acceptodds
Under review as a conference paper at ICLR 2027

Qupeggio: Quantum Error-Correcting Code Discovery via Autoregressive Generation and Diffusion Repair

Abstract

Quantum error-correcting (QEC) code discovery is essential for fault-tolerant quantum computation (FTQC), yet it remains largely driven by expert-designed constructions. Existing automated approaches based on reinforcement learning offer a promising alternative, but require enormous numbers of increasingly expensive code evaluations and have so far been limited to relatively small codes. Meanwhile, the field has accumulated millions of previously discovered QEC codes, raising a natural question: can this existing knowledge be reused to amortize code discovery across different design problems, rather than searching for every code from scratch? Moreover, can such learned knowledge help discover high-distance codes competitive with those already known? We introduce a generate-and-repair framework that learns reusable construction patterns from existing QEC codes, combining global construction from learned priors with targeted local refinement that preserves useful existing structure. An autoregressive model generates code constructions across different numbers of physical and logical qubits, while a diffusion model selectively repairs parts of promising constructions that limit their code performance. Across large and diverse code specifications, our framework generalizes to sparsely represented and unseen settings, and discovers SAT-certified codes whose distances extend beyond the frontier represented in the training data. These results show that generative modeling can amortize QEC code discovery across design problems while continuing to improve upon the constructions from which it learns.

Primary area:
applications to physical sciences (physics, chemistry, biology, etc.)
Keywords:
AI for science, Quantum computing

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_mmRgOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper proposes QUPEGGIO, a framework combining conditional autoregressive generation and discrete diffusion repair to discover quantum error-correcting (QEC) codes. The methodology represents CSS codes as gate-level encoding circuits, enabling pre-training on existing code datasets to generate candidate circuits conditioned on physical qubits, logical qubits, and target distance. For low-distance candidates, minimum-weight logical errors are back-propagated to identify vulnerable gates, which are then localized and regenerated using a bidirectional diffusion model. Experiments show that QUPEGGIO achieves higher code distances compared to RL baselines and existing bivariate bicycle (BB) codes under a fixed QEC evaluation budget.

Critical strengths
  1. The generate-and-repair setup provides a practical alternative to pure RL search by reusing existing QEC constructions to initialize candidates and performing targeted diffusion updates on vulnerable gate regions. 2. Evaluating performance against exact SAT-certified distances and validating structural diversity via Quantum Weight Enumerator (QWE) classes strengthens the empirical verification of the discovered codes.
Critical weaknesses
  1. The feature set of encoding circuits that necessitates discrete diffusion repair over direct local search or greedy gate substitution is not clearly justified. 2. The operational workflow lacks a top-level algorithm box describing the complete sequence of training, sampling, backtracing, thresholding, and repair steps. 3. Experimental comparisons are restricted to a single primary benchmark dataset generated from QuantumClifford.jl without testing on independently constructed random or hardware-constrained codes. 4. The discussion of related works fails to address fundamental limits of sequence-based generative models when scaling to high-weight stabilizer codes.
Questions for authors
  1. In Section 3.1 and Section 3.3, what specific features of quantum encoding circuits make standard optimization methods unsuitable, necessitating a discrete diffusion model for localized gate repair? 2. Could the paper include a complete top-level pseudocode algorithm in Section 3 detailing all steps of autoregressive sampling, error back-tracing, Otsu thresholding, and diffusion masking? 3. In Section 4.1, the evaluation is conducted only on codes derived from the QuantumClifford.jl suite. How does the performance hold when tested on external, highly unstructured or noisy benchmarks? 4. In Figure 4 and Figure 5, the results are presented very concisely. Can the paper provide a detailed breakdown of observation points explaining gate churn and variance across training steps? 5. What are the practical limitations of QUPEGGIO when scaling to n > 500, and how can this framework impact large-scale fault-tolerant architecture design in future work?
5 comments
AuthorsOpenReview ↗

Response to Reviewer mmRg: Part1

Thank you for your thoughtful and constructive feedback! Your comments have helped us more clearly demonstrate the effectiveness of our diffusion repair strategy and the practical relevance of Qupeggio in quantum error correction. We sincerely appreciate your valuable suggestions and address your questions point by point in the following three parts.

Table R1. Best code distance for (n,k)=(144,15)(n,k)=(144,15) under a fixed budget of Neval=1,200N_{\mathrm{eval}}=1,200.

MethodBest code distance dd
AR only12
Full method (AR + diffusion, R=2R=2)15
AR + local search, 1 round12
AR + local search, 2 rounds12
AR + local search, 3 rounds12

Diffusion Repair vs. Local Search. We provide Table R1 to compare diffusion repair with local search using the same error-guided masks and evaluation budget. While diffusion repair improves code distance from 1212 to 1515, local search provides no improvement even with additional repair rounds.

We further clarify that local search is challenging because each CNOT gate has 20,59220,592 possible control-target choices at n=144n=144, while the effectiveness of a modification depends on its interactions with other gates. Diffusion repair instead leverages learned construction patterns and bidirectional circuit context to propose coordinated local modifications, making more effective use of the limited evaluation budget. We will clarify this motivation and comparison in Sec. 4.4 of the revised manuscript.

Table R2. Gate churn and repair effectiveness across repair rounds at (n,k)=(144,15)(n,k)=(144,15).

