Detecting Flakiness in Quantum Software: A Dynamic Testing Approach
read the original abstract
Flaky tests, tests that pass or fail nondeterministically without changes to code or environment, pose a serious threat to software reliability. While classical software engineering has developed a rich body of techniques to study flakiness, corresponding evidence for quantum software remains limited. Prior work relies mainly on static analysis or small sets of manually reported incidents, leaving open questions about their prevalence, characteristics, and detectability. This paper presents the first large-scale dynamic characterization of flaky tests in quantum software, focusing on the Qiskit Terra core library. We executed the Qiskit Terra test suite 10,000 times across 23 releases in controlled environments. For each release, we measured test-outcome variability, identified flaky tests, estimated empirical failure probabilities, analyzed recurrence across versions, used Wilson confidence intervals to quantify rerun budgets for reliable detection, and mapped flaky tests to Terra subcomponents. Across 27,026 fully qualified test identifiers, we identified 62 unique flaky tests. Although overall flakiness rates were low (0-0.17%), recurrence was substantial: 52 of 62 flaky tests (83.87%) reappeared in multiple releases, while only 10 tests (16.13%) were confined to a single release. Empirical failure probabilities spanned several orders of magnitude, with a median of $9 \times 10^{-4}$ and 34 tests (54.84%) at or below $10^{-3}$, implying that thousands to tens of thousands of executions may be required for confident detection. These results show that quantum test flakiness is rare but difficult to detect under typical continuous integration budgets. To support future research, we release a public dataset of per-test execution outcomes.
This paper has not been read by Pith yet.
Forward citations
Cited by 2 Pith papers
-
Failure-Guided Fuzzing for Hybrid Quantum-Classical Programs
Failure-guided local fuzzing around non-convergent seeds improves detection of faulty HQC configurations over random testing, with concolic seeding adding workload-dependent benefits on VQE versus QAOA.
-
Bayesian Sequential Verification for Budget-Aware Quantum Program Testing
Bayesian sequential verification reduces measurement costs for quantum programs by updating decisions incrementally using priors from reference runs or ideal simulations, outperforming fixed budgets when success proba...
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.