-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drawing error in circuits with isolated qubits #6732
Comments
Using |
@kdk from qiskit.circuit import *
qc = QuantumCircuit([Qubit(), Qubit()], [Clbit(), Clbit()])
qc.draw() draws
which I feel might be confusing. |
@kdk @TharrmashasthaPV The
Any other non-alphanumeric character could be used. If we can get a consensus on this, I can make the change for all 3 drawers. |
@TharrmashasthaPV @enavarro51 I don't think we need to distinguish between classical and quantum bits in the labels, since they are distinguished by their line type ( I do like the suggestion of using raw numbers better than using |
Thanks, Kevin. I started looking at this and realized the 3 circuit drawers approach getting the bit names and numbers somewhat differently even though the displayed output is the same. This means for something like this, fixing the problem 3 ways. So I'd like to take a stab at putting the acquisition of bit names and numbers for display into a function in utils.py, that can be called by the 3 drawers, which will fix this and hopefully make maintenance easier in the future. |
Information
What is the current behavior?
When a
QuantumCircuit
is initialized asQuantumCircuit([Qubit(), Qubit()])
, thedraw()
method has some errorsqc.draw('text')
draws the qubit labels as_0
,_1
, ... without a name.Steps to reproduce the problem
returns
What is the expected behavior?
It would be better if the qubit labelling is done similar to that in the registerless circuits.
The text was updated successfully, but these errors were encountered: