[论文解读] Mitigating Noise in Quantum Software Testing Using Machine Learning
本文提出 QOIN,一种基于机器学习的方法,通过从 NISQ 量子计算机中学习并过滤噪声模式,以减轻量子软件测试中的噪声影响。利用全连接神经网络进行迁移学习,QOIN 在大多数后端上将噪声影响降低了 80% 以上,通过过滤后的输出实现准确的测试用例评估,结合已发布的测试断言,达到 99% 的精确率、75% 的召回率和 86% 的 F1 分数。
Quantum Computing (QC) promises computational speedup over classic computing for solving complex problems. However, noise exists in current and near-term quantum computers. Quantum software testing (for gaining confidence in quantum software's correctness) is inevitably impacted by noise, to the extent that it is impossible to know if a test case failed due to noise or real faults. Existing testing techniques test quantum programs without considering noise, i.e., by executing tests on ideal quantum computer simulators. Consequently, they are not directly applicable to testing quantum software on real quantum computers or noisy simulators. To this end, we propose a noise-aware approach (named QOIN) to alleviate the noise effect on test results of quantum programs. QOIN employs machine learning techniques (e.g., transfer learning) to learn the noise effect of a quantum computer and filter it from a quantum program's outputs. Such filtered outputs are then used as the input to perform test case assessments (determining the passing or failing of a test case execution against a test oracle). We evaluated QOIN on IBM's 23 noise models, Google's two available noise models, and Rigetti's Quantum Virtual Machine (QVM), with nine real-world quantum programs and 1000 artificial quantum programs. Results show that QOIN can reduce the noise effect by more than $80\%$ on the majority of noise models. For quantum software testing, we used an existing test oracle and showed that QOIN attained scores of $99\%$, $75\%$, and $86\%$ for precision, recall, and F1-score, respectively, for the test oracle across six real-world programs. For artificial programs, QOIN achieved scores of $93\%$, $79\%$, and $86\%$ for precision, recall, and F1-score. This highlights QOIN's effectiveness in learning noise patterns for noise-aware quantum software testing.
研究动机与目标
- 解决当前及近期量子计算机中噪声带来的挑战,该挑战会损害量子软件测试的可靠性。
- 克服现有测试技术依赖理想化、无噪声模拟器的局限,这些技术在真实嘈杂硬件上会失效。
- 通过区分由真实故障引起的失败与由噪声引起的失败,实现在真实 NISQ 设备上对测试用例进行准确评估。
- 开发一种可扩展的、后端特定的噪声过滤机制,利用机器学习适应通用及电路特定的噪声模式。
- 在多种真实世界和模拟的嘈杂后端上,对不同量子程序的有效性进行验证。
提出的方法
- 在基准量子电路的噪声输出上训练全连接神经网络(MLP),以学习特定 NISQ 后端的通用噪声模式。
- 通过在目标程序的噪声输出上微调,应用迁移学习将通用噪声模型适配到特定电路的噪声上。
- 将训练好的特定电路模型用作噪声过滤器,从噪声程序执行中预测出干净输出。
- 将过滤后的输出输入到现有的测试断言中,以评估测试用例的通过/失败状态,从而提高相比未过滤结果的准确性。
- 使用 Qiskit 生成 1000 个多样化的虚拟量子电路,以评估在不同电路结构和深度下的泛化能力。
- 集成一个基线调优模块,当后端噪声特性发生变化时,定期重新训练噪声模型,每对电路-后端的开销约为 14 分钟。
实验结果
研究问题
- RQ1机器学习模型能否有效学习并过滤真实和模拟的 NISQ 后端上量子程序输出中的噪声?
- RQ2与未过滤的测试结果相比,QOIN 在多样化量子程序和后端上减少噪声影响的程度如何?
- RQ3QOIN 在区分由真实软件故障引起的测试失败与由噪声引起的错误方面有多高效?
- RQ4将 QOIN 集成到量子软件测试流程中的计算开销有多大?
- RQ5QOIN 在不同电路结构、深度和多样性标准下的泛化能力如何?
主要发现
- 在所评估的 26 个后端中,QOIN 在大多数后端上将噪声影响降低了 80% 以上,包括 IBM 的 23 种噪声模型、Google 的两种模型以及 Rigetti 的 QVM。
- 结合已发布的测试断言,QOIN 在六个真实世界的量子程序上实现了 99% 的精确率、75% 的召回率和 86% 的 F1 分数,证明了其在故障检测中的高准确性。
- 对于 1000 个自动生成的量子程序,QOIN 实现了 93% 的精确率、79% 的召回率和 86% 的 F1 分数,证实了其在多样化电路类型中的鲁棒性。
- 在 GPU 上,噪声过滤模型的推理时间仅需几秒钟,表明对测试评估的运行时开销极低。
- 基线调优模块平均每对电路-后端耗时约 14 分钟,其中 12 分钟用于数据生成,但该成本在实际 NISQ 硬件上将显著降低。
- 在 Nvidia 3080 GPU 上,基线模型的一次性训练成本平均约为一分钟,尽管存在初始设置开销,但整体方法仍具可行性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。