量子程序的可逆寿命语义
Reversible Lifetime Semantics for Quantum Programs
AI总结:
本文提出量子程序中可逆计算的语义基础,通过寿命引导的反向计算模型,定义了语义寿命和恢复不变量,证明了嵌套作用域下的组合正确性,并展示了早期回收如何减少电路深度和限制峰值活量子比特。
摘要:
可逆计算要求中间数据被显式撤销而非丢弃。在量子编程中,这一原则表现为反向计算,通常被视为技术清理机制。本文将反向计算作为语义基础。在Qutes语言中,我们引入了作用域受限的寿命引导反向计算形式化模型,其中词法作用域限制变量寿命,静态存活性和纠缠分析确定最早安全回收点。我们定义了语义寿命和恢复不变量,确保临时量子信息在变得语义无关时消失。我们证明了在嵌套作用域下的组合正确性,并展示了早期回收可通过避免关键路径开销来减少电路深度,并通过纪律性的辅助量子比特重用来限制峰值活量子比特。最后,我们展示了参数传递语义从相同的寿命纪律中涌现,其中按值传递和按引用传递对应于不同的寿命边界,并且我们刻画了在不可逆性、持久纠缠和别名约束下,自动反向计算必须受到限制的约束条件。
英文摘要:
Reversible computation requires that intermediate data be explicitly undone rather than discarded. In quantum programming, this principle appears as uncomputation, usually treated as a technical cleanup mechanism. We instead present uncomputation as a semantic foundation. In the Qutes language, we introduce a formal model of \emph{Scope-Bounded Liveness-Guided Uncomputation}, where lexical scope bounds variable lifetime and static liveness and entanglement analysis determine the earliest safe reclamation point. We define semantic lifetime and a Restoration Invariant ensuring that temporary quantum information disappears once it becomes semantically irrelevant. We prove compositional correctness under nested scopes and show that early reclamation can reduce circuit depth by avoiding critical-path overhead and can bound peak live qubits through disciplined ancilla reuse. Finally, we show that parameter passing semantics emerges from the same lifetime discipline, with pass-by-value and pass-by-reference corresponding to different lifetime boundaries, and we characterize the constraints (irreversibility, persistent entanglement, and aliasing) under which automatic uncomputation must be restricted.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。