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

efficient_su2 & co should handle the num_qubits=1 case #13480

Open
Cryoris opened this issue Nov 22, 2024 · 0 comments
Open

efficient_su2 & co should handle the num_qubits=1 case #13480

Cryoris opened this issue Nov 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Cryoris
Copy link
Contributor

Cryoris commented Nov 22, 2024

Environment

  • Qiskit version: 1.3.0rc2
  • Python version: 3.11.9
  • Operating system: macOS

What is happening?

Calling some library functions, like efficient_su2 don't work for num_qubits=1, since the entangling gate requires 2 qubits. This should still work, but simply not add an entangling gate.

We should check this edge case for all other functions, as well.

How can we reproduce the issue?

from qiskit.circuit.library import efficient_su2

efficient_su2(1)

What should happen?

Build a circuit without CX entangling gate. This should be handled in the efficient_su2 function and adjust the internal call to n_local.

Any suggestions?

No response

@Cryoris Cryoris added the bug Something isn't working label Nov 22, 2024
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

1 participant