We introduce a novel scheme of quantum recursive programming, in which large unitary transformations, i.e. quantum gates, can be recursively defined using quantum case statements, which are quantum counterparts of conditionals and case statements extensively used in classical programming. A simple programming language for supporting this kind of quantum recursion is defined, and its semantics is formally described. A series of examples are presented to show that some quantum algorithms can be elegantly written as quantum recursive programs.
翻译:我们提出了一种新颖的量子递归编程方案,在该方案中,大型酉变换(即量子门)可通过量子情形语句递归定义。量子情形语句是经典编程中广泛使用的条件语句和情形语句的量子对应物。我们定义了一种支持此类量子递归的简单编程语言,并形式化描述了其语义。通过一系列实例展示,部分量子算法可被优雅地编写为量子递归程序。