Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

ACM SIGPLAN Notices

Invariants of quantum programs: characterisations and generation

Mingsheng Ying, Shenggang Ying, Xiaodi Wu

Published Jan 1, 2017• 18 citations
Publisher

Abstract

Program invariant is a fundamental notion widely used in program verification and analysis. The aim of this paper is twofold: (i) find an appropriate definition of invariants for quantum programs; and (ii) develop an effective technique of invariant generation for verification and analysis of quantum programs. Interestingly, the notion of invariant can be defined for quantum programs in two different ways -- additive invariants and multiplicative invariants -- corresponding to two interpretations of implication in a continuous valued logic: the Lukasiewicz implication and the Godel implication. It is shown that both of them can be used to establish partial correctness of quantum programs. The problem of generating additive invariants of quantum programs is addressed by reducing it to an SDP (Semidefinite Programming) problem. This approach is applied with an SDP solver to generate invariants of two important quantum algorithms -- quantum walk and quantum Metropolis sampling. Our examples show that the generated invariants can be used to verify correctness of these algorithms and are helpful in optimising quantum Metropolis sampling. To our knowledge, this paper is the first attempt to define the notion of invariant and to develop a method of invariant generation for quantum programs.

DOI
10.1145/3093333.3009840

Related papers

Invariants of quantum programs: characterisations and generation

Mingsheng Ying, Shenggang Ying, Xiaodi Wu

Program invariant is a fundamental notion widely used in program verification and analysis. The aim of this paper is twofold: (i) find an appropriate definition of invariants for quantum programs; and (ii) develop an effective technique of invariant generation for verification and analysis of quantum programs.

ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL)•Dec 22, 2016•37 citations

Toward automatic verification of quantum programs

Mingsheng Ying

Abstract This paper summarises the results obtained by the author and his collaborators in a program logic approach to the verification of quantum programs, including quantum Hoare logic, invariant generation and termination analysis for quantum programs. It also introduces the notion of proof outline and several auxiliary rules for more conveniently reasoning about quantum programs. Some problems for future research are proposed at the end of the paper.

arXiv:1807.11610•Formal Aspects of Computing•Aug 7, 2018•36 citations

Verification of Nondeterministic Quantum Programs

Yuan Feng, Yingte Xu

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 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, Deutsch algorithm, and a nondeterministic quantum walk. Finally, a proof assistant prototype is implemented to aid in the automated reasoning of nondeterministic quantum programs.

arXiv:2302.07973•International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS)•Mar 20, 2023•17 citations

Semidefinite Programming in Quantum Information Science

Paul Skrzypczyk, Daniel Cavalcanti

Semidefinite programs (SDPs) are a class of optimisation problems that find application in numerous areas of physics, engineering and mathematics. Semidefinite programming is particularly suited to problems in quantum physics and quantum information science. Following a review of the theory of semidefinite programming, the book proceeds to describe how it can be used to address a wide range of important problems from across quantum information science. Specific applications include quantum state, measurement, and channel estimation and discrimination, entanglement detection and quantification, quantum distance measures, and measurement incompatibility. Though SDPs have become an increasingly important tool in quantum information science it’s not yet the kind of mathematics students learn routinely. Assuming only a basic knowledge of linear algebra and quantum physics and quantum information, this graduate-level book provides a unified and accessible presentation of one of the key numerical methods used in quantum information science. Whilst the focus is on the theoretical machinery of SDPs, the authors have provided an accompanying GitHub repository containing example code, covering some of the SDPs studied in this book. Part of IOP Series in Quantum Technology. Key features • Accessible for graduate students in science and mathematics. • A unified and accessible presentation of one of the key numerical methods used in quantum information science. • Written by leading researchers on the topic. • Accompanying GitHub repository with sample code.

arXiv:2306.11637•Institute of Physics eBooks•Mar 1, 2023•93 citations

Secure Information Flow in Quantum Programs

Zhicheng Zhang, Mingsheng Ying, Lirong Xia

Information-flow security aims to prevent the leakage of confidential information through program execution. This problem becomes fundamentally subtler for quantum programs, because their states may involve superposition and entanglement, and their executions may involve intricate interactions between classical and quantum variables. This paper develops semantic foundations and verification methods for secure information flow in quantum programs. We formulate two notions of information-flow security. The first is a noninterference-based definition that naturally generalizes its classical counterpart. The second is a simulation-based definition that explicitly models an attacker, providing a clear operational interpretation of security. We prove that these two notions are equivalent. To verify the information-flow security of quantum programs, we develop a proof framework based on quantum Hoare logic. A key challenge is that the standard self-composition technique, which expresses information-flow security in Hoare logic by composing a program with a renamed copy of itself, fails in the quantum setting due to an obstruction analogous to the no-cloning theorem. To overcome this challenge, we introduce self-conjugation, a novel technique that leverages the deferred measurement principle and properties of unitary operations. We demonstrate our framework on examples drawn from the quantum one-time pad, quantum error correction, and anonymous entanglement generation.

arXiv:2611.14147•Nov 10, 2026•0 citations

QSolver: A Quantum Constraint Solver

Shangzhou Xia, Haitao Fu, Jianjun Zhao

With the growing interest in quantum programs, ensuring their correctness is a fundamental challenge. Although constraint-solving techniques can overcome some limitations of traditional testing and verification, they have not yet been sufficiently explored in the context of quantum programs. To address this gap, we present QSolver, the first quantum constraint solver. QSolver provides a structured framework for handling five types of quantum constraints and incorporates an automated assertion generation module to verify quantum states. QSolver transforms quantum programs and multi-moment constraints into symbolic representations, and utilizes an SMT solver to obtain quantum states that satisfy these constraints. To validate the correctness of the generated input states, QSolver automatically generates assertion programs corresponding to each constraint. Experimental results show that QSolver efficiently processes commonly used quantum gates and demonstrates good scalability across quantum programs of different sizes.

quant-pharXiv:2602.20171•ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion)•Feb 11, 2026•1 citation
Program invariant is a fundamental notion widely used in program verification and analysis. The aim of this paper is twofold: (i) find an appropriate definition of invariants for quantum programs; and (ii) develop an effective technique of invariant generation for verification and analysis of quantum programs. Interestingly, the notion of invariant can be defined for quantum programs in two different ways -- additive invariants and multiplicative invariants -- corresponding to two interpretations of implication in a continuous valued logic: the Lukasiewicz implication and the Godel implication. It is shown that both of them can be used to establish partial correctness of quantum programs. The problem of generating additive invariants of quantum programs is addressed by reducing it to an SDP (Semidefinite Programming) problem. This approach is applied with an SDP solver to generate invariants of two important quantum algorithms -- quantum walk and quantum Metropolis sampling. Our examples show that the generated invariants can be used to verify correctness of these algorithms and are helpful in optimising quantum Metropolis sampling. To our knowledge, this paper is the first attempt to define the notion of invariant and to develop a method of invariant generation for quantum programs.
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 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, Deutsch algorithm, and a nondeterministic quantum walk. Finally, a proof assistant prototype is implemented to aid in the automated reasoning of nondeterministic quantum programs.
Semidefinite programs (SDPs) are a class of optimisation problems that find application in numerous areas of physics, engineering and mathematics. Semidefinite programming is particularly suited to problems in quantum physics and quantum information science. Following a review of the theory of semidefinite programming, the book proceeds to describe how it can be used to address a wide range of important problems from across quantum information science. Specific applications include quantum state, measurement, and channel estimation and discrimination, entanglement detection and quantification, quantum distance measures, and measurement incompatibility. Though SDPs have become an increasingly important tool in quantum information science it’s not yet the kind of mathematics students learn routinely. Assuming only a basic knowledge of linear algebra and quantum physics and quantum information, this graduate-level book provides a unified and accessible presentation of one of the key numerical methods used in quantum information science. Whilst the focus is on the theoretical machinery of SDPs, the authors have provided an accompanying GitHub repository containing example code, covering some of the SDPs studied in this book. Part of IOP Series in Quantum Technology. Key features • Accessible for graduate students in science and mathematics. • A unified and accessible presentation of one of the key numerical methods used in quantum information science. • Written by leading researchers on the topic. • Accompanying GitHub repository with sample code.
Information-flow security aims to prevent the leakage of confidential information through program execution. This problem becomes fundamentally subtler for quantum programs, because their states may involve superposition and entanglement, and their executions may involve intricate interactions between classical and quantum variables. This paper develops semantic foundations and verification methods for secure information flow in quantum programs. We formulate two notions of information-flow security. The first is a noninterference-based definition that naturally generalizes its classical counterpart. The second is a simulation-based definition that explicitly models an attacker, providing a clear operational interpretation of security. We prove that these two notions are equivalent. To verify the information-flow security of quantum programs, we develop a proof framework based on quantum Hoare logic. A key challenge is that the standard self-composition technique, which expresses information-flow security in Hoare logic by composing a program with a renamed copy of itself, fails in the quantum setting due to an obstruction analogous to the no-cloning theorem. To overcome this challenge, we introduce self-conjugation, a novel technique that leverages the deferred measurement principle and properties of unitary operations. We demonstrate our framework on examples drawn from the quantum one-time pad, quantum error correction, and anonymous entanglement generation.
With the growing interest in quantum programs, ensuring their correctness is a fundamental challenge. Although constraint-solving techniques can overcome some limitations of traditional testing and verification, they have not yet been sufficiently explored in the context of quantum programs. To address this gap, we present QSolver, the first quantum constraint solver. QSolver provides a structured framework for handling five types of quantum constraints and incorporates an automated assertion generation module to verify quantum states. QSolver transforms quantum programs and multi-moment constraints into symbolic representations, and utilizes an SMT solver to obtain quantum states that satisfy these constraints. To validate the correctness of the generated input states, QSolver automatically generates assertion programs corresponding to each constraint. Experimental results show that QSolver efficiently processes commonly used quantum gates and demonstrates good scalability across quantum programs of different sizes.