Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit db28762

Browse files
committed
Workaround terra mpl drawer bug
There is a bug in the mpl drawer in 0.19.0 (and 0.19.1) release where a custom instruction does not draw without a label parameter set. This will need to be fixed in terra, but in the meantime this worksaround the bug by manually setting a label.
1 parent fc5719a commit db28762

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tutorials/terra/advanced/1_advanced_circuits.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
"\n",
148148
"# Convert to a gate and stick it into an arbitrary place in the bigger circuit\n",
149149
"sub_inst = sub_circ.to_instruction()\n",
150+
"sub_inst.label = "sub_circ\n",
150151
"\n",
151152
"q = QuantumRegister(3, 'q')\n",
152153
"circ = QuantumCircuit(q)\n",

0 commit comments

Comments
 (0)