Verified Pauli-Product Measurement Compilation for Fault-Tolerant Quantum Computation
John Zhuoyang Ye, Jens Palsberg
quant-ph
Oct 20, 2026 · v1
TL;DR
Mechanizes QPPM semantics, Hoare logic, verified lowering and optimization, and approximation bounds in Lean with Mathlib, and uses Lean kernel-checked certificates on benchmarks.
Abstract
Fault-tolerant quantum compilers implement gates through Pauli-product measurements and classical feedback. Verifying such a compiler requires reasoning about the quantum state and the recorded outcomes together: a correction reads an outcome, a gate's internal outcomes must be hidden from its caller, and an application's outcomes must survive optimization. We introduce QPPM, a language for Pauli-product measurement programs, with a weakest-precondition semantics over store-indexed matrix assertions, following quantum Hoare logic with classical variables. Every program terminates, so the Hoare logic is a syntactic presentation of weakest preconditions whose soundness and relative completeness are immediate. Its value is that component specifications compose. All results are mechanized in Lean. We verify lowering of Clifford+$T$ circuits to QPPM with private outcomes and supplied magic states, and an optimizer that eliminates measurements, fuses and reorders rotations, and schedules logical rounds while preserving every outcome that subsequent code can read. A compositional approximation relation bounds the effect of synthesis error on specifications and on output trace distance, and a certificate-checked pipeline selects, among synthesized circuits that meet the user's error limit, the one with the lowest certified depth bound. On QASMBench, verified fusion and scheduling reduce logical measurement depth by a median of 17.9%, and complete source-to-QPPM allowances are certified for all 35 valid selected small-suite inputs.
Problem
Fault-tolerant quantum compilers implement gates through Pauli-product measurements with classical feedback. Verifying them requires reasoning jointly about quantum state and measurement outcomes, including hiding gate-internal outcomes and preserving outcomes through optimization.
Approach
The authors define QPPM, a language for Pauli-product measurement programs. Its weakest-precondition semantics uses store-indexed matrix assertions, and a compositional Hoare logic is built on it. Lowering of Clifford+T circuits with private outcomes and magic states is verified, along with an optimizer that eliminates measurements, fuses and reorders rotations, and schedules rounds. A compositional approximation relation bounds synthesis error. All results are mechanized in Lean 4 with Mathlib, and a certificate-checked pipeline selects the synthesized circuit with the lowest certified depth.
Results
On QASMBench, verified fusion and scheduling reduce logical measurement depth by a median of 17.9%. Complete source-to-QPPM allowances are certified for all 35 valid small-suite inputs. The build audits 1,476 theorems and accepts only standard axioms.