Table of Contents
Fetching ...

Learning Better Error Correction Codes with Hybrid Quantum-Assisted Machine Learning

Yariv Yanay

TL;DR

Problem: designing QECCs with favorable scaling and device-specific error resilience. Approach: a hybrid classical-quantum loop that uses Quantum Lego to build stabilizer codes and evaluates them on real quantum devices via a cost based on $p_{\rm ND}$, complemented by simulations with STIM. Key findings: Clifford simulations achieve up to 97% and 85% reductions in uncorrected error for isotropic and biased noise, while real-device noise raises $p_{\rm ND}$ with code size; renormalization methods using $ \log \mathcal{F}_{\rm ex} = c_q N_q + c_1 N_1 + c_2 N_2$ enable meaningful improvements, e.g., a 7-qubit code on Quantinuum with 45% gain and a 6-qubit code on IBM with 99.8% gain. Significance: demonstrates a practical route to discovering device-tailored QECCs beyond conventional architectures and highlights the potential of hybrid quantum-assisted optimization as hardware improves.

Abstract

Quantum error correction is one of the fundamental building blocks of digital quantum computation. The Quantum Lego formalism has introduced a systematic way of constructing new stabilizer codes out of basic lego-like building blocks, which in previous work we have used to generate improved error correcting codes via an automated reinforcement learning process. Here, we take this a step further and show the use of a hybrid classical-quantum algorithm. We combine classical reinforcement learning with calls to two commercial quantum devices to search for a stabilizer code to correct errors specific to the device, as well as an induced photon loss error.

Learning Better Error Correction Codes with Hybrid Quantum-Assisted Machine Learning

TL;DR

Problem: designing QECCs with favorable scaling and device-specific error resilience. Approach: a hybrid classical-quantum loop that uses Quantum Lego to build stabilizer codes and evaluates them on real quantum devices via a cost based on , complemented by simulations with STIM. Key findings: Clifford simulations achieve up to 97% and 85% reductions in uncorrected error for isotropic and biased noise, while real-device noise raises with code size; renormalization methods using enable meaningful improvements, e.g., a 7-qubit code on Quantinuum with 45% gain and a 6-qubit code on IBM with 99.8% gain. Significance: demonstrates a practical route to discovering device-tailored QECCs beyond conventional architectures and highlights the potential of hybrid quantum-assisted optimization as hardware improves.

Abstract

Quantum error correction is one of the fundamental building blocks of digital quantum computation. The Quantum Lego formalism has introduced a systematic way of constructing new stabilizer codes out of basic lego-like building blocks, which in previous work we have used to generate improved error correcting codes via an automated reinforcement learning process. Here, we take this a step further and show the use of a hybrid classical-quantum algorithm. We combine classical reinforcement learning with calls to two commercial quantum devices to search for a stabilizer code to correct errors specific to the device, as well as an induced photon loss error.
Paper Structure (7 sections, 4 equations, 7 figures)

This paper contains 7 sections, 4 equations, 7 figures.

Figures (7)

  • Figure 1: Reinforcement learning of quantum error correction codes. By using the Quantum Lego framework the learner constructs new codes out of the basic building block tensor. See Ref. Su2025 for details. The focus of this work is the final stage, code evaluation. In our previous work this was done classically. Here, we replace this step with calls to quantum computer.
  • Figure 2: The Quantum Lego formalism. (a) The T6 tensor, pictures, can be any of a variety of QECCs by choosing the logical qubit legs. (b) A new code can be constructed by concatenating two lego blocks, generating a new tensor.
  • Figure 3: Quantum evaluation of an error correcting code. We obtain from the classical leaner a stabilizer matrix, which is converted into encoder circuits for $P\in{X,Y,Z}$, generating the state $\lvert p_{\rm in} \rangle$ (blue). After this, we apply some form of a benchmark circuit (red) that aligns with the expected operation of the qubit. This can include, e.g., logical operations on the qubit, idling for a set amount of time, or artificially inducing errors. Then, stabilizers are measured to extract an error syndrome $s$ (yellow), and finally $p_{\rm out} = \langle{\hat{P}}\rangle$ is measured to observe whether an error has occurred. The set $(p_{\rm in},s,p_{\rm out})$ is recorded for each run.
  • Figure 4: Sample calculation of the reward function for a simple two-qubit code. \ref{['fig:calc-example-res']} Initially we run the code with different initial states, gaining a set of results with syndrome, initial Pauli and error $(p_{\rm in},s,p_{\rm out})$. \ref{['fig:calc-example-corrected']} We correct for the expected machine fidelity, increasing the share of results of $s=0$, $p_{\rm out}=p_{\rm in}$ and reducing the rest. \ref{['fig:calc-example-truetable']} For each syndrome $s$ and application of a logical Pauli $P_{s}$, we find what portion of the shots would result in the correct logical state, $\hat{P}_{s}\lvert p_{\rm out} \rangle=\lvert p_{\rm in} \rangle$. For example, for $s=00$, $\hat{P}_{s}=\hat{I}$, we add up the results from $(+x,00,+x),(+y,00,+y),(+z,00,+z)$ (red highlighting); for $s=10$, $\hat{P}_{s} =\hat{Y}$, the logical state of the $\lvert +X \rangle,\lvert +Z \rangle$ states would be flipped while the $\lvert +Y \rangle$ would be not, and so we add up $(+x,10,-x),(+y,10,+y),(+z,10,-z)$ (orange highlighting). \ref{['fig:calc-example-truetot']} For each syndrome we choose $P_{s}$ to maximize the correct output. \ref{['fig:calc-example-pND']} Adding up the portion of correct output, we find the percentage of uncorrected error.
  • Figure 5: Optimal codes for Pauli noise with \ref{['fig:stimcodes-res-nonbias']} isotropic noise, $\Pr(X)=\Pr(Y)=\Pr(Z)=0.01$, and \ref{['fig:stimcodes-res-biased']} biased noise $\Pr(X)=\Pr(Y)=0.01, \Pr(Z)=0.05$, discovered by learning using a fast Clifford gate simulator Gidney2021. These codes reduce the qubit error by 97% and 85%, respectively.
  • ...and 2 more figures