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

Proceedings of the ACM on Programming Languages

Embedding Quantum Program Verification into Dafny

Feifei Cheng, Sushen Vallabh Vangeepuram, Henry Allard, Seyed Mohammad Reza Jafari, Alex Potanin, Liyi Li

Published Oct 9, 2025• 2 citations
Publisher

Abstract

Despite recent development of quantum program verification, it is still in its early stage, where many quantum programs are hard to verify due to their inherent probabilistic nature and parallelism in quantum superposition. We propose Qafny c , a system that compiles quantum program verification into a well-established classical program verifier Dafny, enabling the formal verification of quantum programs. The key insight behind Qafny c is the separation of quantum program verification from its execution, leveraging the strength of classical verifiers to ensure correctness before compiling certified quantum programs into executable circuits. Using Qafny c , we have successfully verified 37 diverse quantum programs by compiling their verification into Dafny. To the best of our knowledge, this is the most extensive formally verified set of quantum programs.

DOI
10.1145/3763157

Related papers

Qafny: A Quantum-Program Verifier

Liyi Li, Mingwei Zhu, Rance Cleaveland Y +4 more

Because of the probabilistic/nondeterministic behavior of quantum programs, it is highly advisable to verify them formally to ensure that they correctly implement their specifications. Formal verification, however, also traditionally requires significant effort. To address this challenge, we present Qafny, an automated proof system based on the program verifier Dafny and designed for verifying quantum programs. At its core, Qafny uses a type-guided quantum proof system that translates quantum operations to classical array operations modeled within a classical separation logic framework. We prove the soundness and completeness of our proof system and implement a prototype compiler that transforms Qafny programs and specifications into Dafny for automated verification purposes. We then illustrate the utility of Qafny's automated capabilities in efficiently verifying important quantum algorithms, including quantum-walk algorithms, Grover's algorithm, and Shor's algorithm.

arXiv:2211.06411•Leibniz international proceedings in informatics•Nov 11, 2022•7 citations

Connecting Quantum Proof Systems and Hoare Logic

Liyi Li, Zoukarneini Difaizi Tagba, Alex Potanin

Verifying quantum programs today requires specialized proof systems built on interactive theorem provers such as Rocq, Lean, Isabelle, or Why3, and even modest quantum algorithms cost substantial human effort to verify. Because quantum programs cannot be effectively checked by runtime testing, formal verification is the only viable path to correctness, making the cost of these bespoke systems the chief barrier to scalable quantum software assurance. We show that verifying a quantum program should be no harder than verifying a classical array program, a paradigm commonly used in parallel programming: the Qafny quantum proof system translates into Hoare logic with array theory completely (every Qafny proof becomes a valid Hoare triple) and soundly (a valid translated triple certifies only true quantum specifications), and we mechanize the completeness direction in Rocq. The embedding determinizes quantum proof obligations and exposes the full machinery of classical automated verifiers (e.g. Dafny and SMT-based separation logic) to quantum code, removing the need for dedicated quantum proof system infrastructure. In particular, the embedding supplies the correctness argument that the existing compilation of Qafny into Dafny lacks.

arXiv:2610.34723•Oct 26, 2026•0 citations

Formal Verification vs. Quantum Uncertainty

Robert W. Rand, Kesha Hietala, Michael Hicks

Quantum programming is hard: Quantum programs are necessarily probabilistic and impossible to examine without disrupting the execution of a program. In response to this challenge, we and a number of other researchers have written tools to verify quantum programs against their intended semantics. This is not enough. Verifying an idealized semantics against a real world quantum program doesn't allow you to confidently predict the program’s output. In order to have verification that works, you need both an error semantics related to the hardware at hand (this is necessarily low level) and certified compilation to the that same hardware. Once we have these two things, we can talk about an approach to quantum programming where we start by writing and verifying programs at a high level, attempt to verify properties of the compiled code, and repeat as necessary.

Leibniz international proceedings in informatics•Jan 1, 2019•1 citation

Formal Verification of Quantum Circuit Compilation using Symbolic Execution

Jincheng Zhang

