-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Environment
- Qiskit version: 1.3.2
- Python version: 3.11
- Operating system: macos/linux
What is happening?
On certain circuits transpiled with a backend and a coupling map, this call fails
transpiled_circuit.layout.final_index_layout(filter_ancillas=False)
raising KeyError: "The item Qubit(QuantumRegister(5, 'q'), 3) does not exist in the Layout"
.
This worked fine until qiskit 1.3.0
How can we reproduce the issue?
Running the following code:
from qiskit import QuantumCircuit, transpile, qasm2
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService(channel="ibm_quantum")
backend = service.backend("ibmq_manila")
qc = qasm2.loads('OPENQASM 2.0;include "qelib1.inc";qreg q[3];rccx q[2],q[1],q[0];t q[2];u(0.28905709212845454,5.626877140821112,5.481851443455051) q[1];h q[0];cx q[1],q[2];s q[0];', custom_instructions=qasm2.LEGACY_CUSTOM_INSTRUCTIONS)
transpiled_circuit = transpile(qc,backend=backend,coupling_map=[[0,1],[1,2],[2,3]],optimization_level=2,seed_transpiler=42)
transpiled_circuit.layout.final_index_layout(filter_ancillas=False)
What should happen?
There should not be any error in the call. The output to that particular example in qiskit 1.2.4
is [3, 1, 2, 0]
Any suggestions?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working