-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingmod: circuitRelated to the core of the `QuantumCircuit` class or the circuit libraryRelated to the core of the `QuantumCircuit` class or the circuit library
Milestone
Description
Environment
- Qiskit version: 1.3.1
- Qiskit_aer version: 0.15.1
- Python version: 3.12.3
- Operating system: Linux
What is happening?
Transpiling a circuit containing an MCMT
gate with the aer_simulator_unitary
fails. A very long exception trace ends with: AttributeError: 'Instruction' object has no attribute 'num_ctrl_qubits'
.
This is a regression from qiskit 1.2.4.
How can we reproduce the issue?
from qiskit import QuantumCircuit, QuantumRegister, transpile
from qiskit.circuit.library import MCMT, RYGate
from qiskit_aer import Aer
qr = QuantumRegister(2, "q")
qcirc = QuantumCircuit(qr)
ry_gate = RYGate(0.1)
cry_gate = MCMT(gate=ry_gate, num_ctrl_qubits=1, num_target_qubits=1)
qcirc.append(cry_gate, [qr[0], qr[1]])
backend = Aer.get_backend("aer_simulator_unitary")
transpile(qcirc, backend)
What should happen?
Transpilation should succeed (as it does with qiskit 1.2.4).
Any suggestions?
No response
CalMacCQ
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmod: circuitRelated to the core of the `QuantumCircuit` class or the circuit libraryRelated to the core of the `QuantumCircuit` class or the circuit library