Proq: Projection-based Runtime Assertions for Debugging on a Quantum Computer

Gushu Li,Li Zhou,Nengkun Yu,Yufei Ding,Mingsheng Ying,Yuan Xie
2019-01-01
Abstract:In this paper, we propose Proq, a runtime assertion scheme for testing anddebugging quantum programs on a quantum computer. The predicates in Proq arerepresented by projections (or equivalently, closed subspaces of the statespace), following Birkhoff-von Neumann quantum logic. The satisfaction of aprojection by a quantum state can be directly checked upon a small number ofprojective measurements rather than a large number of repeated executions. Onthe theory side, we rigorously prove that checking projection-based assertionscan help locate bugs or statistically assure that the semantic function of thetested program is close to what we expect, for both exact and approximatequantum programs. On the practice side, we consider hardware constraints andintroduce several techniques to transform the assertions, making them directlyexecutable on the measurement-restricted quantum computers. We also propose toachieve simplified assertion implementation using local projection techniquewith soundness guaranteed. We compare Proq with existing quantum programassertions and demonstrate the effectiveness and efficiency of Proq by itsapplications to assert two ingenious quantum algorithms, theHarrow-Hassidim-Lloyd algorithm and Shor's algorithm.
What problem does this paper attempt to address?