Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

IEEE Access

Statistical Hypothesis Testing for Efficient Black-Box Quantum Program Testing

Tiancheng Jin, Bo Yang, Haibo Yu, Jianjun Zhao

Published Jan 1, 2026• 0 citations
Publisher

Abstract

Quantum computing offers exponential computational advantages across diverse application domains, yet the inherent probabilistic nature of quantum measurements poses challenges for program testing. Existing quantum black-box testing approaches rely on ad-hoc tolerance checks applied to empirical probability distributions estimated from large measurement samples, often requiring a large number of measurements, because of lacking formal Type I error control, power guarantees, or principled sample size determination. We present a statistical hypothesis-testing method for quantum program testing, encompassing two paradigms: marginal probability testing and joint distribution testing over the full$2^{d}$-dimensional state space. By combining exact and asymptotic tests, bootstrap procedures, sequential designs, and kernel-based two-sample testing, our method provides rigorous error control with substantially improved sample efficiency. Experiments on quantum programs with 2 to 12 qubits show measurement reductions from 97 to 99 percent over the conventional practice of ten thousand shots against strong synthetic faults. A structural mutation study separates the faults that every test detects at one hundred measurements from those that no measurement-based test can detect. The exact marginal test, the exact branch of the sequential design, and the permutation-calibrated joint tests control the Type I error rate at or below the nominal level of 0.05. The adaptive chi-square branch is mildly anticonservative on random states, with a median of 0.060, and conservative on the named benchmarks. On QFT, the sequential design rejects a faulty program with 32 to 85 percent fewer measurements than a properly powered fixed-sample test at two to twelve qubits on its adaptive branch, and with 19 to 60 percent fewer on its exact branch, which is valid under any dependence and reaches the target power from four qubits upward. Power exceeds 0.80 above a characterized fault strength, and faults that preserve the output distribution are shown to be undetectable by any measurement-based test. These results establish a principled and practical foundation for quantum program testing.

DOI
10.1109/access.2026.3746494

Related papers

Faster and Better Quantum Software Testing through Specification Reduction and Projective Measurements

Noah H. Oldfield, Christoph Laaber, Tao Yue +1 more

Quantum computing (QC) promises polynomial and exponential speedups in many domains, such as unstructured search and prime number factoring. However, quantum programs yield probabilistic outputs from exponentially growing distributions and are vulnerable to quantum-specific faults. Existing quantum software testing (QST) approaches treat quantum superpositions as classical distributions. This leads to two major limitations when applied to quantum programs: (1) an exponentially growing sample space distribution and (2) failing to detect quantum-specific faults such as phase flips. To overcome these limitations, we introduce a QST approach, which applies a reduction algorithm to a quantum program specification. The reduced specification alleviates the limitations (1) by enabling faster sampling through quantum parallelism and (2) by performing projective measurements in the mixed Hadamard basis. Our evaluation of 143 quantum programs across four categories demonstrates significant improvements in test runtimes and fault detection with our reduction approach. Average test runtimes improved from 169.9 s to 11.8 s, with notable enhancements in programs with large circuit depths (383.1 s to 33.4 s) and large program specifications (464.8 s to 7.7 s). Furthermore, our approach increases mutation scores from \(54.5\%\) to \(74.7\%\) , effectively detecting phase flip faults that non-reduced specifications miss. These results underline our approach's importance to improve QST efficiency and effectiveness.

arXiv:2405.15450•ACM Transactions on Software Engineering and Methodology•Aug 17, 2025•23 citations

Quantum sequential parameter testing

Simon Morelli, Ricard Ravell Rodríguez, John Calsamiglia +3 more

