Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2604.19717

Qubit Routing for (Almost) Free

Arianne Meijer-van de Griend

quant-phcs.CCSubmitted Apr 21, 2026• Announced Apr 22, 2026• 0 citations
arXivHTMLPDF

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 \log^2 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.

Comments
14 pages, rough draft

Related papers

Clifford synthesis is NP-complete

Søren Fuglede Jørgensen

We show that the problem of synthesizing a quantum circuit for a given Clifford operator using at most a specified amount of resources is NP-complete for several resource models of practical interest. Specifically, we study synthesis of a given Clifford operator using single-qubit Clifford gates and two-qubit Clifford gates, with full qubit connectivity and no additional ancilla qubits. With single-qubit gates free and CNOT as the only two-qubit gate, we show that deciding whether a given target admits an implementation using at most a specified number of CNOT gates is NP-complete, and we show that the problem remains NP-complete when any two-qubit Clifford gate is allowed and the budget counts all such gates. Moreover, we show that both results continue to hold when SWAP gates may be inserted for free, and when single-qubit gates are also considered part of the budget. In each case, we build on recent work by Li and Guan and show that there are polynomial-time reductions from Hamiltonian path in grid graphs to these decision problems, using a number of qubits quadratic in the number of grid vertices.

quant-pharXiv:2610.40886•Nov 2, 2026

Not All SWAPs Have the Same Cost: A Case for Optimization-Aware Qubit Routing

Ji Liu, Peiyi Li, Huiyang Zhou

Despite rapid advances in quantum computing technologies, the qubit connectivity limitation remains to be a critical challenge. Both near-term NISQ quantum computers and relatively long-term scalable quantum architectures do not offer full connectivity. As a result, quantum circuits may not be directly executed on quantum hardware, and a quantum compiler needs to perform qubit routing to make the circuit compatible with the device layout. During the qubit routing step, the compiler inserts SWAP gates and performs circuit transformations. Given the connectivity topology of the target hardware, there are typically multiple qubit routing candidates. The state-of-the-art compilers use a cost function to evaluate the number of SWAP gates for different routes and then select the one with the minimum number of SWAP gates. After qubit routing, the quantum compiler performs gate optimizations upon the circuit with the newly inserted SWAP gates.In this paper, we observe that the aforementioned qubit routing is not optimal, and qubit routing should not be independent on subsequent gate optimizations. We find that with the consideration of gate optimizations, not all of the SWAP gates have the same basis-gate cost. These insights lead to the development of our qubit routing algorithm, NASSC (Not All Swaps have the Same Cost). NASSC is the first algorithm that considers the subsequent optimizations during the routing step. Our optimization-aware qubit routing leads to better routing decisions and benefits subsequent optimizations. We also propose a new optimization-aware decomposition for the inserted SWAP gates. Our experiments show that the routing overhead compiled with our routing algorithm is reduced by up to 69.30% (21.30% on average) in the number of CNOT gates and up to 43.50% (7.61% on average) in the circuit depth compared with the state-of-the-art scheme, SABRE.

arXiv:2205.10596•IEEE International Symposium on High-Performance Computer Architecture (HPCA)•Apr 1, 2022•32 citations

Combining SWAPs and Remote CNOT Gates for Quantum Circuit Transformation

Philipp Niemann, Luca Mueller, Rolf Drechsler

Quantum computers offer enormous speed advantages over their classical counterparts. Still, optimization on quantum circuits is necessary to further increase their potential. Additionally, physical realizations of quantum computers place restrictions on quantum circuits, regarding the available quantum gates. In order to satisfy these restrictions, non-native gates need to be expressed as an equivalent cascade of natively available quantum gates which induces a mapping overhead. Two complementary approaches to this problem are to move around the qubits (using SWAP gates) or to apply so-called remote gates, i.e. pre-computed cascades of native gates which keep the qubit placement.In this paper, we explore how combinations of movements and remote gates can be employed to reduce the required overhead regarding the number of native gates as well as the circuit depth. We also discuss ways to find out which qubits to address with the movements in order to optimize these metrics. Our general evaluation is supplemented by evaluations on two IBM quantum computer architectures to show how quantum circuits can be optimized by the presented patterns.

