Quantum Hoare logic with classical variables

08/15/2020
by   Yuan Feng, et al.
0

Hoare logic provides a syntax-oriented method to reason about program correctness, and has been proven effective in the verification of classical and probabilistic programs. Existing proposals for quantum Hoare logic either lack completeness or support only quantum variables, thus limiting their capability in practical use. In this paper, we propose a quantum Hoare logic for a simple while language which involves both classical and quantum variables. Its soundness and relative completeness are proven for both partial and total correctness of quantum programs written in the language. Remarkably, with novel definitions of classical-quantum states and corresponding assertions, the logic system is quite simple and similar to the traditional Hoare logic for classical programs. Furthermore, to simplify reasoning in real applications, auxiliary proof rules are provided which support the introduction of disjunction and quantifiers in the classical part of assertions, and of super-operator application and superposition in the quantum part. Finally, a series of practical quantum algorithms, in particular the whole algorithm of Shor's factorisation, are formally verified to show the effectiveness of the logic.

READ FULL TEXT
research
05/04/2022

Birkhoff-von Neumann Quantum Logic as an Assertion Language for Quantum Programs

A first-order logic with quantum variables is needed as an assertion lan...
research
08/09/2023

Local Reasoning about Probabilistic Behaviour for Classical-Quantum Programs

Verifying the functional correctness of programs with both classical and...
research
04/30/2021

Verification of Distributed Quantum Programs

Distributed quantum systems and especially the Quantum Internet have the...
research
04/09/2019

Reasoning about Block-based Cloud Storage Systems

Owing to the massive growth in the storage demands of big data, Cloud St...
research
02/15/2023

Verification of Nondeterministic Quantum Programs

Nondeterministic choice is a useful program construct that provides a wa...
research
10/04/2021

LQP: The Dynamic Logic of Quantum Information

The main contribution of this paper is the introduction of a dynamic log...
research
10/26/2018

Reasoning about Parallel Quantum Programs

We initiate the study of parallel quantum programming by defining the op...

Please sign up or login with your details

Forgot password? Click here to reset