arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.18088cs.SE
收藏

在量子软件中检测不稳定性:一种动态测试方法

A Large-Scale Dynamic Characterization of Flaky Tests in Quantum Software: The Qiskit Terra Case Study

University of Maryland, Baltimore County(马里兰大学巴尔的摩县分校);Toronto Metropolitan University(多伦多都会大学)

Dongchan Kim, Hamidreza Khoramrokh, Lei Zhang, Andriy Miranskyy

AI总结:

本文通过大规模动态分析量子软件中的不稳定性问题,发现尽管整体不稳定性率较低,但某些测试在多个版本中反复出现,需大量执行才能可靠检测。

摘要:

不稳定的测试是指在没有代码或环境变化的情况下随机通过或失败,对软件可靠性构成严重威胁。尽管经典软件工程已发展出丰富的技术研究不稳定性,但量子软件的相关证据有限。本文首次对量子软件中的不稳定性进行了大规模动态分析,聚焦于Qiskit Terra核心库。我们跨23个版本执行Qiskit Terra测试套件10,000次,在受控环境中进行。对于每个版本,我们测量测试结果的变异性,识别不稳定的测试,估计经验性失败概率,分析版本间的重复性,利用Wilson置信区间量化可靠检测的重跑预算,并将不稳定的测试映射到Terra子组件。在27,026个完整测试标识符中,我们发现了62个独特的不稳定的测试。尽管总体不稳定性率较低(0-0.17%),但重复性显著:62个不稳定的测试中有52个(83.87%)在多个版本中重现,而只有10个测试(16.13%)局限于单一版本。经验性失败概率跨度达多个数量级,中位数为$9 \times 10^{-4}$,34个测试(54.84%)在$10^{-3}$以下,这意味着可能需要数千到数万次执行才能可靠检测。这些结果表明,量子测试不稳定性虽然罕见,但在典型持续集成预算下难以检测。为支持未来研究,我们发布了包含每个测试执行结果的公开数据集。

英文摘要:

Flaky tests, tests that pass or fail nondeterministically without changes to code or environment, pose a threat to software reliability. While classical software engineering has developed a body of techniques to study flakiness, evidence for quantum software remains limited. Prior work relies on static analysis or small sets of manually reported incidents, leaving open questions about their prevalence, characteristics, and detectability. This paper presents a large-scale dynamic characterization of flaky tests in quantum software through a longitudinal case study of 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 baseline rerun budgets, and mapped flaky tests to Terra subcomponents. Across 27,026 qualified test identifiers, we identified 62 unique flaky tests. Although 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. 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 flakiness observed in the studied Terra releases is rare under our controlled protocol but difficult to detect under typical continuous integration budgets. To support future research and replication, we release a dataset of per-test execution outcomes.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