Environment
- Qiskit version: 2.4.0.dev0
- Python version: 3.14.3
- Operating system: Arch Linux
What is happening?
When using the compose method of a QuantumCircuit with front=True on another, smaller, QuantumCircuit, compose fails with
ValueError: 'qubits' argument is the wrong length
How can we reproduce the issue?
The following code allows to reproduce the issue.
from qiskit import QuantumCircuit
qc_base = QuantumCircuit(2)
qc_base.h(0)
qc_x = QuantumCircuit(1)
qc_x.x(0)
qc_base.compose(qc_x, qubits=[0], front=True).draw()
What should happen?
The compose method should not raise an error.
Any suggestions?
The previous code runs when using Qiskit 2.3.0. It would seem that this bug was introduced in #15696, where compose was changed.
Environment
What is happening?
When using the
composemethod of aQuantumCircuitwithfront=Trueon another, smaller,QuantumCircuit,composefails withHow can we reproduce the issue?
The following code allows to reproduce the issue.
What should happen?
The
composemethod should not raise an error.Any suggestions?
The previous code runs when using Qiskit 2.3.0. It would seem that this bug was introduced in #15696, where
composewas changed.