# GARI++: A General-Purpose Decoder for Quantum Error Correction

Quantum.world

> Quantum computers need decoders that infer which errors occurred from measured syndromes, and those decoders must be both accurate and fast enough to keep up with repeated syndrome extraction.

**arXiv**: 2611.12833 · Preprint · not peer-reviewed

**Published**: 2026-11-09

**Authors**: Arshpreet Singh Maan, Francisco Garcia-Herrero, Daniel Bascones, Valentin Savin, Alexandru Paler

## In plain words

Quantum computers need decoders that infer which errors occurred from measured syndromes, and those decoders must be both accurate and fast enough to keep up with repeated syndrome extraction. Message-passing decoders are fast and local but often fail to converge because of short cycles and quantum degeneracy, while matching-based decoders are accurate but scale poorly with syndrome weight.

## AI summary

## Overview

**Research area:** Quantum error correction (QEC) decoding for fault-tolerant quantum computing, with a hardware–software co-design angle (FPGA plus CPU).

**Technical level:** Advanced. The paper assumes familiarity with detector error models, belief propagation / min-sum decoding, log-likelihood ratios, and code families such as surface, bivariate bicycle (BB), and color codes. The high-level argument is accessible; the decoding mechanics are not beginner material.

**Scope:** The paper proposes and evaluates GARI++, a two-stage decoder that pairs the GARI message-passing decoder with a code-specific residual decoder, and reports its logical accuracy on surface, bivariate bicycle, and superdense color codes plus an FPGA implementation of the first stage.

## What This Paper Is About

Quantum computers need decoders that infer which errors occurred from measured syndromes, and those decoders must be both accurate and fast enough to keep up with repeated syndrome extraction. Message-passing decoders are fast and local but often fail to converge because of short cycles and quantum degeneracy, while matching-based decoders are accurate but scale poorly with syndrome weight. The paper's goal is a single general-purpose pipeline that keeps the accuracy of the best reference decoders across several code families without using decoding ensembles, and that maps naturally onto a hybrid FPGA-CPU architecture.

## Key Contributions

1. **A two-stage pipeline built on GARI.** Stage 1 is the GARI decoder: normalized min-sum decoding on the GARI-augmented matrix with a hybrid serial-layered schedule (randomized horizontal serial scheduling on the original X and Z subgraphs, horizontal layered scheduling on the auxiliary part). Stage 2 runs only when GARI fails to converge within a budget of at most 7 iterations, and is configurable per code: Union-Find for surface codes, hypergraph Union-Find (HUF) for BB codes, and Chromobius for color codes.
2. **Transfer of both residual syndrome and soft information.** Unlike the approach of Caune et al., which keeps residual syndromes but discards first-stage soft information, GARI++ pipelines both the residual syndrome and LLR-derived weights to the second stage. The second-stage weights are formed as w_i = max(LLR_i at the selected iteration, 0).
3. **Predictive pipelining of intermediate iterations.** GARI++ monitors the soft-information stream online and selects which GARI iteration to hand to the second stage, rather than always forwarding the last iteration. Selection uses the residual syndrome weight r_t = |s_res^(t)| compared against the running minimum m_{t−1}, and an LLR-magnitude score C^(t) summed over the columns of D_Z, replacing the saved estimate when r_t < m_{t−1} or C^(t) > C_*.
4. **Cross-code accuracy demonstrations and an FPGA characterization.** The pipeline is benchmarked on surface codes (distances up to 71), BB codes [[144,12,12]] and [[288,12,18]], and superdense color codes from the NVIDIA benchmark, and GARI is implemented on a single XCVU9P FPGA for surface code distances from 7 to 25. The method explicitly does not rely on ensembles.

## Main Findings

