Research
Circuit compilation in the quspect quantum SDK: selecting routings after coupling-constrained resynthesis
Provides an open-source SDK whose compiler couples routing to coupling-constrained resynthesis, giving practitioners a reproducible alternative for circuit compilation.

- arXiv
- 2611.22315 · Preprint · not peer-reviewed
- Published
- 2026-11-17
- Authors
- Xusheng Xu, Runqing Zhang, Hongtao Xue, Jize Han, Jingwei Wen, Ruoyu Zhou, Lei Jin, Xiaoxiao Hu, Gui-Lu Long
In plain words
Compiling a circuit for a real superconducting chip requires placing logical qubits on physical ones, inserting SWAP gates so that every two-qubit gate acts on connected qubits, and rewriting the result into native gates.
Key results
- Gate-count reduction on the arXiv evaluation set. On 55 circuits from 41 arXiv papers across five topologies, the compiler uses 0.616 times as many two-qubit gates as Qiskit O3 (95% circuit-cluster bootstrap interval 0.555–0.679) at 0.592 times its depth.
- Hardware result. On a 17-qubit superconducting processor, the compiled circuits had the fewest CZ gates in all six scenarios of the main run.
AI summary
Overview
Research area: Quantum computing software — specifically circuit compilation (layout, routing, synthesis and scheduling) for superconducting quantum processors.
Technical level: Advanced. The paper assumes familiarity with transpilation concepts such as SWAP insertion, coupling graphs and CNOT–phase (phase polynomial) circuits, though the main conclusions are stated in terms of gate counts that a general reader can follow.
Scope (one sentence): The paper describes and evaluates the circuit compiler inside the open-source quspect SDK, whose distinguishing idea is to choose among several candidate routings by their two-qubit gate cost after coupling-constrained resynthesis, rather than by their SWAP count.
What This Paper Is About
Compiling a circuit for a real superconducting chip requires placing logical qubits on physical ones, inserting SWAP gates so that every two-qubit gate acts on connected qubits, and rewriting the result into native gates. The authors argue that these stages are not independent: a SWAP placed next to a two-qubit block or inside a CNOT–phase region can be merged or resynthesized away, so the "cheapest" routing by SWAP count is often not the cheapest after later optimization. Their goal is a compiler that routes each circuit in several ways, resynthesizes the candidates under the device's coupling constraints, and then selects the candidate with the fewest two-qubit gates.
Key Contributions
-
A complete mapping compiler inside a general-purpose SDK. The quspect compiler (
quspect.transpiler, part of the Apache-2.0 open-source quspect SDK) integrates layout, routing, synthesis and scheduling, with numerically computed rewrites accepted only after the emitted gates match the target up to global phase at a tolerance of 10⁻⁹ per matrix element; symbolic rewrites (phase folding, cancellation of self-inverse pairs) are exact by construction. -
Stage-level techniques, each positioned against its closest prior work. These include a merge-aware window large-neighborhood search (LNS) for routing with admissible A* bounds, a reduction of layered routing of SU(4) circuits on paths to a chain of linear ordering problems with Kendall-τ costs (extended to rings), trace-monoid depth scheduling with block-level commutation, and post-routing coupling-constrained resynthesis of CNOT–phase regions (A* on regions of up to six wires, beam search on larger ones) combined with numerical instantiation of three-qubit blocks under a per-block 10⁻⁹ check — followed by selection among screened routing candidates.
-
Gap and ablation measurements. Measurements of each stage against exhaustive A*, OLSQ2, QUEKO, QUBIKOS, exact dynamic programs, integer programs and lower bounds, plus leave-one-out and grouped ablations of 14 components on four suites and of the ten components added in the final round on five suites.
-
A broad evaluation and a hardware study. An evaluation on 55 circuits from 41 arXiv papers, on 42 standard and 20 large circuits and a synthetic suite, under three gate sets and on five topologies plus 127- and 156-qubit devices, against seven configurations of five other compilers; plus a hardware study on a 17-qubit superconducting chip with two coupling graphs, nine circuit families and three seeds.
Main Findings
-
Gate-count reduction on the arXiv evaluation set: On 55 circuits from 41 arXiv papers across five topologies, the compiler uses 0.616 times as many two-qubit gates as Qiskit O3 (95% circuit-cluster bootstrap interval 0.555–0.679) at 0.592 times its depth. BQSKit level 2 reaches 0.853 and tket 0.930 on the same comparison.
-
Routing should be judged after synthesis: On 150 small routing instances, the SWAP-minimal routings found by an exhaustive A* search had higher costs after merging than the routings produced by a previous version of the compiler in 94 cases, by 811 CZ gates in total, even though the compiler's routings used 18% more SWAPs.
-
Where superoptimizer gains came from: Among cases where the superoptimizer GUOQ, applied after Qiskit's routing, still outperformed the previous compiler version, 65% of its savings came from rewrites inside CNOT–phase regions of the routed circuit.
-
Hardware result: On a 17-qubit superconducting processor, the compiled circuits had the fewest CZ gates in all six scenarios of the main run. The analysis used Wilson intervals, a hierarchical bootstrap and a two-sided Benjamini–Hochberg procedure.
-
Gains are distributed, not concentrated: A leave-one-out ablation on the previous version (commit 8ec73d8) shows no single component accounts for most of its 17–25% lead over Qiskit O3; a grouped ablation shows a reference pipeline with the structure of Qiskit O3 matches Qiskit O3 to within a few percent on three of four suites. The lead comes from routing extensions, synthesis passes and candidate search together, with routing components largely substituting for one another.
-
The final round of development mattered: Adding post-routing resynthesis of CNOT–phase regions and three-qubit blocks brought the lead to 23–41% on the development suites and 38% on the arXiv evaluation set (previous version: 21%). Removing these final-round components at once increases the two-qubit gate count by 23% on Standard-42 and 27% on the arXiv set — more than the sum of their individual effects.
-
Measured gaps to optima and bounds: The previous version's routings were 1.2% above the same-layout optimum under the merge-aware cost; layered routing on paths reached the optimum of its model in 14 of 15 instances; schedules were within 0.3% of a critical-path bound. The final version's selected routings are further from the merge-aware optimum (556 instead of 90 CZ gates above it on the same small instances) while producing fewer gates — a comparison that also changes compiler components, so it does not isolate the selection rule.
-
Specialized techniques pay off on targeted structures: For example, 37% fewer gates on QV-100 mapped to a line, with little effect elsewhere. For GHZ-50 on heavy-hex, the compiler reaches 50 two-qubit gates (lower bound 49), versus 97 for tket and 277 for Qiskit O3.
-
Where the compiler loses: On the arXiv set it loses in 11 of 275 cases against the best tested opponent configuration, mostly to BQSKit level 2, whose numerical resynthesis of three-qubit blocks to a tolerance ε finds a few more gates; on large devices it loses to Qiskit on random Clifford circuits and some circuits under the IBM basis.
-
Honest evaluation caveats: The arXiv set is an evaluation set, not an untouched test set — it was evaluated before the final development round, and its aggregate results informed the final direction. The final round targeted BQSKit and GUOQ on a separate 157-circuit development set with no circuit identical to one in the arXiv set. The compiler also misses 7 of 248 SWAP-free QUEKO layouts due to a deterministic 10⁵-state search budget, and the marginal effect of the ranking objective on an identical candidate pool was not measured.
Methodology in Plain English
The compiler is built around two principles. First, every stage is judged by the cost that survives the later stages — a SWAP that merges into an adjacent two-qubit block is nearly free, so routings are compared by gate count after merging and resynthesis, not by SWAP count. Second, several stages are recast as classical combinatorial problems and small pieces are solved with A* search under admissible (never-overestimating) bounds when a compute budget allows.
At the default level 2, the compiler works in a CZ-centered basis: it cancels and folds phases before routing, finds a SWAP-free layout when the circuit's interaction graph fits the device (a VF2++-style subgraph monomorphism search), or otherwise generates low-dilation starting layouts by greedy growth plus simulated annealing. It then produces several routings — SABRE-style, a wider-lookahead variant, layered/rollout routing for SU(4) circuits, and refinements by a window LNS that cuts out 1–4 consecutive SWAPs and re-routes them exactly with A* under a merge-aware cost — and runs each through the post-routing pipeline (decomposition, block consolidation, peephole optimization, translation to the target basis). The best routing by two-qubit count, then two-qubit depth, then total gates is "finished" with SWAP-face rewrites, trace-monoid scheduling and single-qubit gate minimization.
Level 3 replaces that routing lane with a candidate search: many routings are generated (block+mirror families with 20 layouts × 12 seeds keeping 2 per layout, commutation-aware, plain SABRE, layered/rollout, global beam search), ranked by a proxy estimate, and the best few are fully evaluated with post-routing CNOT–phase resynthesis and numerical three-qubit instantiation; the winner is selected and small inputs are recompiled in up to two passes. The A* over parity states restricted to the coupling graph is notable because, for a fixed phase polynomial, it certifies the minimum CX count when it reaches a goal within its budget.
Why This Matters
Impact on research. The paper gives a concrete, quantified demonstration that routing and synthesis are coupled, and that optimizing them separately leaves measurable performance on the table — 811 CZ gates across 150 small instances in one experiment, and 65% of a superoptimizer's remaining savings in another. It also shows that a compiler assembled from known techniques plus careful integration can beat mature tools, while being candid that no single component explains the lead.
Real-world applications:
- Running variational and combinatorial-optimization workloads on near-term superconducting hardware, where two-qubit gate count and depth largely determine fidelity.
- Cloud quantum backends: quspect's backends compile every submitted circuit with this compiler by default, so the results affect users who never touch the compiler directly.
- Benchmarking and procurement — comparing vendor compilers on a common circuit suite and topology set (including 127- and 156-qubit devices).
- Reproducibility and verification in compiled quantum software, via the 10⁻⁹ per-matrix-element acceptance checks on numerically computed rewrites.
Industry relevance. The work comes from a mix of a quantum software company (QuSpect Technology), a telecom software group (China Mobile (Suzhou) Software Technology) and academic labs (Tsinghua University, Beijing University of Posts and Telecommunications), and ships as an Apache-2.0 open-source SDK — positioning it as a drop-in alternative to Qiskit, tket, BQSKit, QMAP and Cirq for device-aware compilation.
Future Directions
- Isolate the selection rule. The authors note the marginal effect of the ranking objective on an identical candidate pool was not measured, and that the comparison of selected routings against the merge-aware optimum also changes compiler components. A controlled study is the obvious next step.
- Direct comparison with untested prior work. The paper states it did not compare directly with HOPPS, PhasePoly, MIRAGE or PAS/PAM, and did not evaluate at equal compute budgets — both natural follow-ups.
- Reduce development-time exposure. Building an untouched test set, since the arXiv set informed the final development direction, and closing the residual losses (to BQSKit level 2 on three-qubit blocks, and to Qiskit on large-device random Clifford and IBM-basis circuits).
- Extend the exact methods. Scaling the budgeted parity-state A* beyond six-wire CNOT–phase regions and the 10⁵-state layout search budget (which currently misses 7 of 248 SWAP-free QUEKO layouts) would shrink the remaining gap to certified optima; noise-aware compilation is also listed as absent from the evaluated configuration.
Target Audience
Quantum compiler and transpiler developers; researchers benchmarking circuit-mapping pipelines against Qiskit, tket, BQSKit, QMAP and Cirq; quantum-software engineers deploying circuits to superconducting hardware; and graduate students or advanced undergraduates studying the interaction between routing, synthesis and scheduling. Readers interested primarily in algorithm design or error correction will find the framing less directly useful, but the two-qubit-gate and depth numbers on the arXiv and hardware evaluations are widely relevant.
Authors’ abstract
quspect is an open-source quantum computing SDK that provides circuit construction, C++ state-vector simulation with adjoint gradients, support for variational and combinatorial-optimization algorithms, Hamiltonian simulation, control-pulse envelopes and backends for several cloud quantum processors. Here we describe and evaluate its circuit compiler. Routing and synthesis interact: inserting a SWAP can change the circuit structure that later optimization exploits. At its…
The full abstract on arXivRelated papers
- SCOPE: A Physical Execution Latency-Guided Quantum Circuit Compilation Framework 2026-11-16 · quant-ph · Key terms of the title in common
- A Backend-Agnostic MWIS Kernel for Stochastic Unit Commitment with Neutral-Atom Hardware Validation 2026-09-01 · quant-ph · Also by Jingwei Wen
- CO$Φ$ - COmpiling PHotonics into dIgital quantum circuits 2026-10-20 · quant-ph · Key terms of the title in common
- Quantum Mpemba effect in a driven-dissipative atom-waveguide coupled system 2026-11-18 · quant-ph · Key terms of the title in common
- Instanton tunnelling as a verifiable benchmark for digital quantum simulation: circuit structure, classical simulability and hardware reproducibility 2026-11-18 · quant-ph · Key terms of the title in common