Repair roundMean gate churn (% of editable CNOTs changed)Candidates with improved distanceMean Δd\Delta d of improved candidates
Round 11.07%59%+2.05
Round 20.93%47%+1.72

Gate Churn and Repair Effectiveness. To further clarify gate churn and variation in repair outcomes, we provide a per-round breakdown in Table R2, following the experimental setting of Figure 5. Across repair rounds, diffusion modifies only approximately 11\\% of editable CNOTs, while improving the code distance for roughly half of the candidates. These results demonstrate that Qupeggio achieves consistent distance improvements through localized modifications, with minimal gate churn.

Table R3. Diffusion repair of random CSS codes.

Code size nnImproved candidatesΔd\Delta d
n=72n=7233%+1.34
n=144n=14445%+1.67

Effectiveness on Unstructured CSS Codes. We add Table R3 to evaluate Qupeggio's diffusion repair on 100 random CSS codes without predefined construction structures. The results show that Qupeggio improves code distance in ∼40\sim40\\% of cases, highlighting its ability to apply learned repair strategies to diverse code constructions beyond structured code families.

AuthorsOpenReview ↗

Response to Reviewer mmRg: Part2

Algorithm 1. Qupeggio: Generate-and-Repair Pipeline.

Each AR-generated candidate undergoes up to RR diffusion repair rounds (R=2R=2 by default), with all QEC evaluations counted toward the shared budget NevalN_{\mathrm{eval}}.

Require: Code specification [[n,k,d⋆]][[n,k,d^\star]]; autoregressive generator pθp_\theta; diffusion model pϕp_\phi; fixed Hadamard layer HH; desired check-weight constraint W\mathcal W; number of candidates NARN_{\mathrm{AR}}; repair rounds RR; evaluation budget NevalN_{\mathrm{eval}}.

Ensure: Best discovered distance dbestd_{\mathrm{best}} and corresponding circuit CbestC_{\mathrm{best}}.

Initialization

  1. q←0q\leftarrow0; dbest←−∞d_{\mathrm{best}}\leftarrow-\infty; Cbest←∅C_{\mathrm{best}}\leftarrow\varnothing
  2. Tmax⁡←2000T_{\max}\leftarrow2000 if n=72n=72, else 40004000 if n=144n=144

Per-Candidate Generate-and-Repair

  1. for i=1,…,NARi=1,\ldots,N_{\mathrm{AR}} do

  2. \quad if q≥Nevalq\geq N_{\mathrm{eval}} then break

    Autoregressive Generation

  3. \quad Generate x=(x1,…,xT)∼pθ(⋅∣H,n,k,d⋆)\mathbf{x}=(x_1,\ldots,x_T)\sim p_\theta(\cdot\mid H,n,k,d^\star) until EOS or Tmax⁡T_{\max} gates, enforcing CheckWeightValid(⋅;W)\mathrm{CheckWeightValid}(\cdot;\mathcal W) at each generation step.
    \quad Each xt=(ct,ut)x_t=(c_t,u_t) is a CNOT gate represented by two tokens: control ctc_t and target utu_t.

  4. \quad C←(H,x1,…,xT)C\leftarrow(H,x_1,\ldots,x_T)
    \quad Fixed Hadamard layer followed by the generated CNOT sequence.

  5. \quad (d,E)←QDistRnd(C)(d,\mathcal E)\leftarrow\mathrm{QDistRnd}(C); q←q+1q\leftarrow q+1

  6. \quad if d>dbestd>d_{\mathrm{best}} then (dbest,Cbest)←(d,C)(d_{\mathrm{best}},C_{\mathrm{best}})\leftarrow(d,C)

    Iterative Error-Guided Diffusion Repair

  7. \quad for r=1,…,Rr=1,\ldots,R do

  8. \qquad if q≥Nevalq\geq N_{\mathrm{eval}} or d≥d⋆d\geq d^\star then break

    Logical-Error Back-Tracing

  9. \qquad for each e∈Ee\in\mathcal E do

  10. \qquad\quad e(T)←ee^{(T)}\leftarrow e; e(t−1)←xt†e(t)xte^{(t-1)}\leftarrow x_t^\dagger e^{(t)}x_t for t=T,…,1t=T,\ldots,1

  11. \qquad\quad Δe(xt)←wt(e(t−1))−wt(e(t))\Delta_e(x_t)\leftarrow\mathrm{wt}(e^{(t-1)})-\mathrm{wt}(e^{(t)}) for t=1,…,Tt=1,\ldots,T

  12. \qquad end for

    Otsu-Based Mask Selection

  13. \qquad s(xt)←∑e∈Emax⁡(Δe(xt),0)s(x_t)\leftarrow\sum_{e\in\mathcal E}\max(\Delta_e(x_t),0) for t=1,…,Tt=1,\ldots,T

  14. \qquad sthr←Otsu({s(xt)}t=1T)s_{\mathrm{thr}}\leftarrow\mathrm{Otsu}(\{s(x_t)\}_{t=1}^{T}); M←{t∣s(xt)>sthr}M\leftarrow\{t\mid s(x_t)>s_{\mathrm{thr}}\}

  15. \qquad if M=∅M=\varnothing then break

    Diffusion Masking and Denoising

  16. \qquad C(S)←Mask(C,M)C^{(S)}\leftarrow\mathrm{Mask}(C,M)
    \qquad Mask the control and target tokens of selected CNOTs; keep all other gates and the Hadamard layer fixed.

  17. \qquad for τ=S,…,1\tau=S,\ldots,1 do

  18. \qquad\quad Sample CM(τ−1)∼pϕ(⋅∣C(τ),n,k,d⋆,τ)C_M^{(\tau-1)}\sim p_\phi(\cdot\mid C^{(\tau)},n,k,d^\star,\tau), enforcing CheckWeightValid(⋅;W)\mathrm{CheckWeightValid}(\cdot;\mathcal W); clamp CMˉ(τ−1)←CMˉC_{\bar M}^{(\tau-1)}\leftarrow C_{\bar M}

  19. \qquad end for

  20. \qquad C′←C(0)C'\leftarrow C^{(0)}; (d′,E′)←QDistRnd(C′)(d',\mathcal E')\leftarrow\mathrm{QDistRnd}(C'); q←q+1q\leftarrow q+1

  21. \qquad if d′>dbestd'>d_{\mathrm{best}} then (dbest,Cbest)←(d′,C′)(d_{\mathrm{best}},C_{\mathrm{best}})\leftarrow(d',C')

  22. \qquad if d′>dd'>d then (C,d,E)←(C′,d′,E′)(C,d,\mathcal E)\leftarrow(C',d',\mathcal E')
    \qquad The improved candidate is used for error diagnosis and repair in the next round.

  23. \quad end for

  24. end for

  25. return dbest,Cbestd_{\mathrm{best}},C_{\mathrm{best}}

