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

Unitary Synthesis of Clifford+T Circuits with Reinforcement Learning

Sebastian Rietsch, Abhishek Y. Dubey, Christian Ufrecht, Maniraman Periyasamy, Axel Plinge, Christopher Mutschler, Daniel D. Scherer

Abstract: This paper presents a deep reinforcement learning approach for synthesizing unitaries into quantum circuits. Unitary synthesis aims to identify a quantum circuit that represents a given unitary while minimizing circuit depth, total gate count, a specific gate count, or a combination of these factors. While past research has focused predominantly on continuous gate sets, synthesizing unitaries from the parameter-free Clifford+T gate set remains a challenge. Although the time complexity of this task will inevitably remain exponential in the number of qubits for general unitaries, reducing the runtime for simple problem instances still poses a significant challenge. In this study, we apply the tree-search method Gumbel AlphaZero to solve the problem for a subset of exactly synthesizable Clifford+T unitaries. Our method effectively synthesizes circuits for up to five qubits generated from randomized circuits with up to 60 gates, outperforming existing tools like QuantumCircuitOpt and MIN-T-SYNTH in terms of synthesis time for larger qubit counts. Furthermore, it surpasses Synthetiq in successfully synthesizing random, exactly synthesizable unitaries. These results establish a strong baseline for future unitary synthesis algorithms.

Introduction

In quantum computing, algorithms are often expressed as large unitary matrices—mathematical descriptions of the desired operations. However, physical quantum hardware can only execute a specific set of "native" gates. Unitary Synthesis is the process of finding a sequence of these gates that reproduces the target matrix.

This research focuses on the Clifford+T gate set, the "gold standard" for fault-tolerant quantum computers. The primary challenge lies in the T-gate, which is resource-intensive to implement. Consequently, synthesis algorithms must minimize T-gate counts. Because the search space grows exponentially with the number of qubits and gates, finding optimal circuits is a notoriously difficult combinatorial problem.

Methodology: Gumbel AlphaZero for Quantum Synthesis

The researchers utilize Gumbel AlphaZero, an evolution of the reinforcement learning (RL) algorithm used to master games like Go and Chess, to automate the discovery of optimized Clifford+T circuits.

Reinforcement learning framework for unitary synthesis.

Key technical components of the framework include:

  • MDP Formulation: The problem is framed as a Markov Decision Process where the RL agent starts with an empty circuit and adds gates sequentially.
  • Residual Unitary Observation: Instead of observing the target matrix $U$ directly, the agent sees $UV^\dagger$ (the "residual" difference between the target and the current circuit). This allows the model to generalize to unseen unitaries without retraining.
  • Action Masking: To prune the massive search tree, the authors implemented rules to prevent redundant moves, such as placing two consecutive Hadamard gates that cancel each other out.
  • Parallel Search: During evaluation, the system runs 256 searches in parallel, selecting the best result based on a scoring function that prioritizes low T-counts and total gate counts.

Experimental Results and Benchmarking

The agent was evaluated using randomized unitaries (up to 5 qubits and 60 gates) and structured unitaries like the Toffoli, Fredkin, and Peres gates. It was benchmarked against state-of-the-art tools including MIN-T-SYNTH, QuantumCircuitOpt, and Synthetiq.

Synthesis performance for 5-qubit circuits.

Key findings include:

  • Scaling to 5 Qubits: The agent successfully synthesized 5-qubit circuits, a significant milestone for RL-based synthesis. For 4 and 5-qubit unitaries, the RL agent was significantly faster than exact solvers like MIN-T-SYNTH.
  • Success Rate: In deep circuits with high gate counts, the RL agent maintained a high success rate where heuristic tools like Synthetiq began to fail.
  • Optimality: For structured gates, the agent consistently found theoretically optimal T-counts, proving the effectiveness of its learned heuristics.

Discussion and Future Work

A major advantage of this approach is its inference speed. While training the RL model takes days, the time to synthesize a new circuit remains relatively flat as qubit counts increase. Furthermore, the agent implicitly learns complex commutation rules through the incentive of reducing total gate counts.

Future research will address approximate synthesis, which is critical for real-world applications where a perfect matrix match is not required. The authors also plan to incorporate ancilla qubits (extra qubits used to reduce T-counts) and explore Transformer-based architectures to better capture the topology of quantum circuits.

Summary updated

BibTeX
@inproceedings{rietsch2024unitary,
  author = {Sebastian Rietsch and Abhishek Y. Dubey and Christian Ufrecht and Maniraman Periyasamy and Axel Plinge and Christopher Mutschler and Daniel D. Scherer},
  title = {{Unitary Synthesis of Clifford+T Circuits with Reinforcement Learning}},
  booktitle = {QCE},
  year = {2024},
  doi = {10.1109/qce60285.2024.00102},
}
Figure