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.

DAGOpNode

class DAGOpNode(op, qargs=None, cargs=None)

GitHub

Bases: qiskit.dagcircuit.dagnode.DAGNode

Object to represent an Instruction at a node in the DAGCircuit.

Create an Instruction node


Methods

semantic_eq

static DAGOpNode.semantic_eq(node1, node2, bit_indices1=None, bit_indices2=None)

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

Parameters

  • node1 (DAGOpNode, DAGInNode, DAGOutNode) – A node to compare.
  • node2 (DAGOpNode, DAGInNode, DAGOutNode) – The other node to compare.
  • bit_indices1 (dict) – Dictionary mapping Bit instances to their index within the circuit containing node1
  • bit_indices2 (dict) – Dictionary mapping Bit instances to their index within the circuit containing node2

Returns

If node1 == node2

Return type

Bool


Attributes

cargs

condition

Returns the condition of the node.op

name

Returns the Instruction name corresponding to the op for this node

op

qargs

sort_key

type

Returns the type object

wire

Returns the Bit object, else None.

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