Introduction
In the current Noisy Intermediate-Scale Quantum (NISQ) era, minimizing the number of quantum gates is essential for mitigating noise and improving execution fidelity. Among various gate types, two-qubit CNOT gates are particularly expensive in terms of error rates and execution time. This paper introduces PhasePoly, a novel optimization framework specifically designed for "phase polynomials"—a class of circuits composed of CNOT and $R_z$ gates that appear frequently in algorithms such as Shor’s factoring, Grover’s search, and Hamiltonian simulations.
The Optimization Challenge
Optimizing phase polynomials is a known NP-hard problem. Existing optimization tools typically fall into two categories: local "peephole" rewriters (e.g., Queso, Quartz) and single-block optimizers. Peephole optimizers often miss long-range redundancies, while single-block tools are limited by artificial boundaries created by non-phase gates like the Hadamard gate. PhasePoly overcomes these limitations by employing a global synthesis approach that looks across block boundaries.
Methodology
PhasePoly introduces several innovations to achieve superior circuit compression:
- Co-Optimization of Gates and Basis: By using a dual-matrix data structure, PhasePoly optimizes phase rotations and the final qubit mapping simultaneously. This ensures that CNOT gates serve the dual purpose of implementing rotations and moving qubits toward their target states.
- Memory-Bounded A* Search: The framework utilizes an A* search algorithm with a heuristic cost function to navigate the vast search space of gate sequences efficiently. Memory usage is capped to ensure scalability.
- Multi-Block Merging: Using a technique inspired by Static Single Assignment (SSA) renaming in classical compilers, PhasePoly can "see through" non-phase gates. This allows it to merge multiple phase polynomial blocks into a single large block, revealing significant redundancies.
- Hardware-Aware Synthesis: The framework can directly incorporate physical connectivity constraints, generating circuits that minimize the need for costly SWAP gates during final compilation.
Experimental Results
The authors evaluated PhasePoly against a variety of benchmarks, including arithmetic circuits and algorithmic building blocks.
Logical and Physical Reductions
PhasePoly achieved an average total gate reduction of 34.92% and an average CNOT reduction of 28.53% for logical circuits. When accounting for hardware connectivity, the framework maintained a significant average CNOT reduction of 25.47%.
Scalability
A key strength of PhasePoly is its scalability. While previous state-of-the-art tools struggle with circuits exceeding 20 gates, PhasePoly successfully optimized circuits with up to 800 qubits and tens of thousands of gates. Most benchmarks were processed in under 120 seconds.
Conclusion
PhasePoly represents a significant advancement in quantum circuit optimization. By combining global synthesis with multi-block merging and hardware awareness, it provides a practical and scalable solution for reducing gate counts in NISQ-era quantum programs. Future work will focus on automating the selection of block group sizes and extending these techniques to a broader set of universal gates.
Summary updated