Closed chowington closed 4 years ago
There is already a fix in progress for this issue: https://github.com/Qiskit/qiskit-terra/pull/4389 It's caused by certain gates (or circuit library elements that were converted to gates or instructions) missing a label attribute which the mpl drawer incorrectly assumes is always present.
Hi, is there an ETA on a fix for this?
This should be part of the 0.15 release which is scheduled for two weeks. #4389 is fixing this 🙂
Awesome, thanks 🎉
Information
What is the current behavior?
When trying to draw a
QuantumCircuit
object using.draw(output='mpl')
, I'm gettingAttributeError: 'Instruction' object has no attribute 'label'
inqiskit/visualization/matplotlib.py
. The circuit draws fine using the default text drawer.Steps to reproduce the problem
The code is adapted from the
linear_systems_of_equations
HHL tutorial notebook. Here's a (probably non-minimal) snippet to reproduce:What is the expected behavior?
No errors, and the circuit is drawn correctly using Matplotlib.
Suggested solutions
Not sure - I don't know whether this could be a Terra visualization problem or an Aqua circuit design problem (or just a problem with the code above).