Qunity:一种用于量子与经典计算的统一语言(扩展版)
Qunity: A Unified Language for Quantum and Classical Computing (Extended Version)
AI总结:
Qunity是一种统一量子与经典计算的编程语言,通过统一语法和指称语义保证程序有效性,并利用BQP子程序定理实现可逆子程序,可编译为OpenQASM。
摘要:
我们引入了Qunity,一种新的量子编程语言,旨在将量子计算视为经典计算的自然推广。Qunity提供了一种统一的语法,其中熟悉的编程结构可以同时具有量子效应和经典效应。例如,可以使用和类型来实现线性算子的直和,使用异常处理语法来实现投影测量,并使用别名来诱导纠缠。此外,Qunity利用了被忽视的BQP子程序定理,允许通过反计算“垃圾”输出来从不可逆的量子算法构造可逆子程序。与现有语言通过单独的附加组件(如带有量子门的经典语言)来启用量子方面不同,Qunity提供了一种统一的语法和新颖的指称语义,保证程序在量子力学上是有效的。我们展示了Qunity的语法、类型系统和指称语义,说明了它如何简洁地表达几种量子算法。我们还详细介绍了如何将Qunity编译为像OpenQASM这样的底层量子比特电路语言,证明了我们设计的可实现性。
英文摘要:
We introduce Qunity, a new quantum programming language designed to treat quantum computing as a natural generalization of classical computing. Qunity presents a unified syntax where familiar programming constructs can have both quantum and classical effects. For example, one can use sum types to implement the direct sum of linear operators, exception-handling syntax to implement projective measurements, and aliasing to induce entanglement. Further, Qunity takes advantage of the overlooked BQP subroutine theorem, allowing one to construct reversible subroutines from irreversible quantum algorithms through the uncomputation of "garbage" outputs. Unlike existing languages that enable quantum aspects with separate add-ons (like a classical language with quantum gates bolted on), Qunity provides a unified syntax and a novel denotational semantics that guarantees that programs are quantum mechanically valid. We present Qunity's syntax, type system, and denotational semantics, showing how it can cleanly express several quantum algorithms. We also detail how Qunity can be compiled into a low-level qubit circuit language like OpenQASM, proving the realizability of our design.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。