I'm following the YouTube tutorials for Programming on Quantum Computers and I've completed everything until I reach circuit.draw()
since I don't get $|0\rangle$ or 0 next to q
or c
. Here's my code:
from qiskit import *
qr = QuantumRegister(2)
cr = ClassicalRegister(2)
circuit = QuantumCircuit(qr, cr)
%matplotlib inline
circuit.draw()
[
q0_0:
q0_1:
c0: 2/
]
and so when I attempt an H gate, I receive the error 'QuantumRegister' object is not callable
:
circuit.h(qr(0))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-55-c8b4318b743b> in <module>
----> 1 circuit.h(qr(0))
TypeError: 'QuantumRegister' object is not callable