As quantum computers become real, it is high time we come up with effective techniques that help programmers write correct quantum programs. Inspired by Hoare Type Theory in classical computing, we propose Quantum Hoare Type Theory (QHTT), in which precise specifications about the modification to the quantum state can be provided within the type of computation. These specifications within a Hoare type are given in the form of Hoare-logic style pre- and postconditions following the propositions-as-types principle. The type-checking process verifies that the implementation conforms to the provided specification. QHTT has the potential to be a unified system for programming, specifying, and reasoning about quantum programs.
翻译:当量子计算机成为现实时,我们早就应该拿出有效的技术来帮助程序员编写正确的量子程序。在古典计算中的Hoare类型理论的启发下,我们提出了量子 Hoare类型理论(QHTT),其中可以在计算类型内提供量子状态修改的确切规格。Haare类型中的这些规格以Hoare-logic风格的先期和后期条件的形式提供,遵循原样原则。类型检查过程证实执行符合规定的规格。QHTT有可能成为量子程序的统一编程、说明和推理系统。