You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, Circuit.add_qubit only accept Qubit objects, not labels. You would thus have to write:
c=Circuit()
qubit=Qubit("q1")
c.add_qubit(qubit)
The only case where you don't have access to the qubit directly is if you simply add a qubit without creating it first:
c=Circuit()
c.add_qubit()
in which case it's not obvious how to get hold of the newly added qubit (it will always be placed at the end of the originally created register, unless specified), although it's similar to adding qubits when initializing the circuit:
Currently there is not an easy way to retrieve a qubit added by label. E.g.
it would be nice to be able to do
The text was updated successfully, but these errors were encountered: