Projection-based runtime assertions for testing and debugging Quantum programs
Gushu Li, Li Zhou, Nengkun Yu, Yufei Ding, Mingsheng Ying, Yuan Xie
Abstract
In this paper, we propose Proq, a runtime assertion scheme for testing and debugging quantum programs on a quantum computer. The predicates in Proq are represented by projections (or equivalently, closed subspaces of the state space), following Birkhoff-von Neumann quantum logic. The satisfaction of a projection by a quantum state can be directly checked upon a small number of projective measurements rather than a large number of repeated executions. On the theory side, we rigorously prove that checking projection-based assertions can help locate bugs or statistically assure that the semantic function of the tested program is close to what we expect, for both exact and approximate quantum programs. On the practice side, we consider hardware constraints and introduce several techniques to transform the assertions, making them directly executable on the measurement-restricted quantum computers. We also propose to achieve simplified assertion implementation using local projection technique with soundness guaranteed. We compare Proq with existing quantum program assertions and demonstrate the effectiveness and efficiency of Proq by its applications to assert two sophisticated quantum algorithms, the Harrow-Hassidim-Lloyd algorithm and Shor’s algorithm.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 28e56027-6efa-4e74-a178-fcc18c9a89bbCited by top-tier papers19
- Bugs in Quantum computing platforms: an empirical studyMatteo Paltenghi, Michael PradelOOPSLA 2022 · 70 citations
- MorphQ: Metamorphic Testing of the Qiskit Quantum Computing PlatformMatteo Paltenghi, Michael PradelICSE 2023 · 44 citations
- symQV: Automated Symbolic Verification of Quantum ProgramsFabian Bauer-Marquart, Stefan Leue, Christian SchillingFM 2023 · 37 citations
- Qunity: A Unified Language for Quantum and Classical ComputingFinn Voichick, Liyi Li, Robert Rand, Michael HicksPOPL 2023 · 35 citations
- Twist: sound reasoning for purity and entanglement in Quantum programsCharles Yuan, Christopher McNally, Michael CarbinPOPL 2022 · 30 citations
Builds on2
Related papers
- Systematic Approaches for Precise and Approximate Quantum State Runtime AssertionJi Liu, Huiyang ZhouHPCA 2021 · 31 citations
- An Expressive Assertion Language for Quantum ProgramsBonan Su, Yuan Feng, Mingsheng Ying, Li ZhouPOPL 2026 · 1 citation
- Quantum abstract interpretationNengkun Yu, Jens PalsbergPLDI 2021 · 69 citations
- Verification of Nondeterministic Quantum ProgramsYuan Feng, Yingte XuASPLOS 2023 · 7 citations
- Scalable Equivalence Checking and Verification of Shallow Quantum CircuitsNengkun Yu, Xuan Du Trinh, Thomas RepsOOPSLA 2025
