I am just starting to get around Qiskit, I'm going at baby steps, so I tried to run the code below and I noticed three things:
I tried using
matplotlib_circuit_drawer()
instead ofcircuit_drawer()
, but is return a DeprecationWarning and sugested usingcircuit_drawer
. I assume this is due to the constant updates and the functions are going to change frequently;In the
qc.measure(q, c)
I get a highlight in PyCharm saying Unresolved attribute reference 'measure' for class 'QuantumCircuit', and I don't know what that really means;I think this is also related to 1). When using
draw(qc)
I get the warningDeprecationWarning: The current behavior for the default output will change in a future release. Instead of trying latex and falling back to mpl on failure it will just use "text" by default '"text" by default', DeprecationWarning)
and no image pops up. However when I useprint(qc)
the circuit pops up in text format;
How can I be up to date about the commands?
from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit
from qiskit.tools.visualization import circuit_drawer as draw
c = ClassicalRegister(2)
q = QuantumRegister(2)
qc=QuantumCircuit(q, c)
qc.measure(q, c)
draw(qc)