Research
LiftDiff: Guided Discrete Diffusion for Quantum Code Construction
Overview Research area: Quantum error correction (specifically quantum low-density parity-check code design), combined with generative machine learning (discrete diffusion models). Technical level: Ad

- arXiv
- 2610.25213
- Published
- 2026-10-18
- Authors
- Yotam Peled, Eliya Nachmani
AI summary
Overview
Research area: Quantum error correction (specifically quantum low-density parity-check code design), combined with generative machine learning (discrete diffusion models).
Technical level: Advanced. The paper assumes familiarity with the stabilizer formalism, CSS codes, belief propagation decoding, and diffusion models.
Scope: The paper introduces LiftDiff, a guided discrete diffusion model that generates classical base matrices which are then lifted into quantum LDPC codes, and reports 32 discovered codes along with distance certifications and logical error rate simulations.
What This Paper Is About
Building a fault-tolerant quantum computer requires quantum error-correcting codes that pack many logical qubits into few physical qubits (high encoding rate) while still correcting many errors (high distance). The best existing constructions, such as lifted product (LP) codes, are built by hand from a small classical "base matrix" expanded through a group algebra, and the space of possible base matrices is enormous and combinatorial. LiftDiff reframes this design problem as a generative modeling problem: train a diffusion model to produce base matrices, then steer the sampling process toward matrices whose lifted codes have good girth, degree, sparsity, and decoding behavior.
Key Contributions
-
A discrete diffusion framework for quantum code construction. The authors state that this is, to their knowledge, the first discrete diffusion framework for the generative construction of novel quantum error-correcting codes. The model operates on base matrices over the group algebra F₂[ℤ_ℓ] and expands them into LP(M, M) codes.
-
An energy-based guidance mechanism spanning the whole reverse diffusion process. Instead of sampling unguided, the model's logits are displaced along the gradient of an energy function that scores the quantum code implied by the current continuous base matrix, using differentiable code properties (an unrolled BP decoder, cycle counts, spectral quantities, rank, check weight, degree, and sparsity).
-
A three-stage pipeline with exact certification. Generation is followed by a screening stage that verifies the commutation condition H_X H_Z^T = 0, computes exact n and k, applies a cheap distance upper bound (Pryadko et al., 2022), and finally proves the distance of the best candidates with Mixed-Integer Linear Programming (MILP), using the implementation of Cruz-Benito et al. (2026).
-
A set of discovered codes with competitive parameters. Reported examples include [[169, 13, 11]], [[143, 15, 9]], [[260, 24, 10]], and a [[247, 19, 14]] code that achieves the highest kd²/n among all baselines for a check weight ≤ 8. Thirty-two codes are listed in total.
Main Findings
-
Broad parameter coverage: The 32 collected codes have block lengths n ranging from 65 to 730 and distances d between 5 and 14, with maximum check weights w_chk between 5 and 12.
-
High encoding rates: Encoding rates k/n reach up to 0.310 (codes [[493,153,6]], [[493,153,7]], and [[493,153,8]]), while keeping check weights hardware-friendly.
-
Strong efficiency at low check weight: The [[247, 19, 14]] code attains the highest kd²/n among the baselines for w_chk ≤ 8, at a modest block length. The authors compare it to C1 ([[360, 20, ≤14]]) and C2 ([[360, 16, ≤14]]), which have lower rate at the same distance.
-
Efficiency approaching kd²/n ≈ 17: Code 24 ([[340, 68, 9]], rate 0.200, w_chk 9) reaches kd²/n values approaching 17, outperforming C1 and C2 while increasing w_chk by only one.
-
Lower logical error rates than the [[144, 12, 12]] baseline: Under code-capacity noise decoded with BP-OSD (product-sum BP for 20 iterations, OSD with CS order 7, 10⁶ samples per physical error rate), [[260, 24, 10]] and [[169, 13, 11]] stay below the [[144, 12, 12]] curve over almost the entire range up to p = 0.04 and only meet the baseline at p = 0.05. The [[143, 15, 9]] code is below it for p ≤ 0.02, matches at p = 0.03, and rises above it beyond that.
-
Largest gap at low physical error rates: At p = 0.01, the [[260, 24, 10]] code reaches an LER about twenty times lower than the [[144, 12, 12]] code, while [[143, 15, 9]] and [[169, 13, 11]] are lower by factors of about nine and four. The [[247, 19, 14]] code instead follows the [[144, 12, 12]] curve closely across the whole range.
-
Block-level error accounting: The reported LER is a block error rate: a sample counts as a failure if any of the k logical qubits is flipped after decoding, rather than averaging over individual logical qubits.
-
Circuit-level noise comparison: The abstract states that several discovered codes outperform the Gross code across a broad range of the tested physical error rates under both code-capacity and circuit-level noise; the truncated content provided here details only the code-capacity curves and the comparison against the [[144, 12, 12]] code, so the circuit-level numbers are not reported in the available text.
Methodology in Plain English
Step 1 – Training on plausible base matrices. Rather than operating on full parity-check matrices, the model works on a small base matrix whose entries are short polynomials (elements of F₂[ℤ_ℓ]), stored as an m × n × ℓ tensor of bits. Since no dataset of good base matrices exists, the authors generate training data synthetically: a progressive-edge-growth (PEG) procedure produces a sparse support, and each nonzero cell gets a random polynomial of weight drawn uniformly from {1, …, w_max}. The model is a bipartite-graph attention network (with cross-attention between check and variable nodes, AdaLN time conditioning, and a bilinear edge decoder producing ℓ logits per cell) trained with the standard x₀-prediction objective: flip bits with a symmetric binary channel, then ask the network to recover the clean matrix. A degree term on the soft-OR support is added to the binary cross-entropy, weighted by λ_deg = 3.0.
Step 2 – Guiding the sampler with code quality. During reverse diffusion, the network's logits are moved along the negative gradient of an energy function before each sampling step. The energy is a weighted sum of eight sub-energies, each differentiable so the gradient flows back into the logits:
- A decoding term that simulates a depolarizing error, forms syndromes against continuous check matrices using a smooth parity function par(s) = ½(1 − cos(πs)), unrolls a BP decoder, and measures the binary cross-entropy of its soft error estimates. Unrolling keeps the decoder differentiable through the lift and back into the model.
- Girth-4 and girth-6 terms computed from the node-projection matrices of the unfolded base matrix, with correction terms subtracting spurious non-bipartite contributions.
- A spectral term on the second-largest eigenvalue of the normalized node projections, used as a heuristic proxy for distance.
- A rank term (negative log-determinant over singular values) to prevent rank collapse.
- A depth term using a soft maximum of row and column sums to keep check weights light.
- The degree term from training, plus an L1 term for sparsity.
Geometry terms are evaluated on the unfolded base matrix rather than on H_X and H_Z; the authors report that evaluating them on the check matrices gave no difference in resulting codes and that unfolding is cheaper.
Step 3 – Screening and proving. Generated samples are expanded, checked for commutation, assigned exact n and k via k = n − rank(H_X) − rank(H_Z), ranked by a cheap distance upper bound, and the best ones have their distance proven exactly with MILP. One extra unguided gradient step is applied to the final continuous tensor before clipping to [0, 1] and rounding at ½.
Training details: T = 100 diffusion steps with a cosine schedule and β_t from 10⁻⁴ to 2×10⁻²; 750 epochs; AdamW with batch size 16 and 4096 PEG-generated base matrices per epoch; peak learning rate 10⁻⁴ with weight decay 10⁻⁴, linear warmup over 20 epochs then cosine decay; gradients clipped to norm 1.0; roughly 10.7M parameters; a single NVIDIA L40 GPU at about 5 seconds per epoch. Inference runs generate batches of 64 samples, with the guidance scale and energy weights tuned per run.
Why This Matters
Impact on research. Quantum code design has largely been an algebraic, human-driven craft: LP and bivariate bicycle codes come from carefully chosen polynomials. LiftDiff shows that a generative model can search this discrete, combinatorial space and return codes that are competitive with, and in some efficiency metrics better than, hand-constructed baselines. It also demonstrates a general template — generate a cheap classical object, differentiate through the expensive quantum evaluation, and certify afterwards — that could transfer to other code families.
Potential real-world applications (as directions this line of work enables):
- Fault-tolerant quantum computing architectures that need codes with high encoding rate and bounded check weight to fit hardware connectivity constraints.
- Quantum memory design, where the [[247, 19, 14]]-style trade-off between rate, distance, and check weight determines physical qubit overhead.
- Co-design of decoders and codes, since the decoding energy term embeds a differentiable BP decoder directly in the construction loop.
- Automated exploration of code families for hardware with locality or weight limits, where the soft maximum term explicitly targets light checks.
Industry relevance. Companies pursuing superconducting or trapped-ion quantum processors are constrained by qubit connectivity and syndrome-extraction circuit depth, both of which map onto check weight and code geometry — the quantities LiftDiff is explicitly guided to control. The reported encoding rates up to 0.310 and check weights between 5 and 12 are the kind of parameters such hardware roadmaps care about.
Future Directions
- Closing the gap to exact performance claims: The distance of only the best candidates is proven with MILP, with cheaper upper bounds used for screening; scaling exact certification to larger batches and larger codes remains open.
- Extending beyond the self-product case: The paper restricts itself to LP(M, M); whether guiding toward pairs of distinct base matrices M₁ and M₂ yields better codes is untested here.
- Beyond code-capacity noise: The truncated text reports detailed code-capacity curves only; a fuller treatment of circuit-level noise results (referenced in the abstract) is the natural next step.
- Cheaper and better energy proxies: The spectral term is described as a heuristic for distance that assumes a regular binary graph, and the geometry terms were validated only by observing no difference between the unfolded matrix and the full check matrices — better distance proxies and more principled energy weighting are open problems.
- Generality of the guided-diffusion recipe: Whether this energy-guided discrete diffusion approach transfers to other structured code families (for example bivariate bicycle codes defined over F₂[x, y]/(x^ℓ − 1, y^m − 1)) is not explored.
Target Audience
Researchers and graduate students working at the intersection of quantum error correction and generative machine learning; quantum computing hardware and architecture teams evaluating qLDPC codes for fault-tolerant roadmaps; and ML researchers interested in discrete diffusion with physics-derived, differentiable guidance objectives. Readers without a background in stabilizer codes and diffusion models will find the methodology sections dense, though the results tables and the performance comparisons are accessible.
Authors’ abstract
The realization of fault-tolerant quantum computation relies on Quantum Error-Correcting Codes (QECC). Of particular interest are codes that combine a high encoding rate with sufficient distance. Existing algebraic constructions, such as lifted product (LP) codes, build a large quantum low-density parity-check (qLDPC) code from a classical base matrix. In this work we introduce LiftDiff, a generative approach to the discovery of QECC. A discrete denoising diffusion model is trained to generate base matrices over the group algebra $\mathbb{F}_2[\mathbb{Z}_\ell]$, which are then expanded into LP codes. The reverse diffusion process is guided by an energy function that evaluates quantum code properties, including girth, degree, sparsity and decoding performance, steering the sampler toward matrices that yield LP codes with favorable parameters. Our method discovers codes with parameters such as $[[169,13,11]]$, $[[143,15,9]]$, and $[[260,24,10]]$, including a $[[247,19,14]]$ code that achieves the highest ${kd^2}/{n}$ among the baselines. Moreover, several discovered codes outperform the Gross code across a broad range of the tested physical error rates under both code-capacity and circuit-level noise.