Table of Contents
Fetching ...

Generating Compilers for Qubit Mapping and Routing

Abtin Molavi, Amanda Xu, Ethan Cecchetti, Swamit Tannu, Aws Albarghouthi

TL;DR

The paper presents a unified framework for automatically generating qubit mapping and routing compilers (QMR) by introducing an abstract QMR problem based on device state machines and a domain-specific language named Marol. It shows how Marol programs can parameterize a maximal-state solver, MaxState, to synthesize compilers that execute circuits on diverse hardware without hand-crafting per-architecture implementations. Across nisq and fault-tolerant settings, the generated compilers achieve competitive or superior performance compared to handwritten tools, including scenarios where they match or exceed the quality of industry baselines. The work demonstrates broad applicability across architectures (e.g., nisq, surface code, trapped ions, and reconfigurable atom arrays) and provides extensive empirical evaluation, arguing that automatic QMR compiler synthesis can accelerate adaptation to rapidly evolving quantum hardware while maintaining practical runtime and quality guarantees.

Abstract

To evaluate a quantum circuit on a quantum processor, one must find a mapping from circuit qubits to processor qubits and plan the instruction execution while satisfying the processor's constraints. This is known as the qubit mapping and routing (QMR) problem. High-quality QMR solutions are key to maximizing the utility of scarce quantum resources and minimizing the probability of logical errors affecting computation. The challenge is that the landscape of quantum processors is incredibly diverse and fast-evolving. Given this diversity, dozens of papers have addressed the QMR problem for different qubit hardware, connectivity constraints, and quantum error correction schemes by a developing a new algorithm for a particular context. We present an alternative approach: automatically generating qubit mapping and routing compilers for arbitrary quantum processors. Though each QMR problem is different, we identify a common core structure-device state machine-that we use to formulate an abstract QMR problem. Our formulation naturally leads to a compact domain-specific language for specifying QMR problems and a powerful parametric algorithm that can be instantiated for any QMR specification. Our thorough evaluation on case studies of important QMR problems shows that generated compilers are competitive with handwritten, specialized compilers in terms of runtime and solution quality.

Generating Compilers for Qubit Mapping and Routing

TL;DR

The paper presents a unified framework for automatically generating qubit mapping and routing compilers (QMR) by introducing an abstract QMR problem based on device state machines and a domain-specific language named Marol. It shows how Marol programs can parameterize a maximal-state solver, MaxState, to synthesize compilers that execute circuits on diverse hardware without hand-crafting per-architecture implementations. Across nisq and fault-tolerant settings, the generated compilers achieve competitive or superior performance compared to handwritten tools, including scenarios where they match or exceed the quality of industry baselines. The work demonstrates broad applicability across architectures (e.g., nisq, surface code, trapped ions, and reconfigurable atom arrays) and provides extensive empirical evaluation, arguing that automatic QMR compiler synthesis can accelerate adaptation to rapidly evolving quantum hardware while maintaining practical runtime and quality guarantees.

Abstract

To evaluate a quantum circuit on a quantum processor, one must find a mapping from circuit qubits to processor qubits and plan the instruction execution while satisfying the processor's constraints. This is known as the qubit mapping and routing (QMR) problem. High-quality QMR solutions are key to maximizing the utility of scarce quantum resources and minimizing the probability of logical errors affecting computation. The challenge is that the landscape of quantum processors is incredibly diverse and fast-evolving. Given this diversity, dozens of papers have addressed the QMR problem for different qubit hardware, connectivity constraints, and quantum error correction schemes by a developing a new algorithm for a particular context. We present an alternative approach: automatically generating qubit mapping and routing compilers for arbitrary quantum processors. Though each QMR problem is different, we identify a common core structure-device state machine-that we use to formulate an abstract QMR problem. Our formulation naturally leads to a compact domain-specific language for specifying QMR problems and a powerful parametric algorithm that can be instantiated for any QMR specification. Our thorough evaluation on case studies of important QMR problems shows that generated compilers are competitive with handwritten, specialized compilers in terms of runtime and solution quality.

Paper Structure

This paper contains 97 sections, 3 theorems, 10 equations, 22 figures, 1 table, 4 algorithms.

Key Result

theorem 1

Let $\mathit{Sol}\xspace$ be the solution returned by $\mathrm{MaxState\xspace}_\mathit{P}\xspace$ on input $(A, C\xspace)$. Then, $(C\xspace, A, \mathit{Sol}\xspace) \in \llbracket \mathit{P}\xspace \rrbracket$.

Figures (22)

  • Figure 1: Overview of our approach to qmr compiler generation. Given a specification of a qmr problem in Marol, we generate a compiler by instantiating our parametric solver. The generated compiler takes a quantum circuit and target qpu graph as input and produces a mapping and routing solution.
  • Figure 2: A simple quantum circuit
  • Figure 3: Overview of the nisqmr problem
  • Figure 4: Overview of the scmr problem (examples adapted from dascot)
  • Figure 5: The Marol definition of the nisqmr problem
  • ...and 17 more figures

Theorems & Definitions (14)

  • definition 1: Instruction
  • definition 2: Quantum circuit
  • definition 3: Gate dependency
  • definition 4: Circuit layer
  • definition 5: Device state
  • definition 6: Device state machine
  • definition 7: Mapping & Routing Solution
  • definition 8: Marol semantics
  • theorem 1: $\mathrm{MaxState\xspace}_\mathit{P}\xspace$ Soundness
  • theorem 2: $\mathrm{MaxState\xspace}_\mathit{P}\xspace$ Termination
  • ...and 4 more