Mitigating Noise in Quantum Software Testing Using Machine Learning

IF 6.5 1区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Asmar Muqeet;Tao Yue;Shaukat Ali;Paolo Arcaini
{"title":"Mitigating Noise in Quantum Software Testing Using Machine Learning","authors":"Asmar Muqeet;Tao Yue;Shaukat Ali;Paolo Arcaini","doi":"10.1109/TSE.2024.3462974","DOIUrl":null,"url":null,"abstract":"Quantum Computing (QC) promises computational speedup over classic computing. However, noise exists in near-term quantum computers. Quantum software testing (for gaining confidence in quantum software's correctness) is inevitably impacted by noise, i.e., 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 test quantum software on real quantum computers or noisy simulators. Thus, we propose a noise-aware approach (named \n<inline-formula><tex-math>$\\mathit{QOIN}$</tex-math></inline-formula>\n) to alleviate the noise effect on test results of quantum programs. \n<inline-formula><tex-math>$\\mathit{QOIN}$</tex-math></inline-formula>\n employs machine learning techniques (e.g., transfer learning) to learn the noise effect of a quantum computer and filter it from a 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 \n<inline-formula><tex-math>$\\mathit{QOIN}$</tex-math></inline-formula>\n on IBM's 23 noise models, Google's two available noise models, and Rigetti's Quantum Virtual Machine, with six real-world and 800 artificial programs. We also generated faulty versions of these programs to check if a failing test case execution can be determined under noise. Results show that \n<inline-formula><tex-math>$\\mathit{QOIN}$</tex-math></inline-formula>\n can reduce the noise effect by more than \n<inline-formula><tex-math>$80\\%$</tex-math></inline-formula>\n on most noise models. We used an existing test oracle to evaluate \n<inline-formula><tex-math>$\\mathit{QOIN}$</tex-math></inline-formula>\n's effectiveness in quantum software testing. The results showed that \n<inline-formula><tex-math>$\\mathit{QOIN}$</tex-math></inline-formula>\n attained scores of \n<inline-formula><tex-math>$99\\%$</tex-math></inline-formula>\n, \n<inline-formula><tex-math>$75\\%$</tex-math></inline-formula>\n, and \n<inline-formula><tex-math>$86\\%$</tex-math></inline-formula>\n for precision, recall, and F1-score, respectively, for the test oracle across six real-world programs. For artificial programs, \n<inline-formula><tex-math>$\\mathit{QOIN}$</tex-math></inline-formula>\n achieved scores of \n<inline-formula><tex-math>$93\\%$</tex-math></inline-formula>\n, \n<inline-formula><tex-math>$79\\%$</tex-math></inline-formula>\n, and \n<inline-formula><tex-math>$86\\%$</tex-math></inline-formula>\n for precision, recall, and F1-score respectively. This highlights \n<inline-formula><tex-math>$\\mathit{QOIN}$</tex-math></inline-formula>\n's effectiveness in learning noise patterns for noise-aware quantum software testing.","PeriodicalId":13324,"journal":{"name":"IEEE Transactions on Software Engineering","volume":"50 11","pages":"2947-2961"},"PeriodicalIF":6.5000,"publicationDate":"2024-09-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/10682972/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

Quantum Computing (QC) promises computational speedup over classic computing. However, noise exists in near-term quantum computers. Quantum software testing (for gaining confidence in quantum software's correctness) is inevitably impacted by noise, i.e., 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 test quantum software on real quantum computers or noisy simulators. Thus, we propose a noise-aware approach (named $\mathit{QOIN}$ ) to alleviate the noise effect on test results of quantum programs. $\mathit{QOIN}$ employs machine learning techniques (e.g., transfer learning) to learn the noise effect of a quantum computer and filter it from a 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 $\mathit{QOIN}$ on IBM's 23 noise models, Google's two available noise models, and Rigetti's Quantum Virtual Machine, with six real-world and 800 artificial programs. We also generated faulty versions of these programs to check if a failing test case execution can be determined under noise. Results show that $\mathit{QOIN}$ can reduce the noise effect by more than $80\%$ on most noise models. We used an existing test oracle to evaluate $\mathit{QOIN}$ 's effectiveness in quantum software testing. The results showed that $\mathit{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, $\mathit{QOIN}$ achieved scores of $93\%$ , $79\%$ , and $86\%$ for precision, recall, and F1-score respectively. This highlights $\mathit{QOIN}$ 's effectiveness in learning noise patterns for noise-aware quantum software testing.
利用机器学习减少量子软件测试中的噪音
量子计算(QC)的计算速度有望超过传统计算。然而,近期量子计算机中存在噪声。量子软件测试(以获得对量子软件正确性的信心)不可避免地会受到噪声的影响,也就是说,无法知道测试用例失败的原因是噪声还是真正的故障。现有的测试技术在测试量子程序时不考虑噪声,即在理想的量子计算机模拟器上执行测试。因此,这些技术无法直接用于在真实量子计算机或噪声模拟器上测试量子软件。因此,我们提出了一种噪声感知方法(命名为 $\mathit{QOIN}$),以减轻噪声对量子程序测试结果的影响。$\mathit{QOIN}$采用机器学习技术(如迁移学习)来学习量子计算机的噪声效应,并将其从程序输出中过滤掉。过滤后的输出将作为输入,用于执行测试用例评估(根据测试甲骨文确定测试用例执行的通过或失败)。我们在 IBM 的 23 个噪声模型、Google 的两个可用噪声模型和 Rigetti 的量子虚拟机上评估了 $\mathit{QOIN}$,并使用了 6 个真实程序和 800 个人工程序。我们还生成了这些程序的故障版本,以检查在噪声条件下能否确定测试用例执行失败。结果表明,在大多数噪声模型中,$\mathit{QOIN}$ 可以将噪声影响降低 80% 以上。我们使用现有的测试甲骨文来评估 $\mathit{QOIN}$ 在量子软件测试中的有效性。结果显示,$\mathit{QOIN}$在6个真实世界程序中的测试oracle的精确度、召回率和F1分数分别达到了$99\%$、$75\%$和$86\%$。对于人工程序,$\mathit{QOIN}$ 的精确度、召回率和 F1 分数分别达到了 $93\%$、$79\%$ 和 $86\%$。这凸显了 $\mathit{QOIN}$ 在学习噪声模式以进行噪声感知量子软件测试方面的有效性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
IEEE Transactions on Software Engineering
IEEE Transactions on Software Engineering 工程技术-工程:电子与电气
CiteScore
9.70
自引率
10.80%
发文量
724
审稿时长
6 months
期刊介绍: IEEE Transactions on Software Engineering seeks contributions comprising well-defined theoretical results and empirical studies with potential impacts on software construction, analysis, or management. The scope of this Transactions extends from fundamental mechanisms to the development of principles and their application in specific environments. Specific topic areas include: a) Development and maintenance methods and models: Techniques and principles for specifying, designing, and implementing software systems, encompassing notations and process models. b) Assessment methods: Software tests, validation, reliability models, test and diagnosis procedures, software redundancy, design for error control, and measurements and evaluation of process and product aspects. c) Software project management: Productivity factors, cost models, schedule and organizational issues, and standards. d) Tools and environments: Specific tools, integrated tool environments, associated architectures, databases, and parallel and distributed processing issues. e) System issues: Hardware-software trade-offs. f) State-of-the-art surveys: Syntheses and comprehensive reviews of the historical development within specific areas of interest.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信