Projection-Based Runtime Assertions for Testing and Debugging Quantum Programs

被引:59
作者
Li, Gushu [1 ]
Li Zhou [2 ]
Yu, Nengkun [3 ]
Ding, Yufei [1 ]
Ying, Mingsheng [3 ,4 ]
Xie, Yuan [1 ]
机构
[1] Univ Calif Santa Barbara, Santa Barbara, CA 93106 USA
[2] Max Planck Inst Secur & Privacy, Berlin, Germany
[3] Univ Technol, Sydney, NSW, Australia
[4] Chinese Acad Sci, Inst Software, Beijing, Peoples R China
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2020年 / 4卷 / OOPSLA期
基金
澳大利亚研究理事会; 美国国家科学基金会; 中国国家自然科学基金; 国家重点研发计划;
关键词
quantum computing; quantum programming; assertion; program testing;
D O I
10.1145/3428218
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:29
相关论文
共 40 条
[1]  
Abhari A.J., 2012, 93412 PRINC U
[2]  
Aleksandrowicz G., 2019, QISKIT OPEN SOURCE F
[3]  
[Anonymous], 2018, GC-LSTM: Graph convolution embedded LSTM for dynamic link prediction
[4]   The logic of quantum mechanics [J].
Birkhoff, G ;
von Neumann, J .
ANNALS OF MATHEMATICS, 1936, 37 :823-843
[5]   QUANTUM NON-DEMOLITION MEASUREMENTS [J].
BRAGINSKY, VB ;
VORONTSOV, YI ;
THORNE, KS .
SCIENCE, 1980, 209 (4456) :547-557
[6]   Dynamic quantum logic for quantum programs [J].
Brunet, O ;
Jorrand, P .
INTERNATIONAL JOURNAL OF QUANTUM INFORMATION, 2004, 2 (01) :45-54
[7]   From ground states to local Hamiltonians [J].
Chen, Jianxin ;
Ji, Zhengfeng ;
Zeng, Bei ;
Zhou, D. L. .
PHYSICAL REVIEW A, 2012, 86 (02)
[8]  
Chong Frederic T, 2019, ARXIV PREPRINT ARXIV
[9]  
Google, 2018, ANN CIRQ OP SOURC FR
[10]   Quipper: A Scalable Quantum Programming Language [J].
Green, Alexander S. ;
Lumsdaine, Peter LeFanu ;
Ross, Neil J. ;
Selinger, Peter ;
Valiron, Benoit .
ACM SIGPLAN NOTICES, 2013, 48 (06) :333-342