Complete Algorithm Pseudocode. We provide Algorithm 1 to explicitly describe Qupeggio's end-to-end workflow, including autoregressive generation, code-distance evaluation, logical-error backtracing, Otsu-based mask selection, and diffusion repair. The algorithm also specifies the repair rounds, evaluation budget, and inference-time check-weight constraints. We will include this pseudocode in Appendix J of the revised manuscript.

AuthorsOpenReview ↗

Response to Reviewer mmRg: Part3

Table R4. Logical error rate per logical qubit. Improvement factors relative to the corresponding BB baseline are shown in parentheses. The lowest logical error rates for each code size are highlighted in bold.

Code [[n,k,d]][[n,k,d]]wwp=0.010p=0.010p=0.015p=0.015
BB [[72,12,6]][[72,12,6]]64.4×10−54.4\times10^{-5}1.6×10−41.6\times10^{-4}
Ours [[72,12,8]][[72,12,8]]87.7×10−67.7\times10^{-6} (5.71×)3.7×10−53.7\times10^{-5} (4.32×)
Ours [[72,12,9]][[72,12,9]]103.3×10−63.3\times10^{-6} (13.33×)1.9×10−51.9\times10^{-5} (8.42×)
Ours [[72,12,10]][[72,12,10]]125.6×10−65.6\times10^{-6} (7.86×)3.4×10−53.4\times10^{-5} (4.71×)
Code [[n,k,d]][[n,k,d]]wwp=0.015p=0.015p=0.020p=0.020
BB [[144,12,12]][[144,12,12]]61.7×10−71.7\times10^{-7}1.0×10−61.0\times10^{-6}
Ours [[144,12,13]][[144,12,13]]81.0×10−71.0\times10^{-7} (1.70×)6.6×10−76.6\times10^{-7} (1.52×)
Ours [[144,12,16]][[144,12,16]]102.8×10−72.8\times10^{-7} (0.61×)2.3×10−62.3\times10^{-6} (0.43×)
Ours [[144,12,17]][[144,12,17]]121.0×10−61.0\times10^{-6} (0.17×)7.5×10−67.5\times10^{-6} (0.13×)
Code [[n,k,d]][[n,k,d]]wwp=0.010p=0.010p=0.015p=0.015
BCH [[127,29,15]][[127,29,15]]285.3×10−55.3\times10^{-5}3.0×10−43.0\times10^{-4}
Ours [[72,12,9]][[72,12,9]]103.3×10−63.3\times10^{-6} (16.06×)1.9×10−51.9\times10^{-5} (15.79×)

Check Weight and Practical Considerations. We agree that generating high-weight stabilizer codes poses challenges for sequence-based models due to increased structural complexity. However, higher stabilizer weights do not necessarily lead to better code performance and may increase syndrome-extraction complexity and decoding difficulty [1,2,3]. This motivates our focus on practical QLDPC codes with sparse stabilizers, such as BB codes [2].

We clarify that Qupeggio supports flexible check-weight constraints enforced during both autoregressive generation and diffusion repair. Beyond code distance, we further provide Table R4 to compare logical error rates under the same noise and decoding settings. Our discovered sparse-check codes achieve lower logical error rates than the high-check-weight [[127,29,15]][[127,29,15]] BCH code in the evaluated settings, highlighting the practical value of controlling check weight. We will clarify these considerations in Appendix H and provide representative stabilizer generators in Appendix L of the revised manuscript.

Current Scaling Challenges and Practical Impact on Large-Scale Quantum Computing. We clarify that scaling Qupeggio beyond 500500 physical qubits is primarily limited by the computational cost of classical code-distance evaluation [2,4]. This challenge is also evident in IBM's study [2], where BB codes exceeding 300300 physical qubits are reported with distance bounds rather than exact distances. We will revise Appendix K to explicitly discuss this computational bottleneck.

