[Paper Review] Discovery of Optimal Quantum Error Correcting Codes via Reinforcement Learning
This paper introduces a reinforcement learning (RL) framework that uses the Quantum Lego modular code construction to discover optimal quantum error correcting codes (QECCs). By training an agent to maximize code distance or minimize logical error under biased noise, the method discovers a new [[17,1,3]] CSS code with superior noise resilience compared to known codes, including surface and XZZX codes, demonstrating RL's power in customizing QECCs for specific noise models.
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 extit{arbitrary} 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 extit{lower} 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.
Motivation & Objective
- To develop a scalable, customizable method for designing quantum error correcting codes tailored to specific noise models.
- To overcome the limitations of manual or exhaustive search in code design by leveraging reinforcement learning.
- To explore whether RL can discover codes with superior performance in code distance and logical error suppression under biased Pauli noise.
- To enable code discovery without full knowledge of the noise model by integrating feedback from physical quantum devices.
- To extend the Quantum Lego framework to include non-stabilizer codes and improve scalability through hybrid VQA-RL approaches.
Proposed method
- The authors gamify the Quantum Lego framework, treating code construction as a sequential decision-making game where an RL agent selects actions: adding legos, contracting legs, or terminating.
- The agent is trained using a reward function that encourages maximizing code distance or minimizing logical error probability under biased Pauli noise.
- Code properties such as distance and weight enumerators are computed via tensor network contractions after game termination, using exact or approximate methods.
- The method uses a deep Q-network (DQN) agent with experience replay and target networks to stabilize training and improve convergence.
- For scalability, approximate cost functions based on Monte Carlo sampling or MPO-based tensor contractions are proposed to reduce computational cost from O(exp(d)) to O(n log n).
- The framework supports hybrid training: pre-train on classical noise models, then fine-tune using real device feedback to adapt to unknown noise characteristics.

Experimental results
Research questions
- RQ1Can reinforcement learning discover quantum error correcting codes with higher code distance than standard concatenation?
- RQ2Can RL optimize for logical error suppression under biased Pauli noise more effectively than existing codes?
- RQ3Does the RL-optimized code outperform known codes like surface, XZZX, and color codes in adversarial noise scenarios?
- RQ4Can the RL framework be adapted to work with real quantum hardware without requiring full noise model characterization?
- RQ5Can the framework be extended to include non-stabilizer codes and enable scalable code design via VQA-generated legos?
Key findings
- The RL agent discovers a [[17,1,3]] CSS code that outperforms known codes in logical error suppression under biased Pauli noise, despite having a lower adversarial distance than the surface code.
- The agent achieves the linear programming bound for CSS codes on 13 qubits, saturating the theoretical maximum distance for this code size.
- For the logical error minimization objective, the method discovers the best-known CSS code for ≤20 qubits under biased noise, surpassing surface, XZZX, and 2D color codes.
- The framework enables code discovery without explicit noise model knowledge by using feedback from physical devices during fine-tuning.
- Approximate cost functions using MPO-based tensor contractions reduce computational cost from O(exp(d)) to O(n log n), enabling scalability to larger systems.
- The method is compatible with VQA-generated non-stabilizer codes, extending the Quantum Lego framework to non-Pauli-stabilizer codes via efficient tensor network evaluation.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.