Nondeterministic choice is a useful program construct that provides a way to describe the behaviour of a program without specifying the details of possible implementations. It supports the stepwise refinement of programs, a method that has proven useful in software development. Nondeterminism has also been introduced in quantum programming, and the termination of nondeterministic quantum programs has been extensively analysed. In this paper, we go beyond termination analysis to investigate the verification of nondeterministic quantum programs where properties are given by sets of hermitian operators on the associated Hilbert space. Hoare-type logic systems for partial and total correctness are proposed, which turn out to be both sound and relatively complete with respect to their corresponding semantic correctness. To show the utility of these proof systems, we analyse some quantum algorithms, such as quantum error correction scheme, the Deutsch algorithm, and a nondeterministic quantum walk. Finally, a proof assistant prototype is implemented to aid in the automated reasoning of nondeterministic quantum programs.
翻译:非确定性选择是一种有用的程序构建,它为描述一个程序的行为提供了一种方法,而没有具体说明可能实施的细节。它支持对程序进行渐进式改进,这种方法已证明在软件开发方面有用。在量子编程中也引入了非确定性做法,并且对非确定性量子程序的终止进行了广泛的分析。在本文件中,我们超越了终止分析,以调查非确定性量子程序的核查情况,因为相关Hilbert空间的几组隐士操作员提供了特性。提出了部分和完全正确性的Haare型逻辑系统,结果发现,在相应的语义正确性方面,这种系统既健全又相对完整。为了展示这些验证系统的效用,我们分析了一些量子算法,如量子误差校正计划、Deutsch算法和非确定性量子行走法。最后,我们采用了一个证据助理原型,以协助非确定性量子程序的自动推理。