论文标题
Qunity:一种用于量子和经典计算的统一语言(扩展版本)
Qunity: A Unified Language for Quantum and Classical Computing (Extended Version)
论文作者
论文摘要
我们介绍了一种新的量子编程语言,旨在将量子计算视为经典计算的自然概括。 Qunity提出了统一的语法,其中熟悉的编程结构可以具有量子和经典效应。例如,人们可以使用总类型来实现线性运算符的直接总和,例外处理语法来实现投影测量和混音以诱导纠缠。此外,Qunity利用了被忽视的BQP子例程定理,使一个人可以通过“垃圾”输出的不典范从不可逆的量子算法中构造可逆的子例程。与现有的语言不同,可以通过单独的附加组件启用量子方面(例如带有量子门的经典语言),Qunity提供了一种统一的语法和一种新颖的语法语义,可以保证程序机械地有效。我们介绍了Qunity的语法,类型系统和语义语义,显示了如何清洁表达几种量子算法。我们还详细介绍了如何将Qunity汇编成诸如OpenQasm之类的低级Qubit Circuit语言,从而证明了我们设计的可靠性。
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.