量子程序设计中的交替:从数据叠加到程序叠加
Alternation in Quantum Programming: From Superposition of Data to Superposition of Programs
摘要:
我们提取一个新的量子编程范式-叠加程序-从一类流行的量子算法,即量子行走算法的设计思想。量子行走作为一种计算模型的普适性保证了这种范式的普遍性。然后提出了一种新的量子程序设计语言QGCL来支持程序叠加的范式。这种语言可以被看作是Dijkstra的GCL(守护命令语言)的量子扩展。令人惊讶的是,GCL中的交替在量子环境中分裂为两个不同的概念:经典交替(量子程序)和量子交替,后者是第一次在QGCL中引入。量子交替是实现程序叠加范式的关键程序结构。QGCL的指称语义是通过引入一种新的数学工具-算子值函数的保护复合来定义的。然后直接导出QGCL的最弱前提语义。另一个非常有用的程序构造,在实现量子编程范式的叠加程序,称为量子选择,可以很容易地定义在量子交替。通过定义局部变量的概念,阐明了量子选择与概率选择之间的关系。我们推导出一个家庭的代数法律QGCL程序,可用于程序验证,转换和编译。QGCL的表达能力说明了几个例子,各种变体和推广的量子行走方便地表示使用量子交替和量子选择。我们相信,具有量子交替和选择的量子编程将在进一步利用量子计算的能力方面发挥重要作用。
英文摘要:
We extract a novel quantum programming paradigm - superposition of programs - from the design idea of a popular class of quantum algorithms, namely quantum walk-based algorithms. The generality of this paradigm is guaranteed by the universality of quantum walks as a computational model. A new quantum programming language QGCL is then proposed to support the paradigm of superposition of programs. This language can be seen as a quantum extension of Dijkstra's GCL (Guarded Command Language). Surprisingly, alternation in GCL splits into two different notions in the quantum setting: classical alternation (of quantum programs) and quantum alternation, with the latter being introduced in QGCL for the first time. Quantum alternation is the key program construct for realizing the paradigm of superposition of programs. The denotational semantics of QGCL are defined by introducing a new mathematical tool called the guarded composition of operator-valued functions. Then the weakest precondition semantics of QGCL can straightforwardly derived. Another very useful program construct in realizing the quantum programming paradigm of superposition of programs, called quantum choice, can be easily defined in terms of quantum alternation. The relation between quantum choices and probabilistic choices is clarified through defining the notion of local variables. We derive a family of algebraic laws for QGCL programs that can be used in program verification, transformations and compilation. The expressive power of QGCL is illustrated by several examples where various variants and generalizations of quantum walks are conveniently expressed using quantum alternation and quantum choice. We believe that quantum programming with quantum alternation and choice will play an important role in further exploiting the power of quantum computing.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。