Sequential strategies in hypothesis testing use a variable number of measurement rounds, allowing a decision to be made as soon as the observed data provide a prescribed level of error tolerance. Although sequential testing is well established for a discrete set of hypotheses, extending this framework to a continuous parameter space poses additional challenges and has remained largely unexplored. In this article, we introduce sequential \textit{parameter testing}, a framework for determining an unknown parameter up to a prescribed tolerance by ruling out sufficiently distant competing values with a target error tolerance. We clarify its operational distinction from conventional parameter estimation and develop sequential tests for continuous families of hypotheses, introducing the \textit{twin-peaks test} as a natural and computationally efficient analog of sequential likelihood-ratio testing. We apply the framework to two paradigmatic quantum tasks: testing the phase and the purity of a qubit. For phase testing, we show numerically that adaptive projective measurements achieve the same average sample cost as collective covariant measurements with a fixed number of copies. For purity testing, local measurements are optimal, and sequential parameter testing yields significant average sample savings over fixed sample-size protocols. Our results establish parameter testing as an operationally meaningful framework for resource-efficient certification tasks involving continuous parameters.

quant-pharXiv:2608.01248•Aug 4, 2026•0 citations

Quantum Sequential Universal Hypothesis Testing

Matteo Zecchin, Osvaldo Simeone, A. K. Ramdas

Quantum hypothesis testing (QHT) concerns the statistical inference of unknown quantum states. In the general setting of composite hypotheses, the goal of QHT is to determine whether an unknown quantum state belongs to one or another of two classes of states based on the measurement of a number of copies of the state. Prior art on QHT with composite hypotheses focused on a fixed-copy two-step protocol, with state estimation followed by an optimized joint measurement. However, this fixed-copy approach may be inefficient, using the same number of copies irrespective of the inherent difficulty of the testing task. To address these limitations, we introduce the quantum sequential universal test (QSUT), a novel framework for sequential QHT in the general case of composite hypotheses. QSUT builds on universal inference, and it alternates between adaptive local measurements aimed at exploring the hypothesis space and joint measurements optimized for maximal discrimination. QSUT is proven to rigorously control the type I error under minimal assumptions about the hypothesis structure. We present two practical instantiations of QSUT, one based on the Helstrom-Holevo test and one leveraging shallow variational quantum circuits. Empirical results across a range of composite QHT tasks demonstrate that QSUT consistently reduces copy complexity relative to state-of-the-art fixed-copy strategies.

arXiv:2508.21594•Aug 29, 2025•7 citations

Bayesian Sequential Verification for Budget-Aware Quantum Program Testing

Lei Zhang

Quantum programs often produce probability distributions rather than deterministic outputs, making verification inherently statistical and increasingly costly on real hardware. In practice, developers still frequently rely on testing with fixed shot budgets on simulators, which are simple but time-consuming and poorly suited to noisy backends. What is missing is a verification approach that is both statistically explicit and budget-aware. This paper formulates Bayesian sequential verification as a reference-based Bayesian hypothesis testing workflow in which priors are derived from explicit reference sources, such as finite-shot reference runs or ideal/statevector-based computation, and verification decisions are updated batch by batch as measurement evidence accumulates. This approach is evaluated in Qiskit on two complementary workloads: Bell-state and QAOA-MaxCut. Across both case studies, the results show that Bayesian sequential verification can substantially reduce measurement costs compared to fixed-budget baselines when the success probability of the program exceeds the target threshold. The findings position Bayesian sequential verification as a practical verification workflow for quantum programs. The approach provides a foundation for future quantum continuous-integration pipelines that require reliable, budget-aware pass/fail decisions and motivates validation on real quantum hardware.

cs.SECross-listedarXiv:2605.15601•May 18, 2026•0 citations

True Randomness or Not? Leveraging Quantum Randomness for Test Input Generation in Quantum Software Testing

Mai-Lise Markeng

