paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Twist: sound reasoning for purity and entanglement in Quantum programs

Twist:量子程序中纯性与纠缠的可靠推理
POPL 6(POPL)2022匹配度 2/10 · 论文虽属于程序语言与静态分析/类型系统方向,但研究对象是量子程序的纯性与纠缠推理,未涉及 ML/Agentic 程序、LLM 与静态分析/形式化验证的交叉、浮点程序分析或贝叶斯程序分析。引用 30 inbox
Charles Yuan, Christopher McNally, Michael Carbin
crossref: 2026-09-10

AI 速览

一句话:提出首个具备纯性类型系统的量子语言 Twist,可靠推理纠缠,结合静态分析与运行时验证。

量子程序正确性常取决于纠缠,即量子比特测量结果间的关联,但自动推理纠缠困难。本文把“纯性”形式化为核心工具:纯表达式的求值不受其不拥有的量子比特测量结果影响,从而表明它与计算中其他表达式无纠缠。作者提出 Twist,首个具备纯性可靠推理类型系统的量子语言,可用类型标注识别纯表达式,并用纯性断言算子声明量子门输出无纠缠。系统结合静态分析与运行时验证可靠检查断言。在模拟量子程序基准上,Twist 能表达量子算法、发现错误、支持已有语言禁止的程序,运行时验证开销低于 3.5%。

问题
如何自动化、可靠地推理量子程序中的纠缠,以判断算法正确性和编程模式适用性。
方法
将纯性形式化为不受非拥有量子比特测量结果影响的表达式,提出 Twist 类型系统、纯性断言算子,并用静态分析与运行时验证可靠检查断言。
评估
在模拟的量子程序基准套件上评估类型系统与分析,展示可表达量子算法、捕获编程错误、支持已有语言不允许的程序,且运行时验证开销低于 3.5%。
原文摘要(Abstract)

Quantum programming languages enable developers to implement algorithms for quantum computers that promise computational breakthroughs in classically intractable tasks. Programming quantum computers requires awareness of entanglement , the phenomenon in which measurement outcomes of qubits are correlated. Entanglement can determine the correctness of algorithms and suitability of programming patterns. In this work, we formalize purity as a central tool for automating reasoning about entanglement in quantum programs. A pure expression is one whose evaluation is unaffected by the measurement outcomes of qubits that it does not own, implying freedom from entanglement with any other expression in the computation. We present Twist, the first language that features a type system for sound reasoning about purity. The type system enables the developer to identify pure expressions using type annotations. Twist also features purity assertion operators that state the absence of entanglement in the output of quantum gates. To soundly check these assertions, Twist uses a combination of static analysis and runtime verification. We evaluate Twist’s type system and analyses on a benchmark suite of quantum programs in simulation, demonstrating that Twist can express quantum algorithms, catch programming errors in them, and support programs that existing languages disallow, while incurring runtime verification overhead of less than 3.5%.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1575,
  title = {Twist: sound reasoning for purity and entanglement in Quantum programs},
  author = {Charles Yuan and Christopher McNally and Michael Carbin},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {POPL},
  year = {2022},
  doi = {10.1145/3498691}
}