AlchemQ: Proof-Carrying Quantum Circuit Optimization with Per-Result Equivalence Certificates
This paper introduces AlchemQ v0.5, a proof-of-concept system that ensures the reliability of quantum circuit optimization by coupling an untrusted optimizer with a machine-checkable certification layer that generates self-contained, tamper-evident equivalence certificates for every output, thereby guaranteeing that all optimized circuits are verified for correctness and non-regression.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the quiet, controlled world of quantum computing, scientists build intricate sequences of instructions to manipulate the smallest units of matter. These instructions, called circuits, are designed to solve problems that are impossible for ordinary computers. However, the path from a theoretical idea to a working quantum program is fraught with danger. To make these circuits run efficiently, software tools must constantly rewrite and simplify them, stripping away unnecessary steps. The problem is that these tools are not perfect. They are complex programs written by humans, and like any software, they contain hidden errors. When a tool silently changes a circuit in a way that breaks its logic, the result is a failed experiment that wastes expensive time and resources on hardware that cannot be easily reset. The scientific community has long needed a way to guarantee that a simplified circuit is truly equivalent to the original, not just a guess that looks right.
A new system called AlchemQ offers a different approach to this problem. Instead of trying to prove that the software tool itself is perfect, the researchers built a system that treats every single output as a suspect until it is proven innocent. They created a process where an optimizer suggests a simplified version of a quantum circuit, and then a separate, independent checker immediately verifies that the new version does exactly the same thing as the old one. If the checker finds even a tiny difference, the suggestion is thrown away. If it passes, the system issues a digital certificate, a self-contained document that proves the two circuits are identical. This certificate is designed to be read by anyone, anywhere, without needing to trust the original software that created it. It is a method of proof-carrying optimization, where the evidence travels with the result.
The researchers tested this system on a large collection of one hundred different quantum circuits, ranging from standard benchmarks to complex, randomly generated examples. They ran the optimizer to find better versions of these circuits and then subjected every single result to the strict verification process. The system worked without fail. Every one of the four hundred optimization attempts completed without error, and every single circuit that was returned came with a valid certificate proving it was equivalent to the original. The system also caught a subtle bug in a widely used library that the researchers were using for the verification itself. In one specific case, the library's standard method for comparing two circuits was amplifying tiny numerical noise, causing it to incorrectly reject a perfectly good optimization. The AlchemQ system detected this failure, identified the source of the error, and corrected it, demonstrating that the verification layer could find problems that the optimization tools themselves would have missed.
Beyond catching errors, the system proved that it could find genuine improvements. On average, the optimized circuits were significantly shorter and used fewer complex gates than the original versions. In one specific test on real quantum hardware from IBM, a circuit that had been optimized by the system was seventy-eight percent shallower and used sixty-five percent fewer two-qubit gates than the unoptimized version. When the researchers ran both the original and the optimized circuits on the physical machine, the results were nearly identical, showing that the drastic simplification did not harm the quality of the output. While the difference in performance was not large enough to be statistically certain with the limited number of runs, the trend pointed clearly toward the optimized circuit being better.
The researchers also explored how different mathematical rules for deciding which circuit was "best" affected the outcome. They tested three distinct methods for weighing the various improvements, such as reducing the number of gates versus reducing the depth of the circuit. Surprisingly, for the standard set of circuits they tested, all three methods produced the exact same final result. The choice of rule only mattered when they tested a specially designed set of difficult, adversarial circuits where the improvements were in direct conflict. In those rare cases, the different rules led to different choices, but the system handled this by ensuring that no matter which rule was used, the final circuit never performed worse than the original in any single category.
This work positions itself not as a replacement for the complex software that drives the optimization, but as a safety net that sits on top of it. The researchers are clear that their optimizer is a simple, experimental tool and that the real power lies in the certificate. By making the proof of correctness a standard part of the output, they allow anyone to verify the work independently. The system is designed to be transparent; the certificate includes all the necessary data, such as the exact version of the software used and the specific mathematical tolerances applied, so that the proof can be reproduced on any computer. The researchers have released the certificate format and the verification software to the public, inviting others to check their work and use the system for their own experiments.
The ultimate goal of this research is to build trust in the quantum software pipeline. By ensuring that every optimized circuit comes with a machine-checkable guarantee of correctness, the system removes the risk of silent failures. It acknowledges that the tools used to build quantum software will always have bugs, but it provides a way to catch those bugs before they cause real damage. The system does not claim to be the final word on quantum optimization, nor does it promise to solve every problem. Instead, it offers a practical, verifiable step forward, proving that it is possible to build a system where the results are always accompanied by their own proof of truth.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.