forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Qiskit/main
Fix measure with condition display in mpl and latex drawers (Qiskit#6822)
- Loading branch information
Showing
17 changed files
with
229 additions
and
172 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
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
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
17 changes: 17 additions & 0 deletions
17
releasenotes/notes/fix-display-measure-condition-139ddbb8c7ae4071.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,17 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed an issue with the :func:`~qiskit.visualization.circuit_drawer` | ||
function and :meth:`~qiskit.circuit.QuantumCircuit.draw` method of | ||
:class:`~qiskit.circuit.QuantumCircuit`. When displaying a ``measure`` | ||
instruction containing a classical ``condition`` using the ``mpl`` or | ||
``latex`` options, the ``condition`` information would sometimes | ||
overwrite the ``measure`` display. | ||
fixes: | ||
- | | ||
Fixed an issue with the :func:`~qiskit.visualization.circuit_drawer` | ||
function and :meth:`~qiskit.circuit.QuantumCircuit.draw` method of | ||
:class:`~qiskit.circuit.QuantumCircuit`. The ``mpl`` drawer used hex | ||
notation to display the ``condition`` value, whereas the ``text`` and | ||
``latex`` drawers used decimal notation. Now all three drawers use | ||
hex notation. |
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.
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
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
26 changes: 0 additions & 26 deletions
26
test/python/visualization/references/test_latex_boolean_negation.tex
This file was deleted.
Oops, something went wrong.
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
16 changes: 16 additions & 0 deletions
16
test/python/visualization/references/test_latex_meas_cond_false.tex
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,16 @@ | ||
\documentclass[border=2px]{standalone} | ||
|
||
\usepackage[braket, qm]{qcircuit} | ||
\usepackage{graphicx} | ||
|
||
\begin{document} | ||
\scalebox{1.0}{ | ||
\Qcircuit @C=1.0em @R=0.2em @!R { \\ | ||
\nghost{ {qr}_{0} : } & \lstick{ {qr}_{0} : } & \gate{\mathrm{H}} & \meter & \qw & \gate{\mathrm{H}} & \qw & \qw\\ | ||
\nghost{ {qr}_{1} : } & \lstick{ {qr}_{1} : } & \gate{\mathrm{H}} & \qw & \meter & \qw & \qw & \qw\\ | ||
\nghost{cr1_{0}:} & \lstick{cr1_{0}:} & \cw & \cw & \control \cw \cwx[-1] & \cw & \cw & \cw\\ | ||
\nghost{cr1_{1}:} & \lstick{cr1_{1}:} & \cw & \cw \ar @{<=} [-3,0] & \controlo \cw^(-0.3){^{\mathtt{0x1}}} \cwx[-1] & \cw & \cw & \cw\\ | ||
\nghost{cr2_{0}:} & \lstick{cr2_{0}:} & \cw & \cw & \cw \ar @{<=} [-3,0] & \control \cw \cwx[-4] & \cw & \cw\\ | ||
\nghost{cr2_{1}:} & \lstick{cr2_{1}:} & \cw & \cw & \cw & \control \cw^(0.0){^{\mathtt{0x3}}} \cwx[-1] & \cw & \cw\\ | ||
\\ }} | ||
\end{document} |
14 changes: 14 additions & 0 deletions
14
test/python/visualization/references/test_latex_meas_cond_true.tex
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,14 @@ | ||
\documentclass[border=2px]{standalone} | ||
|
||
\usepackage[braket, qm]{qcircuit} | ||
\usepackage{graphicx} | ||
|
||
\begin{document} | ||
\scalebox{1.0}{ | ||
\Qcircuit @C=1.0em @R=0.2em @!R { \\ | ||
\nghost{ {qr}_{0} : } & \lstick{ {qr}_{0} : } & \gate{\mathrm{H}} & \meter & \qw & \gate{\mathrm{H}} & \qw & \qw\\ | ||
\nghost{ {qr}_{1} : } & \lstick{ {qr}_{1} : } & \gate{\mathrm{H}} & \qw & \meter & \qw & \qw & \qw\\ | ||
\nghost{cr1:} & \lstick{cr1:} & \lstick{/_{_{2}}} \cw & \dstick{_{_{\hspace{0.0em}1}}} \cw \ar @{<=} [-2,0] & \control \cw^(-0.3){^{\mathtt{0x1}}} \cwx[-1] & \cw & \cw & \cw\\ | ||
\nghost{cr2:} & \lstick{cr2:} & \lstick{/_{_{2}}} \cw & \cw & \dstick{_{_{\hspace{1.5em}0}}} \cw \ar @{<=} [-2,0] & \control \cw^(0.0){^{\mathtt{0x3}}} \cwx[-3] & \cw & \cw\\ | ||
\\ }} | ||
\end{document} |
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
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
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
Oops, something went wrong.