QEDIA:Lean 中的量子程序验证
QEDIA: Quantum Program Verification in Lean
AI总结:
研究针对 Lean 4 提出 QEDIA 框架,基于形式化量子霍尔逻辑 QHL+,结合 LLM 证明智能体实现带经典变量量子程序的验证,已成功验证量子傅里叶变换等多种量子程序。
摘要:
实用量子程序会交替执行量子与经典计算:经典数据决定所执行的量子操作,测量结果则决定后续的经典计算。在证明辅助工具中对这类程序进行形式化验证,需要将处理这种交互作用的程序逻辑在各个层面进行机械化,从量子力学的数学基础,到程序的语法与语义,再到规范和证明规则,都要保持一致性。这类机械化工作以及基于它们构建的程序证明,通常需要大量的手动工作量。我们提出 QEDIA,这是一个在 Lean 4 中用于验证带经典变量的量子程序的框架。其基础是一个开放库,该库在上述所有层面上将量子霍尔逻辑 QHL+ 形式化,并证明该逻辑对部分正确性和完全正确性均是可靠的。我们在人工监督下,使用基于大语言模型(LLM)的证明智能体构建了该库和程序证明,我们扩展了该智能体的通用核心以用于量子程序验证。我们通过已验证的程序来说明 QEDIA,包括量子傅里叶变换、相位估计、重复直到成功(repeat-until-success)电路以及哈密顿量模拟。
英文摘要:
Practical quantum programs interleave quantum and classical computation: classical data shape the quantum operations that are performed, and measurement outcomes shape the classical computation that follows. Formal verification of such programs in a proof assistant requires mechanizing a program logic that handles this interplay consistently at every level, from the mathematics of quantum mechanics, through program syntax and semantics, to specifications and proof rules. Such mechanizations, along with the program proofs built on them, typically require substantial manual effort. We present QEDIA, a framework for verifying quantum programs with classical variables in Lean 4. At its foundation is an open library that formalizes the quantum Hoare logic QHL+ across all these levels and proves the logic sound for both partial and total correctness. We construct the library and the program proofs, under human supervision, using an LLM-based prover agent, whose general-purpose core we extend for quantum program verification. We illustrate QEDIA with verified programs including the quantum Fourier transform, phase estimation, repeat-until-success circuits, and Hamiltonian simulation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。