# Discovery of Optimal Quantum Error Correcting Codes via Reinforcement Learning

arXiv: https://arxiv.org/abs/2305.06378 · HTML: https://mlsanity.com/paper/2305.06378/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- Builds on 5 of its 49 references that are in the map.
- First posted on arXiv 10 May 2023.

## Builds on (most cited first, 5 of 5)

- [Proximal Policy Optimization Algorithms](https://mlsanity.com/paper/1707.06347/) (2017)
- [A Closer Look at Invalid Action Masking in Policy Gradient Algorithms](https://mlsanity.com/paper/2006.14171/) (2020)
- [Learning to Unknot](https://mlsanity.com/paper/2010.16263/) (2020)
- [Optimizing Quantum Error Correction Codes with Reinforcement Learning](https://mlsanity.com/paper/1812.08451/) (2018)
- [Reinforcement Learning Decoders for Fault-Tolerant Quantum Computation](https://mlsanity.com/paper/1810.07207/) (2018)

## Built on by (most cited first, 5 of 5)

- [Evolutionary Discovery of Bivariate Bicycle Codes with LLM-Guided Search](https://mlsanity.com/paper/2606.02418/) (2026)
- [Discovering highly efficient low-weight quantum error-correcting codes with reinforcement learning](https://mlsanity.com/paper/2502.14372/) (2025)
- [Enhancing Quantum Memory Lifetime with Measurement-Free Local Error Correction and Reinforcement Learning](https://mlsanity.com/paper/2408.09524/) (2024)
- [Learning Encodings by Maximizing State Distinguishability: Variational Quantum Error Correction](https://mlsanity.com/paper/2506.11552/) (2025)
- [Discovering autonomous quantum error correction via deep reinforcement learning](https://mlsanity.com/paper/2511.12482/) (2025)

## Abstract (arXiv)

The recently introduced Quantum Lego framework provides a powerful method for generating complex quantum error correcting codes (QECCs) out of simple ones. We gamify this process and unlock a new avenue for code design and discovery using reinforcement learning (RL). One benefit of RL is that we can specify textitarbitrary properties of the code to be optimized. We train on two such properties, maximizing the code distance, and minimizing the probability of logical error under biased Pauli noise. For the first, we show that the trained agent identifies ways to increase code distance beyond naive concatenation, saturating the linear programming bound for CSS codes on 13 qubits. With a learning objective to minimize the logical error probability under biased Pauli noise, we find the best known CSS code at this task for lesssim 20 qubits. Compared to other (locally deformed) CSS codes, including Surface, XZZX, and 2D Color codes, our [[17,1,3]] code construction actually has textitlower adversarial distance, yet better protects the logical information, highlighting the importance of QECC desiderata. Lastly, we comment on how this RL framework can be used in conjunction with physical quantum devices to tailor a code without explicit characterization of the noise model.
