Skip to content
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

Qiskit visualization ignores control qubit as idle_wires when following a barrier. #13171

Closed
smajumderibm opened this issue Sep 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@smajumderibm
Copy link

Environment

  • **Qiskit version: 1.1.0 **:
  • Python version: 3.12.5:
  • Operating system: MAC:

What is happening?

circuit.draw() is incorrectly drawing circuit with barriers in them.
Screenshot 2024-09-17 at 3 54 11 PM

How can we reproduce the issue?

Returns the right visualization

qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.draw(fold=-1, output='mpl', idle_wires=False)

Returns a wrong visualization

qc = QuantumCircuit(2)
qc.h(0)
qc.barrier()
qc.cx(0, 1)
qc.draw(fold=-1, output='mpl', idle_wires=False)

What should happen?

The expected behavior is to include both qubits in the circuit and show the CX gate.

Any suggestions?

No response

@smajumderibm smajumderibm added the bug Something isn't working label Sep 17, 2024
@jakelishman
Copy link
Member

Are you sure this was with Qiskit 1.1.0? I can't reproduce a bug like that, but there is a known bug in Qiskit 1.2.0 and 1.2.1 that most likely has this effect (see #13128 and #13146, which are fixed by #13149).

@smajumderibm
Copy link
Author

My bad, it is in Qiskiit 1.2.1.

@jakelishman
Copy link
Member

No worries - in that case this is a duplicated of #13146, and it's just in the process of being fixed by #13149, which will be released in Qiskit 1.2.2, probably later this week. I'll close this as a duplicate for now, but feel free to open more issues if there are more problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants