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

Quantum circuit optimization with AlphaTensor

Francisco J. R. Ruiz, Tuomas Laakkonen, Johannes Bausch, Matej Balog, Mohammadamin Barekatain, Francisco J. H. Heras, Alexander Novikov, Nathan Fitzpatrick, Bernardino Romera-Paredes, John van de Wetering, Alhussein Fawzi, Konstantinos Meichanetzidis, Pushmeet Kohli

Introduction: The T-Gate Bottleneck

Building a fault-tolerant quantum computer—one capable of correcting its own errors—is a primary goal of modern physics. However, not all quantum operations are equal in cost. While "Clifford gates" (such as CNOT) are relatively simple to implement, "non-Clifford gates" like the T gate are extremely resource-intensive. Implementing T gates requires the production of "magic states," a process that can be two orders of magnitude more costly in terms of time and hardware space than standard operations.

Minimizing the number of T gates (the T-count) is an NP-hard problem. Traditionally, researchers have manually designed clever mathematical "gadgets" to shave off T gates. AlphaTensor-Quantum aims to automate this process, finding the most efficient representations for quantum algorithms.

Methodology: AlphaTensor-Quantum

Researchers from Google DeepMind and Quantinuum developed AlphaTensor-Quantum, an evolution of the AlphaTensor agent originally designed for matrix multiplication. The system frames circuit optimization as a reinforcement learning (RL) problem.

The AlphaTensor-Quantum pipeline: converting an input circuit into a signature tensor, which is then decomposed to produce an optimized circuit.

Key technical innovations include:

  • TensorGame: Quantum circuits are represented as a 3D "signature tensor." Optimization is treated as a single-player game where the agent decomposes this tensor into the smallest possible number of components, each representing a T gate.
  • Symmetric (Waring) Decomposition: The agent focuses on symmetric decompositions, which reduces the search space and aligns with the physics of quantum phase polynomials.
  • Gadgetization: The agent is rewarded for finding specific patterns that can be replaced by "gadgets" (like Toffoli or CS gates). These gadgets use extra "ancilla" qubits to perform complex operations with a significantly lower effective T-count.
  • Advanced Architecture: To handle circuits with up to 72 qubits, the model uses a specialized neural network featuring axial attention and symmetrization layers.

Datasets and Benchmarks

The agent was evaluated on several high-stakes benchmarks:

  • Arithmetic Primitives: Standard circuits such as 8-bit adders and Hamming weight circuits.
  • Cryptography: Finite field multiplication ($GF(2^m)$), which is essential for elliptic-curve cryptography.
  • Shor’s Algorithm: Binary addition circuits used for factoring large numbers.
  • Quantum Chemistry: Oracles (SELECT and PREPARE) used in the simulation of the FeMoco molecule, vital for understanding nitrogen fixation.

Key Insights and Results

AlphaTensor-Quantum demonstrated the ability to discover non-intuitive mathematical paths that often elude human designers:

  • Algorithmic Discovery: The agent independently discovered a quantum version of Karatsuba’s algorithm, a famous classical method for fast multiplication. This represents the first time a sub-quadratic quantum multiplication algorithm has been automatically discovered.
  • Recovering Human Ingenuity: The agent rediscovered "measurement-based uncomputation," a sophisticated trick using quantum measurements to "clean up" ancilla qubits.
  • Superior Performance: The agent outperformed all existing automated T-count optimization methods. For the "Mod $5_4$" circuit, it reduced the T-equivalent count from 8 to 2. In binary addition, it halved the Toffoli gate count compared to 2004 benchmarks, matching the current state-of-the-art human designs.

Limitations and Future Work

While powerful, AlphaTensor-Quantum is computationally intensive, often requiring hours of TPU time for complex circuits. For very large circuits (over 60 qubits), researchers must split the circuit into sub-blocks, which may miss global optimizations. Future work aims to incorporate Hadamard gates directly into the RL environment and train the agent to optimize for additional metrics like T-depth (speed) or specific hardware topologies.

Summary updated

BibTeX
@article{ruiz2025quantum,
  author = {Francisco J. R. Ruiz and Tuomas Laakkonen and Johannes Bausch and Matej Balog and Mohammadamin Barekatain and Francisco J. H. Heras and Alexander Novikov and Nathan Fitzpatrick and Bernardino Romera-Paredes and John van de Wetering and Alhussein Fawzi and Konstantinos Meichanetzidis and Pushmeet Kohli},
  title = {{Quantum circuit optimization with AlphaTensor}},
  journal = {Nat. Mac. Intell.},
  year = {2025},
  doi = {10.1038/s42256-025-01001-1},
}
Figure