This thesis investigated how quantum test inputs can be generated in a more flexible and effective manner, addressing key challenges in quantum software testing related to the probabilistic nature of quantum computation, the size of the quantum state space, and the limitations of existing input generation techniques. To overcome these challenges, a generalized framework for constructing quantum input circuits was developed, supporting multiple generation strategies ranging from purely random single-qubit operations to structured entanglement-based circuits and hybrid combinations of both. The experimental evaluation demonstrated that the combined method that integrates both entanglement and random gate operations consistently achieved the highest fault detection rates across all tested programs. This indicates that hybrid circuit structures are better suited for exploring diverse quantum states and revealing distribution-level faults than methods relying solely on random or solely on entanglement-based constructions. The results also demonstrate the feasibility of using true quantum randomness for test input generation in quantum software testing. Although the evaluated programs were too small to expose clear differences between true quantum randomness and simulated randomness, the study shows that quantum-generated randomness can be practically integrated into the testing process. This provides a foundation for future work investigating its potential advantages for larger and more complex quantum programs. Moreover, our approach significantly outperforms the state-of-the-art approach, indicating its ability to explore the quantum state space more broadly. In addition to demonstrating the effectiveness of the proposed methods, this thesis contributes a unified framework that can serve as a foundation for future benchmarking and methodological development in quantum software testing. By enabling controlled comparisons between different circuit construction principles and randomness sources, the framework helps clarify how various input characteristics influence the ability to detect faults. This contributes to a deeper understanding of how quantum inputs should be designed to maximize test coverage and reliability. Overall, the findings of this thesis highlight the importance of combining structural diversity, entanglement, and randomness when generating quantum test inputs. They also show that true quantum randomness is a viable alternative to classical pseudo-randomness, performing on the same level as simulated methods while offering a more physically grounded source of uncertainty. As quantum hardware continues to evolve, the generalized approach presented here provides a flexible and extensible basis for developing more advanced test generation techniques, including guided search, hardware-aware input generation, and multi-objective optimization. These directions represent promising opportunities for future research aimed at improving the robustness and reliability of quantum software systems.

•May 19, 2026•0 citations

Bayesian Sequential Verification for Budget-Aware Quantum Program Testing

Lei Zhang

Quantum programs often produce probability distributions rather than deterministic outputs, making verification inherently statistical and increasingly costly on real hardware. In practice, developers still frequently rely on testing with fixed shot budgets on simulators, which are simple but time-consuming and poorly suited to noisy backends. What is missing is a verification approach that is both statistically explicit and budget-aware. This paper formulates Bayesian sequential verification as a reference-based Bayesian hypothesis testing workflow in which priors are derived from explicit reference sources, such as finite-shot reference runs or ideal/statevector-based computation, and verification decisions are updated batch by batch as measurement evidence accumulates. This approach is evaluated in Qiskit on two complementary workloads: Bell-state and QAOA-MaxCut. Across both case studies, the results show that Bayesian sequential verification can substantially reduce measurement costs compared to fixed-budget baselines when the success probability of the program exceeds the target threshold. The findings position Bayesian sequential verification as a practical verification workflow for quantum programs. The approach provides a foundation for future quantum continuous-integration pipelines that require reliable, budget-aware pass/fail decisions and motivates validation on real quantum hardware.

