mirror of https://github.com/Qiskit/qiskit.git
22 lines
727 B
YAML
22 lines
727 B
YAML
---
|
|
features:
|
|
- |
|
|
Added a new keyword argument, ``wire_order``, to the :func:`~.circuit_drawer`
|
|
function and :meth:`.QuantumCircuit.draw` method which allows arbitrarily
|
|
reordering both the quantum and classical bits in the output visualization.
|
|
For example:
|
|
|
|
.. code-block::
|
|
|
|
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
|
|
|
|
qr = QuantumRegister(4, "q")
|
|
cr = ClassicalRegister(4, "c")
|
|
cr2 = ClassicalRegister(2, "ca")
|
|
circuit = QuantumCircuit(qr, cr, cr2)
|
|
circuit.h(0)
|
|
circuit.h(3)
|
|
circuit.x(1)
|
|
circuit.x(3).c_if(cr, 10)
|
|
circuit.draw('mpl', cregbundle=False, wire_order=[2, 1, 3, 0, 6, 8, 9, 5, 4, 7])
|