一句话:提出融合幅度、相位与纠缠特征的量子程序自动化测试框架 QuraTest,并给出多种测试用例生成器。
现有量子程序测试方法大多忽略量子程序的基本特征,即幅度、相位与纠缠,导致故障检测能力受限、测试效果不佳。本文提出自动化测试框架 QuraTest,内置三种测试用例生成器:新提出的 UCNOT、IQFT,以及基于随机技术的生成器,通过考虑量子特征生成多样化测试输入。实验从测试用例多样性、被测程序输出覆盖率与故障检测能力三方面评估。结果显示,IQFT 在幅度、相位与纠缠方面生成最多样测试用例,单元覆盖率达 66%,而随机方法仅 10%;IQFT 在 70.2%(47 个中的 33 个)量子程序上取得最高输出覆盖率;UCNOT 的故障检测更优,在 88.4%(26 个中的 23 个)量子程序上获得最佳变异得分。
The recent fast development of quantum computers breaks several computation limitations that are difficult for conventional computers. Up to the present, although many approaches and tools have been proposed to test quantum programs, the fundamental features of quantum programs, i.e., magnitude, phase, and entanglement, have been largely overlooked, leading to limited fault detection capability and reduced testing effectiveness. To address this problem, we propose an automated testing framework named QURATEST, equipped with three test case generators (including two newly proposed techniques, UCNOT and IQFT in this paper, as well as one based on Random techniques) to test quantum programs. Overall, the proposed generators enable the generation of diverse test inputs by considering the quantum features of quantum programs. In the experiments, we perform an in-depth evaluation of QURATEST from three aspects: generated test case diversity, output coverage of the program under test, and fault detection capability. The results demonstrate the potential of our newly proposed techniques in that IQFT can generate the most diverse test cases regarding magnitude, phase, and entanglement, with 66% cell coverage. Comparatively, the Random approach only has 10% cell coverage. Regarding the evaluations of the output coverage, IQFT can achieve the highest output coverage in 70.2% (33 out of 47) of all quantum programs. In terms of fault detection, UCNOT outperforms the other two techniques. Specifically, the test cases generated by UCNOT have the best mutation score in 88.4% (23 out of 26) quantum programs.
@inproceedings{YeXZAMZI23,
title = {QuraTest: Integrating Quantum Specific Features in Quantum Program Testing},
author = {Jiaming Ye and Shangzhou Xia and Fuyuan Zhang and Paolo Arcaini and Lei Ma and Jianjun Zhao and Fuyuki Ishikawa},
booktitle = {ASE},
year = {2023},
doi = {10.1109/ase56229.2023.00196}
}