mirror of https://github.com/Qiskit/qiskit.git
23 lines
697 B
YAML
23 lines
697 B
YAML
---
|
|
features_visualization:
|
|
- |
|
|
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()
|