qBraid uses AlphaEvolve for quantum error correction


How qBraid used AlphaEvolve to find more efficient error-correcting codes for quantum chemistry
Realizing quantum advantage for chemistry means translating a problem from the language of electrons into the language of qubits. That one choice, known as the fermion-to-qubit encoding, determines the lower bound on the quantum resources required to successfully solve a chemistry problem, how deep its circuits run, and how well it survives noise. Choose badly and a useful calculation won't fit on any machine we will have for years.
It is also a brutal design problem. For a molecule with just eight orbitals, the number of possible encodings runs past 10^50. The encoding also has to keep the computation alive on noisy hardware. Because today's qubits are error-prone, quantum error correction spreads each piece of information across many physical qubits, so the system can detect and reverse errors before they corrupt the result. A code's distance is the standard measure of how much it can withstand: a distance-3 code corrects any single error, a distance-5 code corrects two.
On the densely connected graphs that real molecules produce, the structures researchers reach for by hand, like grids, chains, and lattices, top out at distance 3. Until now, nobody had hand-built a distance-5 encoding for molecular systems.
At qBraid, we build the cloud platform researchers use to run quantum software, and we maintain one of these encoding families, the Generalized Superfast Encoding. To get past the hand-design ceiling, we turned to AlphaEvolve on Google Cloud.
Starting from a working baseline
AlphaEvolve is an evolutionary coding agent that writes and refines algorithms using Gemini models. Instead of tuning parameters, it edits code: it proposes a change to a program, scores the result, keeps what works, and repeats.
To start we gave AlphaEvolve a seed program: a short Python function that builds an encoding from a molecule's interaction graph. It was a working baseline, just not an efficient one. From there, AlphaEvolve used Gemini to generate thousands of variations and hunt for code that beat the original. The discovery run evaluated nearly 1,500 candidate programs.
Measuring what good looks like
AlphaEvolve is only as good as the scoreboard you give it. Our evaluator recomputed every candidate's code distance with an exact verifier the model could not touch, then scored it on two things: it had to reach the target distance, and it had to get there with as few qubits as possible. We hid each molecule's identity so the search had to learn general rules, and we held two molecules back entirely to test whether those rules would generalize.
The scoreboard mattered more than we expected. Our first version simply rewarded higher distance, and AlphaEvolve gamed it, reaching a genuine distance 7 by wiring nearly every qubit to every other one, strong protection but far too many connections to be practical. Because the output was code, the gaming was obvious on sight. So we changed the question. We made the target distance a hard requirement and rewarded only qubit efficiency. The dense blob went from the best-scoring answer to the worst, and the search was forced to find real structure.
The results
The encoding AlphaEvolve produced beat the hand-designed baseline on every axis that mattered, and it held up on molecules it had never seen:
- Exact code distance 5 on dense molecular Hamiltonians, confirmed by exhaustive enumeration, where hand design had only reached distance 3.
- 4.2 to 5.0 times fewer data qubits than the standard fault-tolerant route to the same protection.
- 3.4 to 7.9 times lower logical error rate under exact decoding.
- Generalization to held-out molecules. Applied unchanged to BeH2 and H2O, molecules the search never saw, the same rule held distance 5.
"AlphaEvolve delivered a result on top of an encoding family we had already spent years refining," said Dr. Kenny Heitritter, Vice President of Research and Development at qBraid. "It searched a design space far too large to comb through by hand and handed back something we could read, verify, and understand. Systems like AlphaEvolve will meaningfully accelerate progress toward useful quantum computing."
Read more here: https://arxiv.org/pdf/2606.25870
What's next
The clear next step is circuit-level fault tolerance: measuring how these codes behave when the error-correction machinery is itself noisy, for both our encoding and the standard route. We are also working to lighten the heavier parity checks and to extend the approach to larger molecules and richer basis sets. Applying AlphaEvolve to more problems in quantum computing is on the minds of everyone on the team.
Acknowledgements
This work was carried out by the qBraid team, including Kenny Heitritter, James Brown, and Tarini Hardikar, through Google Cloud's AlphaEvolve early-access program. We thank Federico Rodriguez, Christopher Penny, Clara Buenker, Adrian Jones, Anant Nawalgaria, Skander Hannachi and Vishal Agarwal + the rest of the AlphaEvolve and AI for Science teams at Google Cloud for the access, support, and technical guidance throughout.
