-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Environment
- Qiskit version: 1.3.0
- Python version: 3.12.5
- Operating system: MacOS
What is happening?
QuantumCircuit.copy_empty_like()
copies RealAmplitudes
instruction to the clone.
How can we reproduce the issue?
>>> from qiskit.circuit.library import RealAmplitudes
>>> circuit = RealAmplitudes(num_qubits=2, reps=2)
>>> circuit.draw()
┌────────────────────────────────────────────────┐
q_0: ┤0 ├
│ RealAmplitudes(θ[0],θ[1],θ[2],θ[3],θ[4],θ[5]) │
q_1: ┤1 ├
└────────────────────────────────────────────────┘
>>> circuit.copy_empty_like().draw()
┌────────────────────────────────────────────────┐
q_0: ┤0 ├
│ RealAmplitudes(θ[0],θ[1],θ[2],θ[3],θ[4],θ[5]) │
q_1: ┤1 ├
└────────────────────────────────────────────────┘
>>> circuit.copy_empty_like() == circuit
True
>>>
What should happen?
The copy should not have a gate
Any suggestions?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working