Quantum circuit compilation is a crucial step in translating high-level quantum algorithms into executable quantum circuits on specific hardware. The complexity and potential for errors within this process necessitate rigorous verification methods. This paper proposes a novel approach leveraging symbolic execution to formally verify quantum circuit compilation. We represent quantum circuits and compilation steps as a symbolic program, enabling the exploration of all possible compilation paths. By incorporating quantum gate fidelities and noise models into the symbolic execution engine, we can identify potential errors in the compilation logic, providing a robust and systematic way to ensure the correctness of the compilation process. The core claim is that symbolic execution can be extended to formally verify the correctness of quantum circuit compilation processes. This work addresses a critical need in quantum computing, offering a new technique for building trust and reliability into quantum software.

•Aug 28, 2026•0 citations

Self-Referential Formal Verification of Quantum Programs

Jincheng Zhang

The verification of quantum programs presents a formidable challenge due to the fundamental properties of quantum mechanics, namely superposition and entanglement. Traditional verification methods struggle to cope with the exponentially growing state space inherent in quantum computation. This paper proposes a novel self-referential formal verification method that leverages quantum computation itself to tackle this problem. The core idea involves representing the verification system as a quantum program, enabling self-execution and verification. We utilize techniques from quantum circuit compilation and formal methods to design and implement this approach. This strategy offers a potential pathway to manage the complexity of quantum verification, though significant theoretical and practical hurdles remain. The primary objective is to establish a framework where the inherent properties of quantum systems are harnessed to address the verification process. This work lays the groundwork for future research into scalable quantum verification techniques.

•Sep 3, 2026•0 citations

Quantum Circuit Verification - A Potential Roadmap (Invited Talk)

Abdulla, Parosh Aziz, Chen, Yu-Fang, Hečko, Michal +4 more

Quantum technologies are progressing at an extraordinary pace and are poised to transform numerous sectors both nationally and globally. Among them, quantum computing stands out for its potential to revolutionize areas such as cryptography, optimization, and the simulation of quantum systems, offering dramatic speed-ups for specific classes of problems. As quantum devices evolve and become increasingly pervasive, guaranteeing their correctness is of paramount importance. This necessitates the development of rigorous methods and tools to analyze and verify their behavior. However, the construction of such verification frameworks presents fundamental challenges. Quantum phenomena such as superposition and entanglement give rise to computational behaviors that differ profoundly from those of classical systems, leading to inherently probabilistic models and exponentially large state spaces, even for relatively small programs. Addressing these challenges requires building on the extensive expertise of the formal methods community in classical program verification, while incorporating recent advances and collaborative efforts in quantum systems. An interesting challenge for the verification community is to design and implement novel verification frameworks that transfer the key strengths of classical verification, such as expressive specification, precise error detection, automation, and scalability, to the quantum domain. We expect that the results of this research will play a crucial role in enabling the dependable deployment of quantum technologies across a wide range of future applications.

