← All papers
First page of Parametric Proof-Carrying Compilation for Quantum Error-Correction

Parametric Proof-Carrying Compilation for Quantum Error-Correction

John Zhuoyang Ye, Jens Palsberg

cs.PL Nov 8, 2026 · v1 quant-ph
Lean 4 mechanizes the framework's metatheory (soundness) and exact circuit-level distances for canonical Surface, hypergraph-product and Toric code families.
We present PC-QEC, a proof-carrying compilation framework for quantum error correction parameterized by both code distance and syndrome-extraction scheme. It covers all four schemes—Standard, Flag, Shor and Knill—with circuit-level distance guarantees for every legal code distance in each proved family under the declared fault and readout contracts. The circuit-level model permits single-wire Pauli faults at every operation's qubit operands, capturing data errors, readout errors and ancilla faults that propagate into multi-qubit hook errors. For each family and scheme, code-algebra proofs and fault-aware Hoare proofs compose into a finite symbolic certificate whose size is independent of code distance. We demonstrate family-wide guarantees for five code families across all four schemes. For rotated Surface code, one Standard Scheme certificate proves a distance lower bound $d$ for every odd $d\ge3$ and checks in 214\,s on average. Lean 4 mechanizes the metatheory and exact circuit-level distances for canonical Surface, hypergraph-product (HGP) and Toric code families.

Circuit-level code distance of quantum error-correction circuits is NP-hard to compute. Proofs for a single code distance do not carry over to other sizes, and gate-by-gate proofs grow with d. A single finite proof is needed that covers whole code families and multiple syndrome-extraction schemes, including hook errors from ancilla faults.

PC-QEC is a proof-carrying compilation framework built from three layers. CodeML specifies a parametric code family together with its ordered extraction schedule. QStab is an intermediate representation that tracks residual data errors, readout offsets and the fault budget. QClifford is a target language with fault-aware Hoare logic. Code-algebra proofs and Hoare proofs compose into a symbolic certificate whose size is independent of d. Certificates are checked by an OCaml verifier, and Lean 4 mechanizes the metatheory and exact distances for canonical Surface, HGP and Toric codes.

Family-wide distance guarantees are shown for five code families across the Standard, Flag, Shor and Knill schemes. For the rotated Surface code, one Standard-scheme certificate proves distance d for every odd d≥3 and checks in 214 s on average. Lean proofs establish soundness and exactness for the canonical Surface, HGP and Toric families.

ApproachHook error analysisAll-size circuit-level distance proofProof reuse across schemes
QuantumSE✗✗✗
Veri-QEC✗✗✗
Chen et al. (2025)✓✗✗
AutoQ-Para✗✗✗
PC-QEC✓✓✓
Comparison with prior QEC verification approaches