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

UnitaryOverlap cannot handle barriers #11177

Closed
caleb-johnson opened this issue Nov 2, 2023 · 1 comment · Fixed by #11179
Closed

UnitaryOverlap cannot handle barriers #11177

caleb-johnson opened this issue Nov 2, 2023 · 1 comment · Fixed by #11179
Labels
bug Something isn't working

Comments

@caleb-johnson
Copy link
Contributor

Environment

  • Qiskit Terra version: 0.45.0rc1
  • Python version: 3.10
  • Operating system: macOS

What is happening?

UnitaryOverlap circuit breaks when input circuits contain barriers

How can we reproduce the issue?

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import UnitaryOverlap

qc1 = QuantumCircuit(2)
qc1.ry(np.pi/2, qc1.qubits)
qc1.cx(0, 1)
qc1.barrier()
qc1.rz(np.pi/2, qc1.qubits)

# Create the overlap circuit
overlap = UnitaryOverlap(qc1, qc1)

results in:
CircuitError: 'One or more instructions cannot be converted to a gate. "barrier" is not a gate instruction

What should happen?

UnitaryOverlap should be able to handle circuits with barriers as if they weren't there.

Any suggestions?

No response

@caleb-johnson caleb-johnson added the bug Something isn't working label Nov 2, 2023
@jakelishman
Copy link
Member

Yeah ok, this one is probably on me for letting it through review: #10734 (review).

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

Successfully merging a pull request may close this issue.

2 participants