Research
4 minute read

Can LLMs discover quantum error correction codes?

Researchers at IBM created an LLM-guided evolutionary framework that quickly found 465 distinct quantum error correction code candidates.

Quantum information is fragile. It doesn’t take much for qubits, the basic information unit of quantum computing, to produce enough inaccuracies to scuttle a computation. Quantum error correction codes help solve this problem, but there are so many potential code formulations that finding the few useful ones is typically a time consuming, computationally demanding task. AI could offer a better way.

In a new paper on arXiv, IBM researchers showcase an evolutionary workflow guided by large language models (LLMs) that quickly explores thousands of code variations, pushes forward the most compelling candidates, and analyzes their properties. The work is one example of the growing two-way interplay between quantum computing and classical AI, where each is beginning to inform and accelerate the other.

Quantum error correction codes are mathematical constructions that protect quantum information by introducing redundancy. They tell the system how to use multiple physical qubits to represent the information of a smaller number of qubits. If one physical qubit in the group experiences an error, it can be detected and corrected using the others that haven’t.

The parameters of these codes are expressed in an [[n,k,d]] format, where n is the number of physical qubits in the code, k is the number of resulting error-corrected “logical” qubits, and d is the “distance,” a measure of how many errors a logical qubit can tolerate before it loses its usefulness.

Ideally, you want a code that doesn’t need that many physical qubits, encodes a lot of logical qubits, and has a high tolerance for errors. In practice, improving one of these properties typically comes at the expense of another, and there’s no single code that is best for all cases.

The new AI-based workflow could help researchers understand the range of trade-offs available much more comprehensively than was possible before, and also make it easier to test the viability of new error correction approaches.

AI-generated error correction code candidates

At the center of the research team’s new AI-powered workflow is a library called OpenEvolve, which builds on evolutionary AI techniques pioneered by AlphaEvolve and FunSearch. The novel results generated so far under this framework demonstrate the usefulness of LLMs as a tool for scientific research, and represent the first application of evolutionary AI to quantum error correction code discovery that the team is aware of.

The researchers tested the framework by focusing on bivariate bicycle (BB) codes — a type of quantum low density parity check (qLDPC) code proposed by IBM as part of its fault tolerant quantum computing roadmap. These BB codes are defined by algebraic expressions that describe how the physical qubits in an error-correcting group are treated — such as which qubits are checked for errors and when.

In this framework, the LLM’s role is to generate informed guesses at algebraic expressions that might be good candidates for codes. The model is given a prompt that includes information about the family of error correction codes being examined, the properties to optimize, and good examples of known codes. Guided by the researchers, the LLM then produces Python scripts for generating the codes themselves. You can see a preview of the kinds of prompts the researchers used in the image below, and find the full example here on GitHub.

prompt-example2.png

While the role of AI is key to the framework’s efficiency, additional analysis using established verification methods is essential for ensuring that only the valid and novel codes are left.

Panning for gold

The cascading framework the team developed works a bit like panning for gold in a river.

blogArt-QEC-chart1-11-2.png
This flow chart shows the different stages of the evolutionary framework, with each step narrowing the pool of candidate codes being considered.

The LLM-created codes are the unsorted sediment that goes into the pan. Quick initial checks like k-only screening removes codes that don’t meet certain criteria. This is like shaking the pan to separate out rocks that aren’t dense enough to be gold.

Then a technique called belief propagation and ordered statistics decoding (BP-OSD) narrows down the field even further — BP-OSD is a relatively fast way to analyze QEC codes but has some limitations in how accurate it can be. Imagine visually inspecting the remaining rocks in your gold pan and removing anything which clearly isn’t the right color.

The final stage involves using an exact but computationally costly technique called mixed-integer linear programming (MILP) to look just at the top candidates and verify their properties. Here, you’re sending the gold-colored rocks to the lab to see what you’ve actually found.

As the framework is running, information from the outcomes of the later stages is fed back into the LLM. This helps refine the LLM’s output to produce better code candidates. Finally, after the evolutionary campaign has concluded, additional verification and duplication checks are conducted before adding the codes to the verified code catalog.

Regardless of how much “gold” is found from any pass, the framework provides value as a way to help researchers quickly assess different families of error correction codes and where to look next. Changing up where you’re panning makes it possible to zero in on where the biggest gold deposits are.

A rich haul of code candidates

The main goal of the team’s experiments was to develop the evolutionary framework itself, but the initial demonstrations have already turned up 465 new error correction codes — some of which could guide further research.

These codes represent a broad array of parameters and trade-offs, as you can see in the chart below comparing the error rates of the most practically relevant candidates in a code capacity setting.

For example, a code was discovered with an eye-catching logical qubit count of 50, much higher than the previous record of 16 for the corresponding code family, though the code’s relatively low distance limits its usefulness. Another code required only 72 physical qubits, which for some types of hardware might be easier to implement than larger codes.

Several new codes generated by the team’s experiments offer more balanced trade-offs, such as the [[288,16,12]] and [[360,12,≤24]] examples, with predicted properties for some types of noise that may even compare with the well-studied [[144, 12, 12]] gross code that IBM is planning to use for its fault tolerant quantum computers.

blogArt-QEC-chart2-11.png

It’s possible that some of these codes may prove useful, but a lot of further work related to implementing them in real-world scenarios will be needed before any definitive claims can be made. However, the discovery of so many codes showcases the viability of the new framework for dramatically speeding up the exploration of algebraic code spaces for quantum error correction.

An open-source tool for advancing quantum error correction

IBM Research is making this framework fully open source and the team encourages others to build on it for their own explorations of quantum error correction codes. You can access everything you need to get started on GitHub.

Future work for the IBM team includes refining the framework and investigating the practical potential of some of the most compelling error correction code candidates that were discovered.

Check out the paper on arXiv to dig deeper into the research.

Related posts