← All papers
First page of Verifying Quantum Programs Before Oracle Binding

Verifying Quantum Programs Before Oracle Binding

Zhao-Yun Chen, Ming-Yang Tan, Hao Pan, Yu Zhang, Guo-Ping Guo

quant-ph Nov 26, 2026 · v1 cs.PL
Lean proves a linking theorem for late-bound quantum oracle programs and hosts executable certified generators and checkers for serialized Oracq programs.
Oracle-based quantum algorithms specify how the circuit can access its input through coherent operations. The correctness of the algorithm can be established in terms of these operations before their implementations are chosen. This paper presents a register-level format for such open quantum programs and a method for verifying their late bindings. The format represents unresolved oracle calls, ordered register views, read-only quantum random-access memory (QRAM), and private workspace. Our validator compares independently supplied open and bound programs. We prove in Lean that an accepted binding transfers the caller's proof when the chosen implementations meet their public matrix contracts and restore private workspace to zero. The theorem accounts for coherent control and adjoints. Quantitative variants bound error for approximate oracle implementations and for callers with a certified projected denotation. OracqVerify implements the checker for serialized Oracq programs. We demonstrate verification on gate and QRAM bindings for Grover search, Boolean oracles for Deutsch-Jozsa, and alternative Hamiltonian simulation components for a fixed evolution caller.

Oracle-based quantum algorithms are proved correct in terms of abstract oracle actions, but implementations are chosen later (late binding). A binding must not invalidate the caller's correctness proof, and wire order, memory banks, phases, and private workspace can each break it.

The authors define a register-level format for open quantum programs with unresolved oracle slots, ordered register views, read-only QRAM, and private workspace, together with a scoped abstract-machine semantics. A validator compares independently supplied open and bound programs under a bank-forwarding plan. In Lean they prove that an accepted binding transfers the caller's proof when implementations meet their public matrix contracts and return private workspace to zero, covering coherent control and adjoints. Quantitative variants bound the error for approximate oracles. A Lean registry provides certified generators and independent checkers (OracqVerify) for serialized RIR programs.

Verification is demonstrated on gate and QRAM bindings for Grover search, where width- and iteration-parametric proofs transfer the search probability and checks scale to k=4,096 iterations. It also covers Boolean oracles for Deutsch–Jozsa at every positive width, and alternative Hamiltonian simulation (LCHS) components bound within 0.02 of the finite quadrature.

CaseEstablished resultScope
Deutsch–JozsaOne oracle call and exact readout under the Boolean promiseEvery positive width; constant, bit, table oracles
Controlled and adjoint callsExact matrix preservation (Theorem 4)Successful validation and matrix contracts
GroverParameterized caller proof transfers search probability to both bindingsOne marked address per width; gate and dense QRAM providers
LCHSSame open caller accepts both methods and a mixed binding within 0.02 of finite quadratureFour slots and a coupled target family
Verification results for the experimental programs (Table 2)