Leibniz international proceedings in informatics•Jan 1, 2025•0 citations
Despite recent development of quantum program verification, it is still in its early stage, where many quantum programs are hard to verify due to their inherent probabilistic nature and parallelism in quantum superposition. We propose Qafny c , a system that compiles quantum program verification into a well-established classical program verifier Dafny, enabling the formal verification of quantum programs. The key insight behind Qafny c is the separation of quantum program verification from its execution, leveraging the strength of classical verifiers to ensure correctness before compiling certified quantum programs into executable circuits. Using Qafny c , we have successfully verified 37 diverse quantum programs by compiling their verification into Dafny. To the best of our knowledge, this is the most extensive formally verified set of quantum programs.
Because of the probabilistic/nondeterministic behavior of quantum programs, it is highly advisable to verify them formally to ensure that they correctly implement their specifications. Formal verification, however, also traditionally requires significant effort. To address this challenge, we present Qafny, an automated proof system based on the program verifier Dafny and designed for verifying quantum programs. At its core, Qafny uses a type-guided quantum proof system that translates quantum operations to classical array operations modeled within a classical separation logic framework. We prove the soundness and completeness of our proof system and implement a prototype compiler that transforms Qafny programs and specifications into Dafny for automated verification purposes. We then illustrate the utility of Qafny's automated capabilities in efficiently verifying important quantum algorithms, including quantum-walk algorithms, Grover's algorithm, and Shor's algorithm.
Verifying quantum programs today requires specialized proof systems built on interactive theorem provers such as Rocq, Lean, Isabelle, or Why3, and even modest quantum algorithms cost substantial human effort to verify. Because quantum programs cannot be effectively checked by runtime testing, formal verification is the only viable path to correctness, making the cost of these bespoke systems the chief barrier to scalable quantum software assurance. We show that verifying a quantum program should be no harder than verifying a classical array program, a paradigm commonly used in parallel programming: the Qafny quantum proof system translates into Hoare logic with array theory completely (every Qafny proof becomes a valid Hoare triple) and soundly (a valid translated triple certifies only true quantum specifications), and we mechanize the completeness direction in Rocq. The embedding determinizes quantum proof obligations and exposes the full machinery of classical automated verifiers (e.g. Dafny and SMT-based separation logic) to quantum code, removing the need for dedicated quantum proof system infrastructure. In particular, the embedding supplies the correctness argument that the existing compilation of Qafny into Dafny lacks.
Quantum programming is hard: Quantum programs are necessarily probabilistic and impossible to examine without disrupting the execution of a program. In response to this challenge, we and a number of other researchers have written tools to verify quantum programs against their intended semantics. This is not enough. Verifying an idealized semantics against a real world quantum program doesn't allow you to confidently predict the program’s output. In order to have verification that works, you need both an error semantics related to the hardware at hand (this is necessarily low level) and certified compilation to the that same hardware. Once we have these two things, we can talk about an approach to quantum programming where we start by writing and verifying programs at a high level, attempt to verify properties of the compiled code, and repeat as necessary.
Quantum circuit compilation is a crucial step in translating high-level quantum algorithms into executable quantum circuits on specific hardware. The complexity and potential for errors within this process necessitate rigorous verification methods. This paper proposes a novel approach leveraging symbolic execution to formally verify quantum circuit compilation. We represent quantum circuits and compilation steps as a symbolic program, enabling the exploration of all possible compilation paths. By incorporating quantum gate fidelities and noise models into the symbolic execution engine, we can identify potential errors in the compilation logic, providing a robust and systematic way to ensure the correctness of the compilation process. The core claim is that symbolic execution can be extended to formally verify the correctness of quantum circuit compilation processes. This work addresses a critical need in quantum computing, offering a new technique for building trust and reliability into quantum software.
The verification of quantum programs presents a formidable challenge due to the fundamental properties of quantum mechanics, namely superposition and entanglement. Traditional verification methods struggle to cope with the exponentially growing state space inherent in quantum computation. This paper proposes a novel self-referential formal verification method that leverages quantum computation itself to tackle this problem. The core idea involves representing the verification system as a quantum program, enabling self-execution and verification. We utilize techniques from quantum circuit compilation and formal methods to design and implement this approach. This strategy offers a potential pathway to manage the complexity of quantum verification, though significant theoretical and practical hurdles remain. The primary objective is to establish a framework where the inherent properties of quantum systems are harnessed to address the verification process. This work lays the groundwork for future research into scalable quantum verification techniques.
Quantum technologies are progressing at an extraordinary pace and are poised to transform numerous sectors both nationally and globally. Among them, quantum computing stands out for its potential to revolutionize areas such as cryptography, optimization, and the simulation of quantum systems, offering dramatic speed-ups for specific classes of problems. As quantum devices evolve and become increasingly pervasive, guaranteeing their correctness is of paramount importance. This necessitates the development of rigorous methods and tools to analyze and verify their behavior. However, the construction of such verification frameworks presents fundamental challenges. Quantum phenomena such as superposition and entanglement give rise to computational behaviors that differ profoundly from those of classical systems, leading to inherently probabilistic models and exponentially large state spaces, even for relatively small programs. Addressing these challenges requires building on the extensive expertise of the formal methods community in classical program verification, while incorporating recent advances and collaborative efforts in quantum systems. An interesting challenge for the verification community is to design and implement novel verification frameworks that transfer the key strengths of classical verification, such as expressive specification, precise error detection, automation, and scalability, to the quantum domain. We expect that the results of this research will play a crucial role in enabling the dependable deployment of quantum technologies across a wide range of future applications.