Euromicro Conference on Digital System Design (DSD)•Sep 1, 2021•2 citations

Dynamic Qubit Routing with CNOT Circuit Synthesis for Quantum Compilation

Arianne Meijer-van de Griend, Sarah Meng Li

Many quantum computers have constraints regarding which two-qubit operations are locally allowed.To run a quantum circuit under those constraints, qubits need to be mapped to different quantum registers, and multi-qubit gates need to be routed accordingly.Recent developments have shown that compiling strategies based on Steiner tree provide a competitive tool to route CNOTs.However, these algorithms require the qubit map to be decided before routing.Moreover, the qubit map is fixed throughout the computation, i.e. the logical qubit will not be moved to a different physical qubit register.This is inefficient with respect to the CNOT count of the resulting circuit.In this paper, we propose the algorithm PermRowCol for routing CNOTs in a quantum circuit.It dynamically remaps logical qubits during the computation, and thus results in fewer output CNOTs than the algorithms Steiner-Gauss [14] and RowCol [27].Here we focus on circuits over CNOT only, but this method could be generalized to a routing and mapping strategy on Clifford+T circuits by slicing the quantum circuit into subcircuits composed of CNOTs and single-qubit gates.Additionally, PermRowCol can be used in place of Steiner-Gauss in the synthesis of phase polynomials as well as the extraction of quantum circuits from ZX-diagrams.

arXiv:2205.00724•Electronic Proceedings in Theoretical Computer Science•Nov 14, 2023•8 citations

Quantum circuits of CNOT gates

Marc Bataille

We study in detail the algebraic structures underlying quantum circuits generated by CNOT gates. Our results allow us to propose polynomial-time heuristics to reduce the number of gates used in a given CNOT circuit and we also give algorithms to optimize this type of circuits in some particular cases. Finally we show how to create some usefull entangled states when a CNOT circuit acts on a fully factorized state.

arXiv:2009.13247•Sep 24, 2020•10 citations

Kvanttiohjelmien kääntämisen kehittäminen NISQ-aikakaudella

Arianne Meijer-van de Griend

Recent advances in the development of quantum technology have made it possible to run small quantum programs on real quantum computers. This has created a need for compiling methods specific to these quantum computers. Unlike classical computers, if a quantum computation takes too long, the qubits might decohere and lose their information, making the computation useless. Hence, well-optimized quantum programs are a necessity. Like classical computers, quantum computers have registers for qubits that are generally sparsely connected. However, classical compilation methods that rely on copying data from one register to another do not apply to quantum computers because qubits cannot be copied. This problem is called the qubit routing problem. Following classical compilation, one could solve the connectivity constraints by moving the qubits to adjacent qubit registers. However, this requires the addition of SWAP gates throughout the quantum circuit, resulting in a strictly longer program. Additionally, a SWAP gate on qubits is not cheap and requires three CNOT gates each. Instead, in this thesis, we have defined a new method for quantum compilation that is based in the quantum nature of the program to be compiled. Instead of routing the qubits directly, we generate new machine code (in the form of quantum circuits) from an intermediate representation. We call this process quantum circuit synthesis. During synthesis, we make sure that all generated gates are supported by the target quantum hardware. Additionally, if the synthesis process is optimal, the resulting quantum circuit will also be optimal, although the methods proposed in this thesis are all heuristic in nature due to the computational complexity of optimal architecture-aware synthesis. We construct the nested intermediate representation starting from sequences of CNOT circuits interleaved with single qubit gates and incrementally generalize the intermediate representation to a universal representation. In particular, we propose two algorithms for synthesizing CNOT circuits from their parity matrix representation and one algorithm for synthesizing phase polynomials (i.e. CNOT+$R_z$ circuits). Additionally, we show that when combining these methods into the universal representation called Mixed ZX-phase polynomial, it is competitive with existing commercial quantum compilers IBM's Qiskit and Quantinuum's TKET for large circuits. This thesis additionally contains a proposal for a framework to benchmark the quality of circuits used in an algorithm called Variational Quantum Eigensolver (VQE). This framework attempts to measure how close the solution found by the VQE is to our best estimate of a real molecule (i.e. accuracy), rather than a classical simulation of the approximate molecule as given to the quantum computer (i.e. precision).