We further clarify that the code sizes currently explored by Qupeggio are directly relevant to IBM's roadmap for large-scale fault-tolerant quantum computing based on modular QLDPC architectures [5,6]. For example, recent architectures adopt the [[144,12,12]][[144,12,12]] BB code [2], while Qupeggio discovers a [[144,12,13]][[144,12,13]] code with higher distance and lower logical error rates at the same code size and encoding rate, as shown in Table R4.

These improved codes can contribute to more capable fault-tolerant quantum hardware, which may in turn support quantum-assisted distance evaluation [7] and enable Qupeggio to explore larger codes. This suggests a promising longer-term connection between improved code discovery and quantum hardware development. We will revise Appendix K to further discuss these practical implications and future scaling opportunities.

References

[1] Sabo, Eric, et al. "Weight-reduced stabilizer codes with lower overhead." PRX Quantum 5.4 (2024): 040302.

[2] Bravyi, Sergey, et al. "High-threshold and low-overhead fault-tolerant quantum memory." Nature 627.8005 (2024): 778–782.

[3] Peham, Tom, et al. "Automated synthesis of fault-tolerant state preparation circuits for quantum error-correction codes." PRX Quantum 6.2 (2025): 020330.

[4] Kapshikar, Upendra, and Srijita Kundu. "On the hardness of the minimum distance problem of quantum codes." IEEE Transactions on Information Theory 69.10 (2023): 6293–6302.

[5] Yoder, Theodore J., et al. "Tour de gross: A modular quantum computer based on bivariate bicycle codes." arXiv preprint arXiv:2506.03094 (2025).

[6] Mandelbaum, R., Gambetta, J., Chow, J., Mittal, T., Yoder, T. J., Cross, A. W., and Steffen, M. "How IBM will build the world's first large-scale, fault-tolerant quantum computer." IBM Quantum Blog (June 10, 2025).

[7] Ismail, Refaat, Ashish Kakkar, and Anatoly Dymarsky. "Quantum annealing approach to the minimum distance problem of quantum codes." Physical Review A 114.4 (2026): 042610.

Reviewer_Ww6ROpenReview ↗
Rating
2(+1)
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper introduces a QEC code discovery framework which generates and repair QEC codes. The generative model is trained with supervised labels to learn from exisiting code construction patterns. Then a diffusion model is used to repair potentially poor gate operations by tracing errors back through the encoding circuit. Experimental results show that the framework can extend beyond training configurations.

Critical strengths

QEC code discovery is an important problem, which the field has been paying more and more attention to. The idea of learning reusable construction patterns from existing QEC codes leverages domain knowledge and reduces the need to train from scratch. The representation of QEC code as an encoding circuit provides validity by construction and enables flexible code discovery instead of restriction to a certain family, which is the limitation of many LLM-based discovery methods.

Critical weaknesses

The paper does not deliver enough details for reproducibility. (1) It provides code family data coutns, but lacks a data collection pipeline, including the construction parameters, sampling ranges, distribution over [n , k, d], conversion into encoding circuit, labeling procedures, etc. (2) It doesn't provide the criteria for choosing d∗d^* at generation and the actual value used in the experiments. (3) There is no clear specification of the "SOTA RL-based search baseline Olle et al. (2024)". The paper says the RL baseline "reward is obtained only after evaluating a complete code", but the original paper describes using "the (negative) weighted KL sum as an instantaneous reward". The authors should specify if they have made any adaptations to the original implementation.

The paper claims large-scale discovery of strong QEC codes, but distance evaluation presents a major scalability bottleneck. The framework evaluates every initial candidate and every repair attempt, which makes it evaluation-heavy. However, distance evaluation is itself a computationally expensive procedure. This is supported by the runtime mentioned in Appendix D, where 600 evaluations take one day. The scaling behavior of the approach remains unclear. Distance should also not be the only evaluation metric. Objectives such as logical error rate are practical relevant metrics as well. This makes the comparison against OmniQEC questionable, as their target is suppressing logical error instead of distance maximization.

I am cautious about the generalization claim. The performance at lower kk underperforms the training data, and the distance degrades significantly when kk increases, which limits the practical usage of discovered code at larger kk. Also, the optimization problem is ambiguous. If it targets unrestricted CSS distance maximization, the paper doesn't compare with strong reference constructions such as the [[127,29,15]] BCH code. If the objective is practical sparse-code discovery, there are no such constraints in the problem formulation.

Questions for authors
  1. Could you clarify the experiment settings listed in Weaknesses 1?
  2. What is the scaling behavior of this framework beyond 600 and 1200 evaluations?
  3. How does the framework perform beyond distance maximization objective?
8 comments
AuthorsOpenReview ↗

Response to Reviewer Ww6R: Part1

Thank you for your thoughtful and constructive feedback! Your comments have significantly strengthened our work by helping us more clearly demonstrate the practical effectiveness of Qupeggio in quantum error correction. We sincerely appreciate your valuable suggestions and address your questions point by point in the following three parts.

Table R1. Maximum check weight vs. code distance.

Code parameters (n,k)(n,k)w=6w=6w=7w=7w=8w=8w=9w=9w=10w=10w=11w=11w=12w=12
(72,12)(72,12)66889910
(144,12)(144,12)12121315161617

Clarification of QLDPC Discovery Objectives. We clarify that Qupeggio focuses on discovering sparse-check QEC codes rather than unrestricted CSS distance maximization. To make this objective explicit, we introduce flexible check-weight constraints enforced at each step of autoregressive generation and diffusion repair. Table R1 shows that Qupeggio matches the distances of BB codes [8] at the same maximum check weight (w=6w=6), while discovering higher-distance codes [[72,12,8]][[72,12,8]] and [[144,12,15]][[144,12,15]] under modestly relaxed limits of w=8w=8 and w=9w=9, respectively. These results demonstrate that Qupeggio can improve code distance while explicitly controlling check sparsity. We will clarify this objective and trade-off in Appendix H and provide the stabilizer generators of representative discovered codes in Appendix L of the revised manuscript.

Table R2. Logical error rate per logical qubit under BP-OSD decoding. Improvement factors relative to the corresponding BB or BCH baseline are shown in parentheses. The lowest logical error rates for each comparison are highlighted in bold.

Code [[n,k,d]][[n,k,d]]wwp=0.010p=0.010p=0.015p=0.015
BB [[72,12,6]][[72,12,6]]64.4×10−54.4\times10^{-5}1.6×10−41.6\times10^{-4}
Ours [[72,12,8]][[72,12,8]]87.7×10−67.7\times10^{-6} (5.71×)3.7×10−53.7\times10^{-5} (4.32×)
Ours [[72,12,9]][[72,12,9]]103.3×10−63.3\times10^{-6} (13.33×)1.9×10−51.9\times10^{-5} (8.42×)
Ours [[72,12,10]][[72,12,10]]125.6×10−65.6\times10^{-6} (7.86×)3.4×10−53.4\times10^{-5} (4.71×)
Code [[n,k,d]][[n,k,d]]wwp=0.015p=0.015p=0.020p=0.020
BB [[144,12,12]][[144,12,12]]61.7×10−71.7\times10^{-7}1.0×10−61.0\times10^{-6}
Ours [[144,12,13]][[144,12,13]]81.0×10−71.0\times10^{-7} (1.70×)6.6×10−76.6\times10^{-7} (1.52×)
Ours [[144,12,16]][[144,12,16]]102.8×10−72.8\times10^{-7} (0.61×)2.3×10−62.3\times10^{-6} (0.43×)
Ours [[144,12,17]][[144,12,17]]121.0×10−61.0\times10^{-6} (0.17×)7.5×10−67.5\times10^{-6} (0.13×)
Code [[n,k,d]][[n,k,d]]wwp=0.010p=0.010p=0.015p=0.015
BCH [[127,29,15]][[127,29,15]]285.3×10−55.3\times10^{-5}3.0×10−43.0\times10^{-4}
Ours [[72,12,9]][[72,12,9]]103.3×10−63.3\times10^{-6} (16.06×)1.9×10−51.9\times10^{-5} (15.79×)

Practical Error-Correction Performance. Beyond code distance, we provide Table R2 to evaluate logical error rates per logical qubit under the same noise settings and BP-OSD decoding. Our discovered codes achieve up to 13.33×13.33\times lower logical error rates than BB codes. We also include the [[127,29,15]][[127,29,15]] BCH code as an additional reference, where our [[72,12,9]][[72,12,9]] code achieves up to 16.06×16.06\times lower logical error rate with substantially lower check weight. These results highlight the practical value of discovering sparse-check codes beyond distance maximization alone.

Table R3. Comparison with OmniQEC: encoding rate and LER per logical qubit (n=72n=72, p=0.01p=0.01).

Code [[n,k,d]][[n,k,d]]SourceEncoding rate k/nk/nDistance ddLER
[[72,2,11]][[72,2,11]]OmniQEC0.028111.5×10−51.5\times10^{-5}
[[72,4,10]][[72,4,10]]OmniQEC0.056102.1×10−52.1\times10^{-5}
[[72,2,9]][[72,2,9]]OmniQEC0.02894.0×10−54.0\times10^{-5}
[[72,12,8]][[72,12,8]]Ours0.16787.7×10−67.7\times10^{-6}
[[72,12,9]][[72,12,9]]Ours0.16793.3×10−63.3\times10^{-6}
[[72,12,10]][[72,12,10]]Ours0.167105.6×10−65.6\times10^{-6}

Comparison with OmniQEC. We further compare Qupeggio with OmniQEC in terms of logical error rate (LER) and encoding rate under the same physical-qubit budget and noise settings, as shown in Table R3. The results show that Qupeggio consistently achieves lower LERs despite encoding substantially more logical qubits. This suggests that Qupeggio achieves a more favorable balance between error suppression and encoding efficiency, rather than improving one at the expense of the other.

References

[8] Bravyi, Sergey, et al. "High-threshold and low-overhead fault-tolerant quantum memory." Nature 627.8005 (2024): 778–782.

AuthorsOpenReview ↗

Response to Reviewer Ww6R: Part2

Table R4. Runtime and best code distance under different evaluation budgets using 10 workers.

Code (n,k)(n,k)EvaluationsRuntime (10 workers)Best distance dd
(72,12)(72,12)6003.1 h8
(72,12)(72,12)3,00013.2 h9
(144,12)(144,12)1,20010.6 h15
(144,12)(144,12)3,60028.3 h (1.2 d)16

Scalability. We clarify that the previously reported one-day runtime for 600 evaluations corresponds to a single-worker setting. Since candidate evaluation and repair can be performed independently across candidates, Qupeggio naturally supports parallelization, reducing the runtime to just 3.1 hours with 10 workers. We further provide Table R4 to examine performance under larger evaluation budgets. The results show that increasing the evaluation budget consistently improves the best discovered code distance, while parallelization keeps the runtime manageable. We will include these additional results and clarify the parallelization capability in Appendix D of the revised manuscript.

Understanding Performance Variations Across kk. We clarify that the observed variations in code distance across kk reflect differences in the difficulty of discovering high-distance codes at different encoding rates.

At small kk, existing QLDPC constructions have been extensively studied and optimized [1,2], leaving limited room for further distance improvements. Nevertheless, Qupeggio surpasses the training frontier at several small-kk settings for n=72n=72 and across the evaluated settings for n=144n=144.

At large kk, achieving high code distances becomes increasingly challenging due to fundamental rate-distance trade-offs [3,4,7]. Theoretical studies further suggest that the prevalence of high-distance codes can decline sharply as kk increases [5,6], providing context for the observed distance degradation.

Importantly, Qupeggio also discovers strong codes at practically relevant encoding rates, including those of established BB codes [8]. We will clarify these observations in Sec. 4.2 of the revised manuscript.

References

[1] Lin, Hsiang-Ku, and Leonid P. Pryadko. "Quantum two-block group algebra codes." Physical Review A 109.2 (2024): 022407.

[2] Liang, Zijian, and Yu-An Chen. "Self-dual bivariate bicycle codes with transversal Clifford gates." npj Quantum Information (2026).

[3] Cerf, Nicolas J., and Richard Cleve. "Information-theoretic interpretation of quantum error-correcting codes." Physical Review A 56.3 (1997): 1721.

[4] Bravyi, Sergey, David Poulin, and Barbara Terhal. "Tradeoffs for reliable quantum information storage in 2D systems." Physical Review Letters 104.5 (2010): 050503.

[5] Ma, Yuefei. "The asymptotic probability distribution of the relative distance of additive quantum codes." Journal of Mathematical Analysis and Applications 340.1 (2008): 550–557.

[6] Chandra, Daryus, et al. "Quantum coding bounds and a closed-form approximation of the minimum distance versus quantum coding rate." IEEE Access 5 (2017): 11557–11581.

[7] Ashikhmin, Alexei E., et al. "Quantum error detection. II. Bounds." IEEE Transactions on Information Theory 46.3 (2000): 789–800.

[8] Bravyi, Sergey, et al. "High-threshold and low-overhead fault-tolerant quantum memory." Nature 627.8005 (2024): 778–782.

AuthorsOpenReview ↗

Response to Reviewer Ww6R: Part3

Table R5. Construction and parameter ranges of the training codes.

FamilynnkkddCode structureGeneration parameters
Color codes7–6113–96.6.6 and 4.8.8 triangular latticesLattice distances d=3d=3–99
Surface codes9–2513–5Rotated surface codeBase distances d=3,5d=3,5
Bivariate bicycle (BB)16–3001–183–24HX=[A∣B]H_X=[A\mid B], HZ=[BT∣AT]H_Z=[B^T\mid A^T]; bivariate polynomials on an ℓ×m\ell\times m torusℓm=8\ell m=8–150150, ℓ,m=2\ell,m=2–5050; 22–55 monomials with enumerated/random exponents; published BB codes
Generalized bicycle (GB)10–1201–103–14Circulant matrices a(x),b(x)a(x),b(x) of size n0n_022–55 terms; n0=5n_0=5–6060
Hypergraph product (HGP)13–2991–333–11HX=[H1⊗I∣I⊗H2T]H_X=[H_1\otimes I\mid I\otimes H_2^T], HZ=[I⊗H2∣H1T⊗I]H_Z=[I\otimes H_2\mid H_1^T\otimes I]Classical seeds of length 33–2727: repetition, single-parity, Hamming, cycle, Reed–Muller, random LDPC, and girth-constrained graph codes
Lifted product (LP)117–29913–396–12Two protographs with circulant permutation blocksColumn weight 22–44, row weight 22–55; lift size L=3L=3–100100 with random shifts
Toric codes50–7225–6L×LL\times L torusL=5,6L=5,6
Quantum Hamming / Steane713HX=HZ=H_X=H_Z= parity-check matrix of the [7,4][7,4] Hamming code[[7,1,3]][[7,1,3]]
Shor codes913HXH_X: two weight-6 checks; HZH_Z: six weight-2 checks[[9,1,3]][[9,1,3]]
Quantum BCH29–3114–5HX=HZ=H_X=H_Z= parity-check matrix of a self-orthogonal BCH codeLength-31 BCH code
Self-orthogonal CSS7–2401–123–13HX=HZ=HH_X=H_Z=H; random even-weight, mutually orthogonal rowsSampling range: n=7n=7–240240, k=1k=1–1212
Overall7–3001–393–24——

Training Data Collection and Preprocessing. We provide Table R5 to detail the construction methods, sampling parameters, and resulting (n,k,d)(n,k,d) ranges across the training code families. We further expand the dataset through qubit permutations and code modifications, including qubit removal, check removal, and logical-to-check conversion, to improve coverage across code specifications.

During preprocessing, we filter out codes with check weights exceeding 10 and convert the remaining parity-check matrices into encoding circuits via Gaussian elimination. The ranges in Table R5 reflect the resulting dataset after filtering. For distance labeling, we use known code distances when available and otherwise estimate them using QDistRnd. We will document these data collection and preprocessing procedures in Appendix A of the revised manuscript.

Target Distance Selection. We clarify that the target distance d⋆d^\star is set to 1010 for n=72n=72 and 2020 for n=144n=144, based on the upper end of the training-data distance distributions at comparable block lengths. This encourages the models to generate high-distance codes while remaining within the distance range represented in the training data. We will specify these values and the selection criterion in Sec. 4.1 of the revised manuscript.

RL Baseline. We clarify that our RL baseline uses the publicly available implementation of [9], including its instantaneous reward formulation, without any modifications. We will explicitly state this in Sec. 4.1. We will also revise the wording from “evaluating a complete code” to “evaluating the code defined by all Clifford gates applied so far” to avoid ambiguity.

References

[9] Olle, Jan, et al. "Simultaneous discovery of quantum error correction codes and encoders with a noise-aware reinforcement learning agent." npj Quantum Information 10.1 (2024): 126.

Reviewer_CgD2OpenReview ↗
Rating
2
Confidence
4
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper propose Qupeggio which is a method for discovering CSS quantum error correcting codes with autoregressive transformer generator and with discrete diffusion. The model represent a CSS code by its Clifford encoding circuit with sequence of CNOT gates which results in valid CSS code. The size of the model is 195M for the transformer and 44M for the masked diffusion. The proposed model conditioned on n, k, and target distance d. The proposed model generate codes with n equals 72 and 144 with SAT certified distances.

Critical strengths
  1. The proposed diagnosis idea in diagnosis idea is novel. Using the QDistRnd algorithm to get the minimum weight logical errors and backpropagat it through the Clifford CNOT circuit is a great signal for the learning to understand where the errors are.

  2. The proposed method check the distance of the generated codes with  SAT solver and use quantum weight enumerators (QWE) to check the code equivalence classes, which gives 187 new classes for n= 72.

Critical weaknesses
  1. The paper don't mention how the encoding circuits are canonicalized and tokenized (from the different codes families). The paper does not explain how the Hadamard layer is used at inference or how many CNOT gates there are. 

  2. One major issue is the weights check number fo the discovered codes. In the appendix it is written that it is 10% of the block length which makes it 14 or 15 in case on n=144. This is very huge number compare to check weights of 6 for BB codes. Since the proposed codes has weights checks of 14/15 it needs much more syndrome measurement circuits.

  3. The paper doesn't report the  logical error rates and it is hard to understand the quality of the generated codes.

Questions for authors
  1. How the paper conver the parity check matrix of QuantumClifford.jl  to canonical CNOT in the training stage? Does the Hadamard layer fixed or generated?

  2. When you applied the diffusion model, does it preserve the exact number of logical qubits k?

  3. PLease prove the check weight distributions for the generated codes and provide thier logical error rate.

  4. You should also compare them to the BP-OSD decoding of the BB codes.

4 comments
AuthorsOpenReview ↗

Response to Reviewer CgD2

Thank you for your thoughtful and constructive feedback! Your comments have helped us more clearly demonstrate the effectiveness and practical relevance of our approach in quantum error correction. We greatly appreciate your suggestions and address your concerns in detail below.

Table R1. Maximum check weight vs. code distance.

Code parameters (n,k)(n,k)w=6w=6w=7w=7w=8w=8w=9w=9w=10w=10w=11w=11w=12w=12
(72,12)(72,12)66889910
(144,12)(144,12)12121315161617

Check-Weight Constraints. To address the concern about stabilizer check weights, we provide Table R1, evaluating Qupeggio under different maximum check-weight constraints enforced at each generation step. At the same check-weight limit as BB codes (w=6w=6), Qupeggio achieves matching code distances. As the limit is relaxed, the discovered distances increase, demonstrating that Qupeggio can flexibly control the trade-off between check weight and code distance. We will also include the stabilizer generators of representative discovered codes in Appendix L of the revised manuscript to facilitate further examination of their structure.

Table R2. Logical error rates under BP-OSD decoding compared with BB codes.

Improvement factors relative to the corresponding BB baseline are shown in parentheses. The lowest logical error rates for each code size are highlighted in bold.

Code [[n,k,d]][[n,k,d]]wwp=0.010p=0.010p=0.015p=0.015
BB [[72,12,6]][[72,12,6]]64.4×10−54.4\times10^{-5}1.6×10−41.6\times10^{-4}
Ours [[72,12,8]][[72,12,8]]87.7×10−67.7\times10^{-6} (5.71×)3.7×10−53.7\times10^{-5} (4.32×)
Ours [[72,12,9]][[72,12,9]]103.3×10−63.3\times10^{-6} (13.33×)1.9×10−51.9\times10^{-5} (8.42×)
Ours [[72,12,10]][[72,12,10]]125.6×10−65.6\times10^{-6} (7.86×)3.4×10−53.4\times10^{-5} (4.71×)
Code [[n,k,d]][[n,k,d]]wwp=0.015p=0.015p=0.020p=0.020
BB [[144,12,12]][[144,12,12]]61.7×10−71.7\times10^{-7}1.0×10−61.0\times10^{-6}
Ours [[144,12,13]][[144,12,13]]81.0×10−71.0\times10^{-7} (1.70×)6.6×10−76.6\times10^{-7} (1.52×)
Ours [[144,12,16]][[144,12,16]]102.8×10−72.8\times10^{-7} (0.61×)2.3×10−62.3\times10^{-6} (0.43×)
Ours [[144,12,17]][[144,12,17]]121.0×10−61.0\times10^{-6} (0.17×)7.5×10−67.5\times10^{-6} (0.13×)

Logical Error Rates and BP-OSD Decoding. To address the concern about practical decoding performance, we provide Table R2, comparing the logical error rates of our discovered codes with BB codes under identical noise settings and BP-OSD decoding. Our codes achieve up to 13.33×13.33\times and 1.70×1.70\times lower logical error rates for n=72n=72 and n=144n=144, respectively. The best decoding performance occurs at moderate check-weight limits (w=8w=8–1010), while further increases in code distance do not necessarily reduce logical error rates. These results underscore the importance of balancing improvements in code distance against the increased decoding difficulty associated with denser checks.

Circuit canonicalization. We clarify that we use QuantumClifford.jl to obtain the parity-check matrices and apply Gaussian elimination to construct one encoding circuit for each training code. Each circuit consists of a Hadamard layer followed by a sequence of CNOT gates. We will clarify this procedure in Appendix A of the revised manuscript.

Circuit Tokenization and Generation. We clarify that each circuit is tokenized by first listing the qubit indices of the Hadamard gates, followed by two tokens per CNOT gate specifying its control and target qubits in execution order. The model is trained on these complete sequences. At inference time, the Hadamard layer is fixed, and the model generates the CNOT sequence until an end-of-sequence (EOS) token is produced or the maximum length is reached. The maximum number of CNOT gates is 2,0002,000 for n=72n=72 and 4,0004,000 for n=144n=144. We will provide further details of these procedures in Appendix B of the revised manuscript.

Logical Qubit Count. We clarify that the number of logical qubits kk is fixed before inference by specifying kk logical inputs to the encoding circuit. Both autoregressive generation and diffusion repair operate only on the CNOT sequence, changing how these logical inputs are encoded without changing their number.

We further clarify that conditioning on kk helps the models learn how to achieve higher code distances for the specified number of logical qubits, rather than determining that number. We will revise Sec. 3.1 to make this distinction explicit.

Dear Reviewer CgD2,

Thank you again for your helpful feedback. We hope our response and additional experiments have addressed your concerns.

Please let us know if you have any remaining questions or concerns. We would be happy to clarify further.

Thank you for your time!

I really appreciate the author response and the additional experiments that was conduct. Thank you for adding the check weights and the BP OSD experiments I still have concern of the following issues:

  1. The distribution if the weight check is not given - only the maximum of the weight check.
  2. The proposed decoder only get the same minimum distance as BB code and not improve upon them for w=6

Therefore I will maintain my score.

Dear Reviewer CgD2,

We sincerely thank you for taking the time to read our response and provide further feedback.

Check-weight distribution. We would like to clarify that the check weights of our generated codes are uniform under the enforced check-weight constraints. Therefore, the maximum check weights reported in Table R2 also represent the weight of every stabilizer check within each code. We have also added the full code parameters of our discovered codes in Appendix L for further reference.

BB Code Comparison in the Context of AI-driven Code Discovery. We acknowledge that Qupeggio does not achieve higher distances than BB codes at w=6. However, its primary contribution lies not in surpassing every specialized algebraic construction, but in enabling flexible, automated quantum code discovery across diverse design constraints.

This distinction is important when interpreting the comparison. BB codes build on two decades of specialized algebraic development, from the original bicycle codes in 2004 [1] to bivariate bicycle codes in 2024 [2]. Qupeggio, in contrast, achieves comparable distances without explicitly imposing these construction-specific algebraic structures. Moreover, its ability to discover structurally diverse codes with competitive performance (Table R1, R2) across different code configurations and check-weight constraints demonstrates that this capability extends beyond a single construction family or optimization setting.

Rather than replacing well-established specialized algebraic constructions, Qupeggio provides a complementary approach that opens up broader possibilities for quantum code discovery, with the flexibility to incorporate diverse hardware-specific constraints and application requirements into the code design process.

[1] MacKay, David JC, Graeme Mitchison, and Paul L. McFadden. "Sparse-graph codes for quantum error correction." IEEE Transactions on Information Theory 50.10 (2004): 2315–2330.

[2] Bravyi, Sergey, et al. "High-threshold and low-overhead fault-tolerant quantum memory." Nature 627.8005 (2024): 778–782.

Comments on the paper

1 comment
Area_Chair_3sTBOpenReview ↗

Please respond to the authors

Dear reviewers,

Thank you for your service.

The authors have provided their response to your initial reviews. As we approach the end of the author-reviewer discussion period, could you please respond to the authors’ rebuttal (if you haven’t done so already) and communicate the extent to which your concerns have been addressed, and whether you have any further questions and concerns?

Thanks, Your AC

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.