AlphaQubit 2: Streaming Neural Decoder for QEC
- AlphaQubit 2 is a streaming neural decoder for topological quantum error correction that integrates recurrence and transformer self-attention to process stabilizer measurement histories.
- It supports both the XZZX rotated surface code and Bell-flagged triangular colour code under realistic circuit-level noise, validated through extensive simulations and experimental data.
- AQ2 achieves near-optimal logical error rates and sub‑1 μs cycle throughput with its compact real-time variant, advancing scalable, real-time quantum error correction.
AlphaQubit 2 (AQ2) is a neural-network decoder for topological quantum error-correcting codes, introduced as a decoder designed to satisfy three requirements that are usually in tension: high decoding accuracy, high speed or real-time throughput, and scalability to larger code distances and long experiments (Senior et al., 8 Dec 2025). It is presented as a discriminative decoder that takes the history of stabilizer-measurement information from a topological-code memory experiment and predicts the relevant logical observable(s) at the end of the experiment, thereby determining the logical frame update implied by the observed syndrome history (Senior et al., 8 Dec 2025). The paper studies AQ2 on both the XZZX rotated surface code and the Bell-flagged triangular colour code under realistic circuit-level noise, and introduces a compact real-time variant, AQ2-RT, for sustained sub--per-cycle surface-code decoding on commercial machine-learning accelerators (Senior et al., 8 Dec 2025).
1. Historical position and problem formulation
AQ2 is positioned after the original AlphaQubit line as an attempt to improve the practical accuracy–speed tradeoff of neural quantum decoders while extending applicability beyond the surface code to the more difficult Bell-flagged colour code (Senior et al., 8 Dec 2025). The central problem is not decoding in the abstract, but decoding under the operational constraints of fault-tolerant quantum computation: a practical decoder must exploit long-range and temporal correlations in realistic circuit-level noise, keep up with hardware cycle time, and remain usable at large code distance and over very long syndrome streams (Senior et al., 8 Dec 2025).
The paper emphasizes that prior decoders typically occupied only one part of this design space. Real-time matching and PyMatching were faster but less accurate, whereas Libra and Tesseract were stronger high-accuracy baselines but slower or harder to scale (Senior et al., 8 Dec 2025). For colour codes, the paper states that the lack of a decoder simultaneously achieving speed, accuracy, and scalability had become a major bottleneck, particularly because colour codes are attractive for more resource-efficient logical operations (Senior et al., 8 Dec 2025).
AQ2 addresses this by adopting a streaming spatiotemporal architecture with per-stabilizer latent states, temporal recurrence, spatial transformer self-attention, temporal compression, and a readout network with pooling and cross-attention (Senior et al., 8 Dec 2025). This suggests that AQ2 is best understood not simply as a higher-capacity successor to AlphaQubit 1, but as a systems-oriented redesign intended to preserve strong logical decoding performance while making deployment at larger scales more plausible.
2. Code families, syndrome structure, and noise models
The paper evaluates AQ2 on two planar topological code families (Senior et al., 8 Dec 2025). For the surface code, the setting is the XZZX rotated surface code, where a logical qubit is encoded on a grid of data qubits, with measure qubits performing repeated X- and Z-type stabilizer checks (Senior et al., 8 Dec 2025). A detection event is defined as a disagreement between consecutive measurements of the same stabilizer, and the final data-qubit measurement induces the last syndrome slice (Senior et al., 8 Dec 2025). The reported simulations evaluate the surface-code decoder up to distance 23 (Senior et al., 8 Dec 2025).
For the colour code, the paper focuses on the Bell-flagged triangular colour code, in which data qubits lie on the vertices of a honeycomb lattice and each hexagonal face has an X stabilizer and a Z stabilizer (Senior et al., 8 Dec 2025). A full correction cycle reads all X stabilizers and then all Z stabilizers, using two ancillas per hexagon, one of which serves as a flag to signal dangerous readout faults (Senior et al., 8 Dec 2025). AQ2 is evaluated on this code up to distance 27 (Senior et al., 8 Dec 2025).
The principal synthetic benchmark uses Stim with the SI1000 circuit-level depolarizing noise model at target physical error rate
The paper states that this is a realistic circuit-level noise model intended to approximate superconducting-hardware noise, including gate, measurement, reset, and idle noise at the circuit level, with the updated SI1000 interpretation including post-measurement and reset noise terms and treating measurement and reset as separate operations (Senior et al., 8 Dec 2025).
In addition to simulation, AQ2 is evaluated on experimental Willow surface-code data at distances 3, 5, and 7 (Senior et al., 8 Dec 2025). The transfer pipeline for these experiments consists of pretraining on SI1000, fine-tuning on a fitted detector error model (DEM), and further fine-tuning on real hardware data (Senior et al., 8 Dec 2025).
3. Architectural organization
AQ2 is described as a streaming spatiotemporal neural architecture organized around per-stabilizer representations, temporal recurrence for each stabilizer independently, spatial transformer self-attention across all stabilizers at a given time, temporal compression over groups of cycles, and a readout network with pooling and cross-attention (Senior et al., 8 Dec 2025). For AQ2-full, one processing block uses the layer sequence
The paper identifies this as a key design change relative to AlphaQubit 1: transformer computation is no longer buried inside a large recurrent core, and instead lightweight recurrent updates are interleaved with transformer layers, allowing more parallelism across time blocks during inference (Senior et al., 8 Dec 2025).
For the surface code, the embedding for each stabilizer includes measurement information, detection event information, and spatial position information (Senior et al., 8 Dec 2025). For the colour code, the embedding includes stabilizer measurement outcomes, corresponding flag outcomes, basis information, and spatial coordinates (Senior et al., 8 Dec 2025). AQ2 also includes explicit geometry through normalized and coordinates embedded linearly, rotational positional encodings (RoPE) in spatial self-attention, and learned basis embeddings for colour-code measurements where X and Z occur at the same location (Senior et al., 8 Dec 2025).
Temporal compression is a prominent architectural feature. Instead of processing every cycle separately, AQ2 groups several consecutive cycles: 6 cycles for simulated surface code, 3 cycles for simulated colour code, and 5 cycles for Willow data (Senior et al., 8 Dec 2025). These grouped cycles are concatenated and projected into a compressed representation, while the final data-qubit-readout-derived syndrome slice is embedded separately but processed by the same network (Senior et al., 8 Dec 2025).
The temporal layers are recurrent and operate independently per stabilizer with shared parameters; for AQ2-full, the previous hidden state and current input are concatenated, projected back to hidden dimension, followed by GELU and RMSNorm, and the result becomes both the layer output and the next recurrent state (Senior et al., 8 Dec 2025). State is initialized to zero at the start of the experiment (Senior et al., 8 Dec 2025). AQ2-RT replaces this recurrence with a faster element-wise gated recurrence chosen specifically for throughput (Senior et al., 8 Dec 2025).
The spatial layers are transformer blocks over stabilizers at a single time step, each containing RMSNorm, multi-head self-attention across stabilizer embeddings, a residual connection, second normalization, and a gated dense block for further update (Senior et al., 8 Dec 2025). The paper explicitly states that AQ2 uses no convolutions (Senior et al., 8 Dec 2025).
The readout stage proceeds after the final cycle by mean-pooling the final per-stabilizer representations, replicating the pooled representation once per logical observable, adding a learned logical-observable embedding, applying two cross-attention transformer layers and two residual dense layers, and projecting to one channel with logistic activation (Senior et al., 8 Dec 2025). Operationally, the decoder outputs an estimate of the probability that the logical observable is 1 (Senior et al., 8 Dec 2025).
4. Training methodology and objectives
AQ2 is trained with binary cross-entropy on the final logical observable bit, but a major feature of training is the use of privileged simulated labels unavailable in real operation (Senior et al., 8 Dec 2025). The four auxiliary labels per cycle are fake intermediates, noiseless observable, noiseless delta, and noiseless-to-intermediate delta (Senior et al., 8 Dec 2025). The total loss is a weighted sum,
This auxiliary supervision is used only during training and is described as accelerating and stabilizing optimization (Senior et al., 8 Dec 2025).
The principal synthetic training regime uses data generated by Stim from memory circuits under SI1000 circuit-level depolarizing noise (Senior et al., 8 Dec 2025). Training does not use a single noise point, but a mixture of noise levels sampled from code-specific distributions. For the main surface-code models, the paper gives
where the second entry is the relative sampling weight (Senior et al., 8 Dec 2025).
Optimization uses Lion for most training and Muon for fine-tuning, with batch sizes generally 1024, a 1M-example linear warmup, and fixed learning rate with optional cosine decay (Senior et al., 8 Dec 2025). The learning-rate scaling rule is given as
where 0 is the number of stabilizers and 1 is the number of cycles, with the effective number of cycles doubled for the colour code (Senior et al., 8 Dec 2025).
A code-distance curriculum is used to improve convergence: early training emphasizes small distances and short durations, and later training gradually shifts toward larger distances (Senior et al., 8 Dec 2025). The paper reports very large training scale, with many models trained on 2 examples, the large-distance colour model on 3 examples, surface-code 4 fine-tuning on 5 examples, and colour-code 6 fine-tuning on 7 examples (Senior et al., 8 Dec 2025).
Regularization includes input masking or dropout: 50% of stabilizer representations in each cycle are zeroed on 80% of training examples (Senior et al., 8 Dec 2025). The paper explicitly compares this to BERT-style masking and states that it improves training (Senior et al., 8 Dec 2025).
For Willow data, the transfer-learning workflow is staged: pretrain on SI1000, fine-tune on a DEM fitted to hardware data, then fine-tune on real experimental samples (Senior et al., 8 Dec 2025). This training philosophy preserves a core feature of the AlphaQubit line, but AQ2 extends it to a broader architectural and code-family setting.
5. Reported decoding performance
For simulated 120-cycle surface-code memory experiments at 8 SI1000 noise, the paper reports that AQ2 reaches, at distance 23,
9
per cycle (Senior et al., 8 Dec 2025). The paper characterizes this as close to Libra and states that AQ2 substantially outperforms both uncorrelated PyMatching and correlated PyMatching on this benchmark (Senior et al., 8 Dec 2025). For the Bell-flagged colour code, AQ2 is reported to track an idealized Tesseract-derived trend closely up to distance 23, and at distance 27, with a 3-model ensemble, reaches
0
per cycle (Senior et al., 8 Dec 2025).
The paper defines logical error per cycle for fixed-length shots as
1
where 2 is the fraction of incorrectly decoded shots of length 3 (Senior et al., 8 Dec 2025). For experimental data with multiple durations, it defines
4
and fits
5
where 6 is the inferred per-cycle logical error rate (Senior et al., 8 Dec 2025).
On Willow distances 3, 5, and 7, the paper states that AQ2 achieves logical error rates comparable to the previous slower AQ1 and better than Libra, while AQ2-RT is close to AQ2-full and better than the original Willow real-time matching decoder and Libra (Senior et al., 8 Dec 2025). The text excerpt does not provide the full numeric Willow LER table, so the comparison is qualitative at that level.
The real-time surface-code result emphasized in the paper concerns distance 11, where AQ2-full reports
7
and AQ2-RT reports
8
for the relevant logical error metric in the paper’s real-time benchmark (Senior et al., 8 Dec 2025). AQ2-RT is therefore described as slightly less accurate than AQ2-full, but still more accurate than other decoders that can meet the same throughput target (Senior et al., 8 Dec 2025).
A broader significance claim follows from these numbers. AQ2 is not presented as formally optimal; rather, “near-optimal logical error rates” is an empirical claim relative to strong baselines such as Libra on the surface code and Tesseract or an extrapolated Tesseract trend on the colour code (Senior et al., 8 Dec 2025). This suggests that the main novelty lies in moving the practical Pareto frontier rather than eliminating the underlying speed–accuracy tradeoff.
6. Real-time decoding, scalability, and relation to subsequent AlphaQubit-style work
AQ2 is explicitly a streaming decoder: it does not need to wait until the entire experiment has finished before doing most of its work, because the architecture is causal and only recurrent states carry history (Senior et al., 8 Dec 2025). The paper defines throughput approximately as total decoding duration divided by number of cycles, measured using very long experiments of 100,800 cycles so that fixed overheads such as final readout are amortized (Senior et al., 8 Dec 2025). Latency is defined as
9
The paper states that AQ2 and AQ2-RT have constant throughput and latency because the computation per block is fixed and does not depend on syndrome weight or detection fraction (Senior et al., 8 Dec 2025).
The strongest real-time result is that AQ2-RT decodes surface-code experiments faster than 0 per cycle up to distance 11 on Trillium TPUs (Senior et al., 8 Dec 2025). For the real-time Willow models, the measured average times per cycle are 1 at distance 3, 2 at distance 5, and 3 at distance 7 (Senior et al., 8 Dec 2025). At distance 11, the paper states that AQ2-full is 4 faster than AlphaQubit 1, and AQ2-RT is another 5 faster than AQ2-full (Senior et al., 8 Dec 2025).
For larger distances, AQ2-full is reported to run below
6
per cycle up to distance 23, and the Methods state that unoptimized AQ2-full at surface-code distance 23 achieves
7
per cycle (Senior et al., 8 Dec 2025). AQ2-RT at distance 23 runs at
8
per cycle, but the paper states that this compact model is not accurate enough there (Senior et al., 8 Dec 2025).
The paper also reports generalization in time: models trained on lengths up to 168 cycles are evaluated up to 1,080,000 cycles, with stable LER per cycle and only modest degradation at the largest tested distances (Senior et al., 8 Dec 2025). This supports the claim that recurrent, time-invariant state propagation enables arbitrarily long streaming operation with fixed memory (Senior et al., 8 Dec 2025).
AQ2 should be distinguished from related AlphaQubit-style efforts published in the same period. “Scalable Neural Decoders for Practical Real-Time Quantum Error Correction” replaces the Transformer attention core in an AlphaQubit-style recurrent decoder with a Mamba state-space core, reducing the dominant scaling from 9 to 0, matching Transformer accuracy on Sycamore memory data while improving the simulated effective threshold from 1 to 2 under a decoder-induced-noise model (Lee et al., 26 Oct 2025). “Learning Neural Decoding with Parallelism and Self-Coordination for Quantum Error Correction” and its later version “Learning to Decode in Parallel: Self-Coordinating Neural Network for Real-Time Quantum Error Correction” instead preserve an AlphaQubit-like recurrent-transformer backbone but redesign the supervision and deployment pipeline for sliding-window parallel decoding, with the later paper reporting a TPU v6e throughput of 3 per syndrome round at distance 25 and hardware results on Zuchongzhi 3.2 up to distance 7 (Zhang et al., 4 Sep 2025, Zhang et al., 14 Jan 2026). In a different direction, “AI-Enabled Decoding of Qubit Loss for Quantum Error-Correcting Codes” shows that a parallel spatiotemporal GNN can perform nearly identically to a modified AlphaQubit baseline for joint Pauli decoding and qubit-loss localization, while reducing aggregate inference time for a 10-round window from 4 ms to 5 ms (Wang et al., 15 Apr 2026).
These neighboring works clarify AQ2’s place in the literature. AQ2 is not the only “next-generation AlphaQubit-style” direction, but it is the one that explicitly unifies surface-code and colour-code decoding, very large-scale synthetic training, streaming recurrence, and a compact real-time variant within a single framework (Senior et al., 8 Dec 2025). A plausible implication is that the post-AlphaQubit design space is no longer centered on a single architectural motif, but on multiple orthogonal strategies: temporal compression and interleaved recurrence-attention in AQ2, state-space substitution in Mamba-based decoders, and window-level parallelization in self-coordinating sliding-window systems.
7. Limitations and open questions
The paper states several important limitations directly. The strongest real-time result is only up to surface-code distance 11, so extending real-time decoding beyond that regime remains future work (Senior et al., 8 Dec 2025). At the highest distances, especially colour-code distance 27 and long million-cycle runs, training becomes harder and performance deviates somewhat from ideal scaling (Senior et al., 8 Dec 2025). The paper also explicitly says that it has not yet addressed minimizing end-of-experiment latency between the final measurement and the final decoding result, even though such latency matters for some applications (Senior et al., 8 Dec 2025).
The real-time demonstrations are performed on Trillium TPUs, which provides strong evidence of deployability on commercial accelerators but also means that throughput depends on the hardware and software stack used in evaluation (Senior et al., 8 Dec 2025). Although the architecture is code-agnostic in spirit, the demonstrated models are trained and evaluated for specific code families, circuit layouts, and noise models, so broader generalization should not be assumed beyond what is shown (Senior et al., 8 Dec 2025).
For the Bell-flagged colour code, the paper notes that the studied circuit is not planar in its two-qubit interaction graph and therefore is not directly implementable on planar superconducting hardware, though it could suit all-to-all platforms such as neutral atoms (Senior et al., 8 Dec 2025). Finally, the paper states that reaching and reliably evaluating logical error rates around 6 and below remains challenging and would require more compute or more advanced rare-event estimation (Senior et al., 8 Dec 2025).
Taken together, these caveats delimit the scope of AQ2’s contribution. AQ2 establishes that a streaming neural decoder can jointly approach near-optimal logical performance, large-distance scaling, and sub-7-per-cycle throughput in a practically relevant regime (Senior et al., 8 Dec 2025). It does not establish that the decoding problem is solved in general, nor that a single architecture dominates all alternatives. Instead, it marks a specific point in the evolution of neural QEC decoders: from proof-of-principle high-accuracy models toward deployable, accelerator-compatible decoders for surface and colour codes at the scales relevant to fault-tolerant quantum computation.