# Identifying Flaky Tests in Quantum Code: A Machine Learning Approach

arXiv: https://arxiv.org/abs/2502.04471 · HTML: https://mlsanity.com/paper/2502.04471/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 10 of its 31 references that are in the map.
- First posted on arXiv 6 Feb 2025.

## Builds on (most cited first, 10 of 10)

- [XGBoost: A Scalable Tree Boosting System](https://mlsanity.com/paper/1603.02754/) (2016)
- [A Random Forest Guided Tour](https://mlsanity.com/paper/1511.05741/) (2015)
- [Quantum Software Engineering: Landscapes and Horizons](https://mlsanity.com/paper/2007.07047/) (2020)
- [A Qualitative Study on the Sources, Impacts, and Mitigation Strategies of Flaky Tests](https://mlsanity.com/paper/2112.04919/) (2021)
- [Identifying Flakiness in Quantum Programs](https://mlsanity.com/paper/2302.03256/) (2023)
- [Software Engineering for Quantum Programming: How Far Are We?](https://mlsanity.com/paper/2203.16969/) (2022)
- [Automated flakiness detection in quantum software bug reports](https://mlsanity.com/paper/2408.05331/) (2024)
- [An Empirical Study of Flaky Tests in Python](https://mlsanity.com/paper/2101.09077/) (2021)
- [A Survey on How Test Flakiness Affects Developers and What Support They Need To Address It](https://mlsanity.com/paper/2203.00483/) (2022)
- [Automating Quantum Software Maintenance: Flakiness Detection and Root Cause Analysis](https://mlsanity.com/paper/2410.23578/) (2024)

## Built on by (most cited first, 1 of 1)

- [Automating Detection and Root-Cause Analysis of Flaky Tests in Quantum Software](https://mlsanity.com/paper/2603.09029/) (2026)

## Abstract (arXiv)

Testing and debugging quantum software pose significant challenges due to the inherent complexities of quantum mechanics, such as superposition and entanglement. One challenge is indeterminacy, a fundamental characteristic of quantum systems, which increases the likelihood of flaky tests in quantum programs. To the best of our knowledge, there is a lack of comprehensive studies on quantum flakiness in the existing literature. In this paper, we present a novel machine learning platform that leverages multiple machine learning models to automatically detect flaky tests in quantum programs. Our evaluation shows that the extreme gradient boosting and decision tree-based models outperform other models (i.e., random forest, k-nearest neighbors, and support vector machine), achieving the highest F1 score and Matthews Correlation Coefficient in a balanced dataset and an imbalanced dataset, respectively. Furthermore, we expand the currently limited dataset for researchers interested in quantum flaky tests. In the future, we plan to explore the development of unsupervised learning techniques to detect and classify quantum flaky tests more effectively. These advancements aim to improve the reliability and robustness of quantum software testing.
