AlchemQ: Proof-Carrying Quantum Circuit Optimization with Per-Result Equivalence Certificates
quant-ph
Submitted: 2026-08-24
Updated: 2026-08-24
Comments: 25 pages, 6 figures, 7 tables. Pilot run on IBM Heron r2. Certificate spec, reference verifier, benchmark and certificate corpora, raw hardware data: https://github.com/a1damek1125/AlchemQ (code Apache-2.0, data CC BY 4.0), archived at https://doi.org/10.5281/zenodo.XXXXXXXX . Engine proprietary; certificates verifiable without it. LLM-assisted drafting; see Acknowledgments
Code: https://github.com/a1damek1125/AlchemQ
License: http://creativecommons.org/licenses/by/4.0/
The gist: We present AlchemQ v0.5, a proof-of-concept system that couples an untrusted beam-search optimizer with a machine-checkable per-result certification layer and a versioned certificate protocol
Terminology
Abstract
We present AlchemQ v0.5, a proof-of-concept system that couples an untrusted beam-search optimizer with a machine-checkable per-result certification layer and a versioned certificate protocol (0.2.0), so that every optimized circuit ships with a verifiable artifact rather than a bare claim. The certifier proves equivalence up to global phase by ZX-calculus full reduction, with a numeric-tensor fallback based on the optimal Hilbert-Schmidt overlap. Certificates are self-contained and tamper-evident: canonical gate-canon-v1 hashes, measured residuals, tri-state verdicts (certified/rejected/inconclusive), and versioned phase-note schemas for cross-platform reproducibility. The agent aggregates three fuzzy t-norms, cannot return an uncertified circuit, and since v0.4 guarantees no componentwise regression against the original. On a benchmark of 100 circuits, all 400 optimizations terminate without error, every returned circuit is certified, every mutation is detected, and a 2998-test suite passes on two platforms. The PyZX baseline is strong (21.4% mean T-count reduction over 82 circuits) and the agent is strictly better on 9/100; the three t-norms return identical circuits on all 100 standard instances, diverging only on 4/38 of an adversarial suite. Two case studies are new: a false negative root-caused to a pivot-normalization bug in PyZX's compare tensors (pivot 4.7e-9; the optimal-overlap residual is 7.4e-11), and eight certificates rejected on macOS due to BLAS-dependent floats in phase note. Both were fixed; all artifact sets validate 400/400 on both platforms. A pilot run on IBM Heron r2 gives a certified circuit 78% shallower with 65% fewer two-qubit gates; output quality favors it on all three metrics but is not significant at 1024 shots. We release the certificate specification and a standalone reference verifier (Apache-2.0) with data and scripts; the engine is proprietary.
Sources
- ZX-calculus for the working quantum computer scientist
- A Review on Quantum Circuit Optimization using ZX-Calculus
- CertiQ: A Mostly-automated Verification of a Realistic Quantum Compiler
- A Verified Compiler for Quantum Simulation
- Assessing Quantum Layout Synthesis Tools via Known Optimal-SWAP Cost Benchmarks
- T-Norm Operators for EU AI Act Compliance Classification: An Empirical Comparison of Lukasiewicz, Product, and G\"odel Semantics in a Neuro-Symbolic Reasoning System
- The Heisenberg Representation of Quantum Computers
- Context-Verified, Error-Budget-Aware Decomposition Selection for Toffoli Networks
- Quantum Circuit Equivalence Checking: A Tractable Bridge From Unitary to Hybrid Circuits
- QITE: Assembly-Level, Cross-Platform Testing of Quantum Computing Platforms
- QEMI: A Quantum Software Stacks Testing Framework via Equivalence Modulo Inputs
- Exploring the optimality of approximate state preparation quantum circuits with a genetic algorithm
- QBalance: A Reproducible Multi-Objective Workflow for Quantum Compilation, Noise Suppression, and Error-Mitigation Strategy Selection
- TRAM: A Transverse Relaxation Time-Aware Qubit Mapping Algorithm for NISQ Devices
- Fidelity-Aware Frequency Allocation and Transpilation Co-Design for Tunable Coupler Quantum Systems
- Per-Phase Fidelity Attribution for Quantum Compilers using HBR Decomposition
- Revisiting Noise-adaptive Transpilation in Quantum Computing: How Much Impact Does it Have?
Related papers
- Reconquering Bell sampling on qudits: stabilizer learning and testing, quantum pseudorandomness bounds, and more
- Encrypted clones can leak: Classification of informative subsets in Quantum Encrypted Cloning
- Polynomial-time classical and quantum simulation of quantum impurity models
- A quasiparticle-protected superconducting qubit
- Theory of quantum-enhanced interferometry with general Markovian light sources
- A convergent hierarchy of spectral gap certificates for qubit Hamiltonians