Research
CoDecoder: Make Quantum Decoders Up to 100x Faster and Even More Accurate
Overview Research area: Quantum error correction, specifically real-time decoding for fault-tolerant quantum computers, combined with neural-network systems engineering (GPU kernels, routing, and infe

- arXiv
- 2610.28748
- Published
- 2026-10-20
- Authors
- Yicheng Guang, Yuliang Xiong, Xun Gao, Yueqi Chen
AI summary
Overview
Research area: Quantum error correction, specifically real-time decoding for fault-tolerant quantum computers, combined with neural-network systems engineering (GPU kernels, routing, and inference optimization).
Technical level: Advanced. The paper assumes familiarity with stabilizer codes, detector error models, matching and belief-propagation decoders, and GPU inference performance.
Scope: The paper introduces CoDecoder, a small neural "frontend" that sits in front of an existing strong decoder and routes only low-confidence shots to it, and evaluates this composition across two code families (rotated surface codes and bivariate-bicycle codes) and four fallback decoders.
What This Paper Is About
Fault-tolerant quantum computers need decoders that are both accurate and fast enough to keep pace with syndrome measurement rounds, but the most accurate decoders are slow: on the [[72,12,6]] bivariate-bicycle code at a physical error rate of 0.3%, the belief-propagation decoder Relay-BP fails on 0.55% of shots when decoding both check types together, but takes 85.4 ms per shot on one CPU core, 26 times as long as the single-check setting. The paper's goal is to show that a small, cheap neural network can be placed in front of such a decoder, answer the shots it is confident about, and hand the rest to the unchanged fallback, so that the combination is both more accurate and measurably faster than the fallback alone.
Key Contributions
-
Conditions for useful composition. The authors formalize when composition helps, following Decoder Switching: the composition beats the fallback in accuracy exactly when the frontend makes fewer errors than the fallback on the retained shots (condition C1), and it is faster when the fallback work saved exceeds the network and handoff costs (condition C2). They give the accounting as T_comp = T_net + T_fb + T_hand and a speed-up expression of 1/(qκ + (T_net + T_hand)/T_B), where q is the routed fraction and κ the relative cost of routed shots.
-
A logical-operator-aware output head. Instead of pooling features without logical-operator geometry, the head scores flips of multiple shifted logical operators. On the surface code it aligns scores of equivalent logical lines using the parity δ_j of intervening X detectors and sums them into one vote; on BB codes it scores joint observable-flip patterns over 2^k = 4,096 classes for k = 12 logicals, deciding all logical qubits together.
-
GPU engines and routing support. A fused Triton engine reduces a three-block surface-code network from about 40 PyTorch kernel launches per shot to L + 2 kernels for an L-block network, replayed with a CUDA graph; a resident kernel serves successive shots at d = 7; a multi-shot BB engine shares weight loads across shots; and a compiled C++ router reduces handoff cost to correlated matching.
-
A multi-setting evaluation with a controlled head ablation. The paper tests composition against correlated matching, full-DEM Relay-BP, sector Relay-BP, and the authors' re-implementations of Cascade, isolates the output head's contribution under matched trunk, data and budget, and analyzes per-shot error exchange. Training and decoding code, weights and commands for the matching and Relay-BP tests are released.
Main Findings
-
Gains over correlated matching on surface codes: composition reduces failures by 6.4–31.4% relative to correlated matching at distances 7–17, with a 2.3–10.3-fold speed-up on the Grace timing basis. At d = 15, routing 1% of shots cuts failures from 4,030 to 3,012; at d = 7, 9 and 17, routing 2%, 6% and 1% reverses the network's standalone accuracy deficit against correlated matching.
-
Gains over Relay-BP on BB codes: composition with full-DEM Relay-BP reduces failures by 22–50% with an 8.9–124-fold speed-up. On BB72 at p = 0.3%, routing 1.99% of shots reduces failures to 857 from 1,107 with a 17-fold speed-up; at p = 0.2%, routing 0.245% reduces failures to 204 from 288 with a 124-fold speed-up, the largest reported. On the gross code [[144,12,12]], routing 2% reduces failures to 234 from 472 with an 8.9-fold speed-up.
-
The frontend alone is not the source of the gain: CoDecoder alone fails more often than full-DEM Relay-BP on BB72 at p = 0.3% (1,398 against 1,107) and shows no significant difference at p = 0.2% (269 against 288); on the gross code it fails on 1,024 shots against 472, despite taking 0.019 of CUDA-Q BP-OSD's time. Gains therefore come from composition, not from a uniformly better network.
-
Sub-microsecond throughput: in batches, CoDecoder + correlated matching decodes the surface code at p = 0.6% up to distance 11 in less than 1 µs per syndrome round, against 3.2–10.8 µs for correlated matching alone on one core. CoDecoder + Cascade on the multi-shot engine decodes BB72 at p = 0.2% in 0.733 and 0.891 µs per round on an RTX PRO 6000 and an H100, against 12.00 and 7.34 µs for Cascade alone. The authors state this is, to their knowledge, the first open-source design bringing a strong decoder below 1 µs per round at a physical error rate as high as 0.6% while reducing failures.
-
Comparison with Cascade: with the authors' re-implementations, composition reduces decoding time in all four settings. A joint decision on the routed shots, which also reads Cascade's logits, keeps this speed and is more accurate than Cascade in all four, with 14–18% fewer failures on BB72. On BB72 at p = 0.2%, Cascade alone fails on 8,074 shots, CoDecoder alone on 10,398, CoDecoder + Cascade on 7,986, and the joint decision on 6,597; single-shot time drops from 1,719.5 µs to 168.1 µs (10.23-fold).
-
The output head matters: on BB72, a conventional head with independent logical outputs fails 3.8–5.0 times as often as the joint class score under matched training conditions, and with 2% of shots routed to full-DEM Relay-BP, only the joint class score's composition beats Relay-BP alone. On the surface code at d = 9 and q = 1%, the line vote trained on the final answer fails least (9,921 and 9,919 with the fallback), while adding line supervision makes the vote worse.
-
Why accuracy improves: per-shot analysis shows the frontend corrects more fallback errors than it introduces on retained shots, even when it is less accurate overall. Confidence concentrates frontend failures among routed shots, but routing helps only if the fallback is more accurate on those shots.
-
Limitations stated: class enumeration grows exponentially with the number of measured logicals; routed shots can be more expensive than average (κ > 1 for the classical fallbacks measured), so a small routed fraction does not by itself imply a large speed-up; and on the gross code the sector Relay-BP composition takes 1.49 times as long as CUDA-Q BP-OSD (20.35 against 13.70 ms per shot), though without the Grace conversion it would take 13.57 ms.
Methodology in Plain English
The authors frame decoding as a routing problem. A small convolutional neural network reads the same detector bits any decoder would read and outputs both a predicted logical outcome and a confidence score. If the confidence meets a threshold τ, the network's answer is used; otherwise the original detector bits go to a strong decoder, which runs unchanged on CPU or GPU. The network and threshold are fixed on development and calibration data before any test shots are drawn, and thresholds are set as quantiles of calibration confidence measured through the deployed GPU engine, so the routed fraction on test shots can differ slightly.
The headline accuracy claim rests on a simple bookkeeping identity: because the fallback decides every routed shot, the composition differs from the fallback only on retained shots, so it is more accurate exactly when the network beats the fallback on that subset. The cost claim rests on measuring the network time, the handoff time, and the fallback time averaged over all shots, and checking that their sum is below the fallback's standalone time.
Two code families are used. On rotated surface codes the network queries one row of data qubits per logical line, aligns the lines using the measured parity of the X detectors between each line and the observable's line, and sums the aligned scores into a single vote, with |c| as confidence. On BB codes, where translating a logical operator can change its logical class, the network queries each measured logical operator under each torus shift and scores whole flip patterns jointly, with the margin between the top two class scores as confidence. Training uses fresh Stim shots with exact labels; the BB loss combines a cross-entropy term on the joint class with a per-translate binary cross-entropy auxiliary term.
Evaluation covers four fallbacks: correlated matching on surface codes at distances 7–17, sector and full-DEM Relay-BP on BB72 and the gross code, and the authors' re-implementations of Cascade on both families (Cascade's code and trained weights are not public, so the architecture was rebuilt and trained on their circuits). Test sets range from 1,000,000 shots at d = 9–17 and 2,000,000 at d = 7, to 11,000,000 and 17,000,000 shots on BB72 and 30,000,000 shots for one d = 13 surface-code setting. Accuracy comparisons use the exact McNemar test on shots where exactly one decoder fails, with 95% Wilson intervals. Every speed-up compares the slowest of the composition's runs with the fastest of the baseline's runs, a rule the authors note counts against their own system.
Why This Matters
Decoder speed is not a convenience issue: if decoding cannot keep up with the roughly 1 µs round period of superconducting processors, a backlog grows and every logical operation waiting on a decoded result stalls, while every wrong prediction is a logical error. The paper offers a general recipe for improving an existing decoder without modifying it, which matters because the most accurate decoders (BP variants, neural decoders) are exactly the ones too slow to deploy directly.
- Real-time decoding at feed-forward points, such as corrections after a T gate, where each shot must be answered as it arrives; the paper separates this reaction mode from batched throughput mode.
- Batched, high-throughput decoding of independent syndrome windows or separate logical blocks, where the reported sub-microsecond per-round costs at p = 0.6% approach the round period.
- Practical use of qLDPC codes such as BB72 and the gross code, whose accurate decoders (Relay-BP, Cascade) are the slowest in the study.
- Hardware/software co-design for quantum control stacks, since the composition runs a small network on a GPU and leaves matching or BP on a CPU or GPU.
Industry relevance: the work is directly aimed at the real-time decoding bottleneck in superconducting quantum computing, and it is compared against production-adjacent tooling (PyMatching, NVIDIA's Ising pre-decoders, BP-OSD implementations, CUDA-Q), with all code, weights and commands for the matching and Relay-BP tests released.
Future Directions
- Scaling the joint class score beyond 12 logicals. The authors explicitly flag that enumerating 2^k classes grows exponentially with the number of measured logicals, which bounds the current BB head.
- Reducing routed-shot cost (κ). Since κ > 1 for the measured classical fallbacks, the achievable speed-up is capped at 1/(qκ); making routed shots cheaper, or predicting their cost, is a direct route to larger gains.
- Extending the joint decision. The joint decision is currently evaluated with neural fallbacks that report logits; whether equivalent gains are reachable with correction-returning decoders such as matching and BP is left open.
- Broadening the frontend/fallback matrix. The paper notes its results vary by code family and fallback, and that routing helps only when the fallback is genuinely better on routed shots, so the conditions under which composition transfers to other codes and decoders remain an open empirical question.
Target Audience
Quantum error-correction researchers and decoder engineers who work with surface codes or qLDPC codes and care about the accuracy–latency tradeoff; systems researchers interested in GPU kernel fusion, CUDA graphs and routing for real-time quantum control; and quantum-hardware teams planning feed-forward architectures who need to know whether an off-the-shelf strong decoder can be brought under a microsecond per round without losing accuracy. Readers without background in stabilizer codes and detector error models will find the decoding sections dense, though the composition logic itself is stated in plain algebraic terms.
Authors’ abstract
Fault-tolerant quantum computers need fast and accurate error decoding. We present CoDecoder, a small neural frontend that composes with an existing decoder to improve accuracy and reduce mean decoding time. It predicts each shot's logical outcome, retains confident predictions and routes the remaining shots to the unchanged fallback. A logical-operator-aware output head scores shifted logical operators, combining equivalent logical lines on surface codes and deciding logical qubits jointly on bivariate-bicycle (BB) codes. Fused GPU inference and efficient routing reduce the overhead paid on every shot. In registered tests under circuit-level noise, composition reduces failures by 6.4-31.4% relative to correlated matching on surface codes of distance 7-17 and by 22-50% relative to full-DEM Relay-BP on two BB codes, with 2.3-124-fold speed-ups across these comparisons. With our re-implementations of the neural decoder Cascade, composition reduces decoding time in all four settings. A joint decision of both decoders on the routed shots keeps this speed and makes the composition more accurate than Cascade in all four, with 14-18% fewer failures on the [[72,12,6]] code. On the [[72,12,6]] BB code, a conventional head with independent logical outputs fails 3.8-5.0 times as often as our joint class score under matched training conditions. Per-shot analysis shows how composition gains accuracy. On retained shots, the frontend corrects more fallback errors than it introduces, even when it is less accurate overall.