Verifying Quantum Programs Before Oracle Binding
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.
| Case | Established result | Scope |
|---|---|---|
| Deutsch–Jozsa | One oracle call and exact readout under the Boolean promise | Every positive width; constant, bit, table oracles |
| Controlled and adjoint calls | Exact matrix preservation (Theorem 4) | Successful validation and matrix contracts |
| Grover | Parameterized caller proof transfers search probability to both bindings | One marked address per width; gate and dense QRAM providers |
| LCHS | Same open caller accepts both methods and a mixed binding within 0.02 of finite quadrature | Four slots and a coupled target family |
