Abstract
Quantum algorithms are typically designed under the assumption of all-to-all qubit connectivity. However, physical quantum hardware is constrained by specific coupling graphs, necessitating the insertion of SWAP gates to facilitate interactions between non-adjacent qubits. This paper presents OLSQ and TB-OLSQ, two novel synthesizers that utilize Satisfiability Modulo Theories (SMT) to optimize the mapping of logical circuits to physical hardware. By rethinking variable encoding and leveraging commutation rules, these tools achieve significant reductions in circuit depth and gate costs compared to existing heuristic and optimal solvers.
Introduction: The Connectivity Gap
A fundamental challenge in quantum computing is the discrepancy between logical algorithm design and physical hardware implementation. While algorithms assume any qubit can interact with any other, real-world Quantum Processing Units (QPUs) possess fixed coupling graphs.
When a gate operation is required between two qubits that are not physically connected, the compiler must insert SWAP gates. This process, known as Layout Synthesis for Quantum Computing (LSQC), is NP-complete. Existing solutions often fall into two categories: fast but sub-optimal heuristics, or optimal solvers that suffer from extreme computational overhead, limiting their use to very small circuits.
Methodology: Rethinking SMT Formulation
The authors propose a new approach to LSQC by formulating it as an SMT problem solved via the Z3 solver. Three primary variations are introduced:
- OLSQ (Optimal Layout Synthesizer): Unlike previous models that constrained gate sequences, OLSQ employs a spacetime-based variable encoding. It treats the mapping of logical to physical qubits as time-dependent variables, allowing the solver to explore all valid topological orderings.
- TB-OLSQ (Transition-Based OLSQ): Recognizing that mappings only change during SWAP operations, TB-OLSQ groups gates into blocks. By only tracking mapping transitions between these blocks, it significantly reduces the variable space, enhancing scalability without sacrificing near-optimality.
- QAOA-OLSQ: Tailored for the Quantum Approximate Optimization Algorithm (QAOA), this version integrates commutation rules. By reordering gates that do not have strict dependencies, the synthesizer can find layouts that minimize SWAP requirements.
Evaluation and Results
The synthesizers were benchmarked using RevLib, QUEKO, and QAOA circuits across architectures including IBM QX2, IBM Melbourne, Rigetti Aspen-4, and Google’s Sycamore.
Key Performance Metrics
- Efficiency: OLSQ demonstrates superior speed and memory management compared to prior SMT-based tools. It successfully processed 16-qubit benchmarks that previously caused 32GB+ memory overflows.
- Cost Reduction: TB-OLSQ achieved a 69.2% reduction in additional CX gate costs relative to the industry-standard
t|ket>. - Fidelity Improvements: On average, TB-OLSQ improved circuit fidelity by 1.30x over
TriQ, with gains reaching up to 10x for specific large-scale programs. - QAOA Optimization: QAOA-OLSQ reduced circuit depth by 70.2% and gate costs by 53.8% compared to
t|ket>.
Conclusion
OLSQ and its derivatives bridge the gap between logical quantum operations and physical hardware constraints. By shifting the focus from transformation-based to mapping-based encoding and utilizing domain-specific knowledge like gate commutation, these tools provide a scalable path toward optimal quantum circuit synthesis. Future work will explore handling correlated errors and further optimizing for larger-scale "quantum supremacy" class devices.
Summary updated