Table of Contents
Fetching ...

Mitigating Noise in Quantum Software Testing Using Machine Learning

Asmar Muqeet, Tao Yue, Shaukat Ali, Paolo Arcaini

TL;DR

This work tackles the challenge of hardware-induced noise in quantum software testing by introducing QOIN, a noise-aware ML framework that filters noisy quantum outputs to support accurate test assessments. QOIN learns general noise patterns per backend (Baseline Trainer) and then specializes to specific circuits through transfer learning (Baseline Tuner), with a Test Analyzer filtering outputs before applying existing test oracles. Empirical evaluation across 26 backends (IBM, Google, Rigetti) using real-world and 1000 artificial circuits shows substantial noise reduction (often >80%) and significant improvements in test-case assessment metrics (real-world F1 around 0.85–0.86; artificial around 0.85), validating the approach. The results demonstrate the practical potential of ML-driven noise filtering to enhance the reliability of quantum software testing on NISQ devices, while highlighting limitations and directions for future work such as broader backend coverage and real-hardware validation.

Abstract

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.

Mitigating Noise in Quantum Software Testing Using Machine Learning

TL;DR

This work tackles the challenge of hardware-induced noise in quantum software testing by introducing QOIN, a noise-aware ML framework that filters noisy quantum outputs to support accurate test assessments. QOIN learns general noise patterns per backend (Baseline Trainer) and then specializes to specific circuits through transfer learning (Baseline Tuner), with a Test Analyzer filtering outputs before applying existing test oracles. Empirical evaluation across 26 backends (IBM, Google, Rigetti) using real-world and 1000 artificial circuits shows substantial noise reduction (often >80%) and significant improvements in test-case assessment metrics (real-world F1 around 0.85–0.86; artificial around 0.85), validating the approach. The results demonstrate the practical potential of ML-driven noise filtering to enhance the reliability of quantum software testing on NISQ devices, while highlighting limitations and directions for future work such as broader backend coverage and real-hardware validation.

Abstract

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 on the majority of noise models. For quantum software testing, we used an existing test oracle and showed that QOIN attained scores of , , and for precision, recall, and F1-score, respectively, for the test oracle across six real-world programs. For artificial programs, QOIN achieved scores of , , and for precision, recall, and F1-score. This highlights QOIN's effectiveness in learning noise patterns for noise-aware quantum software testing.
Paper Structure (32 sections, 2 equations, 6 figures, 7 tables)

This paper contains 32 sections, 2 equations, 6 figures, 7 tables.

Figures (6)

  • Figure 1: Illustrating three-qubit GHZ state in Qiskit.
  • Figure 2: Overview of $\mathit{QOIN}$. ODR is the Odds ratio for each output; POS is the Probability of success for each output; POF is the Probability of failure for each output.
  • Figure 3: An example configuration file for three baseline circuits.
  • Figure 4: RQ1 (the program aspect) -- Dunn's test results for the real-world benchmarks. The darker blue coloring shows that the magnitude of noise effect reduction in Hellinger Distance is more similar between a pair of programs.
  • Figure 5: RQ1 -- Result of Improved% (see Table \ref{['table:RQ1_distance_backend']}) on the real-world benchmark for 10 runs. Each box plot shows the distribution of percentage improvement achieved by $\mathit{QOIN}$ for each backend for 10 runs.
  • ...and 1 more figures