Qubit Routing Using Graph Neural Network Aided Monte Carlo Tree Search

Animesh Sinha, Utkarsh Azad, Harjinder Singh

Introduction

In the Noisy Intermediate-Scale Quantum (NISQ) era, quantum hardware is characterized by limited qubit counts and, more critically, restricted physical connectivity. Most current quantum processors only allow two-qubit gates between adjacent physical qubits. To execute arbitrary quantum circuits, compilers must perform "qubit routing"—the process of inserting SWAP gates to move logical qubits across the chip until they are physically adjacent. However, each additional SWAP gate increases circuit depth, exacerbating decoherence and noise. This paper presents QRoute, a framework that leverages Graph Neural Networks (GNNs) and Monte Carlo Tree Search (MCTS) to optimize qubit routing for minimal circuit depth.

The Qubit Routing Problem

Quantum algorithms are typically designed for "logical" qubits with all-to-all connectivity. Mapping these to a physical topology, such as a grid or a specific heavy-hex lattice, requires a transformation that respects hardware constraints.

Quantum hardware topologies represented as graphs: (a) 3x3 grid and (b) IBMQX-20 architecture.

The primary objective in NISQ compilation is depth minimization. While many existing routers focus on reducing the total gate count, QRoute prioritizes parallelizing operations to keep the circuit "shallow," thereby reducing the time qubits spend in a decohering state.

Methodology: GNN-Guided MCTS

QRoute treats qubit routing as a reinforcement learning problem, employing a hybrid approach that combines structured search with neural heuristics.

1. Monte Carlo Tree Search (MCTS)

Unlike greedy heuristics that make decisions based on immediate local gains, MCTS performs a look-ahead search. It simulates potential sequences of SWAP operations, evaluates their long-term impact on circuit depth, and iteratively refines its routing strategy.

2. Graph Neural Network (GNN) Evaluator

The search process is guided by a GNN that learns the structural properties of the hardware topology. The GNN serves as both a policy network (suggesting promising SWAP moves) and a value network (estimating the remaining steps to completion). By operating directly on the connectivity graph, the model remains hardware-agnostic.

3. Mutex Locks for Parallelism

To maximize parallel gate execution, QRoute introduces a "mutex-lock" mechanism inspired by classical concurrent programming. When a qubit is involved in a gate or a SWAP, it is "locked" for that timestep. This allows the algorithm to identify and schedule multiple non-conflicting operations simultaneously, directly reducing overall circuit depth.

Decomposed quantum circuit illustrating parallel gate execution and potential mutex-lock regions.

Experimental Evaluation

The authors evaluated QRoute across various benchmarks, including random circuits (30–150 gates) and realistic algorithmic circuits (up to ~6,000 gates). Testing spanned multiple topologies, such as the 3x3 grid, the 20-qubit IBMQX-20, and the 53-qubit Google Sycamore.

Key Results

  • Depth Reduction: QRoute achieved an average 13.6% reduction in circuit depth compared to industry-standard compilers like Qiskit and t|ket⟩ on large-scale benchmarks.
  • Scalability: The framework successfully routed a complex 5,960-gate circuit in under four hours on consumer-grade hardware, demonstrating its viability for large-scale quantum applications.
  • Performance vs. RL Baselines: On small realistic circuits, QRoute outperformed previous Deep Q-Network (DQN) approaches, achieving a superior Circuit Depth Ratio (CDR) of 1.178.

Conclusion and Future Directions

QRoute demonstrates that combining the rigorous search capabilities of MCTS with the inductive bias of GNNs provides a powerful solution for the qubit routing problem. Future work includes integrating Transformer-based encoders to extend the look-ahead horizon and incorporating advanced gate primitives like BRIDGE gates to further optimize NISQ circuit execution.

Summary updated

BibTeX
@inproceedings{sinha2022qubit,
  author = {Animesh Sinha and Utkarsh Azad and Harjinder Singh},
  title = {{Qubit Routing Using Graph Neural Network Aided Monte Carlo Tree Search}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i9.21231},
}
Figure