Skip to main content
QUICK REVIEW

[Paper Review] Using Reinforcement Learning to Perform Qubit Routing in Quantum Compilers

Matteo G. Pozzi, Steven Herbert|arXiv (Cornell University)|Jul 31, 2020
Quantum Computing Algorithms and ArchitectureComputer Science16 citations
TL;DR

This paper proposes a deep Q-learning (DQN)-based reinforcement learning approach for qubit routing in quantum compilers, significantly outperforming state-of-the-art compilers like Qiskit and t|ket⟩ on both random and realistic near-term quantum circuit benchmarks. The method uses a novel state representation and learning paradigm to minimize circuit depth added by SWAP gates, achieving superior performance in minimizing depth overhead while remaining adaptable to diverse quantum architectures.

ABSTRACT

"Qubit routing" refers to the task of modifying quantum circuits so that they satisfy the connectivity constraints of a target quantum computer. This involves inserting SWAP gates into the circuit so that the logical gates only ever occur between adjacent physical qubits. The goal is to minimise the circuit depth added by the SWAP gates. In this paper, we propose a qubit routing procedure that uses a modified version of the deep Q-learning paradigm. The system is able to outperform the qubit routing procedures from two of the most advanced quantum compilers currently available, on both random and realistic circuits, across near-term architecture sizes.

Motivation & Objective

  • To address the challenge of qubit routing in near-term quantum architectures, where physical qubit connectivity constraints require insertion of SWAP gates to make arbitrary circuits executable.
  • To improve upon existing qubit routing algorithms that fail to minimize circuit depth, especially under realistic hardware constraints.
  • To develop a reinforcement learning-based system that is adaptive and scalable across diverse quantum architectures, unlike static, rule-based routing approaches.
  • To benchmark the proposed method against state-of-the-art compilers, demonstrating superior performance in minimizing depth overhead.

Proposed method

  • The system frames qubit routing as a reinforcement learning problem, using a modified deep Q-network (DQN) to learn optimal SWAP gate insertion strategies.
  • A new state representation encodes the current qubit mapping and circuit structure, capturing relevant connectivity and gate dependencies for decision-making.
  • The agent learns through trial-and-error using a reward function that penalizes circuit depth and favors minimal SWAP insertion.
  • An annealing mechanism is employed to balance exploration and exploitation during training, improving convergence and performance.
  • The method uses experience replay and target networks to stabilize training, as in standard DQN, but adapted for the dynamic nature of quantum circuit compilation.
  • The system is trained on circuit instances and then evaluated on unseen random and realistic benchmarks, including 4x4 grid architectures.

Experimental results

Research questions

  • RQ1Can a deep Q-learning approach effectively solve the qubit routing problem in quantum compilers, achieving competitive or better performance than existing methods?
  • RQ2How does the proposed DQN-based routing system compare to state-of-the-art compilers like Qiskit and t|ket⟩ in terms of circuit depth minimization?
  • RQ3Can the RL-based system generalize across different quantum architecture topologies and circuit types, including realistic near-term benchmarks?
  • RQ4Does the proposed method maintain performance while being adaptable to new or evolving quantum hardware architectures?

Key findings

  • The DQN-based routing system outperforms Qiskit’s StochasticSwap and t|ket⟩ on both random and realistic circuit benchmarks, achieving lower circuit depth overhead.
  • On the 4x4 grid realistic benchmark, the system achieved a CDR (Circuit Depth Ratio) significantly better than Qiskit’s StochasticSwap and comparable to t|ket⟩, despite being slower in runtime.
  • The method demonstrated strong generalization across different circuit types and architectures, showing adaptability beyond static routing heuristics.
  • The system achieved a 15% improvement in CDR on average over Qiskit’s StochasticSwap on the realistic test set, with consistent gains across multiple circuit families.
  • Runtime remains a bottleneck, with the system taking ~2400s per 100 circuits on 4x4 grids, though this is comparable to or better than other high-performing methods like LookaheadSwap.
  • The authors identify several optimization paths—such as neural network pruning, better parallelization, and adaptive annealing—that could reduce runtime without sacrificing performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.