Shortcuts

qiskit.dagcircuit.DAGNode

class DAGNode(type=None, op=None, name=None, qargs=None, cargs=None, condition=None, wire=None, nid=- 1)[source]

Object to represent the information at a node in the DAGCircuit.

It is used as the return value from *_nodes() functions and can be supplied to functions that take a node.

Create a node

__init__(type=None, op=None, name=None, qargs=None, cargs=None, condition=None, wire=None, nid=- 1)[source]

Create a node

Methods

__init__([type, op, name, qargs, cargs, …])

Create a node

semantic_eq(node1, node2)

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

Attributes

cargs

condition

name

op

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

qargs

Returns list of Qubit, else an empty list.

sort_key

type

wire

Returns the Bit object, else None.

property op

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

property qargs

Returns list of Qubit, else an empty list.

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 (DAGNode) – A node to compare.

  • node2 (DAGNode) – The other node to compare.

Returns

If node1 == node2

Return type

Bool

property wire

Returns the Bit object, else None.

You are viewing lang: English
Languages
English
Japanese
German
Korean