Työväentutkimus Vuosikirja•Jan 8, 2024•0 citations
In this paper, we give a mathematical proof that bounds the number of CNOT gates required to synthesize an nnn qubit phase polynomial with ggg terms to be at least O(gnmax⁡(log⁡g,1))O(\frac{gn}{\max (\log g, 1)})O(max(logg,1)gn​) and at most O(gn)O(gn)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)≤α≤O(nlog⁡2n)O(\log n) \leq α\leq O(n \log^2 n)O(logn)≤α≤O(nlog2n). 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≤α≤4≃O(1)1 \leq α\leq 4 \simeq O(1)1≤α≤4≃O(1). Additionally, since phase polynomials and Hadamard gates together form a universal gate set, we get qubit routing for almost free.
We show that the problem of synthesizing a quantum circuit for a given Clifford operator using at most a specified amount of resources is NP-complete for several resource models of practical interest. Specifically, we study synthesis of a given Clifford operator using single-qubit Clifford gates and two-qubit Clifford gates, with full qubit connectivity and no additional ancilla qubits. With single-qubit gates free and CNOT as the only two-qubit gate, we show that deciding whether a given target admits an implementation using at most a specified number of CNOT gates is NP-complete, and we show that the problem remains NP-complete when any two-qubit Clifford gate is allowed and the budget counts all such gates. Moreover, we show that both results continue to hold when SWAP gates may be inserted for free, and when single-qubit gates are also considered part of the budget. In each case, we build on recent work by Li and Guan and show that there are polynomial-time reductions from Hamiltonian path in grid graphs to these decision problems, using a number of qubits quadratic in the number of grid vertices.
Despite rapid advances in quantum computing technologies, the qubit connectivity limitation remains to be a critical challenge. Both near-term NISQ quantum computers and relatively long-term scalable quantum architectures do not offer full connectivity. As a result, quantum circuits may not be directly executed on quantum hardware, and a quantum compiler needs to perform qubit routing to make the circuit compatible with the device layout. During the qubit routing step, the compiler inserts SWAP gates and performs circuit transformations. Given the connectivity topology of the target hardware, there are typically multiple qubit routing candidates. The state-of-the-art compilers use a cost function to evaluate the number of SWAP gates for different routes and then select the one with the minimum number of SWAP gates. After qubit routing, the quantum compiler performs gate optimizations upon the circuit with the newly inserted SWAP gates.In this paper, we observe that the aforementioned qubit routing is not optimal, and qubit routing should not be independent on subsequent gate optimizations. We find that with the consideration of gate optimizations, not all of the SWAP gates have the same basis-gate cost. These insights lead to the development of our qubit routing algorithm, NASSC (Not All Swaps have the Same Cost). NASSC is the first algorithm that considers the subsequent optimizations during the routing step. Our optimization-aware qubit routing leads to better routing decisions and benefits subsequent optimizations. We also propose a new optimization-aware decomposition for the inserted SWAP gates. Our experiments show that the routing overhead compiled with our routing algorithm is reduced by up to 69.30% (21.30% on average) in the number of CNOT gates and up to 43.50% (7.61% on average) in the circuit depth compared with the state-of-the-art scheme, SABRE.
Quantum computers offer enormous speed advantages over their classical counterparts. Still, optimization on quantum circuits is necessary to further increase their potential. Additionally, physical realizations of quantum computers place restrictions on quantum circuits, regarding the available quantum gates. In order to satisfy these restrictions, non-native gates need to be expressed as an equivalent cascade of natively available quantum gates which induces a mapping overhead. Two complementary approaches to this problem are to move around the qubits (using SWAP gates) or to apply so-called remote gates, i.e. pre-computed cascades of native gates which keep the qubit placement.In this paper, we explore how combinations of movements and remote gates can be employed to reduce the required overhead regarding the number of native gates as well as the circuit depth. We also discuss ways to find out which qubits to address with the movements in order to optimize these metrics. Our general evaluation is supplemented by evaluations on two IBM quantum computer architectures to show how quantum circuits can be optimized by the presented patterns.
Many quantum computers have constraints regarding which two-qubit operations are locally allowed.To run a quantum circuit under those constraints, qubits need to be mapped to different quantum registers, and multi-qubit gates need to be routed accordingly.Recent developments have shown that compiling strategies based on Steiner tree provide a competitive tool to route CNOTs.However, these algorithms require the qubit map to be decided before routing.Moreover, the qubit map is fixed throughout the computation, i.e. the logical qubit will not be moved to a different physical qubit register.This is inefficient with respect to the CNOT count of the resulting circuit.In this paper, we propose the algorithm PermRowCol for routing CNOTs in a quantum circuit.It dynamically remaps logical qubits during the computation, and thus results in fewer output CNOTs than the algorithms Steiner-Gauss [14] and RowCol [27].Here we focus on circuits over CNOT only, but this method could be generalized to a routing and mapping strategy on Clifford+T circuits by slicing the quantum circuit into subcircuits composed of CNOTs and single-qubit gates.Additionally, PermRowCol can be used in place of Steiner-Gauss in the synthesis of phase polynomials as well as the extraction of quantum circuits from ZX-diagrams.
Recent advances in the development of quantum technology have made it possible to run small quantum programs on real quantum computers. This has created a need for compiling methods specific to these quantum computers. Unlike classical computers, if a quantum computation takes too long, the qubits might decohere and lose their information, making the computation useless. Hence, well-optimized quantum programs are a necessity. Like classical computers, quantum computers have registers for qubits that are generally sparsely connected. However, classical compilation methods that rely on copying data from one register to another do not apply to quantum computers because qubits cannot be copied. This problem is called the qubit routing problem. Following classical compilation, one could solve the connectivity constraints by moving the qubits to adjacent qubit registers. However, this requires the addition of SWAP gates throughout the quantum circuit, resulting in a strictly longer program. Additionally, a SWAP gate on qubits is not cheap and requires three CNOT gates each. Instead, in this thesis, we have defined a new method for quantum compilation that is based in the quantum nature of the program to be compiled. Instead of routing the qubits directly, we generate new machine code (in the form of quantum circuits) from an intermediate representation. We call this process quantum circuit synthesis. During synthesis, we make sure that all generated gates are supported by the target quantum hardware. Additionally, if the synthesis process is optimal, the resulting quantum circuit will also be optimal, although the methods proposed in this thesis are all heuristic in nature due to the computational complexity of optimal architecture-aware synthesis. We construct the nested intermediate representation starting from sequences of CNOT circuits interleaved with single qubit gates and incrementally generalize the intermediate representation to a universal representation. In particular, we propose two algorithms for synthesizing CNOT circuits from their parity matrix representation and one algorithm for synthesizing phase polynomials (i.e. CNOT+RzR_zRz​ circuits). Additionally, we show that when combining these methods into the universal representation called Mixed ZX-phase polynomial, it is competitive with existing commercial quantum compilers IBM's Qiskit and Quantinuum's TKET for large circuits. This thesis additionally contains a proposal for a framework to benchmark the quality of circuits used in an algorithm called Variational Quantum Eigensolver (VQE). This framework attempts to measure how close the solution found by the VQE is to our best estimate of a real molecule (i.e. accuracy), rather than a classical simulation of the approximate molecule as given to the quantum computer (i.e. precision).