- **Surface code accuracy matches correlated MWPM.** GARI++ tracks correlated MWPM closely for surface-code distances up to 71 over the sampled physical error rate range (Fig. 5), with the GARI stage using at most seven iterations and a normalization factor of 0.9063.
- **GARI alone beats references on the shots where it converges.** On exactly the GARI-converged shots, GARI shows lower logical error rates than the corresponding reference decoder (correlated MWPM for surface codes at p = 0.002, BP-OSD for BB codes at p = 0.005, Chromobius for superdense color codes at p = 0.002).
- **Strong syndrome suppression on non-converged shots.** For a distance-21 surface code at p = 10⁻³, the mean Z-detector syndrome weight drops from 80.71 before GARI to 1.97 after GARI on non-converged shots, with the residual distribution concentrated on a few non-zero detectors.
- **Residual decoding stays cheap.** At p = 10⁻³, the mean residual Union-Find decoding time remains below 1 μs per round on a single Apple M2 core for surface code distances up to 51, with nearly constant scaling; residual HUF reduces cost for larger BB codes and residual Chromobius for color codes.
- **FPGA first-stage latency.** Under uniform circuit-level depolarizing noise at p = 0.001, the FPGA implementation of GARI achieves average latencies per round from 201 ns to 11.8 μs for surface code distances between 7 and 25. Per-iteration-per-round latency stays below 750 ns for distances up to 15, and the maximum operating frequency stays nearly constant across those implementations.
- **Distance 25 is the current FPGA limit.** Distances 21 and 25 both fit on a single FPGA without architectural partitioning, but maximum operating frequency drops by approximately 18% relative to the distance-15 implementation, giving iteration latencies of 1.7 μs and 2.55 μs. The distance-25 build uses more than 50% of available BRAM.
- **BB codes: better than BP-OSD and Relay-BP at low noise.** GARI++ improves on the D_Z-BP-OSD reference and achieves lower logical error rates than D_XYZ-Relay-BP-5 in the low-noise regime; the Relay-BP curves become shallower as physical error rate decreases, most clearly at d = 18.
- **Color codes: large gain over standalone Chromobius.** Combining GARI with residual Chromobius decoding improves on standalone Chromobius by an order of magnitude at distance 17 and 0.001 physical error rate, with increasing distance giving stronger suppression.
- **Longer iteration budgets are not better.** In an extended simulation of a distance-15 surface code at p = 10⁻³ with up to 20 iterations and normalization factor 0.875, the mean residual syndrome weight among non-converged shots decreases early, reaches a minimum near iteration four, then plateaus or rises — motivating predictive selection of intermediate iterations.
- **End-to-end latency is not reported.** The reported CPU times cover only the second-stage decoding operation, excluding GARI decoding, decoder construction, weight preparation and loading, and communication; the authors state that full real-time budgets require matched first-stage timings plus transfer and CPU-processing costs.

## Methodology in Plain English

The team starts from a standard description of a quantum error-correction circuit as a detector error model: a binary matrix mapping faults to the detection events they trigger, so that a valid correction must reproduce the measured syndrome. Standard belief propagation passes messages between error variables and checks, and its min-sum variant replaces the nonlinear check update with a signed minimum scaled by a normalization factor between 0 and 1.

GARI's earlier trick is to rewrite the X, Y, and Z error variables using auxiliary variables, producing a larger matrix in which the X and Z subproblems are coupled through auxiliary checks. This preserves joint inference — so information about Y errors is not thrown away — while removing the troublesome 4-cycle clusters. GARI++ runs this decoder for at most seven iterations and checks whether the Z-detector part of the residual syndrome is zero. If it is, the estimate is accepted immediately and no second stage runs.

If not, the pipeline needs to decide what to hand downstream. Because the residual syndrome weight stops improving after a few iterations, the authors do not simply forward the final state. Instead, at every iteration they compare the current residual weight against the best seen so far and compare an LLR-magnitude score against the score of the currently saved candidate; either condition can trigger replacement. The saved state's residual syndrome and clipped LLRs become the second-stage problem and weights.

The second stage is deliberately swappable by code family: Union-Find for surface codes (chosen partly because it is local and has hardware implementations), HUF for BB codes, and Chromobius for color codes. The final correction is the XOR of the saved GARI partial estimate and the second-stage estimate. Benchmarking uses Stim's rotated surface code circuits, a published BB code circuit implementation, and the superdense color code construction from the NVIDIA benchmark, all under uniform circuit-level depolarizing noise in Z-memory, with logical error rates reported per syndrome extraction round. Separately, the GARI stage is synthesized onto a XCVU9P FPGA, adapting an earlier architecture by tuning the pipeline and the number of processing units for the U and V messages, and measuring latency, frequency, LUT, register, CARRY8, CLB, and BRAM usage.

## Why This Matters

**Impact on research.** The work challenges the assumption that a strong first-stage decoder must either fully solve the problem or be discarded. It shows that a message-passing decoder's partial progress — both its residual syndrome and its soft information — is valuable enough that a comparatively simple second stage like Union-Find can match correlated MWPM on surface codes. It also argues against the common practice of forwarding the last iteration's soft information, and it presents a decoder that is not tied to one code family, in contrast to most published decoders tuned for surface codes or a single qLDPC construction.

**Real-world applications**

