-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dag In/Out nodes should have op and/or names #8314
Comments
Bumping this as I am running into this issue once again. |
In particular, they should be given a name |
Honestly, this doesn't seem like a good idea to me. The in and out nodes not being operations is an important part of the DAG structure, and operations acting on the DAG must be aware of that. If we add dummy If you want to do this in your own code, would explicitly doing name = getattr(dag_node, "name", None) or similar work for you? (Also, |
|
Hmm, let me see if those work. Basically I want to do something like check the names of a call like |
Perhaps an alternative here could be to add keywords to |
We have discussed adding |
That would be a nice solution as well. |
What should we add?
Currently
DAGOutNode
andDAGInNode
have noop
orname
attributes. This makes looking for specific operations more difficult than it has to be, and one must always do a type check first. For example:https://github.com/Qiskit/qiskit-terra/blob/16169de38ba858747e796a2acb5c96f8f37cb3b9/qiskit/dagcircuit/dagcircuit.py#L1404
It would be nice if they could be set as
None
ops and/or be given names likein
/'out
so that they can easily be directly checked.The text was updated successfully, but these errors were encountered: