-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6610fb7
commit 53381b3
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
releasenotes/notes/update-dag-dependency-drawer-d06d4ae660c1cbc2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
features: | ||
- | | ||
The :func:`.dag_drawer` has been updated for the :class:`.DAGDependency`. These | ||
drawings have a new color scheme, and the nodes now indicate the ``Qubits`` and | ||
``Clbits`` that are used by the node. If the node has a ``condition`` the drawings | ||
will indicate that as well. | ||
.. code-block:: python | ||
from qiskit.circuit import QuantumCircuit | ||
from qiskit.converters import circuit_to_dagdependency | ||
qc = QuantumCircuit(3, 2) | ||
qc.h(0) | ||
qc.cx(0, 1) | ||
qc.cx(0, 2) | ||
qc.x(1) | ||
qc.barrier() | ||
qc.measure(0, 0) | ||
dagdep = circuit_to_dagdependency(qc) | ||
dagdep.draw() |