•May 15, 2026•0 citations
Quantum computing offers exponential computational advantages across diverse application domains, yet the inherent probabilistic nature of quantum measurements poses challenges for program testing. Existing quantum black-box testing approaches rely on ad-hoc tolerance checks applied to empirical probability distributions estimated from large measurement samples, often requiring a large number of measurements, because of lacking formal Type I error control, power guarantees, or principled sample size determination. We present a statistical hypothesis-testing method for quantum program testing, encompassing two paradigms: marginal probability testing and joint distribution testing over the full2d2^{d}2d-dimensional state space. By combining exact and asymptotic tests, bootstrap procedures, sequential designs, and kernel-based two-sample testing, our method provides rigorous error control with substantially improved sample efficiency. Experiments on quantum programs with 2 to 12 qubits show measurement reductions from 97 to 99 percent over the conventional practice of ten thousand shots against strong synthetic faults. A structural mutation study separates the faults that every test detects at one hundred measurements from those that no measurement-based test can detect. The exact marginal test, the exact branch of the sequential design, and the permutation-calibrated joint tests control the Type I error rate at or below the nominal level of 0.05. The adaptive chi-square branch is mildly anticonservative on random states, with a median of 0.060, and conservative on the named benchmarks. On QFT, the sequential design rejects a faulty program with 32 to 85 percent fewer measurements than a properly powered fixed-sample test at two to twelve qubits on its adaptive branch, and with 19 to 60 percent fewer on its exact branch, which is valid under any dependence and reaches the target power from four qubits upward. Power exceeds 0.80 above a characterized fault strength, and faults that preserve the output distribution are shown to be undetectable by any measurement-based test. These results establish a principled and practical foundation for quantum program testing.
Quantum computing (QC) promises polynomial and exponential speedups in many domains, such as unstructured search and prime number factoring. However, quantum programs yield probabilistic outputs from exponentially growing distributions and are vulnerable to quantum-specific faults. Existing quantum software testing (QST) approaches treat quantum superpositions as classical distributions. This leads to two major limitations when applied to quantum programs: (1) an exponentially growing sample space distribution and (2) failing to detect quantum-specific faults such as phase flips. To overcome these limitations, we introduce a QST approach, which applies a reduction algorithm to a quantum program specification. The reduced specification alleviates the limitations (1) by enabling faster sampling through quantum parallelism and (2) by performing projective measurements in the mixed Hadamard basis. Our evaluation of 143 quantum programs across four categories demonstrates significant improvements in test runtimes and fault detection with our reduction approach. Average test runtimes improved from 169.9 s to 11.8 s, with notable enhancements in programs with large circuit depths (383.1 s to 33.4 s) and large program specifications (464.8 s to 7.7 s). Furthermore, our approach increases mutation scores from 54.5%54.5\%54.5% to 74.7%74.7\%74.7% , effectively detecting phase flip faults that non-reduced specifications miss. These results underline our approach's importance to improve QST efficiency and effectiveness.
Sequential strategies in hypothesis testing use a variable number of measurement rounds, allowing a decision to be made as soon as the observed data provide a prescribed level of error tolerance. Although sequential testing is well established for a discrete set of hypotheses, extending this framework to a continuous parameter space poses additional challenges and has remained largely unexplored. In this article, we introduce sequential \textit{parameter testing}, a framework for determining an unknown parameter up to a prescribed tolerance by ruling out sufficiently distant competing values with a target error tolerance. We clarify its operational distinction from conventional parameter estimation and develop sequential tests for continuous families of hypotheses, introducing the \textit{twin-peaks test} as a natural and computationally efficient analog of sequential likelihood-ratio testing. We apply the framework to two paradigmatic quantum tasks: testing the phase and the purity of a qubit. For phase testing, we show numerically that adaptive projective measurements achieve the same average sample cost as collective covariant measurements with a fixed number of copies. For purity testing, local measurements are optimal, and sequential parameter testing yields significant average sample savings over fixed sample-size protocols. Our results establish parameter testing as an operationally meaningful framework for resource-efficient certification tasks involving continuous parameters.
Quantum hypothesis testing (QHT) concerns the statistical inference of unknown quantum states. In the general setting of composite hypotheses, the goal of QHT is to determine whether an unknown quantum state belongs to one or another of two classes of states based on the measurement of a number of copies of the state. Prior art on QHT with composite hypotheses focused on a fixed-copy two-step protocol, with state estimation followed by an optimized joint measurement. However, this fixed-copy approach may be inefficient, using the same number of copies irrespective of the inherent difficulty of the testing task. To address these limitations, we introduce the quantum sequential universal test (QSUT), a novel framework for sequential QHT in the general case of composite hypotheses. QSUT builds on universal inference, and it alternates between adaptive local measurements aimed at exploring the hypothesis space and joint measurements optimized for maximal discrimination. QSUT is proven to rigorously control the type I error under minimal assumptions about the hypothesis structure. We present two practical instantiations of QSUT, one based on the Helstrom-Holevo test and one leveraging shallow variational quantum circuits. Empirical results across a range of composite QHT tasks demonstrate that QSUT consistently reduces copy complexity relative to state-of-the-art fixed-copy strategies.
Quantum programs often produce probability distributions rather than deterministic outputs, making verification inherently statistical and increasingly costly on real hardware. In practice, developers still frequently rely on testing with fixed shot budgets on simulators, which are simple but time-consuming and poorly suited to noisy backends. What is missing is a verification approach that is both statistically explicit and budget-aware. This paper formulates Bayesian sequential verification as a reference-based Bayesian hypothesis testing workflow in which priors are derived from explicit reference sources, such as finite-shot reference runs or ideal/statevector-based computation, and verification decisions are updated batch by batch as measurement evidence accumulates. This approach is evaluated in Qiskit on two complementary workloads: Bell-state and QAOA-MaxCut. Across both case studies, the results show that Bayesian sequential verification can substantially reduce measurement costs compared to fixed-budget baselines when the success probability of the program exceeds the target threshold. The findings position Bayesian sequential verification as a practical verification workflow for quantum programs. The approach provides a foundation for future quantum continuous-integration pipelines that require reliable, budget-aware pass/fail decisions and motivates validation on real quantum hardware.
This thesis investigated how quantum test inputs can be generated in a more flexible and effective manner, addressing key challenges in quantum software testing related to the probabilistic nature of quantum computation, the size of the quantum state space, and the limitations of existing input generation techniques. To overcome these challenges, a generalized framework for constructing quantum input circuits was developed, supporting multiple generation strategies ranging from purely random single-qubit operations to structured entanglement-based circuits and hybrid combinations of both. The experimental evaluation demonstrated that the combined method that integrates both entanglement and random gate operations consistently achieved the highest fault detection rates across all tested programs. This indicates that hybrid circuit structures are better suited for exploring diverse quantum states and revealing distribution-level faults than methods relying solely on random or solely on entanglement-based constructions. The results also demonstrate the feasibility of using true quantum randomness for test input generation in quantum software testing. Although the evaluated programs were too small to expose clear differences between true quantum randomness and simulated randomness, the study shows that quantum-generated randomness can be practically integrated into the testing process. This provides a foundation for future work investigating its potential advantages for larger and more complex quantum programs. Moreover, our approach significantly outperforms the state-of-the-art approach, indicating its ability to explore the quantum state space more broadly. In addition to demonstrating the effectiveness of the proposed methods, this thesis contributes a unified framework that can serve as a foundation for future benchmarking and methodological development in quantum software testing. By enabling controlled comparisons between different circuit construction principles and randomness sources, the framework helps clarify how various input characteristics influence the ability to detect faults. This contributes to a deeper understanding of how quantum inputs should be designed to maximize test coverage and reliability. Overall, the findings of this thesis highlight the importance of combining structural diversity, entanglement, and randomness when generating quantum test inputs. They also show that true quantum randomness is a viable alternative to classical pseudo-randomness, performing on the same level as simulated methods while offering a more physically grounded source of uncertainty. As quantum hardware continues to evolve, the generalized approach presented here provides a flexible and extensible basis for developing more advanced test generation techniques, including guided search, hardware-aware input generation, and multi-objective optimization. These directions represent promising opportunities for future research aimed at improving the robustness and reliability of quantum software systems.
Quantum programs often produce probability distributions rather than deterministic outputs, making verification inherently statistical and increasingly costly on real hardware. In practice, developers still frequently rely on testing with fixed shot budgets on simulators, which are simple but time-consuming and poorly suited to noisy backends. What is missing is a verification approach that is both statistically explicit and budget-aware. This paper formulates Bayesian sequential verification as a reference-based Bayesian hypothesis testing workflow in which priors are derived from explicit reference sources, such as finite-shot reference runs or ideal/statevector-based computation, and verification decisions are updated batch by batch as measurement evidence accumulates. This approach is evaluated in Qiskit on two complementary workloads: Bell-state and QAOA-MaxCut. Across both case studies, the results show that Bayesian sequential verification can substantially reduce measurement costs compared to fixed-budget baselines when the success probability of the program exceeds the target threshold. The findings position Bayesian sequential verification as a practical verification workflow for quantum programs. The approach provides a foundation for future quantum continuous-integration pipelines that require reliable, budget-aware pass/fail decisions and motivates validation on real quantum hardware.