DAGCircuit.op_nodes¶
- DAGCircuit.op_nodes(op=None, include_directives=True)[source]¶
Get the list of “op” nodes in the dag.
- Parameters
op (qiskit.circuit.Instruction) – op nodes to return. If None, return all op nodes.
include_directives (bool) – include barrier, snapshot etc.
- Returns
the list of node ids containing the given op.
- Return type
list[DAGNode]