-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and expand DAGDependency drawer (#11103)
* Update and expand dag dependency drawer * Increase tolerance * Add conditions and truncate long lists * Lint * Cyclic import * Lint * Reno
- Loading branch information
1 parent
34773f3
commit e7b1f5e
Showing
5 changed files
with
119 additions
and
23 deletions.
There are no files selected for viewing
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
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() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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