Table of Contents
Fetching ...

LightSABRE: A Lightweight and Enhanced SABRE Algorithm

Henry Zou, Matthew Treinish, Kevin Hartman, Alexander Ivrii, Jake Lishman

TL;DR

LightSABRE tackles the bottleneck of routing large quantum circuits by delivering a Rust-based, highly scalable extension to SABRE. It introduces relative scoring, multi-trial exploration, advanced layout seeding, support for disjoint connectivity and control-flow, and new depth/critical-path heuristics, plus a release valve to escape stagnation. Empirically, it achieves roughly a 200× speedup over earlier Qiskit implementations and, on benchmark circuits, about an 18.9% average reduction in CNOT gates compared with Li et al., demonstrating improved runtime and circuit quality on large-scale devices. These advances enable efficient optimization of complex quantum circuits on current and future hardware, with flexible tuning for device connectivity and optimization goals.

Abstract

We introduce LightSABRE, a significant enhancement of the SABRE algorithm that advances both runtime efficiency and circuit quality. LightSABRE addresses the increasing demands of modern quantum hardware, which can now accommodate complex scenarios, and circuits with millions of gates. Through iterative development within Qiskit, primarily using the Rust programming language, we have achieved a version of the algorithm in Qiskit 1.2.0 that is approximately 200 times faster than the implementation in Qiskit 0.20.1, which already introduced key improvements like the release valve mechanism. Additionally, when compared to the SABRE algorithm presented in Li et al., LightSABRE delivers an average decrease of 18.9\% in SWAP gate count across the same benchmark circuits. Unlike SABRE, which struggles with scalability and convergence on large circuits, LightSABRE delivers consistently high-quality routing solutions, enabling the efficient execution of large quantum circuits on near-term and future quantum devices. LightSABRE's improvements in speed, scalability, and quality position it as a critical tool for optimizing quantum circuits in the context of evolving quantum hardware and error correction techniques.

LightSABRE: A Lightweight and Enhanced SABRE Algorithm

TL;DR

LightSABRE tackles the bottleneck of routing large quantum circuits by delivering a Rust-based, highly scalable extension to SABRE. It introduces relative scoring, multi-trial exploration, advanced layout seeding, support for disjoint connectivity and control-flow, and new depth/critical-path heuristics, plus a release valve to escape stagnation. Empirically, it achieves roughly a 200× speedup over earlier Qiskit implementations and, on benchmark circuits, about an 18.9% average reduction in CNOT gates compared with Li et al., demonstrating improved runtime and circuit quality on large-scale devices. These advances enable efficient optimization of complex quantum circuits on current and future hardware, with flexible tuning for device connectivity and optimization goals.

Abstract

We introduce LightSABRE, a significant enhancement of the SABRE algorithm that advances both runtime efficiency and circuit quality. LightSABRE addresses the increasing demands of modern quantum hardware, which can now accommodate complex scenarios, and circuits with millions of gates. Through iterative development within Qiskit, primarily using the Rust programming language, we have achieved a version of the algorithm in Qiskit 1.2.0 that is approximately 200 times faster than the implementation in Qiskit 0.20.1, which already introduced key improvements like the release valve mechanism. Additionally, when compared to the SABRE algorithm presented in Li et al., LightSABRE delivers an average decrease of 18.9\% in SWAP gate count across the same benchmark circuits. Unlike SABRE, which struggles with scalability and convergence on large circuits, LightSABRE delivers consistently high-quality routing solutions, enabling the efficient execution of large quantum circuits on near-term and future quantum devices. LightSABRE's improvements in speed, scalability, and quality position it as a critical tool for optimizing quantum circuits in the context of evolving quantum hardware and error correction techniques.
Paper Structure (16 sections, 3 equations, 8 figures, 1 table)

This paper contains 16 sections, 3 equations, 8 figures, 1 table.

Figures (8)

  • Figure 1: This figure illustrates the effectiveness of the techniques in LightSABRE compared to the original SABRE algorithm, using coupling maps from experiments on the 16-qubit EfficientSU2 example with circular entanglement. Panel (A) shows the layout generated by running SABRE, where certain pairs of qubits that are connected in the abstract circuit are separated by significant distances in the physical circuit, as indicated by the purple arrows. Panel (B) shows the layout produced by running SabrePreLayout before SABRE, resulting in a better configuration where all connected nodes are at most distance-2 apart in the physical map. However, this layout remains suboptimal, with a qubit isolated from a pair of red qubits (highlighted with a box) and gaps in the boxed blue qubits. Finally, panel (C) displays the optimal layout achieved by employing the additional minimization feature in SabrePreLayout, which eliminates these inefficiencies and improves overall qubit connectivity.
  • Figure 2: A DAG representation of a circuit which applies an H-gate onto qubit q0, measures the result into classical bit c0, and then conditionally applies either an X-gate or H-gate onto qubit q1 based on the result at runtime. The if-else operation is represented as a gate with data dependencies on c0 used by its condition and q1 used by the inner two circuits of its branches. Finally, q1 is measured to c1 in the outer circuit.
  • Figure 3: Simplified interaction graph laid out on a linear topology on which the lookahead heuristic is unable to make forwards progress. Gates requiring routing are marked by joined circles. Swap costs are indicated on the right edge; braces denote that all neighboring qubits within the brace have the same swap cost. The blue gate needs only one swap to be routed, but its cost is $w-1$, where $w = k\lvert F\rvert/\lvert E\rvert$ is the relative weighting of the unit distance within the extended set as compared to within the front layer with respect to eq. \ref{['eq:lookahead-heuristic']}. If the front layer has many gates compared to the extended set, the necessary swaps can be more costly than shuffling the outermost qubits without making progress.
  • Figure 4: Algorithm runtime (ignoring setup and output circuit construction as for small circuits these times dominate for such a large connectivity graph) and output swap count for running LightSABRE on Bernstein Vazirani circuits targetting a backend with a 142x142 directed grid connectivity with 20 layout and routing trials and 4 iterations. Generated using Qiskit 1.0.2 as bugs introduced in 1.1.0 prevented scaling this large. Run using Python 3.12.5 on an AMD Ryzen Threadripper 3970x running Linux 6.10.3.
  • Figure 5: LightSABRE was significantly optimized, particularly after porting to Rust at Qiskit 0.22.4. All data was generated using 4 iterations, and for Qiskit-terra versions >= 0.23, 20 layout and 20 routing trials were run, targeting a 50q QV circuit with 57 qubit heavy-hex connectivity. The tests were conducted on Python 3.9.9 using an AMD Ryzen Threadripper 3970x running Linux 6.10.3.
  • ...and 3 more figures