Skip to main contentIBM Quantum Documentation
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.

DAG Circuits

qiskit.dagcircuit


Circuits as Directed Acyclic Graphs

DAGCircuitQuantum circuit as a directed acyclic graph.
DAGNodeParent class for DAGOpNode, DAGInNode, and DAGOutNode.
DAGOpNodeObject to represent an Instruction at a node in the DAGCircuit.
DAGInNodeObject to represent an incoming wire node in the DAGCircuit.
DAGOutNodeObject to represent an outgoing wire node in the DAGCircuit.
DAGDepNode([type, op, name, qargs, cargs, ...])Object to represent the information at a node in the DAGDependency().
DAGDependency()Object to represent a quantum circuit as a Directed Acyclic Graph (DAG) via operation dependencies (i.e.

Exceptions

DAGCircuitError

exception qiskit.dagcircuit.DAGCircuitError(*msg)

GitHub

Bases: QiskitError

Base class for errors raised by the DAGCircuit object.

Set the error message.

DAGDependencyError

exception qiskit.dagcircuit.DAGDependencyError(*msg)

GitHub

Bases: QiskitError

Base class for errors raised by the DAGDependency object.

Set the error message.


Utilities

BlockCollapser(dag)This class implements various strategies of consolidating blocks of nodes in a DAG (direct acyclic graph).
BlockCollector(dag)This class implements various strategies of dividing a DAG (direct acyclic graph) into blocks of nodes that satisfy certain criteria.
BlockSplitter()Splits a block of nodes into sub-blocks over disjoint qubits.
Was this page helpful?
Report a bug or request content on GitHub.