NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Compilation for Surface Code Quantum Computers

Abtin Molavi, Amanda Xu, Swamit Tannu, Aws Albarghouthi · DOI

Abstract

As quantum computing transitions toward fault-tolerant architectures, efficient compilation for surface codes becomes critical. This paper presents DASCOT (Dependency-Aware Surface Code OpTimization), a compiler designed to optimize the mapping and routing of logical qubits on a surface code grid. By leveraging the dependency structure of quantum circuits, DASCOT reduces execution time by up to 31% compared to existing flow-insensitive tools, offering a scalable solution for large-scale quantum systems.

Introduction

Fault-tolerant quantum computing relies on error-correcting codes, with surface codes being a leading candidate for practical implementation. In these architectures, logical qubits are represented as grids of physical qubits. Operations between logical qubits, such as CNOT gates performed via lattice surgery, require dedicated paths of "ancilla" qubits on the grid. The efficiency of a quantum program is thus heavily dependent on how these qubits are mapped to the physical grid and how the communication paths are routed.

The Mapping and Routing Challenge

The Surface Code Mapping and Routing (SCMR) problem involves two primary tasks: determining the physical grid location for each circuit qubit (mapping) and establishing the paths and execution order for gates (routing). Because routing paths cannot overlap, poor planning leads to "traffic jams," where gates that could logically run in parallel are forced to execute sequentially.

The SCMR problem: A routed gate (CNOT q0, q1) can physically block the path required for another gate (CNOT q2, q3), leading to execution delays.

Existing compilers often utilize flow-insensitive approaches, failing to account for the temporal order of gates. This oversight results in layouts that avoid conflicts between gates that would never actually run concurrently, while failing to optimize for those that do.

The DASCOT Framework

DASCOT addresses these inefficiencies through a two-stage, dependency-aware optimization process that decouples mapping from routing while maintaining awareness of the circuit's flow.

The DASCOT workflow decouples the SCMR problem into dependency-aware mapping and routing stages, optimized via simulated annealing.

Dependency-Aware Mapping

DASCOT employs a Layered Interaction Graph to partition circuits into layers of gates that can execute in parallel. Using simulated annealing, the mapping algorithm minimizes the overlap of "bounding boxes" for gates within the same layer. This ensures the grid layout is optimized to support maximum parallelism for concurrent operations.

Dependency-Aware Routing

Within each layer, the routing order is critical. DASCOT evaluates the "criticality" of each gate—defined by the number of subsequent operations that depend on its completion. A simulated annealing search identifies a routing order that prioritizes these bottleneck operations, even if it requires longer individual paths, to improve overall circuit throughput.

Experimental Evaluation

The performance of DASCOT was evaluated against a benchmark suite of 232 application circuits, including algorithms like Shor’s, Quantum Fourier Transform (QFT), and Grover’s, as well as synthetic dense circuits designed to stress-test congestion handling. To establish a baseline for optimality, the authors developed a Boolean satisfiability (SAT)-based optimal solver for small-scale circuits.

Results and Discussion

DASCOT demonstrated significant improvements over state-of-the-art tools like Autobraid:

  • Efficiency: DASCOT outperformed or matched existing methods on 84% of benchmarks in compact architectures.
  • High-Density Performance: For complex workloads like the QFT, DASCOT achieved a 31% reduction in execution time.
  • Near-Optimality: On small circuits, DASCOT's solutions were within 25% of the theoretical optimum determined by the SAT solver.
  • Scalability: The compiler successfully processed a 10,000-qubit Bernstein-Vazirani circuit in just a few minutes, proving its viability for the fault-tolerant era.

Conclusion

DASCOT highlights the importance of flow-sensitivity in quantum compilation. By accounting for gate dependencies and operation criticality, it significantly mitigates grid congestion in surface code architectures. Future work includes extending the framework to handle dynamic mapping (qubit movement) and integrating the scheduling of magic state distillation for T-gates.

Summary updated

BibTeX
@article{molavi2025compilation,
  author = {Abtin Molavi and Amanda Xu and Swamit Tannu and Aws Albarghouthi},
  title = {{Compilation for Surface Code Quantum Computers}},
  journal = {Proc. ACM Program. Lang.},
  year = {2025},
  doi = {10.1145/3720416},
}
Figure