About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
DAGOpNode
class qiskit.dagcircuit.DAGOpNode
Bases: DAGNode
Object to represent an Instruction at a node in the DAGCircuit.
Attributes
cargs
condition
definition
duration
label
matrix
name
Returns the Instruction name corresponding to the op for this node
num_clbits
num_qubits
op
params
qargs
sort_key
unit
Methods
from_instruction
static from_instruction(instruction, /, *, dag=None, deepcopy=False)
is_control_flow
is_control_flow()
Is the Operation
contained in this node a control-flow operation (i.e. an instance of ControlFlowOp
)?
is_controlled_gate
is_controlled_gate()
Is the Operation
contained in this node a subclass of ControlledGate
?
is_directive
is_directive()
Is the Operation
contained in this node a directive?
is_parameterized
is_parameterized()
Does this node contain any ParameterExpression
parameters?
is_standard_gate
is_standard_gate()
Is the Operation
contained in this node a Qiskit standard gate?
semantic_eq
static semantic_eq(node1, node2, bit_indices1, bit_indices2)
Check if DAG nodes are considered equivalent, e.g., as a node_match for rustworkx.is_isomorphic_node_match()
.
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
Was this page helpful?
Report a bug or request content on GitHub.