Mitigating Noise in Quantum Software Testing Using Machine Learning
Asmar Muqeet,Tao Yue,Shaukat Ali,Paolo Arcaini
DOI: https://doi.org/10.1109/tse.2024.3462974
2023-01-01
Abstract:Quantum Computing (QC) promises computational speedup over classic computingfor solving complex problems. However, noise exists in current and near-termquantum computers. Quantum software testing (for gaining confidence in quantumsoftware's correctness) is inevitably impacted by noise, to the extent that itis 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 quantumcomputers 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 thenoise effect of a quantum computer and filter it from a quantum program'soutputs. Such filtered outputs are then used as the input to perform test caseassessments (determining the passing or failing of a test case executionagainst a test oracle). We evaluated QOIN on IBM's 23 noise models, Google'stwo available noise models, and Rigetti's Quantum Virtual Machine (QVM), withnine real-world quantum programs and 1000 artificial quantum programs. Resultsshow that QOIN can reduce the noise effect by more than 80% on the majorityof noise models. For quantum software testing, we used an existing test oracleand showed that QOIN attained scores of 99%, 75%, and 86% forprecision, recall, and F1-score, respectively, for the test oracle across sixreal-world programs. For artificial programs, QOIN achieved scores of 93%,79%, and 86% for precision, recall, and F1-score. This highlights QOIN'seffectiveness in learning noise patterns for noise-aware quantum softwaretesting.