Research
AlphaClifford: Efficient Clifford Synthesis and Transpilation with Model-based RL
Overview Research area: Quantum computing — specifically quantum circuit synthesis and transpilation for Clifford circuits, tackled with model-based reinforcement learning (Monte Carlo Tree Search). T

- arXiv
- 2608.18946
- Published
- 2026-08-19
- Authors
- Daniele Lizzio Bosco, Jacopo Cossio, Carla Piazza, Giuseppe Serra
AI summary
Overview
Research area: Quantum computing — specifically quantum circuit synthesis and transpilation for Clifford circuits, tackled with model-based reinforcement learning (Monte Carlo Tree Search).
Technical level: Intermediate. The paper assumes familiarity with Pauli/stabilizer formalism, symplectic representations, and basic RL concepts, but the core ideas are explained with motivating examples.
Scope: The paper introduces AlphaClifford, an MCTS-driven RL framework that synthesizes and transpiles Clifford circuits using only the {H, S, CNOT} gate set, and evaluates it on unconstrained optimization, hardware-constrained transpilation, and post-synthesis inside a Clifford+T pipeline.
What This Paper Is About
Clifford circuits are central to quantum error correction and fault-tolerant compilation, and they can be represented compactly as binary symplectic matrices. Standard synthesis methods such as the Aaronson–Gottesman algorithm produce correct but gate-hungry circuits, so the paper's goal is to find much shorter equivalent gate sequences. AlphaClifford learns to search the space of symplectic matrices and turn a target matrix into the identity with as few gates as possible.
Key Contributions
- A model-based RL framework for Clifford synthesis. AlphaClifford casts circuit compilation as a tree search over symplectic matrices, where nodes are matrices and edges are {H, S, CNOT} operations, and trains paired policy and value networks inside a Monte Carlo Tree Search loop.
- An inverted state formulation that shrinks the search space. Instead of feeding the model both the current matrix and a fixed target, the observation is the single product M_C·M_k⁻¹, turning synthesis into a fixed goal-reaching task (reach the identity). Mapping the state to the symplectic group rather than the full Clifford group reduces the search space by a factor of 2^(2n), and the residual Pauli correction is recovered in O(n²) time.
- Three demonstrated applications from one framework. Unconstrained Clifford optimization, hardware-constrained transpilation (by restricting the action space to a connectivity map), and use as a post-synthesis optimizer on Clifford blocks inside a Clifford+T logical synthesis pipeline. The same models can also act as peephole optimizers on subcircuits of larger circuits.
- Benchmarks against classical and RL baselines. Comparisons against Aaronson–Gottesman (as implemented in qiskit), qiskit greedy, stim, three heuristic decomposers (A*, greedy, Volanto) from prior work, and an RL-based Clifford transpiler, with the paper reporting up to 56% total gate reduction versus Aaronson–Gottesman and up to 20% versus the RL-based Clifford transpiler.
Main Findings
- Unconstrained optimization wins on most metrics: For n ∈ {3, 4, 5, 6, 7} over 100 Clifford circuits involving up to 4n² gates, AlphaClifford averaged 8.85, 13.90, 20.66, 29.56 and 40.05 total gates, versus 19.99, 25.89, 38.05, 51.37 and 65.61 for Aaronson–Gottesman. Sampling 10 times (AlphaClifford₁₀) lowered these to 8.78, 13.39, 19.49, 27.11 and 36.75.
- Two-qubit gate counts also improve: AlphaClifford averaged 4.25, 7.50, 11.85, 17.47 and 25.53 CNOTs for n = 3–7, against 3.65, 10.41, 16.17, 22.43 and 28.59 for Aaronson–Gottesman, and AlphaClifford₁₀ reached 4.06, 6.96, 10.98, 15.82 and 23.06. The n = 3 CNOT average is the notable case where Aaronson–Gottesman is lower.
- The advantage holds despite a weaker gate set: The A*, greedy and Volanto baselines from prior work achieve lower gate counts only when allowed a richer generating set including transvection gates; when restricted to {H, S, CNOT}, their reported totals (for example 19.49, 33.47, 49.90, 68.33 and 89.47 for A*) are far above AlphaClifford's. Nearly all methods synthesized every instance correctly, except the Greedy method, which failed on a few larger instances (averages then reported only over solved instances).
- Transpilation improves total gates but not always CNOTs: On six connectivity maps (line graphs 3L, 4L, 5L and T-shaped graphs 4T, 5T, 6T from 3 to 6 qubits), AlphaClifford₁₀ produced total gate counts of 9.81, 17.08, 27.58, 15.76, 25.04 and 38.84, versus 12.19, 22.90, 33.31, 21.58, 30.92 and 46.11 for RL-Qiskit₁₀. Corresponding AlphaClifford₁₀ CNOT counts were 4.99, 10.08, 17.31, 8.96, 15.56 and 25.10, versus 4.60, 9.54, 16.08, 8.43, 14.29 and 22.74 for RL-Qiskit₁₀, i.e. slightly higher in every case; the authors suggest a reward tailored to two-qubit gates would help here.
- Post-synthesis gains inside a Clifford+T pipeline: On 10 random circuits for each n ∈ {5, 10, 15, 20, 25}, AlphaClifford reported Clifford-count reductions of 2.44%, 2.39%, 2.53%, 2.50% and 2.43% in the "without pre-compilation" setting, compared with 0.36%, 0.13%, 0.09%, 0.14% and 0.14% for Qiskit transpile. The table's "with pre-compilation" section is truncated in the supplied text, so those values are not reported here.
- Sampling more than once helps consistently: In every optimization and transpilation setting, AlphaClifford₁₀ improved on the single-shot AlphaClifford₁, indicating that the stochastic policy provides useful diversity.
- A simple reward shapes the result: A per-step penalty of −1/√n and a terminal reward of +n, with no problem-specific heuristics, implicitly minimizes total gate count; the authors note that changing the penalty weighting would shift the objective, for example toward fewer CNOTs.
Methodology in Plain English
The researchers exploit a classical shortcut: any Clifford circuit can be described by a binary symplectic matrix, and two circuits with the same matrix differ only by a Pauli layer. So instead of learning circuits directly, they learn to move around in matrix space.
- Tree formulation: Each node is a symplectic matrix, each edge is applying an H, S, or CNOT, and the goal is the identity. In the constrained setting, only CNOTs allowed by the hardware connectivity map are legal moves.
- Inverted state: Rather than tracking the current circuit and a separate target, the state is the single matrix M_C·M_k⁻¹, so every episode starts at the target and the agent's job is always to reach the same terminal matrix.
- MCTS loop: Four standard phases — selection using the UCT rule with an exploration constant c, expansion of a new child, simulation via a rollout sampled from the policy network and scored by the value network, and backpropagation of the outcome.
- Training: Each episode uses a fresh random target built from k random Clifford gates; a step penalty and an identity-reaching bonus drive learning. A linear curriculum starts at k = 1 and raises k once a 95% solve rate is reached, stopping at k_max = 4n². Both policy and value networks are 12-layer fully connected networks with 256 hidden units per layer, organized as 4 residual blocks with skip connections every three layers; a separate model is trained per qubit count and per connectivity map.
- Inference: Compute the target's symplectic matrix, query the model for a gate sequence, compute the phase discrepancy between target and synthesizer, then append the X and Z gates that fix the Pauli leftover, yielding a fully equivalent circuit.
Why This Matters
Compilation overhead is one of the practical bottlenecks between an algorithm and a runnable quantum program. Showing that a search-based learned model can beat a 20-year-old polynomial-time baseline while using a deliberately restricted gate set suggests that structure-aware RL is a viable alternative to hand-written heuristics in compiler toolchains.
Real-world applications:
- Fault-tolerant quantum computing: Clifford blocks dominate the cheap part of Clifford+T circuits, so shrinking them reduces overall fault-tolerant resource estimates and the number of expensive T gates that must be distilled.
- Hardware-constrained execution: The transpilation mode maps logical circuits onto restricted connectivity graphs such as line and T-shaped topologies, which resemble the limited couplers of superconducting devices.
- Near-term device execution: Fewer total gates and shallower circuits mean less accumulated error on noisy hardware, directly extending what can be run before decoherence wins.
- Post-processing in existing toolchains: Because the method works as a peephole pass on Clifford subcircuits, it can be bolted onto pipelines built around KAK decomposition and gridsynth-style synthesis without redesigning them.
Industry relevance: quantum compiler and SDK vendors, cloud quantum providers scheduling jobs onto fixed device topologies, and hardware teams estimating error-correction resource budgets all consume exactly this kind of gate-count reduction.
Future Directions
- Reward engineering toward CNOT minimization. The transpilation results show lower total gates but slightly more two-qubit gates than the RL baseline; the authors explicitly suggest tuning the penalty to target CNOT count, or to depth, or to device-specific error rates on qubits and couplers.
- Richer gate sets. The authors expect better performance if more expressive generators are allowed than {H, S, CNOT}, which the current experiments deliberately avoided.
- Scaling beyond local improvements. The peephole strategy lets small-n models optimize larger circuits but yields only local, non-globally-optimal gains; how to push toward larger full-circuit synthesis is left open.
- Deeper integration into logical synthesis. The post-synthesis results use the relatively small Clifford blocks produced by standard peephole synthesis, leaving open how the method behaves on much larger consecutive Clifford regions in full Clifford+T compilation flows.
Target Audience
Quantum compiler and transpiler researchers, reinforcement-learning researchers working on combinatorial optimization, and fault-tolerant quantum computing practitioners who care about gate-count and resource estimation. It is also useful for graduate students wanting a concrete case study of MCTS plus neural guidance applied to an algebraically structured quantum problem, and for engineers building or extending quantum SDK compilation passes.
Authors’ abstract
Clifford circuits play a foundational role in quantum computing, particularly due to their importance in quantum error correction and fault-tolerant logical synthesis. While these circuits can be efficiently simulated and represented as symplectic matrices, standard synthesis methods-such as the Aaronson-Gottesman algorithm-often yield sub-optimal circuits with excessively high gate counts. In this work, we introduce AlphaClifford, a model-based Reinforcement Learning framework powered by Monte Carlo Tree Search, designed to efficiently synthesize Clifford circuits from the fundamental gate set composed of H, S, and CNOT. By modeling the state space through the algebraic properties of the symplectic group, AlphaClifford effectively explores this combinatorial space to minimize overall circuit cost. For unconstrained Clifford optimization, our approach achieves a consistent reduction in both total and two-qubit (CNOT) gate counts compared to state-of-the-art synthesis heuristics, despite operating with a strictly less expressive gate set. Furthermore, we demonstrate the broad applicability of our framework on two additional tasks: hardware-constrained Clifford transpilation, where we outperform existing RL-based compilers, and as a post-synthesis optimization component within a full Clifford+T logical synthesis pipeline. Our results underscore that model-based RL is highly effective at addressing the combinatorial complexities of quantum compilation, offering a scalable pathway to mitigate hardware constraints in both near-term and future fault-tolerant quantum devices.