# Floyd--hoare logic for quantum programs

@article{Ying2012FloydhoareLF, title={Floyd--hoare logic for quantum programs}, author={Mingsheng Ying}, journal={ACM Trans. Program. Lang. Syst.}, year={2012}, volume={33}, pages={19:1-19:49} }

Floyd--Hoare logic is a foundation of axiomatic semantics of classical programs, and it provides effective proof techniques for reasoning about correctness of classical programs. To offer similar techniques for quantum program verification and to build a logical foundation of programming methodology for quantum computers, we develop a full-fledged Floyd--Hoare logic for both partial and total correctness of quantum programs. It is proved that this logic is (relatively) complete by exploiting…

## Figures and Topics from this paper

## 106 Citations

Verification Logics for Quantum Programs

- Computer ScienceArXiv
- 2019

The mathematical foundations of the Hoare logics, their underlying languages, and the expressivity of their assertions are compared; the languages used are used to verify the Deutsch-Jozsa Algorithm, and their relative usability in practice is discussed.

Logic for quantum programs

- Mathematics
- 2016

This chapter develops a logical foundation for reasoning about correctness of quantum programs with classical control. We first define quantum predicates as observables that can properly describe…

Quantum Hoare Logic

- Computer ScienceArch. Formal Proofs
- 2019

This work specifies the syntax and denotational semantics of a simple model of quantum programs and writes down the rules of quantum Hoare logic for partial correctness, and shows the soundness and completeness of the resulting proof system.

Formal Verification of Quantum Algorithms Using Quantum Hoare Logic

- Computer ScienceCAV
- 2019

To the best knowledge, this is the first time a Hoare logic for quantum programs is formalized in an interactive theorem prover, and used to verify the correctness of a nontrivial quantum algorithm.

Quantum Hoare logic with classical variables

- Computer Science, PhysicsACM Transactions on Quantum Computing
- 2021

A quantum Hoare logic for a simple while language that involves both classical and quantum variables is proposed and its soundness and relative completeness are proven for both partial and total correctness of quantum programs written in the language.

An applied quantum Hoare logic

- Computer SciencePLDI
- 2019

We derive a variant of quantum Hoare logic (QHL), called applied quantum Hoare logic (aQHL for short), by: 1. restricting QHL to a special class of preconditions and postconditions, namely…

Quantum Hoare Type Theory

- Computer Science, PhysicsArXiv
- 2020

Inspired by Hoare Type Theory in classical computing, Quantum Hoar Type Theory (QHTT) is proposed in which precise specifications about the modification to the quantum state can be provided within the type of a computation.

A Theorem Prover for Quantum Hoare Logic and Its Applications

- Mathematics, Computer ScienceArXiv
- 2016

This paper implements a theorem prover for QHL based on Isabelle/HOL, and proves the correctness of two well-known quantum algorithms, i.e., Grover Quantum Search and Quantum Phase Estimation are proved using the theoremProver, the first mechanized proofs for both of them.

A Quantum interpretation of separating conjunction for local reasoning of Quantum programs based on separation logic

- Proceedings of the ACM on Programming Languages
- 2022

It is well-known that quantum programs are not only complicated to design but also challenging to verify because the quantum states can have exponential size and require sophisticated mathematics to…

A Logic for Recursive Quantum Programs

- Mathematics, Computer ScienceArXiv
- 2018

This paper presents a logic for recursive quantum programs, an extension of quantum Hoare logic for quantum While-programs, and its effectiveness is shown by a running example: fixed-point Grover's search.

## References

SHOWING 1-10 OF 48 REFERENCES

Proof rules for the correctness of quantum programs

- Computer ScienceTheor. Comput. Sci.
- 2007

The notion of quantum predicate proposed by D'Hondt and Panangaden is applied to analyze a simple language fragment which may describe the quantum part of a future quantum computer in Knill's architecture and the proof rules are extended to be complete in the sense that any correct assertion about the quantum loops can be proved.

The Logic of Quantum Programs

- Computer Science, PhysicsArXiv
- 2021

A dynamic logic that is capable of dealing with quantum measurements, unitary evolutions and entanglements in compound quantum systems is introduced and a sound proof system for this logic is presented.

Reasoning About Imperative Quantum Programs

- Computer Science, MathematicsMFPS
- 2006

The state logic is used to provide a sound Hoare-style calculus for quantum imperative programs and the calculus is illustrated by proving the correctness of the Deutsch algorithm.

Quantum weakest preconditions

- Computer Science, PhysicsMathematical Structures in Computer Science
- 2006

We develop a notion of predicate transformer and, in particular, the weakest precondition, appropriate for quantum computation. We show that there is a Stone-type duality between the usual…

Quantum Programming

- Computer ScienceMPC
- 2000

The theory of quantum programming provides tools to write both classical and quantum specifications, develop quantum programs that implement these specifications, and reason about their comparative time and space complexity all in the same framework.

Towards a quantum programming language

- Computer ScienceMathematical Structures in Computer Science
- 2004

This paper describes the syntax and semantics of a simple quantum programming language with high-level features such as loops, recursive procedures, and structured data types, and has an interesting denotational semantics in terms of complete partial orders of superoperators.

A functional quantum programming language

- Mathematics, Physics20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05)
- 2005

QML integrates reversible and irreversible quantum computations in one language, using first order strict linear logic to make weakenings explicit, and preserves superpositions and entanglement -which is essential for quantum parallelism.

LQP: the dynamic logic of quantum information

- Computer Science, PhysicsMathematical Structures in Computer Science
- 2006

A dynamic logic formalism for reasoning about information flow in composite quantum systems, capable of expressing important features of quantum measurements and unitary evolutions of multi-partite states, as well as giving logical characterisations to various forms of entanglement.

Dynamic Quantum Logic for Quantum Programs

- Computer Science, Physics
- 2003

A way to apply quantum logic to the study of quantum programs is presented by using an extension of the usual propositional language in order to make transformations performed on the system appear explicitly.

Soundness and Completeness of an Axiom System for Program Verification

- Mathematics, Computer ScienceSIAM J. Comput.
- 1978

The main new results are the completeness theorem, and a careful treatment of the procedure call rules for procedures with global variables in their declarations.