Papers
Topics
Authors
Recent
Search
2000 character limit reached

Qubit Routing for (Almost) Free

Published 21 Apr 2026 in quant-ph and cs.CC | (2604.19717v1)

Abstract: In this paper, we give a mathematical proof that bounds the number of CNOT gates required to synthesize an $n$ qubit phase polynomial with $g$ terms to be at least $O(\frac{gn}{\max (\log g, 1)})$ and at most $O(gn)$. However, when targeting restricted hardware, not all CNOTs are allowed. If we were to use SWAP-based methods to route the qubits on the architecture such that the earlier synthesized gates are natively allowed, we increase the number of CNOTs by a routing overhead factor of $O(\log n) \leq α\leq O(n \log2 n)$. However, if we only synthesize allowed gates, we do not need to route any qubits. Moreover, in that case the routing overhead factor is $1 \leq α\leq 4 \simeq O(1)$. Additionally, since phase polynomials and Hadamard gates together form a universal gate set, we get qubit routing for almost free.

Summary

  • The paper establishes that integrating hardware connectivity constraints directly into synthesis reduces routing overhead to a constant factor (1 ≤ α ≤ 4), unlike SWAP-based methods.
  • It develops tight lower and upper CNOT bounds for phase polynomial circuits using techniques such as binary parity matrix manipulation and recursive partitioning.
  • The study challenges conventional SWAP-based routing and advocates for a shift to late-stage, hardware-aware compilation to optimize circuit depth and performance on NISQ devices.

Qubit Routing for (Almost) Free: A Technical Summary

Overview

The paper "Qubit Routing for (Almost) Free" (2604.19717) provides a rigorous mathematical analysis of qubit routing by architecture-aware synthesis, particularly focusing on the synthesis of phase polynomial circuits and its implications for quantum compilation. It derives tight lower and upper bounds on the CNOT complexity for both hardware-constrained and unconstrained synthesis, quantifies the actual overhead incurred by SWAP-based routing, and demonstrates that incorporating connectivity constraints directly in synthesis yields circuits with provably minimal routing overhead—effectively rendering the cost of qubit routing constant in the size of the problem when executed optimally.

Phase Polynomial Synthesis and CNOT Complexity

The analysis begins with phase polynomials, which serve as an expressive and classically simulable class of circuits composed of CNOT and RZR_Z gates. The technical approach leverages the commutativity of phase polynomial terms and their convenient binary parity matrix representation. The work establishes:

  • Upper bound: Any nn-qubit phase polynomial with gg terms can be implemented with at most O(gn)\mathcal{O}(gn) CNOT gates, both in unconstrained and hardware-constrained settings. This is shown using naive term-wise decomposition or via synthesis leveraging binary matrix manipulations.
  • Lower bound: There exist phase polynomials requiring at least O(gnmax(logg,1))\mathcal{O}\left(\frac{gn}{\max(\log g,1)}\right) CNOTs, demonstrated through recursive partitioning akin to the GraySynth algorithm and linear reversible circuit synthesis arguments.
  • Tightness: For both unconstrained and connectivity-constrained settings, the lower and upper bounds are effectively matched up to constant factors, formalizing the cost of optimal architecture-aware synthesis of phase polynomial circuits.

Routing Overhead and SWAP-Based Transpilation

A central contribution is the quantification of routing overhead incurred when converting an unconstrained circuit into a hardware-admissible one using SWAP gates post hoc:

  • The routing overhead factor α\alpha is formally defined as the ratio between the CNOT count post-routing and the optimum count.
  • For phase polynomials synthesized without hardware constraints and then routed by conventional SWAP-based methods, α\alpha scales at least as O(logn)\mathcal{O}(\log n) and at most as O(nlog2n)\mathcal{O}(n\log^2 n).
  • In stark contrast, when phase polynomial synthesis directly incorporates hardware connectivity, α\alpha is provably constant (nn0), i.e., the routing cost is essentially nn1.
  • This is attributed to the ability to directly synthesize only hardware-allowed CNOTs, obviating the need for SWAP insertion.

Generalization to Universal Quantum Circuits

Since phase polynomials alone are not universal for quantum computation, the results are generalized to universal gate sets by interleaving them with Hadamard layers (yielding CNOT+nn2 circuits):

  • An arbitrary quantum circuit can be decomposed into a sequence of phase polynomial subcircuits separated by Hadamard gates.
  • The CNOT complexity for universal circuits synthesized architecture-aware is asymptotically the same as in the unconstrained case, with only a constant-factor overhead.
  • The arguments show that architecture-aware synthesis for universal circuits yields a routing factor nn3. In contrast, SWAP-based techniques exhibit super-constant overheads.

Implications for Quantum Compilation and Software Stack

This work formally challenges the established transpiler pipeline, where hardware-unaware synthesized circuits are later routed onto device constraints via SWAP insertions. It mathematically demonstrates the inefficiency—potentially dramatic—of this paradigm for both CNOT gate count and overall circuit depth. The implications are significant:

  • The quantum software stack should shift toward late, hardware-aware synthesis using gate primitives directly tailored to device topology.
  • Early imposition of connectivity constraints during synthesis achieves asymptotically optimal results for the routing problem.
  • The abstraction level of quantum program input (e.g., use of path sums or ZX diagrams rather than low-level gate sequences) must be reconsidered to exploit hardware efficiently.
  • For devices with sparse or complex connectivity, the methodology establishes that the physical topology does not present an inherent compilation bottleneck—provided synthesis is properly configured.
  • The findings are especially salient for large-scale and NISQ devices, where minimizing overheads can be decisive for practical quantum advantage.

Limitations and Theoretical Aspects

The analysis is conducted in the absence of ancillae or classical control, and it assumes well-optimized representations of quantum programs. The actual benefit in practice depends on the quality of the path sum or diagrammatic representations and the ability to minimize redundancies and exploit classical commutativity and cancellation. Moreover, while the CNOT bounds are shown tight for known cases, the possibility of improving these bounds for nontrivial instances remains open.

Future Research

Potential directions include developing architecture-aware synthesis for broader classes of circuits (e.g., extending path sum ideas to arbitrary gate libraries), tightening lower bounds for the CNOT complexity of phase polynomial circuits, and adapting diagrammatic or block-encoding approaches for hardware with more irregular connectivity (e.g., heavy-hex or shuttling-based architectures). The study also points to the need for high-level representations in the quantum software stack that are compatible with direct hardware-aware synthesis.

Conclusion

The paper establishes, through precise bounds and constructive algorithms, that the incremental cost of routing quantum circuits on hardware with restricted connectivity can be made essentially constant by integrating hardware constraints into the synthesis step. This shift in quantum compilation strategy yields tangible improvements in CNOT count and circuit depth, underlining the importance of architecture-aware synthesis and motivating a fundamental rethinking of quantum software abstractions and compiler design. Theoretical developments here offer foundational guidance for the practical realization of scalable quantum computation.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.