Optimal Qubit Mapping with Simultaneous Gate Absorption ICCAD Special Session Paper

Bochen Tan, Jason Cong · DOI

TL;DR

This paper introduces OLSQ-GA, a novel quantum compiler that optimizes qubit mapping for NISQ devices by simultaneously considering gate commutation and SWAP gate absorption. This approach significantly reduces circuit depth and SWAP counts, leading to improved fidelity, which is crucial for the practical application of current noisy quantum computers.

What Problem Does This Paper Address?

Quantum computers, especially those in the Noisy Intermediate-Scale Quantum (NISQ) era, are prone to errors and have limited coherence times. To run complex quantum algorithms, the logical qubits in a program must be mapped to physical qubits on the hardware. This mapping process is complicated by the fact that physical qubits often have limited connectivity, requiring the insertion of SWAP gates to move qubits around. This insertion increases circuit depth and introduces more opportunities for errors. While existing compilers address this mapping problem, they often rely on heuristics for scalability or don't fully exploit the unique properties of NISQ applications, such as the ability to absorb SWAP gates into other operations or the commutation of certain gates. This paper aims to bridge this gap by developing an optimal mapping solution that leverages these NISQ-specific optimizations.

Methods

The core of OLSQ-GA is its formulation of the qubit mapping problem as an exact Satisfiability Modulo Theories (SMT) optimization problem. This allows for finding optimal solutions. The key innovations are:

  • Simultaneous Gate Absorption: OLSQ-GA can absorb SWAP gates into two-qubit gates (like CNOT or simulation gates). This is achieved by mathematically combining the SWAP gate with the target gate, effectively performing the SWAP operation "for free" by modifying the parameters of the original gate.
  • Commutation Exploitation: The compiler leverages the fact that certain gates can be reordered without affecting the outcome. This provides additional flexibility in scheduling and mapping.
  • SMT Formulation: The entire problem, including mapping, spacetime coordinates, absorbed SWAPs, and explicit SWAPs, is encoded into a set of variables and constraints for an SMT solver. This allows for finding provably optimal solutions.
  • Solution Space Reduction Strategies: To improve scalability, OLSQ-GA incorporates techniques like:
  • Alternating Matchings: For linear architectures, it's proven that optimal solutions often involve alternating between sets of "even" and "odd" edges. This constraint significantly prunes the search space.
  • Initial Mapping: Providing a pre-defined initial mapping can guide the solver and speed up the search, especially for symmetric problems.

Datasets

The paper evaluates OLSQ-GA on benchmarks for the Quantum Approximate Optimization Algorithm (QAOA) for 3-regular graphs. These graphs are of sizes 8, 10, 12, and 14, similar to those used in a leading experimental work [6]. The authors generated these graphs using the NetworkX package.

Key Insights and Ideas

  • SWAP Absorption is Powerful: The ability to absorb SWAP gates into existing operations is not just a minor optimization; it can drastically reduce the number of explicit SWAPs and circuit depth, leading to significant fidelity improvements.
  • NISQ Properties Unlock Optimality: NISQ applications have specific characteristics (like gate commutation and the possibility of SWAP absorption) that, when fully exploited, can lead to much better compilation results than general-purpose methods.
  • Exact SMT Solvers are Viable for NISQ: While NP-hard, formulating the mapping problem for NISQ devices as an SMT problem, especially with clever constraints, can yield optimal solutions that outperform heuristic approaches for current problem sizes.
  • Depth and SWAP Count are Intertwined with Fidelity: Reducing depth and SWAP count directly translates to fewer opportunities for errors and thus higher fidelity, which is the ultimate goal for NISQ computation.

Key Results

OLSQ-GA demonstrated significant improvements over state-of-the-art methods (SABRE and TB-OLSQ) on QAOA benchmarks:

  • Depth Reduction: Up to 50.0% reduction compared to TB-OLSQ and up to 80.0% compared to SABRE.
  • SWAP Count Reduction: 100% reduction (i.e., zero explicit SWAPs) compared to both TB-OLSQ and SABRE, achieved through SWAP absorption.
  • Fidelity Improvement:
    • 9.45% improvement over TB-OLSQ and 49.1% over SABRE for a single iteration.
  • For 5 iterations, OLSQ-GA achieved 55.9% higher fidelity than TB-OLSQ and 636% higher than SABRE.
  • Speedup: The solution space reduction strategies (alternating matchings and initial mapping) achieved speedups of up to 272X compared to the baseline SMT solver.

Limitations and Future Work

  • Scalability of Exact SMT: While OLSQ-GA offers speedups, the exact SMT formulation can still be computationally intensive for very large quantum programs.
  • Architecture Generalization: The "alternating matchings" strategy is proven for linear architectures. Future work includes devising similar strategies for other architectures (e.g., 2D grids) with minimal loss of optimality.
  • Parallelization: The authors suggest parallelizing the solving process by partitioning the solution space or using different initial mappings across multiple cores.
  • Application to Other Models: Extending OLSQ-GA to find optimal mapping solutions for important chemical models and other NISQ applications is a promising future direction.
  • Non-Commuting Gates: While the paper focuses on commutable gates for QAOA, extending the techniques to handle non-commuting gates more effectively is also an area for future research.

Summary updated

BibTeX
@inproceedings{tan2021optimal,
  author = {Bochen Tan and Jason Cong},
  title = {{Optimal Qubit Mapping with Simultaneous Gate Absorption ICCAD Special Session Paper}},
  booktitle = {ICCAD},
  year = {2021},
  doi = {10.1109/iccad51958.2021.9643554},
}
Figure