- Fault-tolerant quantum computing with superconducting qubits, where the syndrome extraction round budget constrains decoder latency and the paper's sub-microsecond residual decoding is relevant up to distance 51.
- Quantum LDPC codes such as bivariate bicycle codes, which are candidates for reducing qubit overhead in error-corrected machines but need decoders that handle hyperedges.
- Color codes and other topological constructions targeted by hardware vendors and benchmark suites such as the NVIDIA color code benchmark cited in the paper.
- FPGA-based control and decoding electronics for quantum processors, where the proposed split — local message passing on programmable logic, residual decoding on an embedded CPU — matches how real control stacks are built.

**Industry relevance.** The hybrid FPGA-CPU proposal, the concrete resource and timing figures on an off-the-shelf XCVU9P, and the explicit identification of routing congestion and BRAM capacity as scaling bottlenecks give hardware teams a realistic starting point. The paper frames distance 25 as the present implementation limit on that device and points to larger parts such as the xcvp1802 as a possible path, while cautioning that device size alone may not deliver the desired latency.

## Future Directions

- **Tighter hardware integration.** The authors propose a more detailed implementation with Union-Find placed either on the FPGA or on embedded CPU cores on the same FPGA board, to lower the communication time between FPGA and CPU.
- **Relieving routing congestion.** The early-stopping criterion unit, implemented in parallel, consumes a substantial share of routing resources in the distance-21 and distance-25 builds; optimizing it and its interconnections could improve timing.
- **Reducing memory pressure.** Because the distance-25 implementation uses more than 50% of BRAM, optimizing message storage and memory organization is needed to free resources for larger distances.
- **Completing the real-time accounting.** Assessing the full real-time budget requires matched first-stage timings together with the transfer and CPU-processing costs, and the invocation fraction of the second stage, none of which are combined into an end-to-end latency in this paper.
- **Larger devices.** Testing much larger FPGAs, such as the xcvp1802, to see whether sub-microsecond iteration latency is achievable at larger code distances.

## Target Audience

Researchers and engineers working on QEC decoders and fault-tolerant quantum computing, particularly those interested in message-passing and post-processing hybrids, qLDPC code decoding beyond surface codes, and FPGA or embedded implementations of real-time decoders. It is also useful for quantum hardware teams evaluating whether commodity FPGA plus CPU architectures can meet syndrome-extraction timing budgets, and for readers comparing ensemble-based decoding approaches against single-pass pipelines.

## Authors’ abstract

We present GARI++, a two-stage decoding pipeline achieving accuracy competitive with the state of the art across surface, bivariate bicycle and color codes without relying on ensembles. The first stage uses GARI, a normalized min-sum decoder with random serial scheduling on the GARI transformed matrix. The second stage decoder is used only for the cases that the first stage does not converge, and the decoder is configurable based on the choice of the QEC code. The first…

[The full abstract on arXiv](https://arxiv.org/abs/2611.12833)

[Read the original paper](https://arxiv.org/abs/2611.12833)

## Related papers

- [Decoding with alternating weighted graph sparsification for quantum low-density parity-check codes](https://quantum.world/paper/decoding-with-alternating-weighted-graph-sparsification-for-quantum-low-2610.35735) 2026-10-26 · quant-ph · Also by Francisco Garcia-Herrero
- [TCBP-JOBS: GPU-Accelerated Quantum Error Correction Decoding and Noise Learning with Near-Optimal Accuracy](https://quantum.world/paper/tcbp-jobs-gpu-accelerated-quantum-error-correction-decoding-and-noise-2611.21321) 2026-11-16 · quant-ph · Key terms of the title in common
- [Designing Quantum Error Correcting Codes to fit decoders via Reinforcement Learning](https://quantum.world/paper/designing-quantum-error-correcting-codes-to-fit-decoders-via-2608.15754) 2026-08-16 · quant-ph · Key terms of the title in common
- [Circuit-Level Analysis of Quantum Error Correction in Second-Generation Quantum Repeaters](https://quantum.world/paper/circuit-level-analysis-of-quantum-error-correction-in-second-generation-2611.16435) 2026-11-12 · quant-ph · Key terms of the title in common
- [Trinetra.Q: Statistical and Behavioral Detection of Attacks on the Quantum-Error-Correction Layer and Classical Control Stack of Quantum Computing Systems](https://quantum.world/paper/trinetra-q-statistical-and-behavioral-detection-of-attacks-on-the-2611.05722) 2026-11-03 · quant-ph · Key terms of the title in common

---

Canonical: https://quantum.world/paper/gari-a-general-purpose-decoder-for-quantum-error-correction-2611.12833
