一句话:提出 QOPS,基于 Pauli 串的测试用例与可集成 IBM Estimator API 的测试预言,利用对易性质免除完整规约。
量子计算前景广阔,但现有量子软件测试在工业场景下受限:不适用于工业相关程序、需要完整规约,且与 IBM 错误缓解不兼容。为此,本文提出 QOPS:基于 Pauli 串定义测试用例,提出可集成 IBM Estimator API 并支持错误缓解的测试预言,并利用 Pauli 串对易性质放宽完整规约要求。在 194,982 个真实量子程序上评估,QOPS 的 F1、精确率和召回率均完美,优于现有最佳方法;并在 IBM 三台真实量子计算机上结合工业与开源错误缓解方法验证了工业适用性。
The most promising applications of quantum computing are centered around solving search and optimization tasks, particularly in fields such as physics simulations, quantum chemistry, and finance. However, the current quantum software testing methods face practical limitations when applied in industrial contexts: (i) they do not apply to quantum programs most relevant to the industry, (ii) they require a full program specification, which is usually not available for these programs, and (iii) they are incompatible with error mitigation methods currently adopted by main industry actors like IBM. To address these challenges, we present QOPS, a novel quantum software testing approach. QOPS introduces a new definition of test cases based on Pauli strings to improve compatibility with different quantum programs. QOPS also introduces a new test oracle that can be directly integrated with industrial APIs such as IBM’s Estimator API and can utilize error mitigation methods for testing on real noisy quantum computers. We also leverage the commuting property of Pauli strings to relax the requirement of having complete program specifications, making QOPS practical for testing complex quantum programs in industrial settings. We empirically evaluate QOPS on 194,982 real quantum programs, demonstrating effective performance in test assessment compared to the state-of-the-art with a perfect F1-score, precision, and recall. Furthermore, we validate the industrial applicability of QOPS by assessing its performance on IBM’s three real quantum computers, incorporating both industrial and open-source error mitigation methods.CCS Concepts• Software and its engineering → Correctness; • Theory of computation → Quantum computation theory; • Computer systems organization → Quantum computing