Repository: Qiskit/qiskit

Issue:
Problem in drawing circuit for conditional measurement using multiple classical registers
### Information
The `qc.draw()` function does not draw the quantum circuit properly if we change the order of classical registers while initializing the `QuantumCircuit()` instance if there is a measurement in the circuit that is conditioned on the output of some other classical register.

- **Qiskit Terra version**:
```
{'qiskit-terra': '0.17.4', 'qiskit-aer': '0.8.2', 'qiskit-ignis': '0.6.0', 'qiskit-ibmq-provider': '0.14.0', 'qiskit-aqua': '0.9.2', 'qiskit': '0.27.0', 'qiskit-nature': '0.1.3', 'qiskit-finance': None, 'qiskit-optimization': None, 'qiskit-machine-learning': None}
```
- **Python version**: 3.8.6
- **Operating system**: MacOS

### What is the current behavior (and how to reproduce the problem)?
![Screenshot 2021-07-26 at 1 48 35 PM](https://user-images.githubusercontent.com/30632765/126957435-23b69b2f-bd81-4efb-a2b0-ea86c57f8732.png)

Notice that in the above code, we initialize the quantum circuit as:
```py
qc = QuantumCircuit(q_a, q_b, c_a, c_b)
```

However, if we exchange the classical registers while initializing, like so:
```py
qc = QuantumCircuit(q_a, q_b, c_b, c_a)
```
we get this, which is the correct circuit...
![Screenshot 2021-07-26 at 1 48 55 PM](https://user-images.githubusercontent.com/30632765/126957717-dde3ea6a-e7ed-40ff-8f64-a47316a5231d.png)


### What is the expected behavior?
The circuit in the first image should have the arrows going to the classical register `c_b` and the dots going to `c_a`, but here both of them go to `c_a`. 


Discussion:
I can work on this. It may affect all 3 circuit drawers. Thanks for finding it.
> I can work on this. It may affect all 3 circuit drawers. Thanks for finding it.

Hi @enavarro51 , thanks for taking this up!
I checked the "text" circuit drawer and the output of that looked fine to me. However, I didn't check the "latex" option. But anyway you can try both of them out yourself also once :)

Resolving patch:
diff --git a/qiskit/visualization/latex.py b/qiskit/visualization/latex.py
--- a/qiskit/visualization/latex.py
+++ b/qiskit/visualization/latex.py
@@ -22,7 +22,6 @@
 from qiskit.circuit.library.standard_gates import SwapGate, XGate, ZGate, RZZGate, U1Gate, PhaseGate
 from qiskit.circuit.measure import Measure
 from qiskit.visualization.qcstyle import load_style
-from qiskit.visualization import exceptions
 from qiskit.circuit.tools.pi_check import pi_check
 from .utils import get_gate_ctrl_text, get_param_str, generate_latex_label
 
@@ -394,6 +393,10 @@ def _build_latex_array(self):
             for node in layer:
                 op = node.op
                 num_cols_op = 1
+                wire_list = [self.img_regs[qarg] for qarg in node.qargs]
+                if op.condition:
+                    self._add_condition(op, wire_list, column)
+
                 if isinstance(op, Measure):
                     self._build_measure(node, column)
 
@@ -404,15 +407,11 @@ def _build_latex_array(self):
                     gate_text, _, _ = get_gate_ctrl_text(op, "latex", style=self._style)
                     gate_text += get_param_str(op, "latex", ndigits=4)
                     gate_text = generate_latex_label(gate_text)
-                    wire_list = [self.img_regs[qarg] for qarg in node.qargs]
                     if node.cargs:
                         cwire_list = [self.img_regs[carg] for carg in node.cargs]
                     else:
                         cwire_list = []
 
-                    if op.condition:
-                        self._add_condition(op, wire_list, column)
-
                     if len(wire_list) == 1 and not node.cargs:
                         self._latex[wire_list[0]][column] = "\\gate{%s}" % gate_text
 
@@ -531,10 +530,8 @@ def _build_symmetric_gate(self, op, gate_text, wire_list, col):
 
     def _build_measure(self, node, col):
         """Build a meter and the lines to the creg"""
-        if node.op.condition:
-            raise exceptions.VisualizationError("If controlled measures currently not supported.")
-
         wire1 = self.img_regs[node.qargs[0]]
+        self._latex[wire1][col] = "\\meter"
         if self.cregbundle:
             wire2 = len(self.qubit_list)
             cregindex = self.img_regs[node.cargs[0]] - wire2
@@ -544,17 +541,15 @@ def _build_measure(self, node, col):
                     wire2 += 1
                 else:
                     break
-        else:
-            wire2 = self.img_regs[node.cargs[0]]
-
-        self._latex[wire1][col] = "\\meter"
-        if self.cregbundle:
-            self._latex[wire2][col] = "\\dstick{_{_{%s}}} \\cw \\cwx[-%s]" % (
+            cond_offset = 1.5 if node.op.condition else 0.0
+            self._latex[wire2][col] = "\\dstick{_{_{\\hspace{%sem}%s}}} \\cw \\ar @{<=} [-%s,0]" % (
+                cond_offset,
                 str(cregindex),
                 str(wire2 - wire1),
             )
         else:
-            self._latex[wire2][col] = "\\control \\cw \\cwx[-" + str(wire2 - wire1) + "]"
+            wire2 = self.img_regs[node.cargs[0]]
+            self._latex[wire2][col] = "\\cw \\ar @{<=} [-" + str(wire2 - wire1) + ",0]"
 
     def _build_barrier(self, node, col):
         """Build a partial or full barrier if plot_barriers set"""
@@ -612,18 +607,29 @@ def _add_condition(self, op, wire_list, col):
             cwire += 1
 
         gap = cwire - max(wire_list)
+        meas_offset = -0.3 if isinstance(op, Measure) else 0.0
         if self.cregbundle:
-            # Print the condition value at the bottom
-            self._latex[cwire][col] = "\\dstick{_{_{=%s}}} \\cw \\cwx[-%s]" % (
-                str(op.condition[1]),
+            # Print the condition value at the bottom and put bullet on creg line
+            self._latex[cwire][col] = "\\control \\cw^(%s){^{\\mathtt{%s}}} \\cwx[-%s]" % (
+                meas_offset,
+                str(hex(op.condition[1])),
                 str(gap),
             )
         else:
             # Add the open and closed buttons to indicate the condition value
-            for i in range(creg_size):
+            for i in range(creg_size - 1):
                 control = "\\control" if if_value[i] == "1" else "\\controlo"
                 self._latex[cwire + i][col] = f"{control} \\cw \\cwx[-" + str(gap) + "]"
                 gap = 1
+            # Add (hex condition value) below the last cwire
+            control = "\\control" if if_value[creg_size - 1] == "1" else "\\controlo"
+            self._latex[creg_size + cwire - 1][col] = (
+                f"{control}" + " \\cw^(%s){^{\\mathtt{%s}}} \\cwx[-%s]"
+            ) % (
+                meas_offset,
+                str(hex(op.condition[1])),
+                str(gap),
+            )
 
     def _truncate_float(self, matchobj, ndigits=4):
         """Truncate long floats."""
diff --git a/qiskit/visualization/matplotlib.py b/qiskit/visualization/matplotlib.py
--- a/qiskit/visualization/matplotlib.py
+++ b/qiskit/visualization/matplotlib.py
@@ -903,6 +903,8 @@ def _condition(self, node, cond_xy):
                 v_ind += 1
         clbit_b = min(xy_plot, key=lambda xy: xy[1])
         xpos, ypos = clbit_b
+        if isinstance(node.op, Measure):
+            xpos += 0.3
         self._ax.text(
             xpos,
             ypos - 0.3 * HIG,
diff --git a/qiskit/visualization/text.py b/qiskit/visualization/text.py
--- a/qiskit/visualization/text.py
+++ b/qiskit/visualization/text.py
@@ -890,11 +890,6 @@ def draw_wires(self, wires):
 
         return lines
 
-    @staticmethod
-    def label_for_conditional(node):
-        """Creates the label for a conditional instruction."""
-        return "= %s" % node.op.condition[1]
-
     @staticmethod
     def special_label(node):
         """Some instructions have special labels"""
@@ -1384,7 +1379,7 @@ def set_cl_multibox(self, creg, val, top_connect="┴"):
                 label = f"{bit_reg.name}_{bit_index} {label_bool}"
                 self.set_clbit(creg, BoxOnClWire(label=label, top_connect=top_connect))
             else:
-                label = "= %s" % val
+                label = "%s" % str(hex(val))
                 self.set_clbit(creg[0], BoxOnClWire(label=label, top_connect=top_connect))
         else:
             if isinstance(creg, Clbit):
@@ -1410,7 +1405,7 @@ def set_cond_bullets(self, val, clbits):
         for i, bit in enumerate(clbits):
             bot_connect = " "
             if bit == clbits[-1]:
-                bot_connect = "=%s" % str(int(val, 2))
+                bot_connect = "%s" % str(hex(int(val, 2)))
             if vlist[i] == "1":
                 self.set_clbit(bit, ClBullet(top_connect="║", bot_connect=bot_connect))
             elif vlist[i] == "0":


Test patch:
diff --git a/test/ipynb/mpl/circuit/references/measure_cond_false.png b/test/ipynb/mpl/circuit/references/measure_cond_false.png
new file mode 100644
Binary files /dev/null and b/test/ipynb/mpl/circuit/references/measure_cond_false.png differ
diff --git a/test/ipynb/mpl/circuit/references/measure_cond_true.png b/test/ipynb/mpl/circuit/references/measure_cond_true.png
new file mode 100644
Binary files /dev/null and b/test/ipynb/mpl/circuit/references/measure_cond_true.png differ
diff --git a/test/ipynb/mpl/circuit/references/user_ax.png b/test/ipynb/mpl/circuit/references/user_ax.png
Binary files a/test/ipynb/mpl/circuit/references/user_ax.png and b/test/ipynb/mpl/circuit/references/user_ax.png differ
diff --git a/test/ipynb/mpl/circuit/test_circuit_matplotlib_drawer.py b/test/ipynb/mpl/circuit/test_circuit_matplotlib_drawer.py
--- a/test/ipynb/mpl/circuit/test_circuit_matplotlib_drawer.py
+++ b/test/ipynb/mpl/circuit/test_circuit_matplotlib_drawer.py
@@ -625,8 +625,9 @@ def test_user_ax_subplot(self):
 
         fig = plt.figure(1, figsize=(6, 4))
         fig.patch.set_facecolor("white")
-        fig.add_subplot(1, 2, 1)
+        ax1 = fig.add_subplot(1, 2, 1)
         ax2 = fig.add_subplot(1, 2, 2)
+        ax1.plot([1, 2, 3])
 
         circuit = QuantumCircuit(4)
         circuit.h(0)
@@ -646,6 +647,20 @@ def test_figwidth(self):
         circuit.x(2)
         self.circuit_drawer(circuit, style={"figwidth": 5}, filename="figwidth.png")
 
+    def test_measures_with_conditions(self):
+        """Test that a measure containing a condition displays"""
+        qr = QuantumRegister(2, "qr")
+        cr1 = ClassicalRegister(2, "cr1")
+        cr2 = ClassicalRegister(2, "cr2")
+        circuit = QuantumCircuit(qr, cr1, cr2)
+        circuit.h(0)
+        circuit.h(1)
+        circuit.measure(0, cr1[1])
+        circuit.measure(1, cr2[0]).c_if(cr1, 1)
+        circuit.h(0).c_if(cr2, 3)
+        self.circuit_drawer(circuit, cregbundle=False, filename="measure_cond_false.png")
+        self.circuit_drawer(circuit, cregbundle=True, filename="measure_cond_true.png")
+
 
 if __name__ == "__main__":
     unittest.main(verbosity=1)
diff --git a/test/python/visualization/references/test_latex_4597.tex b/test/python/visualization/references/test_latex_4597.tex
--- a/test/python/visualization/references/test_latex_4597.tex
+++ b/test/python/visualization/references/test_latex_4597.tex
@@ -9,6 +9,6 @@
 	 	\nghost{ {q}_{0} :  } & \lstick{ {q}_{0} :  } & \qw & \qw & \qw & \qw\\
 	 	\nghost{ {q}_{1} :  } & \lstick{ {q}_{1} :  } & \qw & \qw & \qw & \qw\\
 	 	\nghost{ {q}_{2} :  } & \lstick{ {q}_{2} :  } & \qw & \gate{\mathrm{X}} & \qw & \qw\\
-	 	\nghost{c:} & \lstick{c:} & \lstick{/_{_{3}}} \cw & \dstick{_{_{=2}}} \cw \cwx[-1] & \cw & \cw\\
+	 	\nghost{c:} & \lstick{c:} & \lstick{/_{_{3}}} \cw & \control \cw^(0.0){^{\mathtt{0x2}}} \cwx[-1] & \cw & \cw\\
 \\ }}
 \end{document}
\ No newline at end of file
diff --git a/test/python/visualization/references/test_latex_boolean_negation.tex b/test/python/visualization/references/test_latex_boolean_negation.tex
deleted file mode 100644
--- a/test/python/visualization/references/test_latex_boolean_negation.tex
+++ /dev/null
@@ -1,26 +0,0 @@
-% \documentclass[preview]{standalone}
-% If the image is too large to fit on this documentclass use
-\documentclass[draft]{beamer}
-% img_width = 4, img_depth = 3
-\usepackage[size=custom,height=10,width=10,scale=0.7]{beamerposter}
-% instead and customize the height and width (in cm) to fit.
-% Large images may run out of memory quickly.
-% To fix this use the LuaLaTeX compiler, which dynamically
-% allocates memory.
-\usepackage[braket, qm]{qcircuit}
-\usepackage{amsmath}
-\pdfmapfile{+sansmathaccent.map}
-% \usepackage[landscape]{geometry}
-% Comment out the above line if using the beamer documentclass.
-\begin{document}
-
-\begin{equation*}
-    \Qcircuit @C=1.0em @R=1.0em @!R {
-	 	\lstick{ {q}_{0} :  } & \multigate{3}{\texttt{$\neg$x\,\&\,(y\,|\,z)}}_<<<{0} & \qw & \qw\\
-	 	\lstick{ {q}_{1} :  } & \ghost{\texttt{$\neg$x\,\&\,(y\,|\,z)}}_<<<{1} & \qw & \qw\\
-	 	\lstick{ {q}_{2} :  } & \ghost{\texttt{$\neg$x\,\&\,(y\,|\,z)}}_<<<{2} & \qw & \qw\\
-	 	\lstick{ {q}_{3} :  } & \ghost{\texttt{$\neg$x\,\&\,(y\,|\,z)}}_<<<{3} & \qw & \qw\\
-	 }
-\end{equation*}
-
-\end{document}
\ No newline at end of file
diff --git a/test/python/visualization/references/test_latex_conditional.tex b/test/python/visualization/references/test_latex_conditional.tex
--- a/test/python/visualization/references/test_latex_conditional.tex
+++ b/test/python/visualization/references/test_latex_conditional.tex
@@ -8,6 +8,6 @@
 \Qcircuit @C=1.0em @R=0.2em @!R { \\
 	 	\nghost{ {q}_{0} :  } & \lstick{ {q}_{0} :  } & \gate{\mathrm{H}} & \meter & \qw & \gate{\mathrm{H}} & \qw & \qw\\
 	 	\nghost{ {q}_{1} :  } & \lstick{ {q}_{1} :  } & \gate{\mathrm{H}} & \qw & \meter & \qw & \qw & \qw\\
-	 	\nghost{c:} & \lstick{c:} & \lstick{/_{_{2}}} \cw & \dstick{_{_{0}}} \cw \cwx[-2] & \dstick{_{_{1}}} \cw \cwx[-1] & \dstick{_{_{=2}}} \cw \cwx[-2] & \cw & \cw\\
+	 	\nghost{c:} & \lstick{c:} & \lstick{/_{_{2}}} \cw & \dstick{_{_{\hspace{0.0em}0}}} \cw \ar @{<=} [-2,0] & \dstick{_{_{\hspace{0.0em}1}}} \cw \ar @{<=} [-1,0] & \control \cw^(0.0){^{\mathtt{0x2}}} \cwx[-2] & \cw & \cw\\
 \\ }}
 \end{document}
\ No newline at end of file
diff --git a/test/python/visualization/references/test_latex_meas_cond_false.tex b/test/python/visualization/references/test_latex_meas_cond_false.tex
new file mode 100644
--- /dev/null
+++ b/test/python/visualization/references/test_latex_meas_cond_false.tex
@@ -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}
\ No newline at end of file
diff --git a/test/python/visualization/references/test_latex_meas_cond_true.tex b/test/python/visualization/references/test_latex_meas_cond_true.tex
new file mode 100644
--- /dev/null
+++ b/test/python/visualization/references/test_latex_meas_cond_true.tex
@@ -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}
\ No newline at end of file
diff --git a/test/python/visualization/references/test_latex_meas_condition.tex b/test/python/visualization/references/test_latex_meas_condition.tex
--- a/test/python/visualization/references/test_latex_meas_condition.tex
+++ b/test/python/visualization/references/test_latex_meas_condition.tex
@@ -8,6 +8,6 @@
 \Qcircuit @C=1.0em @R=0.2em @!R { \\
 	 	\nghost{ {qr}_{0} :  } & \lstick{ {qr}_{0} :  } & \gate{\mathrm{H}} & \meter & \qw & \qw & \qw\\
 	 	\nghost{ {qr}_{1} :  } & \lstick{ {qr}_{1} :  } & \qw & \qw & \gate{\mathrm{H}} & \qw & \qw\\
-	 	\nghost{cr:} & \lstick{cr:} & \lstick{/_{_{2}}} \cw & \dstick{_{_{0}}} \cw \cwx[-2] & \dstick{_{_{=1}}} \cw \cwx[-1] & \cw & \cw\\
+	 	\nghost{cr:} & \lstick{cr:} & \lstick{/_{_{2}}} \cw & \dstick{_{_{\hspace{0.0em}0}}} \cw \ar @{<=} [-2,0] & \control \cw^(0.0){^{\mathtt{0x1}}} \cwx[-1] & \cw & \cw\\
 \\ }}
 \end{document}
\ No newline at end of file
diff --git a/test/python/visualization/references/test_latex_teleport.tex b/test/python/visualization/references/test_latex_teleport.tex
--- a/test/python/visualization/references/test_latex_teleport.tex
+++ b/test/python/visualization/references/test_latex_teleport.tex
@@ -9,6 +9,6 @@
 	 	\nghost{ {q}_{0} :  } & \lstick{ {q}_{0} :  } & \gate{\mathrm{U}\,(\mathrm{0.3,0.2,0.1})} & \qw \barrier[0em]{2} & \qw & \ctrl{1} & \gate{\mathrm{H}} & \meter & \qw & \qw & \qw & \qw & \qw\\
 	 	\nghost{ {q}_{1} :  } & \lstick{ {q}_{1} :  } & \gate{\mathrm{H}} & \ctrl{1} & \qw & \targ & \meter & \qw & \qw & \qw & \qw & \qw & \qw\\
 	 	\nghost{ {q}_{2} :  } & \lstick{ {q}_{2} :  } & \qw & \targ & \qw & \qw & \qw & \qw & \gate{\mathrm{Z}} & \gate{\mathrm{X}} & \meter & \qw & \qw\\
-	 	\nghost{c:} & \lstick{c:} & \lstick{/_{_{3}}} \cw & \cw & \cw & \cw & \dstick{_{_{1}}} \cw \cwx[-2] & \dstick{_{_{0}}} \cw \cwx[-3] & \dstick{_{_{=1}}} \cw \cwx[-1] & \dstick{_{_{=2}}} \cw \cwx[-1] & \dstick{_{_{2}}} \cw \cwx[-1] & \cw & \cw\\
+	 	\nghost{c:} & \lstick{c:} & \lstick{/_{_{3}}} \cw & \cw & \cw & \cw & \dstick{_{_{\hspace{0.0em}1}}} \cw \ar @{<=} [-2,0] & \dstick{_{_{\hspace{0.0em}0}}} \cw \ar @{<=} [-3,0] & \control \cw^(0.0){^{\mathtt{0x1}}} \cwx[-1] & \control \cw^(0.0){^{\mathtt{0x2}}} \cwx[-1] & \dstick{_{_{\hspace{0.0em}2}}} \cw \ar @{<=} [-1,0] & \cw & \cw\\
 \\ }}
 \end{document}
\ No newline at end of file
diff --git a/test/python/visualization/test_circuit_latex.py b/test/python/visualization/test_circuit_latex.py
--- a/test/python/visualization/test_circuit_latex.py
+++ b/test/python/visualization/test_circuit_latex.py
@@ -548,6 +548,24 @@ def test_inst_with_cbits(self):
 
         self.assertEqualToReference(filename)
 
+    def test_measures_with_conditions(self):
+        """Test that a measure containing a condition displays"""
+        filename1 = self._get_resource_path("test_latex_meas_cond_false.tex")
+        filename2 = self._get_resource_path("test_latex_meas_cond_true.tex")
+        qr = QuantumRegister(2, "qr")
+        cr1 = ClassicalRegister(2, "cr1")
+        cr2 = ClassicalRegister(2, "cr2")
+        circuit = QuantumCircuit(qr, cr1, cr2)
+        circuit.h(0)
+        circuit.h(1)
+        circuit.measure(0, cr1[1])
+        circuit.measure(1, cr2[0]).c_if(cr1, 1)
+        circuit.h(0).c_if(cr2, 3)
+        circuit_drawer(circuit, cregbundle=False, filename=filename1, output="latex_source")
+        circuit_drawer(circuit, cregbundle=True, filename=filename2, output="latex_source")
+        self.assertEqualToReference(filename1)
+        self.assertEqualToReference(filename2)
+
 
 if __name__ == "__main__":
     unittest.main(verbosity=2)
diff --git a/test/python/visualization/test_circuit_text_drawer.py b/test/python/visualization/test_circuit_text_drawer.py
--- a/test/python/visualization/test_circuit_text_drawer.py
+++ b/test/python/visualization/test_circuit_text_drawer.py
@@ -1405,7 +1405,7 @@ def test_control_gate_label_with_cond_1_low(self):
                 "        └──╥───┘",
                 "           ║    ",
                 " c_0: 0 ═══■════",
-                "           =1   ",
+                "          0x1   ",
             ]
         )
 
@@ -1430,7 +1430,7 @@ def test_control_gate_label_with_cond_1_low_cregbundle(self):
                 "q_1: |0>┤ my h ├",
                 "        └──╥───┘",
                 "        ┌──╨──┐ ",
-                " c: 0 1/╡ = 1 ╞═",
+                " c: 0 1/╡ 0x1 ╞═",
                 "        └─────┘ ",
             ]
         )
@@ -1457,7 +1457,7 @@ def test_control_gate_label_with_cond_1_med(self):
                 "q_1: |0>┤ my h ├",
                 "        └──╥───┘",
                 " c_0: 0 ═══■════",
-                "           =1   ",
+                "          0x1   ",
             ]
         )
 
@@ -1481,7 +1481,7 @@ def test_control_gate_label_with_cond_1_med_cregbundle(self):
                 "q_1: |0>┤ my h ├",
                 "        └──╥───┘",
                 "        ┌──╨──┐ ",
-                " c: 0 1/╡ = 1 ╞═",
+                " c: 0 1/╡ 0x1 ╞═",
                 "        └─────┘ ",
             ]
         )
@@ -1509,7 +1509,7 @@ def test_control_gate_label_with_cond_1_high(self):
                 "q_1: |0>┤ my h ├",
                 "        └──╥───┘",
                 " c_0: 0 ═══■════",
-                "           =1   ",
+                "          0x1   ",
             ]
         )
 
@@ -1532,7 +1532,7 @@ def test_control_gate_label_with_cond_1_high_cregbundle(self):
                 "        ┌──┴───┐",
                 "q_1: |0>┤ my h ├",
                 "        ├──╨──┬┘",
-                " c: 0 1/╡ = 1 ╞═",
+                " c: 0 1/╡ 0x1 ╞═",
                 "        └─────┘ ",
             ]
         )
@@ -1560,7 +1560,7 @@ def test_control_gate_label_with_cond_2_med(self):
                 "         my ch  ",
                 "           ║    ",
                 " c_0: 0 ═══■════",
-                "           =1   ",
+                "          0x1   ",
             ]
         )
 
@@ -1584,7 +1584,7 @@ def test_control_gate_label_with_cond_2_med_cregbundle(self):
                 "q_1: |0>───■────",
                 "         my ch  ",
                 "        ┌──╨──┐ ",
-                " c: 0 1/╡ = 1 ╞═",
+                " c: 0 1/╡ 0x1 ╞═",
                 "        └─────┘ ",
             ]
         )
@@ -1614,7 +1614,7 @@ def test_control_gate_label_with_cond_2_low(self):
                 "         my ch  ",
                 "           ║    ",
                 " c_0: 0 ═══■════",
-                "           =1   ",
+                "          0x1   ",
             ]
         )
 
@@ -1639,7 +1639,7 @@ def test_control_gate_label_with_cond_2_low_cregbundle(self):
                 "q_1: |0>───■────",
                 "         my ch  ",
                 "        ┌──╨──┐ ",
-                " c: 0 1/╡ = 1 ╞═",
+                " c: 0 1/╡ 0x1 ╞═",
                 "        └─────┘ ",
             ]
         )
@@ -1746,10 +1746,10 @@ def test_text_conditional_1(self):
                 "        └─╥─┘└─╥─┘",
                 "          ║    ║  ",
                 "c0_0: 0 ══■════╬══",
-                "          =1   ║  ",
+                "         0x1   ║  ",
                 "               ║  ",
                 "c1_0: 0 ═══════■══",
-                "               =1 ",
+                "              0x1 ",
             ]
         )
 
@@ -1773,10 +1773,10 @@ def test_text_conditional_1_bundle(self):
                 "q_0: |0>─┤ X ├──┤ X ├─",
                 "         └─╥─┘  └─╥─┘ ",
                 "        ┌──╨──┐   ║   ",
-                "c0: 0 1/╡ = 1 ╞═══╬═══",
+                "c0: 0 1/╡ 0x1 ╞═══╬═══",
                 "        └─────┘   ║   ",
                 "               ┌──╨──┐",
-                "c1: 0 1/═══════╡ = 1 ╞",
+                "c1: 0 1/═══════╡ 0x1 ╞",
                 "               └─────┘",
             ]
         )
@@ -1815,7 +1815,7 @@ def test_text_conditional_reverse_bits_true(self):
                 " cr_1: 0 ═══════════╩════════■══",
                 "                             ║  ",
                 " cr_0: 0 ════════════════════o══",
-                "                             =2 ",
+                "                            0x2 ",
             ]
         )
 
@@ -1849,7 +1849,7 @@ def test_text_conditional_reverse_bits_false(self):
                 " cr_0: 0 ═══════╬════o══",
                 "                ║    ║  ",
                 " cr_1: 0 ═══════╩════■══",
-                "                     =2 ",
+                "                    0x2 ",
                 "cr2_0: 0 ═══════════════",
                 "                        ",
             ]
@@ -1910,12 +1910,12 @@ def test_text_conditional_1(self):
                 "q_0: |0>┤ X ├┤ X ├",
                 "        └─╥─┘└─╥─┘",
                 "c0_0: 0 ══■════╬══",
-                "          =1   ║  ",
+                "         0x1   ║  ",
+                "               ║  ",
                 "c1_0: 0 ═══════■══",
-                "               =1 ",
+                "              0x1 ",
             ]
         )
-
         circuit = QuantumCircuit.from_qasm_str(qasm_string)
         self.assertEqual(
             str(_text_circuit_drawer(circuit, vertical_compression="medium")), expected
@@ -1938,9 +1938,9 @@ def test_text_conditional_1_bundle(self):
                 "q_0: |0>─┤ X ├──┤ X ├─",
                 "         └─╥─┘  └─╥─┘ ",
                 "        ┌──╨──┐   ║   ",
-                "c0: 0 1/╡ = 1 ╞═══╬═══",
+                "c0: 0 1/╡ 0x1 ╞═══╬═══",
                 "        └─────┘┌──╨──┐",
-                "c1: 0 1/═══════╡ = 1 ╞",
+                "c1: 0 1/═══════╡ 0x1 ╞",
                 "               └─────┘",
             ]
         )
@@ -1975,7 +1975,7 @@ def test_text_measure_with_spaces(self):
                 " c_1: 0 ═╩═══o══",
                 "             ║  ",
                 " c_2: 0 ═════o══",
-                "             =1 ",
+                "            0x1 ",
             ]
         )
         circuit = QuantumCircuit.from_qasm_str(qasm_string)
@@ -2003,7 +2003,7 @@ def test_text_measure_with_spaces_bundle(self):
                 "q_1: |0>─╫──┤ X ├─",
                 "         ║  └─╥─┘ ",
                 "         ║ ┌──╨──┐",
-                " c: 0 3/═╩═╡ = 1 ╞",
+                " c: 0 3/═╩═╡ 0x1 ╞",
                 "         1 └─────┘",
             ]
         )
@@ -2033,9 +2033,9 @@ def test_text_conditional_1_cregbundle(self):
                 "         ┌───┐  ┌───┐ ",
                 "q_0: |0>─┤ X ├──┤ X ├─",
                 "        ┌┴─╨─┴┐ └─╥─┘ ",
-                "c0: 0 1/╡ = 1 ╞═══╬═══",
+                "c0: 0 1/╡ 0x1 ╞═══╬═══",
                 "        └─────┘┌──╨──┐",
-                "c1: 0 1/═══════╡ = 1 ╞",
+                "c1: 0 1/═══════╡ 0x1 ╞",
                 "               └─────┘",
             ]
         )
@@ -2060,9 +2060,9 @@ def test_text_conditional_1(self):
                 "q_0: |0>┤ X ├┤ X ├",
                 "        └─╥─┘└─╥─┘",
                 "c0_0: 0 ══■════╬══",
-                "          =1   ║  ",
+                "         0x1   ║  ",
                 "c1_0: 0 ═══════■══",
-                "               =1 ",
+                "              0x1 ",
             ]
         )
 
@@ -2085,9 +2085,9 @@ def test_text_conditional_2_cregbundle(self):
                 "         ┌───┐  ┌───┐ ",
                 "q_0: |0>─┤ X ├──┤ X ├─",
                 "        ┌┴─╨─┴┐ └─╥─┘ ",
-                "c0: 0 2/╡ = 2 ╞═══╬═══",
+                "c0: 0 2/╡ 0x2 ╞═══╬═══",
                 "        └─────┘┌──╨──┐",
-                "c1: 0 2/═══════╡ = 2 ╞",
+                "c1: 0 2/═══════╡ 0x2 ╞",
                 "               └─────┘",
             ]
         )
@@ -2113,11 +2113,11 @@ def test_text_conditional_2(self):
                 "c0_0: 0 ══o════╬══",
                 "          ║    ║  ",
                 "c0_1: 0 ══■════╬══",
-                "          =2   ║  ",
+                "         0x2   ║  ",
                 "c1_0: 0 ═══════o══",
                 "               ║  ",
                 "c1_1: 0 ═══════■══",
-                "               =2 ",
+                "              0x2 ",
             ]
         )
         circuit = QuantumCircuit.from_qasm_str(qasm_string)
@@ -2139,9 +2139,9 @@ def test_text_conditional_3_cregbundle(self):
                 "         ┌───┐  ┌───┐ ",
                 "q_0: |0>─┤ X ├──┤ X ├─",
                 "        ┌┴─╨─┴┐ └─╥─┘ ",
-                "c0: 0 3/╡ = 3 ╞═══╬═══",
+                "c0: 0 3/╡ 0x3 ╞═══╬═══",
                 "        └─────┘┌──╨──┐",
-                "c1: 0 3/═══════╡ = 3 ╞",
+                "c1: 0 3/═══════╡ 0x3 ╞",
                 "               └─────┘",
             ]
         )
@@ -2169,13 +2169,13 @@ def test_text_conditional_3(self):
                 "c0_1: 0 ══■════╬══",
                 "          ║    ║  ",
                 "c0_2: 0 ══o════╬══",
-                "          =3   ║  ",
+                "         0x3   ║  ",
                 "c1_0: 0 ═══════■══",
                 "               ║  ",
                 "c1_1: 0 ═══════■══",
                 "               ║  ",
                 "c1_2: 0 ═══════o══",
-                "               =3 ",
+                "              0x3 ",
             ]
         )
         circuit = QuantumCircuit.from_qasm_str(qasm_string)
@@ -2204,7 +2204,7 @@ def test_text_conditional_4(self):
                 "c0_2: 0 ══■════╬══",
                 "          ║    ║  ",
                 "c0_3: 0 ══o════╬══",
-                "          =4   ║  ",
+                "         0x4   ║  ",
                 "c1_0: 0 ═══════o══",
                 "               ║  ",
                 "c1_1: 0 ═══════o══",
@@ -2212,7 +2212,7 @@ def test_text_conditional_4(self):
                 "c1_2: 0 ═══════■══",
                 "               ║  ",
                 "c1_3: 0 ═══════o══",
-                "               =4 ",
+                "              0x4 ",
             ]
         )
         circuit = QuantumCircuit.from_qasm_str(qasm_string)
@@ -2243,7 +2243,7 @@ def test_text_conditional_5(self):
                 "c0_3: 0 ══o════╬══",
                 "          ║    ║  ",
                 "c0_4: 0 ══o════╬══",
-                "          =5   ║  ",
+                "         0x5   ║  ",
                 "c1_0: 0 ═══════■══",
                 "               ║  ",
                 "c1_1: 0 ═══════o══",
@@ -2253,7 +2253,7 @@ def test_text_conditional_5(self):
                 "c1_3: 0 ═══════o══",
                 "               ║  ",
                 "c1_4: 0 ═══════o══",
-                "               =5 ",
+                "              0x5 ",
             ]
         )
         circuit = QuantumCircuit.from_qasm_str(qasm_string)
@@ -2273,7 +2273,7 @@ def test_text_conditional_cz_no_space_cregbundle(self):
                 "            │   ",
                 "qr_1: |0>───■───",
                 "         ┌──╨──┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2289,13 +2289,13 @@ def test_text_conditional_cz_no_space(self):
 
         expected = "\n".join(
             [
-                "             ",
-                "qr_0: |0>─■──",
-                "          │  ",
-                "qr_1: |0>─■──",
-                "          ║  ",
-                " cr_0: 0 ═■══",
-                "          =1 ",
+                "              ",
+                "qr_0: |0>──■──",
+                "           │  ",
+                "qr_1: |0>──■──",
+                "           ║  ",
+                " cr_0: 0 ══■══",
+                "          0x1 ",
             ]
         )
 
@@ -2317,7 +2317,7 @@ def test_text_conditional_cz_cregbundle(self):
                 "            ║   ",
                 "qr_2: |0>───╫───",
                 "         ┌──╨──┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2333,15 +2333,15 @@ def test_text_conditional_cz(self):
 
         expected = "\n".join(
             [
-                "             ",
-                "qr_0: |0>─■──",
-                "          │  ",
-                "qr_1: |0>─■──",
-                "          ║  ",
-                "qr_2: |0>─╫──",
-                "          ║  ",
-                " cr_0: 0 ═■══",
-                "          =1 ",
+                "              ",
+                "qr_0: |0>──■──",
+                "           │  ",
+                "qr_1: |0>──■──",
+                "           ║  ",
+                "qr_2: |0>──╫──",
+                "           ║  ",
+                " cr_0: 0 ══■══",
+                "          0x1 ",
             ]
         )
 
@@ -2363,7 +2363,7 @@ def test_text_conditional_cx_ct_cregbundle(self):
                 "          └─╥─┘ ",
                 "qr_2: |0>───╫───",
                 "         ┌──╨──┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2387,7 +2387,7 @@ def test_text_conditional_cx_ct(self):
                 "qr_2: |0>──╫──",
                 "           ║  ",
                 " cr_0: 0 ══■══",
-                "           =1 ",
+                "          0x1 ",
             ]
         )
 
@@ -2409,7 +2409,7 @@ def test_text_conditional_cx_tc_cregbundle(self):
                 "            ║   ",
                 "qr_2: |0>───╫───",
                 "         ┌──╨──┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2433,7 +2433,7 @@ def test_text_conditional_cx_tc(self):
                 "qr_2: |0>──╫──",
                 "           ║  ",
                 " cr_0: 0 ══■══",
-                "           =1 ",
+                "          0x1 ",
             ]
         )
 
@@ -2455,7 +2455,7 @@ def test_text_conditional_cu3_ct_cregbundle(self):
                 "         └────────╥────────┘",
                 "qr_2: |0>─────────╫─────────",
                 "               ┌──╨──┐      ",
-                " cr: 0 1/══════╡ = 1 ╞══════",
+                " cr: 0 1/══════╡ 0x1 ╞══════",
                 "               └─────┘      ",
             ]
         )
@@ -2479,7 +2479,7 @@ def test_text_conditional_cu3_ct(self):
                 "qr_2: |0>─────────╫─────────",
                 "                  ║         ",
                 " cr_0: 0 ═════════■═════════",
-                "                  =1        ",
+                "                 0x1        ",
             ]
         )
 
@@ -2501,7 +2501,7 @@ def test_text_conditional_cu3_tc_cregbundle(self):
                 "                  ║         ",
                 "qr_2: |0>─────────╫─────────",
                 "               ┌──╨──┐      ",
-                " cr: 0 1/══════╡ = 1 ╞══════",
+                " cr: 0 1/══════╡ 0x1 ╞══════",
                 "               └─────┘      ",
             ]
         )
@@ -2525,7 +2525,7 @@ def test_text_conditional_cu3_tc(self):
                 "qr_2: |0>─────────╫─────────",
                 "                  ║         ",
                 " cr_0: 0 ═════════■═════════",
-                "                  =1        ",
+                "                 0x1        ",
             ]
         )
 
@@ -2549,7 +2549,7 @@ def test_text_conditional_ccx_cregbundle(self):
                 "          └─╥─┘ ",
                 "qr_3: |0>───╫───",
                 "         ┌──╨──┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2575,7 +2575,7 @@ def test_text_conditional_ccx(self):
                 "qr_3: |0>──╫──",
                 "           ║  ",
                 " cr_0: 0 ══■══",
-                "           =1 ",
+                "          0x1 ",
             ]
         )
 
@@ -2597,7 +2597,7 @@ def test_text_conditional_ccx_no_space_cregbundle(self):
                 "          ┌─┴─┐ ",
                 "qr_2: |0>─┤ X ├─",
                 "         ┌┴─╨─┴┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2621,7 +2621,7 @@ def test_text_conditional_ccx_no_space(self):
                 "qr_2: |0>┤ X ├",
                 "         └─╥─┘",
                 " cr_0: 0 ══■══",
-                "           =1 ",
+                "          0x1 ",
             ]
         )
 
@@ -2641,7 +2641,7 @@ def test_text_conditional_h_cregbundle(self):
                 "          └─╥─┘ ",
                 "qr_1: |0>───╫───",
                 "         ┌──╨──┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2663,7 +2663,7 @@ def test_text_conditional_h(self):
                 "qr_1: |0>──╫──",
                 "           ║  ",
                 " cr_0: 0 ══■══",
-                "           =1 ",
+                "          0x1 ",
             ]
         )
 
@@ -2685,7 +2685,7 @@ def test_text_conditional_swap_cregbundle(self):
                 "            ║   ",
                 "qr_2: |0>───╫───",
                 "         ┌──╨──┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2701,15 +2701,15 @@ def test_text_conditional_swap(self):
 
         expected = "\n".join(
             [
-                "             ",
-                "qr_0: |0>─X──",
-                "          │  ",
-                "qr_1: |0>─X──",
-                "          ║  ",
-                "qr_2: |0>─╫──",
-                "          ║  ",
-                " cr_0: 0 ═■══",
-                "          =1 ",
+                "              ",
+                "qr_0: |0>──X──",
+                "           │  ",
+                "qr_1: |0>──X──",
+                "           ║  ",
+                "qr_2: |0>──╫──",
+                "           ║  ",
+                " cr_0: 0 ══■══",
+                "          0x1 ",
             ]
         )
 
@@ -2733,7 +2733,7 @@ def test_text_conditional_cswap_cregbundle(self):
                 "            ║   ",
                 "qr_3: |0>───╫───",
                 "         ┌──╨──┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2749,17 +2749,17 @@ def test_text_conditional_cswap(self):
 
         expected = "\n".join(
             [
-                "             ",
-                "qr_0: |0>─■──",
-                "          │  ",
-                "qr_1: |0>─X──",
-                "          │  ",
-                "qr_2: |0>─X──",
-                "          ║  ",
-                "qr_3: |0>─╫──",
-                "          ║  ",
-                " cr_0: 0 ═■══",
-                "          =1 ",
+                "              ",
+                "qr_0: |0>──■──",
+                "           │  ",
+                "qr_1: |0>──X──",
+                "           │  ",
+                "qr_2: |0>──X──",
+                "           ║  ",
+                "qr_3: |0>──╫──",
+                "           ║  ",
+                " cr_0: 0 ══■══",
+                "          0x1 ",
             ]
         )
 
@@ -2780,7 +2780,7 @@ def test_conditional_reset_cregbundle(self):
                 "            ║   ",
                 "qr_1: |0>───╫───",
                 "         ┌──╨──┐",
-                " cr: 0 1/╡ = 1 ╞",
+                " cr: 0 1/╡ 0x1 ╞",
                 "         └─────┘",
             ]
         )
@@ -2803,7 +2803,7 @@ def test_conditional_reset(self):
                 "qr_1: |0>──╫──",
                 "           ║  ",
                 " cr_0: 0 ══■══",
-                "           =1 ",
+                "          0x1 ",
             ]
         )
 
@@ -2827,7 +2827,7 @@ def test_conditional_multiplexer_cregbundle(self):
                 "         └──────╥───────┘",
                 "qr_2: |0>───────╫────────",
                 "             ┌──╨──┐     ",
-                " cr: 0 1/════╡ = 1 ╞═════",
+                " cr: 0 1/════╡ 0x1 ╞═════",
                 "             └─────┘     ",
             ]
         )
@@ -2853,9 +2853,9 @@ def test_conditional_multiplexer(self):
                 "qr_2: |0>───────╫────────",
                 "                ║        ",
                 " cr_0: 0 ═══════■════════",
-                "                =1       ",
+                "               0x1       ",
                 "             ┌──╨──┐     ",
-                " cr_0: 0 ════╡ = 1 ╞═════",
+                " cr_0: 0 ════╡ 0x1 ╞═════",
                 "             └─────┘     ",
             ]
         )
@@ -2878,7 +2878,7 @@ def test_text_conditional_measure_cregbundle(self):
                 "         └───┘└╥┘ ┌───┐ ",
                 "qr_1: |0>──────╫──┤ H ├─",
                 "               ║ ┌┴─╨─┴┐",
-                " cr: 0 2/══════╩═╡ = 1 ╞",
+                " cr: 0 2/══════╩═╡ 0x1 ╞",
                 "               0 └─────┘",
             ]
         )
@@ -2904,7 +2904,7 @@ def test_text_conditional_measure(self):
                 " cr_0: 0 ══════╩═══■══",
                 "                   ║  ",
                 " cr_1: 0 ══════════o══",
-                "                   =1 ",
+                "                  0x1 ",
             ]
         )
 
@@ -2927,9 +2927,9 @@ def test_text_bit_conditional(self):
                 "qr_1: |0>──╫──┤ H ├",
                 "           ║  └─╥─┘",
                 " cr_0: 0 ══■════╬══",
-                "           =1   ║  ",
+                "          0x1   ║  ",
                 " cr_1: 0 ═══════o══",
-                "                =0 ",
+                "               0x0 ",
             ]
         )
 
@@ -2981,7 +2981,7 @@ def test_text_conditional_reverse_bits_1(self):
                 " cr_1: 0 ══════╬═══o══",
                 "               ║   ║  ",
                 " cr_0: 0 ══════╩═══■══",
-                "                   =1 ",
+                "                  0x1 ",
             ]
         )
 
@@ -3013,7 +3013,7 @@ def test_text_conditional_reverse_bits_2(self):
                 " cr_1: 0 ══■════o════■════■══",
                 "           ║    ║    ║    ║  ",
                 " cr_0: 0 ══o════■════o════■══",
-                "           =6   =1   =2   =3 ",
+                "          0x6  0x1  0x2  0x3 ",
             ]
         )
 
@@ -3825,17 +3825,17 @@ def test_cccz_conditional(self):
         """Closed-Open controlled Z (with conditional)"""
         expected = "\n".join(
             [
-                "            ",
-                "q_0: |0>─■──",
-                "         │  ",
-                "q_1: |0>─o──",
-                "         │  ",
-                "q_2: |0>─■──",
-                "         │  ",
-                "q_3: |0>─■──",
-                "         ║  ",
-                " c_0: 0 ═■══",
-                "         =1 ",
+                "             ",
+                "q_0: |0>──■──",
+                "          │  ",
+                "q_1: |0>──o──",
+                "          │  ",
+                "q_2: |0>──■──",
+                "          │  ",
+                "q_3: |0>──■──",
+                "          ║  ",
+                " c_0: 0 ══■══",
+                "         0x1 ",
             ]
         )
         qr = QuantumRegister(4, "q")