Proq: Projection-based Runtime Assertions for Debugging on a Quantum Computer
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 ingenious quantum algorithms, the Harrow-Hassidim-Lloyd algorithm and Shor's algorithm.
Code (0)
등록된 구현이 없습니다.
Similar Papers 제목 키워드 기반
Design by Contract Framework for Quantum Software
To realize reliable quantum software, techniques to automatically ensure the quantum software's correctness have recently been investigated. However, they primarily focus on fixed quantum circuits rather than the procedu…
System-on-Chip Security Assertions
Assertions are widely used for functional validation as well as coverage analysis for both software and hardware designs. Assertions enable runtime error detection as well as faster localization of errors. While there is…
ProQ3: Improved model quality assessments using Rosetta energy terms
Motivation: To assess the quality of a protein model, i.e. to estimate how close it is to its native structure, using no other information than the structure of the model has been shown to be useful for structure predict…
ProQ3D: Improved model quality assessments using Deep Learning
Summary: Protein quality assessment is a long-standing problem in bioinformatics. For more than a decade we have developed state-of-art predictors by carefully selecting and optimising inputs to a machine learning method…
Deep LearningmodelASSERTIFY: Utilizing Large Language Models to Generate Assertions for Production Code
Production assertions are statements embedded in the code to help developers validate their assumptions about the code. They assist developers in debugging, provide valuable documentation, and enhance code comprehension.…
Few-Shot LearningPrompt Engineering