DAGDepNode¶
- class qiskit.dagcircuit.DAGDepNode(type=None, op=None, name=None, qargs=(), cargs=(), successors=None, predecessors=None, reachable=None, matchedwith=None, successorstovisit=None, isblocked=None, qindices=None, cindices=None, nid=-1)[source]¶
Bases:
object
Object to represent the information at a node in the DAGDependency().
It is used as the return value from *_nodes() functions and can be supplied to functions that take a node.
Attributes
- type¶
- name¶
- cargs¶
- sort_key¶
- node_id¶
- successors¶
- predecessors¶
- reachable¶
- matchedwith¶
- isblocked¶
- successorstovisit¶
- qindices¶
- cindices¶
- op¶
Returns the Instruction object corresponding to the op for the node, else None
- qargs¶
Returns list of Qubit, else an empty list.
Methods
- copy()[source]¶
Function to copy a DAGDepNode object. :returns: a copy of a DAGDepNode object. :rtype: DAGDepNode
- static semantic_eq(node1, node2)[source]¶
Check if DAG nodes are considered equivalent, e.g., as a node_match for nx.is_isomorphic.
- Parameters:
node1 (DAGDepNode) – A node to compare.
node2 (DAGDepNode) – The other node to compare.
- Returns:
If node1 == node2
- Return type: