Repository: Qiskit/qiskit

Issue:
[mpl and latex circuit drawer] The box needs to extend over the classical registers as well when an instruction has classical parameters
_Originally posted by @ajavadia in https://github.com/Qiskit/qiskit-terra/issues/2973#issuecomment-521635150_

> No mpl and latex also need to be fixed. The box needs to extend over the classical registers as well. But at least they draw something. I would say text is priority since that's the default drawer.




Discussion:
I think the part of this issue dealing with the latex drawer is the same as that of #3202 . Or am I missing something?

Resolving patch:
diff --git a/qiskit/visualization/matplotlib.py b/qiskit/visualization/matplotlib.py
--- a/qiskit/visualization/matplotlib.py
+++ b/qiskit/visualization/matplotlib.py
@@ -182,6 +182,7 @@ def __init__(
         self._ax.tick_params(labelbottom=False, labeltop=False, labelleft=False, labelright=False)
         self._initial_state = initial_state
         self._cregbundle = cregbundle
+        self._set_cregbundle()
         self._global_phase = global_phase
 
         self._ast = None
@@ -311,6 +312,24 @@ def _registers(self, clbit, qubit):
         for r in qubit:
             self._qubit.append(r)
 
+    def _set_cregbundle(self):
+        """Sets the cregbundle to False if there is any instruction that
+        needs access to individual clbit."""
+        for layer in self._ops:
+            for op in layer:
+                if op.cargs and op.name != "measure":
+                    self._cregbundle = False
+                    warn(
+                        "Cregbundle set to False since an instruction needs to refer"
+                        " to individual classical wire",
+                        RuntimeWarning,
+                        2,
+                    )
+                    break
+            else:
+                continue
+            break
+
     @property
     def ast(self):
         """AST getter"""
@@ -510,10 +529,16 @@ def _get_colors(self, op):
         sc = gt
         return fc, ec, gt, self._style["tc"], sc, lc
 
-    def _multiqubit_gate(self, xy, fc=None, ec=None, gt=None, sc=None, text="", subtext=""):
+    def _multiqubit_gate(
+        self, xy, c_xy=None, fc=None, ec=None, gt=None, sc=None, text="", subtext=""
+    ):
         xpos = min([x[0] for x in xy])
         ypos = min([y[1] for y in xy])
         ypos_max = max([y[1] for y in xy])
+        if c_xy:
+            cxpos = min([x[0] for x in c_xy])
+            cypos = min([y[1] for y in c_xy])
+            ypos = min(ypos, cypos)
         fs = self._style["fs"]
         sfs = self._style["sfs"]
 
@@ -548,6 +573,20 @@ def _multiqubit_gate(self, xy, fc=None, ec=None, gt=None, sc=None, text="", subt
                 clip_on=True,
                 zorder=PORDER_TEXT,
             )
+        if c_xy:
+            # annotate classical inputs
+            for bit, y in enumerate([x[1] for x in c_xy]):
+                self._ax.text(
+                    cxpos + 0.07 - 0.5 * wid,
+                    y,
+                    str(bit),
+                    ha="left",
+                    va="center",
+                    fontsize=fs,
+                    color=gt,
+                    clip_on=True,
+                    zorder=PORDER_TEXT,
+                )
         if text:
             if subtext:
                 self._ax.text(
@@ -1374,7 +1413,7 @@ def _draw_ops(self, verbose=False):
                 #
                 # draw single qubit gates
                 #
-                elif len(q_xy) == 1:
+                elif len(q_xy) == 1 and not op.cargs:
                     self._gate(
                         q_xy[0], fc=fc, ec=ec, gt=gt, sc=sc, text=gate_text, subtext=str(param)
                     )
@@ -1487,7 +1526,14 @@ def _draw_ops(self, verbose=False):
                 # draw multi-qubit gate as final default
                 else:
                     self._multiqubit_gate(
-                        q_xy, fc=fc, ec=ec, gt=gt, sc=sc, text=gate_text, subtext="{}".format(param)
+                        q_xy,
+                        c_xy,
+                        fc=fc,
+                        ec=ec,
+                        gt=gt,
+                        sc=sc,
+                        text=gate_text,
+                        subtext="{}".format(param),
                     )
 
             # adjust the column if there have been barriers encountered, but not plotted


Test patch:
diff --git a/test/ipynb/mpl/references/instruction_1q_1c.png b/test/ipynb/mpl/references/instruction_1q_1c.png
new file mode 100644
Binary files /dev/null and b/test/ipynb/mpl/references/instruction_1q_1c.png differ
diff --git a/test/ipynb/mpl/references/instruction_3q_3c_circ1.png b/test/ipynb/mpl/references/instruction_3q_3c_circ1.png
new file mode 100644
Binary files /dev/null and b/test/ipynb/mpl/references/instruction_3q_3c_circ1.png differ
diff --git a/test/ipynb/mpl/references/instruction_3q_3c_circ2.png b/test/ipynb/mpl/references/instruction_3q_3c_circ2.png
new file mode 100644
Binary files /dev/null and b/test/ipynb/mpl/references/instruction_3q_3c_circ2.png differ
diff --git a/test/ipynb/mpl/references/instruction_3q_3c_circ3.png b/test/ipynb/mpl/references/instruction_3q_3c_circ3.png
new file mode 100644
Binary files /dev/null and b/test/ipynb/mpl/references/instruction_3q_3c_circ3.png differ
diff --git a/test/ipynb/mpl/test_circuit_matplotlib_drawer.py b/test/ipynb/mpl/test_circuit_matplotlib_drawer.py
--- a/test/ipynb/mpl/test_circuit_matplotlib_drawer.py
+++ b/test/ipynb/mpl/test_circuit_matplotlib_drawer.py
@@ -549,6 +549,46 @@ def test_6095(self):
             filename="6095.png",
         )
 
+    def test_instruction_1q_1c(self):
+        """Tests q0-cr0 instruction on a circuit"""
+        qr = QuantumRegister(2, "qr")
+        cr = ClassicalRegister(2, "cr")
+        circuit = QuantumCircuit(qr, cr)
+        inst = QuantumCircuit(1, 1, name="Inst").to_instruction()
+        circuit.append(inst, [qr[0]], [cr[0]])
+        self.circuit_drawer(circuit, filename="instruction_1q_1c.png")
+
+    def test_instruction_3q_3c_circ1(self):
+        """Tests q0-q1-q2-cr_20-cr0-cr1 instruction on a circuit"""
+        qr = QuantumRegister(4, "qr")
+        cr = ClassicalRegister(2, "cr")
+        cr2 = ClassicalRegister(2, "cr2")
+        circuit = QuantumCircuit(qr, cr, cr2)
+        inst = QuantumCircuit(3, 3, name="Inst").to_instruction()
+        circuit.append(inst, [qr[0], qr[1], qr[2]], [cr2[0], cr[0], cr[1]])
+        self.circuit_drawer(circuit, filename="instruction_3q_3c_circ1.png")
+
+    def test_instruction_3q_3c_circ2(self):
+        """Tests q3-q0-q2-cr0-cr1-cr_20 instruction on a circuit"""
+        qr = QuantumRegister(4, "qr")
+        cr = ClassicalRegister(2, "cr")
+        cr2 = ClassicalRegister(2, "cr2")
+        circuit = QuantumCircuit(qr, cr, cr2)
+        inst = QuantumCircuit(3, 3, name="Inst").to_instruction()
+        circuit.append(inst, [qr[3], qr[0], qr[2]], [cr[0], cr[1], cr2[0]])
+        self.circuit_drawer(circuit, filename="instruction_3q_3c_circ2.png")
+
+    def test_instruction_3q_3c_circ3(self):
+        """Tests q3-q1-q2-cr_31-cr1-cr_30 instruction on a circuit"""
+        qr = QuantumRegister(4, "qr")
+        cr = ClassicalRegister(2, "cr")
+        cr2 = ClassicalRegister(1, "cr2")
+        cr3 = ClassicalRegister(2, "cr3")
+        circuit = QuantumCircuit(qr, cr, cr2, cr3)
+        inst = QuantumCircuit(3, 3, name="Inst").to_instruction()
+        circuit.append(inst, [qr[3], qr[1], qr[2]], [cr3[1], cr[1], cr3[0]])
+        self.circuit_drawer(circuit, filename="instruction_3q_3c_circ3.png")
+
     def test_overwide_gates(self):
         """Test gates don't exceed width of default fold"""
         circuit = QuantumCircuit(5)
diff --git a/test/ipynb/mpl_tester.ipynb b/test/ipynb/mpl_tester.ipynb
--- a/test/ipynb/mpl_tester.ipynb
+++ b/test/ipynb/mpl_tester.ipynb
@@ -2,91 +2,9 @@
  "cells": [
   {
    "cell_type": "code",
-   "execution_count": 1,
-   "metadata": {
-    "ExecuteTime": {
-     "end_time": "2021-04-07T19:47:29.673376Z",
-     "start_time": "2021-04-07T19:47:18.887453Z"
-    }
-   },
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "."
-     ]
-    },
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "{'u1': '$\\\\mathrm{U}_1$', 'u2': '$\\\\mathrm{U}_2$', 'u3': '$\\\\mathrm{U}_3$', 'u': 'U', 'p': 'P', 'id': 'I', 'x': 'X', 'y': 'Y', 'z': 'Z', 'h': 'H', 's': 'S', 'sdg': '$\\\\mathrm{S}^\\\\dagger$', 'sx': '$\\\\sqrt{\\\\mathrm{X}}$', 'sxdg': '$\\\\sqrt{\\\\mathrm{X}}^\\\\dagger$', 't': 'T', 'tdg': '$\\\\mathrm{T}^\\\\dagger$', 'dcx': 'Dcx', 'iswap': 'Iswap', 'ms': 'MS', 'r': 'R', 'rx': '$\\\\mathrm{R}_\\\\mathrm{X}$', 'ry': '$\\\\mathrm{R}_\\\\mathrm{Y}$', 'rz': '$\\\\mathrm{R}_\\\\mathrm{Z}$', 'rxx': '$\\\\mathrm{R}_{\\\\mathrm{XX}}$', 'ryy': '$\\\\mathrm{R}_{\\\\mathrm{YY}}$', 'rzx': '$\\\\mathrm{R}_{\\\\mathrm{ZX}}$', 'rzz': '$\\\\mathrm{R}_{\\\\mathrm{ZZ}}$', 'reset': '$\\\\left|0\\\\right\\\\rangle$', 'initialize': '$|\\\\psi\\\\rangle$'}\n",
-      "{'u1': '$\\\\mathrm{U}_1$', 'u2': '$\\\\mathrm{U}_2$', 'u3': '$\\\\mathrm{U}_3$', 'u': 'U', 'p': 'P', 'id': 'I', 'x': 'X', 'y': 'Y', 'z': 'Z', 'h': 'H', 's': 'S', 'sdg': '$\\\\mathrm{S}^\\\\dagger$', 'sx': '$\\\\sqrt{\\\\mathrm{X}}$', 'sxdg': '$\\\\sqrt{\\\\mathrm{X}}^\\\\dagger$', 't': 'T', 'tdg': '$\\\\mathrm{T}^\\\\dagger$', 'dcx': 'Dcx', 'iswap': 'Iswap', 'ms': 'MS', 'r': 'R', 'rx': '$\\\\mathrm{R}_\\\\mathrm{X}$', 'ry': '$\\\\mathrm{R}_\\\\mathrm{Y}$', 'rz': '$\\\\mathrm{R}_\\\\mathrm{Z}$', 'rxx': '$\\\\mathrm{R}_{\\\\mathrm{XX}}$', 'ryy': '$\\\\mathrm{R}_{\\\\mathrm{YY}}$', 'rzx': '$\\\\mathrm{R}_{\\\\mathrm{ZX}}$', 'rzz': '$\\\\mathrm{ZZ}$', 'reset': '$\\\\left|0\\\\right\\\\rangle$', 'initialize': '$|\\\\psi\\\\rangle$'}\n"
-     ]
-    },
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "............/Users/bel/repos/qiskit-terra/test/ipynb/mpl/test_circuit_matplotlib_drawer.py:412: DeprecationWarning: The QuantumCircuit.u1 method is deprecated as of 0.16.0. It will be removed no earlier than 3 months after the release date. You should use the QuantumCircuit.p method instead, which acts identically.\n",
-      "  circuit.u1(pi/2, 4)\n",
-      "/Users/bel/repos/qiskit-terra/test/ipynb/mpl/test_circuit_matplotlib_drawer.py:414: DeprecationWarning: The QuantumCircuit.cu1 method is deprecated as of 0.16.0. It will be removed no earlier than 3 months after the release date. You should use the QuantumCircuit.cp method instead, which acts identically.\n",
-      "  circuit.cu1(pi/2, 5, 6)\n",
-      "/Users/bel/repos/qiskit-terra/test/ipynb/mpl/test_circuit_matplotlib_drawer.py:419: DeprecationWarning: The QuantumCircuit.u2 method is deprecated as of 0.16.0. It will be removed no earlier than 3 months after the release date. You can use the general 1-qubit gate QuantumCircuit.u instead: u2(φ,λ) = u(π/2, φ, λ). Alternatively, you can decompose it interms of QuantumCircuit.p and QuantumCircuit.sx: u2(φ,λ) = p(π/2+φ) sx p(λ-π/2) (1 pulse on hardware).\n",
-      "  circuit.u2(pi/2, pi/2, 5)\n"
-     ]
-    },
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "{'u1': '$\\\\mathrm{U}_1$', 'u2': '$\\\\mathrm{U}_2$', 'u3': '$\\\\mathrm{U}_3$', 'u': 'U', 'p': 'P', 'id': 'I', 'x': 'X', 'y': 'Y', 'z': 'Z', 'h': 'H', 's': 'S', 'sdg': '$\\\\mathrm{S}^\\\\dagger$', 'sx': '$\\\\sqrt{\\\\mathrm{X}}$', 'sxdg': '$\\\\sqrt{\\\\mathrm{X}}^\\\\dagger$', 't': 'T', 'tdg': '$\\\\mathrm{T}^\\\\dagger$', 'dcx': 'Dcx', 'iswap': 'Iswap', 'ms': 'MS', 'r': 'R', 'rx': '$\\\\mathrm{R}_\\\\mathrm{X}$', 'ry': '$\\\\mathrm{R}_\\\\mathrm{Y}$', 'rz': '$\\\\mathrm{R}_\\\\mathrm{Z}$', 'rxx': '$\\\\mathrm{R}_{\\\\mathrm{XX}}$', 'ryy': '$\\\\mathrm{R}_{\\\\mathrm{YY}}$', 'rzx': '$\\\\mathrm{R}_{\\\\mathrm{ZX}}$', 'rzz': '$\\\\mathrm{R}_{\\\\mathrm{ZZ}}$', 'reset': '$\\\\left|0\\\\right\\\\rangle$', 'initialize': '$|\\\\psi\\\\rangle$'}\n",
-      "{'u1': '$\\\\mathrm{U}_1$', 'u2': '$\\\\mathrm{U}_2$', 'u3': '$\\\\mathrm{U}_3$', 'u': 'U', 'p': 'P', 'id': 'I', 'x': 'X', 'y': 'Y', 'z': 'Z', 'h': 'H', 's': 'S', 'sdg': '$\\\\mathrm{S}^\\\\dagger$', 'sx': '$\\\\sqrt{\\\\mathrm{X}}$', 'sxdg': '$\\\\sqrt{\\\\mathrm{X}}^\\\\dagger$', 't': 'T', 'tdg': '$\\\\mathrm{T}^\\\\dagger$', 'dcx': 'Dcx', 'iswap': 'Iswap', 'ms': 'MS', 'r': 'R', 'rx': '$\\\\mathrm{R}_\\\\mathrm{X}$', 'ry': '$\\\\mathrm{R}_\\\\mathrm{Y}$', 'rz': '$\\\\mathrm{R}_\\\\mathrm{Z}$', 'rxx': '$\\\\mathrm{R}_{\\\\mathrm{XX}}$', 'ryy': '$\\\\mathrm{R}_{\\\\mathrm{YY}}$', 'rzx': '$\\\\mathrm{R}_{\\\\mathrm{ZX}}$', 'rzz': '$\\\\mathrm{ZZ}$', 'reset': '$\\\\left|0\\\\right\\\\rangle$', 'initialize': '$|\\\\psi\\\\rangle$'}\n"
-     ]
-    },
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      ".............."
-     ]
-    },
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "{'u1': '$\\\\mathrm{U}_1$', 'u2': '$\\\\mathrm{U}_2$', 'u3': '$\\\\mathrm{U}_3$', 'u': 'U', 'p': 'P', 'id': 'I', 'x': 'X', 'y': 'Y', 'z': 'Z', 'h': 'H', 's': 'S', 'sdg': '$\\\\mathrm{S}^\\\\dagger$', 'sx': '$\\\\sqrt{\\\\mathrm{X}}$', 'sxdg': '$\\\\sqrt{\\\\mathrm{X}}^\\\\dagger$', 't': 'T', 'tdg': '$\\\\mathrm{T}^\\\\dagger$', 'dcx': 'Dcx', 'iswap': 'Iswap', 'ms': 'MS', 'r': 'R', 'rx': '$\\\\mathrm{R}_\\\\mathrm{X}$', 'ry': '$\\\\mathrm{R}_\\\\mathrm{Y}$', 'rz': '$\\\\mathrm{R}_\\\\mathrm{Z}$', 'rxx': '$\\\\mathrm{R}_{\\\\mathrm{XX}}$', 'ryy': '$\\\\mathrm{R}_{\\\\mathrm{YY}}$', 'rzx': '$\\\\mathrm{R}_{\\\\mathrm{ZX}}$', 'rzz': '$\\\\mathrm{R}_{\\\\mathrm{ZZ}}$', 'reset': '$\\\\left|0\\\\right\\\\rangle$', 'initialize': '$|\\\\psi\\\\rangle$'}\n",
-      "{'u1': '$\\\\mathrm{U}_1$', 'u2': '$\\\\mathrm{U}_2$', 'u3': '$\\\\mathrm{U}_3$', 'u': 'U', 'p': 'P', 'id': 'I', 'x': 'X', 'y': 'Y', 'z': 'Z', 'h': 'H', 's': 'S', 'sdg': '$\\\\mathrm{S}^\\\\dagger$', 'sx': '$\\\\sqrt{\\\\mathrm{X}}$', 'sxdg': '$\\\\sqrt{\\\\mathrm{X}}^\\\\dagger$', 't': 'T', 'tdg': '$\\\\mathrm{T}^\\\\dagger$', 'dcx': 'Dcx', 'iswap': 'Iswap', 'ms': 'MS', 'r': 'R', 'rx': '$\\\\mathrm{R}_\\\\mathrm{X}$', 'ry': '$\\\\mathrm{R}_\\\\mathrm{Y}$', 'rz': '$\\\\mathrm{R}_\\\\mathrm{Z}$', 'rxx': '$\\\\mathrm{R}_{\\\\mathrm{XX}}$', 'ryy': '$\\\\mathrm{R}_{\\\\mathrm{YY}}$', 'rzx': '$\\\\mathrm{R}_{\\\\mathrm{ZX}}$', 'rzz': '$\\\\mathrm{ZZ}$', 'reset': '$\\\\left|0\\\\right\\\\rangle$', 'initialize': '$|\\\\psi\\\\rangle$'}\n"
-     ]
-    },
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "."
-     ]
-    },
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "{'u1': '$\\\\mathrm{U}_1$', 'u2': '$\\\\mathrm{U}_2$', 'u3': '$\\\\mathrm{U}_3$', 'u': 'U', 'p': 'Phase', 'id': 'I', 'x': 'X', 'y': 'Y', 'z': 'Z', 'h': 'H', 's': 'S', 'sdg': '$\\\\mathrm{S}^\\\\dagger$', 'sx': '$\\\\sqrt{\\\\mathrm{X}}$', 'sxdg': '$\\\\sqrt{\\\\mathrm{X}}^\\\\dagger$', 't': 'T', 'tdg': '$\\\\mathrm{T}^\\\\dagger$', 'dcx': 'Dcx', 'iswap': 'Iswap', 'ms': 'MS', 'r': 'R', 'rx': '$\\\\mathrm{R}_\\\\mathrm{X}$', 'ry': '$\\\\mathrm{R}_\\\\mathrm{Y}$', 'rz': '$\\\\mathrm{R}_\\\\mathrm{Z}$', 'rxx': '$\\\\mathrm{R}_{\\\\mathrm{XX}}$', 'ryy': '$\\\\mathrm{R}_{\\\\mathrm{YY}}$', 'rzx': '$\\\\mathrm{R}_{\\\\mathrm{ZX}}$', 'rzz': '$\\\\mathrm{R}_{\\\\mathrm{ZZ}}$', 'reset': '$\\\\left|0\\\\right\\\\rangle$', 'initialize': '$|\\\\psi\\\\rangle$'}\n",
-      "{'u1': '$\\\\mathrm{U}_1$', 'u2': '$\\\\mathrm{U}_2$', 'u3': '$\\\\mathrm{U}_3$', 'u': 'U', 'p': 'P', 'id': 'I', 'x': 'X', 'y': 'Y', 'z': 'Z', 'h': 'H', 's': 'S', 'sdg': '$\\\\mathrm{S}^\\\\dagger$', 'sx': '$\\\\sqrt{\\\\mathrm{X}}$', 'sxdg': '$\\\\sqrt{\\\\mathrm{X}}^\\\\dagger$', 't': 'T', 'tdg': '$\\\\mathrm{T}^\\\\dagger$', 'dcx': 'Dcx', 'iswap': 'Iswap', 'ms': 'MS', 'r': 'R', 'rx': '$\\\\mathrm{R}_\\\\mathrm{X}$', 'ry': '$\\\\mathrm{R}_\\\\mathrm{Y}$', 'rz': '$\\\\mathrm{R}_\\\\mathrm{Z}$', 'rxx': '$\\\\mathrm{R}_{\\\\mathrm{XX}}$', 'ryy': '$\\\\mathrm{R}_{\\\\mathrm{YY}}$', 'rzx': '$\\\\mathrm{R}_{\\\\mathrm{ZX}}$', 'rzz': '$\\\\mathrm{ZZ}$', 'reset': '$\\\\left|0\\\\right\\\\rangle$', 'initialize': '$|\\\\psi\\\\rangle$'}\n"
-     ]
-    },
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "..\n",
-      "----------------------------------------------------------------------\n",
-      "Ran 30 tests in 9.856s\n",
-      "\n",
-      "OK\n"
-     ]
-    }
-   ],
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
    "source": [
     "import warnings; warnings.simplefilter('ignore')\n",
     "%run 'mpl/test_circuit_matplotlib_drawer.py'"
@@ -94,28 +12,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 2,
-   "metadata": {
-    "ExecuteTime": {
-     "end_time": "2021-04-07T19:47:31.182812Z",
-     "start_time": "2021-04-07T19:47:29.676294Z"
-    }
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/html": [
-       "<div><a href=\"mpl/mismatch.zip\">Download 4 mismatch results as a zip</a></div><div><details><summary style=\"background-color:lightgreen;\"> <tt><b>big_gates.png</b> | test_big_gates (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/big_gates.png\"</td><td><img src=\"mpl/references/big_gates.png\"</td><td><img src=\"mpl/big_gates.diff.png\"</td></tr></table></details><details open><summary style=\"background-color:lightcoral;\"> <tt><b>bw.png</b> | test_bw (__main__.TestMatplotlibDrawer) </tt> | ratio: 0.9824332633430483 </summary><table><tr><td><img src=\"mpl/bw.png\"</td><td><img src=\"mpl/references/bw.png\"</td><td><img src=\"mpl/bw.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgrey;\"> Download <a download=\"ccz.png\" href=\"mpl/ccz.png\">this image</a> to <tt>mpl/references/ccz.png</tt> and add/push to the repo</td> </summary><table><tr><td><img src=\"mpl/ccz.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>cnot.png</b> | test_cnot (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/cnot.png\"</td><td><img src=\"mpl/references/cnot.png\"</td><td><img src=\"mpl/cnot.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>conditional.png</b> | test_conditional (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/conditional.png\"</td><td><img src=\"mpl/references/conditional.png\"</td><td><img src=\"mpl/conditional.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>creg_initial_false.png</b> | test_creg_initial (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/creg_initial_false.png\"</td><td><img src=\"mpl/references/creg_initial_false.png\"</td><td><img src=\"mpl/creg_initial_false.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>creg_initial_true.png</b> | test_creg_initial (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/creg_initial_true.png\"</td><td><img src=\"mpl/references/creg_initial_true.png\"</td><td><img src=\"mpl/creg_initial_true.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>cswap_rzz.png</b> | test_cswap_rzz (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/cswap_rzz.png\"</td><td><img src=\"mpl/references/cswap_rzz.png\"</td><td><img src=\"mpl/cswap_rzz.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>ctrl_labels.png</b> | test_ctrl_labels (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/ctrl_labels.png\"</td><td><img src=\"mpl/references/ctrl_labels.png\"</td><td><img src=\"mpl/ctrl_labels.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>cz.png</b> | test_cz (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/cz.png\"</td><td><img src=\"mpl/references/cz.png\"</td><td><img src=\"mpl/cz.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>empty_circut.png</b> | test_empty_circuit (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/empty_circut.png\"</td><td><img src=\"mpl/references/empty_circut.png\"</td><td><img src=\"mpl/empty_circut.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>fold_4.png</b> | test_fold_4 (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/fold_4.png\"</td><td><img src=\"mpl/references/fold_4.png\"</td><td><img src=\"mpl/fold_4.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>fold_minus1.png</b> | test_fold_minus1 (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/fold_minus1.png\"</td><td><img src=\"mpl/references/fold_minus1.png\"</td><td><img src=\"mpl/fold_minus1.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>ghz_to_gate.png</b> | test_ghz_to_gate (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/ghz_to_gate.png\"</td><td><img src=\"mpl/references/ghz_to_gate.png\"</td><td><img src=\"mpl/ghz_to_gate.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>global_phase.png</b> | test_with_global_phase (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/global_phase.png\"</td><td><img src=\"mpl/references/global_phase.png\"</td><td><img src=\"mpl/global_phase.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>init_reset.png</b> | test_init_reset (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/init_reset.png\"</td><td><img src=\"mpl/references/init_reset.png\"</td><td><img src=\"mpl/init_reset.diff.png\"</td></tr></table></details><details open><summary style=\"background-color:lightcoral;\"> <tt><b>iqx_color.png</b> | test_iqx_colors (__main__.TestMatplotlibDrawer) </tt> | ratio: 0.9503461481808808 </summary><table><tr><td><img src=\"mpl/iqx_color.png\"</td><td><img src=\"mpl/references/iqx_color.png\"</td><td><img src=\"mpl/iqx_color.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>long_name.png</b> | test_long_name (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/long_name.png\"</td><td><img src=\"mpl/references/long_name.png\"</td><td><img src=\"mpl/long_name.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>meas_condition.png</b> | test_meas_condition (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/meas_condition.png\"</td><td><img src=\"mpl/references/meas_condition.png\"</td><td><img src=\"mpl/meas_condition.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>no_barriers.png</b> | test_no_barriers_false (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/no_barriers.png\"</td><td><img src=\"mpl/references/no_barriers.png\"</td><td><img src=\"mpl/no_barriers.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>no_op_circut.png</b> | test_no_ops (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/no_op_circut.png\"</td><td><img src=\"mpl/references/no_op_circut.png\"</td><td><img src=\"mpl/no_op_circut.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>partial_layout.png</b> | test_partial_layout (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/partial_layout.png\"</td><td><img src=\"mpl/references/partial_layout.png\"</td><td><img src=\"mpl/partial_layout.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>pauli_clifford.png</b> | test_pauli_clifford (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/pauli_clifford.png\"</td><td><img src=\"mpl/references/pauli_clifford.png\"</td><td><img src=\"mpl/pauli_clifford.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>pi_in_param_expr.png</b> | test_pi_param_expr (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/pi_in_param_expr.png\"</td><td><img src=\"mpl/references/pi_in_param_expr.png\"</td><td><img src=\"mpl/pi_in_param_expr.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>plot_barriers_false.png</b> | test_plot_barriers (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/plot_barriers_false.png\"</td><td><img src=\"mpl/references/plot_barriers_false.png\"</td><td><img src=\"mpl/plot_barriers_false.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>plot_barriers_true.png</b> | test_plot_barriers (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/plot_barriers_true.png\"</td><td><img src=\"mpl/references/plot_barriers_true.png\"</td><td><img src=\"mpl/plot_barriers_true.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>plot_partial_barrier.png</b> | test_plot_partial_barrier (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/plot_partial_barrier.png\"</td><td><img src=\"mpl/references/plot_partial_barrier.png\"</td><td><img src=\"mpl/plot_partial_barrier.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>r_gates.png</b> | test_r_gates (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/r_gates.png\"</td><td><img src=\"mpl/references/r_gates.png\"</td><td><img src=\"mpl/r_gates.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>reverse_bits.png</b> | test_reverse_bits (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/reverse_bits.png\"</td><td><img src=\"mpl/references/reverse_bits.png\"</td><td><img src=\"mpl/reverse_bits.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>scale_default.png</b> | test_scale (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/scale_default.png\"</td><td><img src=\"mpl/references/scale_default.png\"</td><td><img src=\"mpl/scale_default.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>scale_double.png</b> | test_scale (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/scale_double.png\"</td><td><img src=\"mpl/references/scale_double.png\"</td><td><img src=\"mpl/scale_double.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>scale_half.png</b> | test_scale (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/scale_half.png\"</td><td><img src=\"mpl/references/scale_half.png\"</td><td><img src=\"mpl/scale_half.diff.png\"</td></tr></table></details><details open><summary style=\"background-color:lightcoral;\"> <tt><b>subfont.png</b> | test_subfont_change (__main__.TestMatplotlibDrawer) </tt> | ratio: 0.9464704020259576 </summary><table><tr><td><img src=\"mpl/subfont.png\"</td><td><img src=\"mpl/references/subfont.png\"</td><td><img src=\"mpl/subfont.diff.png\"</td></tr></table></details><details><summary style=\"background-color:lightgreen;\"> <tt><b>u_gates.png</b> | test_u_gates (__main__.TestMatplotlibDrawer) </tt> | ratio: 1.0 </summary><table><tr><td><img src=\"mpl/u_gates.png\"</td><td><img src=\"mpl/references/u_gates.png\"</td><td><img src=\"mpl/u_gates.diff.png\"</td></tr></table></details><details open><summary style=\"background-color:lightcoral;\"> <tt><b>user_style.png</b> | test_user_style (__main__.TestMatplotlibDrawer) </tt> | ratio: 0.840540369926141 </summary><table><tr><td><img src=\"mpl/user_style.png\"</td><td><img src=\"mpl/references/user_style.png\"</td><td><img src=\"mpl/user_style.diff.png\"</td></tr></table></details></div>"
-      ],
-      "text/plain": [
-       "<__main__.Results at 0x12e8ed1c0>"
-      ]
-     },
-     "execution_count": 2,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
    "source": [
     "%run -i 'results.py'\n",
     "RESULTS"