Quantum error correction (QEC) is essential for fault-tolerant quantum computing — but decoding must keep pace with the hardware. Standard decoders like minimum-weight perfect matching (MWPM, implemented by PyMatching) are near-optimal under simplified noise assumptions, but real hardware noise is more complex. As part of the NVIDIA Ising open model family, a neural pre-decoder was released to bridge this gap.
What Is a Pre-Decoder?
A pre-decoder is a lightweight neural network that preprocesses syndromes before the main decoder runs. It does not replace the decoder — it makes the decoder's job easier:
The neural network learns to identify and correct local, high-confidence errors from the raw syndrome. What remains — the residual — is sparser and contains only the harder, ambiguous errors. The main decoder then operates on this reduced problem, achieving both lower logical error rates and faster decode times.
In this post, we evaluate the NVIDIA Ising CNN pre-decoder on surface codes, then ask whether the same idea can generalize to quantum LDPC codes with fundamentally different structure. We implement a simple MLP pre-decoder for bivariate bicycle (BB) codes and compare results, identifying what works and where the gaps are.
Part I: CNN Pre-Decoder on Surface Codes
Architecture
The NVIDIA Ising surface code pre-decoder is a 3D CNN that operates on detector syndrome tensors of shape (B, 4, T, D, D) — four channels (X/Z syndromes + presence masks) across T measurement rounds and a D × D spatial grid. The network processes this tensor through residual 3D convolutional blocks, outputting corrected syndromes with reduced density. These are then passed to PyMatching (MWPM) for the final logical error decision.
The architecture exploits the surface code's regular lattice: each convolutional layer captures local spatiotemporal error correlations within its receptive field R = 1 + Σ(ki − 1), and the regular grid means every spatial position is treated uniformly. Two pre-trained models are available — R=9 (4 layers, ~913K params) and R=13 (6 layers, ~1.8M params), trained with a 25-parameter circuit-level noise model [3] [5].
Test 1: LER Across Physical Error Rates
We sweep the physical error rate p from 0.001 to 0.008 and measure LER at distance 9:
Test 2: Decoding Speedup Across Distances
By reducing syndrome density, the pre-decoder makes PyMatching's job easier — sparser syndromes mean fewer matching edges and lower decode latency:
| Distance | PyMatching Speedup | LER Reduction |
|---|---|---|
| d = 5 | 1.47x | 1.50x |
| d = 7 | 2.03x | 1.66x |
| d = 9 | 2.12x | 1.56x |
Table 1: Decoding speedup and LER reduction across code distances using the R=13 model at p = 0.004.
The CNN pre-decoder delivers consistent improvements: up to 2.12x faster decoding and up to 1.66x lower LER, with the speedup growing at larger distances.
Why Can a Pre-Decoder Beat PyMatching?
At first glance, this is counter-intuitive: PyMatching implements MWPM on the detector error model (DEM), which is near-optimal for independent errors. How can a heuristic CNN improve on that?
The key is that the pre-decoder is not replacing PyMatching — it is reducing the problem's complexity before PyMatching runs:
- The DEM is an approximation. PyMatching builds its matching graph by decomposing correlated circuit-level noise into independent error mechanisms via
approximate_disjoint_errors. This decomposition is lossy — it discards spatiotemporal correlations from CNOT error propagation, idle depolarization, and SPAM noise. The CNN, trained end-to-end on the full 25-parameter noise model [3], learns these correlations directly within its receptive field. - Division of labor. Most errors are local and fall within the CNN's receptive field (R=9 or R=13). The CNN corrects these, leaving only long-range or ambiguous errors in the residual. PyMatching then operates on a sparser, simpler matching problem — which it solves more accurately (and faster).
- Falsifiable. A random (untrained) CNN would add noise to the syndrome, making PyMatching worse. The fact that improvement scales with model capacity (R=13 > R=9) confirms the CNN is exploiting real structure in the noise, not benefiting from an evaluation artifact.
Surface Code Limitation
These results validate neural pre-decoding on surface codes — but surface codes store just 1 logical qubit in d2 data qubits. Can we bring neural pre-decoding to codes with better encoding rates?
Part II: Bivariate Bicycle Codes
Why Move Beyond Surface Codes?
The qubit overhead of surface codes is arguably the single largest obstacle to building a useful fault-tolerant quantum computer. Current hardware roadmaps project thousands of physical qubits, but a surface-code architecture would consume most of them on error correction alone.
qLDPC codes offer a fundamentally different tradeoff [8]. Bivariate bicycle (BB) codes [1] strike an attractive balance: their quasi-cyclic structure admits relatively simple routing schemes while delivering dramatic encoding rate improvements:
| Code | n | k | d | Rate k/n |
|---|---|---|---|---|
| BB-72 | 72 | 12 | 6 | 16.7% |
| BB-144 | 144 | 12 | 12 | 8.3% |
| Surface d=6 | 36 | 1 | 6 | 2.8% |
| Surface d=12 | 144 | 1 | 12 | 0.7% |
Table 2: Encoding rate comparison between bivariate bicycle codes and surface codes.
The BB [[72,12,6]] code stores 12 logical qubits in 72 physical qubits — twice what a d=6 surface code uses for just 1. The [[144,12,12]] code achieves distance 12 with the same qubit count as a d=12 surface code, but encodes 12 logicals instead of 1.
Code Construction
A BB code is defined over ℤℓ × ℤm with polynomials A(x,y) and B(x,y):
HX = [A | B], HZ = [BT | AT]
The CSS condition HXHZT = 0 follows from the commutativity of the group algebra. Construction is straightforward:
# [[72, 12, 6]]: l=6, m=6
A = poly_to_matrix([(3,0), (0,1), (0,2)], 6, 6)
B = poly_to_matrix([(0,3), (1,0), (2,0)], 6, 6)
Hx = sp.hstack([A, B]) # 36 x 72
Hz = sp.hstack([B.T, A.T]) # 36 x 72Decoding: The Degeneracy Challenge
Unlike surface codes where MWPM works well, BB codes require belief propagation (BP) [9] — but quantum degeneracy causes BP to oscillate between equivalent error configurations instead of converging [2] [6]. BP-OSD addresses this with Ordered Statistics Decoding as a fallback [7]: when BP fails, OSD uses BP's soft information to guide a deterministic search.
Test 3: BP-OSD Baseline
We evaluate both BB codes under code-capacity noise with BP-OSD (5,000 shots per point) to establish baseline performance:
At p = 0.03, the [[144,12,12]] code achieves block LER ≈ 0.004 while encoding 12 logical qubits — a 12× improvement in encoding rate over a surface code at the same distance.
Part III: MLP Pre-Decoder for BB Codes
The surface code CNN exploits the regular T × D × D grid — but BB codes have non-local and non-planar check-qubit connectivity, so a CNN's local receptive field would miss long-range correlations entirely. As a first step toward neural pre-decoding for qLDPC codes, we implement a simpler architecture.
Approach
An MLP pre-decoder takes the full syndrome as input and outputs refined per-qubit error probabilities for BP-OSD:
Syndrome → MLP → Refined Channel Probs → BP-OSD → CorrectionThe output is interpolated with the uniform prior (α = 0.4) for stability. The MLP doesn't need to decode — it just provides better soft information than the flat prior p.
Note the contrast with Part I: the surface code CNN outputs corrected syndromes (a discrete residual for PyMatching), while the BB code MLP outputs refined probabilities (continuous soft information for BP-OSD). The approach differs because the downstream decoders differ.
Test 4: MLP Pre-Decoder vs. BP-OSD Alone
We compare BP-OSD alone vs. MLP pre-decoder + BP-OSD on [[144,12,12]] (100,000 shots per point per basis, same error samples for both decoders):
| p | BP-OSD | Pre-Dec + BP-OSD | Improvement |
|---|---|---|---|
| 0.01 | 7.0e-5 | 5.0e-6 | 14.00x |
| 0.02 | 6.9e-4 | 1.3e-4 | 5.31x |
| 0.03 | 3.0e-3 | 1.5e-3 | 1.95x |
| 0.04 | 1.02e-2 | 9.02e-3 | 1.13x |
| 0.05 | 3.17e-2 | 3.25e-2 | 0.97x |
| 0.06 | 8.21e-2 | 8.69e-2 | 0.94x |
| 0.07 | 0.168 | 0.178 | 0.95x |
Table 3: MLP pre-decoder vs. BP-OSD alone on [[144,12,12]] across physical error rates.
The improvement is moderate at low p and fades entirely above threshold, where the MLP's predictions add noise rather than useful information. This is expected: the MLP treats the syndrome as a flat vector with no inductive bias for the code's non-local connectivity. It provides a mild warm start for BP at low error rates, but cannot capture the long-range correlations needed at higher noise.
Analysis: Architecture-Code Alignment
Comparing the two pre-decoders reveals the central finding:
▶ Surface Code — CNN
▶ BB Code — MLP
The surface code CNN delivers consistent improvement across all noise rates because the convolutional architecture is perfectly matched to the code's lattice — every layer captures meaningful local correlations. The BB code MLP shows moderate gains at low p that vanish above threshold because it treats the syndrome as a flat vector, with no inductive bias for the code's long-range connectivity. Above threshold the MLP's predictions actually degrade performance slightly (0.95x at p=0.06).
Future Work
The results point to several promising directions:
- CNN + MLP hybrids: BB codes have quasi-cyclic structure from ℤℓ × ℤm. Within each cyclic block, connectivity is regular (processable by small CNNs); inter-block long-range connections can be handled by MLP or attention layers. This mirrors how the surface code CNN exploits spatial regularity, but adapted for BB codes' block-cyclic topology.
- Graph neural networks on the Tanner graph: GNNs operate directly on the check-qubit graph, learning message-passing rules that respect the actual connectivity [9] — a trainable BP with learned update functions. Quasi-cyclic weight sharing across ℤℓ × ℤm would reduce parameters and enable transfer across code sizes.
- Learned symmetry breaking: The degeneracy problem is fundamentally about Tanner graph symmetry [2]. Neural networks can implicitly break these symmetries through nonlinear activations — the training loss drives commitment to specific corrections rather than degenerate oscillation.
- Hardware-aware adaptation: Real devices have non-uniform noise. Combining neural pre-decoding with hardware-specific layout synthesis [5] and adaptive encoding [4] could yield end-to-end optimized systems calibrated to actual device noise profiles.
Just as the CNN pre-decoder succeeds by matching architecture to the surface code's spatial structure, future qLDPC pre-decoders should be designed from the code's Tanner graph outward.
Try It Yourself
pip install numpy scipy ldpc torch
# Surface code pre-decoder (requires GPU)
WORKFLOW=inference bash code/scripts/local_run.sh
# BB code: LER comparison (Figure 3)
python blog/bb_code_demo.py --shots 10000 --mode ler
# BB code: pre-decoder comparison (Figures 4-5)
python blog/bb_code_demo.py --shots 10000 --mode compareAll code — including the surface code CNN pre-decoder with pre-trained models and the BB code MLP pre-decoder — is available as part of the NVIDIA Ising open model family.
References
Citation
BibTeX citation:
@online{ruan2026nvidia,
author = {Yin, Keyi and Ruan, Jixuan and Lin, Yichen and Ding, Yufei},
title = {Testing {NVIDIA} {Ising}: Evaluating Neural
Pre-Decoding from Surface Codes to Bivariate
Bicycle Codes},
date = {2026-04-08},
url = {https://yufeiding.ucsd.edu},
langid = {en}
}For attribution, please cite this work as:
Keyi Yin, Jixuan Ruan, Yichen Lin, and Yufei Ding. 2026. “Testing NVIDIA Ising: Evaluating Neural Pre-Decoding from Surface Codes to Bivariate Bicycle Codes.” April 8, 2026.