Skip to content

Panic in SabreLayout when running on large quantum volume circuit #13081

@mtreinish

Description

@mtreinish

Environment

  • Qiskit version: 1.1, 1.2, and main
  • Python version: Any
  • Operating system: Linux

What is happening?

When running a large quantum volume circuit through the SabreLayout pass the individual trials start to internally panic with the following:

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', crates/accelerate/src/sabre/layer.rs:73:52

once for each thread launched. Once all 20 threads panic the pass stops.

How can we reproduce the issue?

from qiskit.circuit.library import QuantumVolume
import qiskit
from qiskit.transpiler import PassManager
from qiskit.transpiler.passes import SabreLayout, Unroll3qOrMore
from qiskit.transpiler import CouplingMap

qv = QuantumVolume(1000, seed=42)
qv.measure_all()
qc = Unroll3qOrMore()(qv)

cmap = CouplingMap.from_heavy_hex(21)
pm = PassManager([
    SabreLayout(cmap, swap_trials=20, layout_trials=20, max_iterations=4),
])

tqc = pm.run(qc)

What should happen?

The pass shouldn't panic, and should successfully apply a layout and route the circuit.

Any suggestions?

This was most likely a regression introduced by: #11977 as the example works fine with Qiskit 1.0.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmod: transpilerIssues and PRs related to Transpiler

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions