{"title":"利用机器学习减少量子软件测试中的噪音","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":"{\"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}","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}
Mitigating Noise in Quantum Software Testing Using Machine Learning
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.
期刊介绍:
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.