Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK Go to the latest version
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

qiskit.dagcircuit.DAGDepNode

class DAGDepNode(type=None, op=None, name=None, qargs=None, cargs=None, condition=None, successors=None, predecessors=None, reachable=None, matchedwith=None, successorstovisit=None, isblocked=None, qindices=None, cindices=None, nid=- 1)

GitHub

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.

__init__

__init__(type=None, op=None, name=None, qargs=None, cargs=None, condition=None, successors=None, predecessors=None, reachable=None, matchedwith=None, successorstovisit=None, isblocked=None, qindices=None, cindices=None, nid=- 1)

Initialize self. See help(type(self)) for accurate signature.


Methods

__init__([type, op, name, qargs, cargs, …])Initialize self.
copy()Function to copy a DAGDepNode object.
semantic_eq(node1, node2)Check if DAG nodes are considered equivalent, e.g., as a node_match for nx.is_isomorphic.

Attributes

cargs
cindices
condition
isblocked
matchedwith
name
node_id
opReturns the Instruction object corresponding to the op for the node, else None
predecessors
qargsReturns list of Qubit, else an empty list.
qindices
reachable
sort_key
successors
successorstovisit
type

copy

copy()

Function to copy a DAGDepNode object. :returns: a copy of a DAGDepNode object. :rtype: DAGDepNode

op

Returns the Instruction object corresponding to the op for the node, else None

qargs

Returns list of Qubit, else an empty list.

semantic_eq

static semantic_eq(node1, node2)

Check if DAG nodes are considered equivalent, e.g., as a node_match for nx.is_isomorphic.

Parameters

Returns

If node1 == node2

Return type

Bool

Was this page helpful?
Report a bug or request content on GitHub.