qiskit.dagcircuit.DAGCircuit.topological_nodes¶
- DAGCircuit.topological_nodes(key=None)[Quellcode]¶
Yield nodes in topological order.
- Parameter
key (Callable) – A callable which will take a DAGNode object and return a string sort key. If not specified the
sort_key
attribute will be used as the sort key for each node.- Rückgabe
node in topological order
- Rückgabetyp
generator(DAGOpNode, DAGInNode, or DAGOutNode)