pith. sign in

arxiv: 2506.10348 · v1 · submitted 2025-06-12 · 🪐 quant-ph

Context-Aware Unit Testing for Quantum Subroutines

Pith reviewed 2026-05-19 10:21 UTC · model grok-4.3

classification 🪐 quant-ph
keywords quantum unit testingparametrized quantum channelsprobabilistic assertionscontext-aware testingquantum software engineeringGHZ stateShor's algorithmquantum tomography
0
0 comments X

The pith

Quantum subroutines become practically testable by modeling them as parametrized quantum channels and adding context-awareness to limit the states that must be checked.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The paper shows that quantum software testing faces special difficulties from non-determinism, large Hilbert spaces, and noise. It models each subroutine as a parametrized quantum channel and builds unit tests from probabilistic assertions checked either by tomography or by classical statistical tests. Context-awareness is introduced so that the tester only examines the states and inputs relevant to the current usage, cutting the number of cases that must be run. The method is worked out on a three-qubit circuit that prepares a GHZ state and on selected subroutines inside an implementation of Shor's algorithm, where the accuracy-coverage-efficiency trade-offs are measured.

Core claim

Modeling a quantum subroutine as a parametrized quantum channel and equipping the test harness with context-aware probabilistic assertions makes it possible to create unit tests whose required state-space coverage is smaller than exhaustive tomography while still detecting the errors that matter for the intended use.

What carries the argument

Parametrized quantum channels equipped with context-aware probabilistic assertions: the channel description lets the tester treat the subroutine as a black-box map, while the context filter restricts the assertion checks to the inputs and output statistics that are active in the surrounding program.

If this is right

  • Unit tests for quantum subroutines no longer require enumerating the entire 2^n state space.
  • Context filters can be reused across different hardware back-ends as long as the logical context stays the same.
  • Statistical tests become sufficient for many subroutines once the context has narrowed the expected output distribution.
  • The same framework supplies quantitative trade-off curves between test accuracy and number of shots needed.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • Development tools could automatically extract context from the calling code and generate the corresponding test harness.
  • The approach may extend to variational quantum algorithms where the context is defined by the current parameter values.
  • Error models derived from hardware calibration data could be folded into the context to make the assertions hardware-aware.

Load-bearing premise

Context can be defined sharply enough that restricting tests to it still catches the faults a full-space test would find.

What would settle it

Apply the context-aware tester and a full tomography tester to the same three-qubit GHZ preparation routine; if the context-aware version misses a fault that the full test detects, or if its run time does not drop by at least a factor of two while keeping detection rate above 90 percent, the central claim is falsified.

Figures

Figures reproduced from arXiv: 2506.10348 by Bahar Goldozian, Liming Zhu, Muhammad Usman, Mykhailo Klymenko, Qinghua Lu, Samuel A. Wilkinson, Suyu Ma, Thong Hoang, Xiwei Xu.

Figure 1
Figure 1. Figure 1: (a) Circuit diagram of a general quantum subroutine with both classical and quantum inputs, θ and ρin, and classical and quantum outputs, O and ρout. The classical input and output are vectors of real numbers. (b) Circuit diagram of a quantum unit test program composed of the quantum channel Φpre, which prepares the initial state ρin; the quantum channel Φθ, representing formally quantum logic of the speci… view at source ↗
Figure 2
Figure 2. Figure 2: Relationships between quantum program lifecycle phases and concepts of quantum information theory. Definition 2.2 (Quantum computing process) A quantum computing process Π′ is the instance of the quantum program Π that has been deployed and is being executed on a quantum computer characterised by some decoherence rate and noise introducing modifications into the specified quantum channel, Φθ 7→ Φ ′ θ : X Φ… view at source ↗
Figure 3
Figure 3. Figure 3: Experiments have been conducted on a simulator replicating 27 qubit IBM backend ibm sydney. experiments were carried out using a simulator called FakeSydneyV2 [58], which is part of the Qiskit classes library [59] from IBM. This simulator replicates the IBM backend provided by 27-qubit IBM quantum processing unit ibm sydney with the connectivity of qubits shown in [PITH_FULL_IMAGE:figures/full_fig_p016_3.png] view at source ↗
Figure 4
Figure 4. Figure 4: Samples of source codes written in OpenQASM 3.0 language and corresponding quantum circuit diagrams for three quantum subroutines under testing: (a) the correct three-qubit quantum program, (b) the program with a mutated qubit index for the Hadamard gate, (c) a mutated gate specification (an identity gate instead of a phase shift gate), and d) extra two-qubit gate. contextual information. Indeed, we can ea… view at source ↗
Figure 5
Figure 5. Figure 5: Dependence of the probabilistic assertion outcome on number of measurements without contextual information based on the quantum process tomography (panels a and c) and with contextual information based on the quantum state tomography (panels b and d). The experiments have been conducted for the noise-less environment (panels a and b) and in the presence of noise (panels c and d). Note that the ground truth… view at source ↗
Figure 6
Figure 6. Figure 6: Circuit diagram of a quantum program that implements the phase estimation algorithm, which is a key component of Shor’s algorithm (here Subroutine 1 implements a parameterized unitary rotation, while Subroutine 2 performs the inverse quantum Fourier transform). The quantum channels Φpre and Φmeas are only applied during testing. previous case when quantum state tomography was applied to a three-qubit subro… view at source ↗
Figure 7
Figure 7. Figure 7: Dependence of the probabilistic assertion outcome on number of shots for a correct implementation of Subroutine 1. The assertion has been evaluated using the testing protocol based on the quantum state tomography. The results are obtained for a noise-free environment (solid line) and with noise models (dashed lines). The numbers at the curves indicate the noise models used in the simulations: 1 represents … view at source ↗
Figure 8
Figure 8. Figure 8: Dependence of the probabilistic assertion outcome on number of shots for a correct implementation of Subroutine 2. The assertion has been evaluated using the testing protocol based on the Pearson’s χ 2 test and p-value. The results are obtained for a noise-free environment (solid line) and with noise model from ibm sydney (dashed line). is by initializing all qubits in the input quantum register to zero an… view at source ↗
Figure 9
Figure 9. Figure 9: Trade-offs between state space coverage, accuracy, time, and cost efficiency for different quantum unit testing protocols. The diagrams also show the big-O￾notation for asymptotic complexity (in terms of number of measurements) as a function of n = N · α, where N is a number of qubits and α is a number of shots. written in a simple imperative programming language. The key notion of this formal system is a … view at source ↗
Figure 1
Figure 1. Figure 1: Source code for Subroutine 1 This representation was chosen for its compactness achieved by high-level abstractions offered by the programming language. While this code can be translated into QASM instructions or circuit diagrams, such representations would require many lines of text due to the large number of primitive instructions/gates. Ultimately, the specific set of instructions for this subroutine is… view at source ↗
Figure 2
Figure 2. Figure 2: Source code for Subroutine 2 [PITH_FULL_IMAGE:figures/full_fig_p031_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: Circuit diagram of the library function QTF implementing the inverse quantum Fourier transform For the reference, we also show the circuit diagram for the QFT function from the Qiskit library in [PITH_FULL_IMAGE:figures/full_fig_p032_3.png] view at source ↗
Figure 4
Figure 4. Figure 4: Expected (orange line) vs. experimentally obtained (blue line) counts per quantum state, shown without noise (left panels) and with noise (right panels). Each row of panels corresponds to an increasing number of shots: 101 , 102 , 103 , 104 , 105 , from top to bottom [PITH_FULL_IMAGE:figures/full_fig_p033_4.png] view at source ↗
read the original abstract

Software testing is a critical component of the classical software development lifecycle, and this principle is expected to hold true for quantum software as it evolves toward large-scale production and adherence to industry standards. Developing and testing quantum software presents unique challenges due to the non-deterministic nature of quantum information, the high dimensionality of the underlying Hilbert space, complex hardware noise, and the inherent non-local properties of quantum systems. In this work, we model quantum subroutines as parametrized quantum channels and explore the feasibility of creating practical unit tests using probabilistic assertions, combined with either quantum tomography or statistical tests. To address the computational complexity associated with unit testing in quantum systems, we propose incorporating context-awareness into the testing process. The trade-offs between accuracy, state space coverage, and efficiency associated with the proposed theoretical framework for quantum unit testing have been demonstrated through its application to a simple three-qubit quantum subroutine that prepares a Greenberger-Horne-Zeilinger state, as well as to subroutines within a program implementing Shor's algorithm.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 1 minor

Summary. The paper proposes modeling quantum subroutines as parametrized quantum channels and creating unit tests via probabilistic assertions combined with quantum tomography or statistical tests. To mitigate the exponential complexity of quantum state spaces, it introduces context-awareness (defined via local observables or reduced density matrices on subsystems) and demonstrates the resulting trade-offs in accuracy, coverage, and efficiency on a three-qubit GHZ-state preparation subroutine and on subroutines drawn from an implementation of Shor's algorithm.

Significance. If the informal notion of context can be equipped with a formal selection criterion and detection-power guarantees, the framework would supply a practical route to unit testing quantum software that respects non-determinism and non-locality; the reliance on standard quantum-information primitives (channels, tomography, statistical tests) is a clear strength and positions the work as a useful starting point for quantum software-engineering research.

major comments (2)
  1. [Context-awareness proposal] The section introducing context-awareness supplies only an informal description (local observables or reduced density matrices on a chosen subsystem) and contains no theorem, algorithm, or quantitative bound showing that the chosen context preserves detection power for non-local errors. This omission is load-bearing for the central claim that context-awareness meaningfully reduces state-space coverage while retaining sufficient accuracy, especially for the Shor-subroutine example where phase errors can reside in global superpositions.
  2. [Demonstrations] In the GHZ and Shor demonstration sections the manuscript reports no quantitative results, error bars, false-negative rates, or derivation details supporting the claimed feasibility and trade-offs; without these data the degree to which the examples validate the overall approach cannot be assessed.
minor comments (1)
  1. [Abstract] The abstract states that trade-offs 'have been demonstrated' yet the text remains at a high-level conceptual stage; adding a short table or paragraph summarizing the concrete metrics (e.g., number of measurements, observed error rates) would improve clarity.

Simulated Author's Rebuttal

2 responses · 0 unresolved

We thank the referee for the constructive comments and the positive assessment of the work's potential contribution to quantum software engineering. Below we respond point by point to the major comments, indicating the changes we will make in the revised manuscript.

read point-by-point responses
  1. Referee: [Context-awareness proposal] The section introducing context-awareness supplies only an informal description (local observables or reduced density matrices on a chosen subsystem) and contains no theorem, algorithm, or quantitative bound showing that the chosen context preserves detection power for non-local errors. This omission is load-bearing for the central claim that context-awareness meaningfully reduces state-space coverage while retaining sufficient accuracy, especially for the Shor-subroutine example where phase errors can reside in global superpositions.

    Authors: We agree that the presentation of context-awareness would benefit from greater formality. The manuscript currently introduces the notion via local observables and reduced density matrices on selected subsystems to illustrate how testers can focus on relevant parts of the state space. In the revision we will add an explicit definition of a context as a pair consisting of a subsystem and a set of local observables, together with a proposition that bounds the probability of missing errors whose support intersects the chosen context. We acknowledge that universal detection guarantees for arbitrary global errors cannot be given without further restrictions on context selection; our framework instead relies on the tester choosing contexts aligned with the subroutine specification. For the Shor subroutines we will clarify that the selected registers capture the phase information relevant to the modular exponentiation and inverse QFT steps. revision: yes

  2. Referee: [Demonstrations] In the GHZ and Shor demonstration sections the manuscript reports no quantitative results, error bars, false-negative rates, or derivation details supporting the claimed feasibility and trade-offs; without these data the degree to which the examples validate the overall approach cannot be assessed.

    Authors: We accept that the demonstration sections require additional quantitative support. The current text emphasizes conceptual feasibility and qualitative trade-offs between accuracy, coverage, and efficiency. In the revised manuscript we will report numerical results from repeated executions, including error bars on success probabilities, measured false-negative rates for the probabilistic assertions, and explicit descriptions of the statistical tests and tomography procedures used for both the three-qubit GHZ preparation and the Shor subroutines. revision: yes

Circularity Check

0 steps flagged

No circularity: forward proposal built on standard quantum primitives

full rationale

The manuscript models quantum subroutines as parametrized channels, introduces probabilistic assertions, and proposes context-awareness as a heuristic to limit state-space coverage. These steps are presented as a new engineering framework demonstrated on GHZ and Shor examples using tomography and statistical tests. No equation or claim reduces by construction to a fitted parameter taken from the same data, no self-citation is invoked as a uniqueness theorem, and the central definitions (context as local observables or reduced density matrices) are introduced explicitly rather than smuggled in. The derivation chain is therefore self-contained against external quantum-information benchmarks.

Axiom & Free-Parameter Ledger

0 free parameters · 1 axioms · 0 invented entities

The central proposal rests on the domain assumption that quantum subroutines admit a useful parametrization as quantum channels and that context can be meaningfully specified to prune the test space; no free parameters or invented entities are visible in the abstract.

axioms (1)
  • domain assumption Quantum subroutines can be modeled as parametrized quantum channels
    This modeling step is explicitly adopted in the abstract as the foundation for the testing framework.

pith-pipeline@v0.9.0 · 5733 in / 1262 out tokens · 78968 ms · 2026-05-19T10:21:04.448574+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Lean theorems connected to this paper

Citations machine-checked in the Pith Canon. Every link opens the source theorem in the public Lean library.

What do these tags mean?
matches
The paper's claim is directly supported by a theorem in the formal canon.
supports
The theorem supports part of the paper's argument, but the paper may add assumptions or extra steps.
extends
The paper goes beyond the formal theorem; the theorem is a base layer rather than the whole result.
uses
The paper appears to rely on the theorem as machinery.
contradicts
The paper's claim conflicts with a theorem or certificate in the canon.
unclear
Pith found a possible connection, but the passage is too broad, indirect, or ambiguous to say the theorem truly supports the claim.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. A Methodological Analysis of Empirical Studies in Quantum Software Testing

    quant-ph 2026-01 accept novelty 7.0

    A systematic analysis of 59 quantum software testing empirical studies reveals highly diverse designs, inconsistent reporting, and open methodological challenges, leading to recommendations for future work.

Reference graph

Works this paper leans on

81 extracted references · 81 canonical work pages · cited by 1 Pith paper · 5 internal anchors

  1. [1]

    or assessing of average fidelity for Clifford gates on a 7-qubit quantum processor [13]. However, as quantum software systems scale up and quantum hardware becomes increasingly reliable, we anticipate a shift in focus toward addressing human-related errors, as these are expected to persist regardless of advancements in technology. Today, a growing body of...

  2. [2]

    arrange-act- assert

    Method 2.1. Quantum subroutine as a specification of a parametrized quantum channel To fully leverage the power of quantum information theory for unit testing, we define quantum subroutines and quantum unit tests using fundamental notions of this theory, such as quantum channels, quantum state space, etc. A source code of a quantum program written in a lo...

  3. [3]

    Choi matrix, Pauli transfer matrix, Kraus matrix, etc

    O 24n (CX = X, CY = Y), no context required. Choi matrix, Pauli transfer matrix, Kraus matrix, etc. State tomography

  4. [4]

    Density matrices Classical shadow tomography

    O 22n (CX = {ρin} ⊂ X, CY = Y), the input state is fixed or there are few possible input states. Density matrices Classical shadow tomography

  5. [5]

    Classical shadows, observables Statistical tests (Pearson’s χ2)

    O log M ε2 (CX = {ρin} ⊂ X, CY = {tr (Ojρ)}), where Oj is an element from the set of M observables, and ε is precision. Classical shadows, observables Statistical tests (Pearson’s χ2)

  6. [6]

    Statistical characteristics of a quantum state, e.g

    O(n) (CX = {ρin} ⊂ X, CY = {tr (Oρ)}), where O is the operator corresponding to the projective measurements in the computational basis set. Statistical characteristics of a quantum state, e.g. expectation value, degree of entanglement, superposition Single shot measurement (classical assertions) O(N) (CX = {ρin} ⊂ X, CY = {tr (Oρ)} ⊂ { 0, 1}), where O is ...

  7. [7]

    This assumption further simplifies equation (15): Pr(A | Bn) ≈ Pr (A[ρ = ρBn] | ρBn, Bn)

    proposes using a normalized uniform integration measure as the prior – by setting Context-Aware Unit Testing for Quantum Subroutines 13 Pr (ρ) = 1 – in cases where no prior information about the distribution of quantum states is available. This assumption further simplifies equation (15): Pr(A | Bn) ≈ Pr (A[ρ = ρBn] | ρBn, Bn) . (16) From here on in this ...

  8. [8]

    Input scope: Defines the subspace of the input density matrix space and the possible input parameter values if any

  9. [9]

    Output usage: Concerns how the output states will be utilized within the software

  10. [10]

    Each type of contextual information can be either deterministic or probabilistic

    General context: Includes other types of contextual information, such as the probability of the user making certain types of errors. Each type of contextual information can be either deterministic or probabilistic. In this work, we focus solely on the deterministic contextual information, particularly on the input scope and output usage, hereafter referre...

  11. [11]

    Results 3.1. Experimental setup In this section, we conduct a series of numerical experiments to gather empirical data on the performance of different testing protocols and to examine how the test results depend on the number of measurements and the available contextual information. All Context-Aware Unit Testing for Quantum Subroutines 16 0 1 4 7 10 12 1...

  12. [12]

    arrange-act-assert

    Discussion 4.1. Answers to the research questions Here, we briefly summarize the answers to the research questions addressed in this study. RQ1: Quantum subroutines, as well as quantum programs, can be modeled as parametrized quantum channels, which enables the use of quantum process tomography and quantum state tomography to verify their expected functio...

  13. [13]

    The choice of a particular protocol depends on the requirements for accuracy, available computational resources (classical and quantum), and accessible contextual information

    Conclusion In this work, we propose a unified theoretical framework for unit testing quantum subroutines that integrates a range of testing protocols, such as quantum process tomography, quantum state tomography, Pearson’s χ2 test, and others. The choice of a particular protocol depends on the requirements for accuracy, available computational resources (...

  14. [14]

    https://www.ibm.com/quantum/technology

  15. [15]

    Long P and Zhao J 2024 ACM Trans. Softw. Eng. Methodol. 33 ISSN 1049-331X URL https: //doi.org/10.1145/3656339

  16. [16]

    Klymenko M, Hoang T, Xu X, Xing Z, Usman M, Lu Q and Zhu L 2025 Journal of Systems and Software 227 112456 ISSN 0164-1212 URL https://www.sciencedirect.com/science/ article/pii/S0164121225001244

  17. [17]

    Cross A, Javadi-Abhari A, Alexander T, De Beaudrap N, Bishop L S, Heidel S, Ryan C A, Sivarajah P, Smolin J, Gambetta J M and Johnson B R 2022 ACM Transactions on Quantum Computing 3 URL https://doi.org/10.1145/3505636

  18. [18]

    https://openqasm.com/language/subroutines.html

  19. [19]

    Nielsen M A and Chuang I L 2010 Quantum Computation and Quantum Information: 10th Anniversary Edition (Cambridge University Press)

  20. [20]

    Huang Y and Martonosi M 2019 Statistical assertions for validating patterns and finding bugs in quantum programs Proceedings of the 46th International Symposium on Computer Architecture ISCA ’19 (New York, NY, USA: Association for Computing Machinery) p 541–553 ISBN 9781450366694 URL https://doi.org/10.1145/3307650.3322213

  21. [21]

    Zimmerman N A 1969 System integration as a programming function Proceedings of the 1969 24th National Conference ACM ’69 (New York, NY, USA: Association for Computing Machinery) p 459–467 ISBN 9781450374934 URL https://doi.org/10.1145/800195.805951

  22. [22]

    Zhu H, Hall P A and May J H 1997 Acm computing surveys (csur) 29 366–427

  23. [23]

    Daka E and Fraser G 2014 A survey on unit testing practices and problems 2014 IEEE 25th International Symposium on Software Reliability Engineering (IEEE) pp 201–211

  24. [24]

    Hamill P 2004 Unit test frameworks: tools for high-quality software development (” O’Reilly Media, Inc.”)

  25. [25]

    Tanttu T, Lim W H, Huang J Y, Dumoulin Stuyck N, Gilbert W, Su R Y, Feng M, Cifuentes J D, Seedhouse A E, Seritan S K, Ostrove C I, Rudinger K M, Leon R C C, Huang W, Escott C C, Itoh K M, Abrosimov N V, Pohl H J, Thewalt M L W, Hudson F E, Blume-Kohout R, Bartlett S D, Morello A, Laucht A, Yang C H, Saraiva A and Dzurak A S 2024 Nature Physics 20 1804–18...

  26. [26]

    Lu D, Li H, Trottier D A, Li J, Brodutch A, Krismanich A P, Ghavami A, Dmitrienko G I, Context-Aware Unit Testing for Quantum Subroutines 26 Long G, Baugh J and Laflamme R 2015 Phys. Rev. Lett. 114(14) 140505 URL https: //link.aps.org/doi/10.1103/PhysRevLett.114.140505

  27. [27]

    Weder B, Barzen J, Leymann F, Salm M and Vietz D 2020 The quantum software lifecycle Proceedings of the 1st ACM SIGSOFT International Workshop on Architectures and Paradigms for Engineering Quantum Software APEQS 2020 (New York, NY, USA: Association for Computing Machinery) p 2–9 ISBN 9781450381000 URL https://doi.org/10.1145/3412451. 3428497

  28. [28]

    Weder B, Barzen J, Leymann F and Vietz D 2022 Quantum Software Development Lifecycle (Cham: Springer International Publishing) pp 61–83 ISBN 978-3-031-05324-5 URL https: //doi.org/10.1007/978-3-031-05324-5_4

  29. [29]

    Dwivedi K, Haghparast M and Mikkonen T 2024 Cluster Computing 27 7127–7145 ISSN 1573-7543 URL https://doi.org/10.1007/s10586-024-04362-1

  30. [30]

    Wilde M M 2013 Quantum Information Theory (Cambridge University Press)

  31. [31]

    Watrous J 2018 The Theory of Quantum Information (Cambridge University Press) ISBN 9781107180567 URL https://books.google.com.au/books?id=GRNSDwAAQBAJ

  32. [32]

    Metwalli S A and Van Meter R 2024 IEEE Transactions on Quantum Engineering 5 1–15

  33. [33]

    Chuang I L and Nielsen M A 1997 Journal of Modern Optics 44 2455–2467

  34. [34]

    D’Ariano G M and Lo Presti P 2001 Phys. Rev. Lett. 86(19) 4195–4198 URL https://link.aps. org/doi/10.1103/PhysRevLett.86.4195

  35. [35]

    Aaronson S 2018 Shadow tomography of quantum states Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing STOC 2018 (New York, NY, USA: Association for Computing Machinery) p 325–338 ISBN 9781450355599 URL https://doi.org/10.1145/ 3188745.3188802

  36. [36]

    Huang H Y, Kueng R and Preskill J 2020 Nature Physics 16 1050–1057 ISSN 1745-2481 URL https://doi.org/10.1038/s41567-020-0932-7

  37. [37]

    Smith R S, Curtis M J and Zeng W J 2016 arXiv preprint arXiv:1608.03355

  38. [38]

    https://docs.quantum.ibm.com/guides/classical-feedforward-and-control-flow

  39. [39]

    Sakaguchi A, Konno S, Hanamura F, Asavanant W, Takase K, Ogawa H, Marek P, Filip R, Yoshikawa J i, Huntington E, Yonezawa H and Furusawa A 2023 Nature Communications 14 3817 ISSN 2041-1723 URL https://doi.org/10.1038/s41467-023-39195-w

  40. [40]

    Cross A W, Bishop L S, Smolin J A and Gambetta J M 2017 arXiv preprint arXiv:1707.03429

  41. [41]

    Long P and Zhao J 2024 Journal of Systems and Software 211 112000 ISSN 0164-1212 URL https://www.sciencedirect.com/science/article/pii/S0164121224000438

  42. [42]

    Ying M 2012 ACM Trans. Program. Lang. Syst. 33 ISSN 0164-0925 URL https://doi.org/10. 1145/2049706.2049708

  43. [43]

    ACM Program

    Li G, Zhou L, Yu N, Ding Y, Ying M and Xie Y 2020 Proc. ACM Program. Lang. 4 URL https://doi.org/10.1145/3428218

  44. [44]

    au/books?id=KisNzwEACAAJ

    Okken B 2022 Python Testing with Pytest: Simple, Rapid, Effective, and Scalable Pragmatic programmers (Pragmatic Bookshelf) ISBN 9781680509427 URL https://books.google.com. au/books?id=KisNzwEACAAJ

  45. [45]

    Ali S, Arcaini P, Wang X and Yue T 2021 Assessing the effectiveness of input and output coverage criteria for testing quantum programs2021 14th IEEE Conference on Software Testing, Verification and Validation (ICST) pp 13–23

  46. [46]

    Wang X, Arcaini P, Yue T and Ali S 2022 Quito: a coverage-guided test generator for quantum programs Proceedings of the 36th IEEE/ACM International Conference on Automated Software Engineering ASE ’21 (IEEE Press) p 1237–1241 ISBN 9781665403375 URL https://doi.org/ 10.1109/ASE51524.2021.9678798

  47. [47]

    Mohseni M, Rezakhani A T and Lidar D A 2008 Phys. Rev. A 77(3) 032322 URL https: //link.aps.org/doi/10.1103/PhysRevA.77.032322

  48. [48]

    Paris M and Rehacek J 2004 Quantum State Estimation Lecture Notes in Physics (Springer Berlin Heidelberg) ISBN 9783540223290 URL https://books.google.com.au/books?id= Context-Aware Unit Testing for Quantum Subroutines 27 Grr25VFtGgUC

  49. [49]

    James D F V, Kwiat P G, Munro W J and White A G 2001 Phys. Rev. A 64(5) 052312 URL https://link.aps.org/doi/10.1103/PhysRevA.64.052312

  50. [50]

    Hantzko L, Binkowski L and Gupta S 2024 arXiv preprint arXiv:2411.00526

  51. [51]

    Gelman A, Carlin J, Stern H, Dunson D, Vehtari A and Rubin D 2013 Bayesian Data Analysis, Third Edition Chapman & Hall/CRC Texts in Statistical Science (Taylor & Francis) ISBN 9781439840955 URL https://books.google.com.au/books?id=ZXL6AQAAQBAJ

  52. [52]

    Granade C, Combes J and Cory D G 2016 New Journal of Physics 18 033024 URL https: //dx.doi.org/10.1088/1367-2630/18/3/033024

  53. [53]

    Lukens J M, Law K J H, Jasra A and Lougovski P 2020 New Journal of Physics 22 063038 URL https://dx.doi.org/10.1088/1367-2630/ab8efa

  54. [54]

    Smolin J A, Gambetta J M and Smith G 2012 Phys. Rev. Lett. 108(7) 070502 URL https: //link.aps.org/doi/10.1103/PhysRevLett.108.070502

  55. [55]

    Christandl M and Renner R 2012 Phys. Rev. Lett. 109(12) 120403 URL https://link.aps.org/ doi/10.1103/PhysRevLett.109.120403

  56. [56]

    Faist P and Renner R 2016 Phys. Rev. Lett. 117(1) 010404 URL https://link.aps.org/doi/ 10.1103/PhysRevLett.117.010404

  57. [57]

    Wang J, Scholz V B and Renner R 2019 Phys. Rev. Lett. 122(19) 190401 URL https://link. aps.org/doi/10.1103/PhysRevLett.122.190401

  58. [58]

    de Gois C and Kleinmann M 2024 Phys. Rev. A 109(6) 062417 URL https://link.aps.org/ doi/10.1103/PhysRevA.109.062417

  59. [59]

    com/science/article/pii/0003491691901828

    Jones K 1991 Annals of Physics 207 140–170 ISSN 0003-4916 URL https://www.sciencedirect. com/science/article/pii/0003491691901828

  60. [60]

    Fuchs C A 1996 arXiv preprint quant-ph/9601020

  61. [61]

    Audenaert K M R, Calsamiglia J, Mu˜ noz Tapia R, Bagan E, Masanes L, Acin A and Verstraete F 2007 Phys. Rev. Lett. 98(16) 160501 URL https://link.aps.org/doi/10.1103/ PhysRevLett.98.160501

  62. [62]

    Bae J and Kwek L C 2015 Journal of Physics A: Mathematical and Theoretical 48 083001 URL https://dx.doi.org/10.1088/1751-8113/48/8/083001

  63. [63]

    Kargin V 2005 The Annals of Statistics 33 959–976 ISSN 00905364 URL http://www.jstor.org/ stable/3448612

  64. [64]

    Nussbaum M and Szko la A 2009 The Annals of Statistics 37 1040–1057 ISSN 00905364, 21688966 URL http://www.jstor.org/stable/30243657

  65. [65]

    Hayashi M 2006 Quantum Information: An Introduction (Springer Berlin Heidelberg) ISBN 9783540302650 URL https://books.google.com.au/books?id=UjDLl5sP7vEC

  66. [66]

    Tomamichel M 2015 Quantum Information Processing with Finite Resources: Mathematical Foundations SpringerBriefs in Mathematical Physics (Springer International Publishing) ISBN 9783319218915 URL https://books.google.com.au/books?id=643DCgAAQBAJ

  67. [67]

    On information and sufficiency

    Chernoff H 1952 The Annals of Mathematical Statistics 23 493 – 507 URL https://doi.org/10. 1214/aoms/1177729330

  68. [68]

    Sedl´ ak M and Fiur´ aˇ sek J 2016Phys. Rev. A 93(4) 042316 URL https://link.aps.org/doi/10. 1103/PhysRevA.93.042316

  69. [69]

    au/books?id=HdWaAAAAQBAJ

    Vaughan S 2013 Scientific Inference: Learning from Data Scientific Inference: Learning from Data (Cambridge University Press) ISBN 9781107024823 URL https://books.google.com. au/books?id=HdWaAAAAQBAJ

  70. [70]

    Montanaro A and de Wolf R 2013 arXiv preprint arXiv:1310.2035

  71. [71]

    https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/fake-provider-fake-sydney-v2

  72. [72]

    Quantum computing with Qiskit

    Javadi-Abhari A, Treinish M, Krsulich K, Wood C J, Lishman J, Gacon J, Martiel S, Nation P D, Bishop L S, Cross A W et al. 2024 arXiv preprint arXiv:2405.08810

  73. [73]

    https://github.com/klymenko-code/qutest

  74. [74]

    Greenberger D M, Horne M A, Shimony A and Zeilinger A 1990 American Journal of Physics 58 Context-Aware Unit Testing for Quantum Subroutines 28 1131–1143 ISSN 0002-9505 (Preprint https://pubs.aip.org/aapt/ajp/article-pdf/58/12/ 1131/11479397/1131\_1\_online.pdf) URL https://doi.org/10.1119/1.16243

  75. [75]

    Shor P W 1999 SIAM review 41 303–332

  76. [76]

    Buchmann J 2024 Introduction to Quantum Algorithms Pure and Applied Undergraduate Texts (American Mathematical Society) ISBN 9781470473983 URL https://books.google.com.au/ books?id=Fpv8EAAAQBAJ

  77. [77]

    Weinstein Y S, Havel T F, Emerson J, Boulant N, Saraceno M, Lloyd S and Cory D G 2004 The Journal of Chemical Physics 121 6117–6133 ISSN 0021-9606 URL https://doi.org/10.1063/ 1.1785151

  78. [78]

    In this work, all tests of Shor’s algorithm have been implemented using the factorization of the number 9 as a simple example

    Garc´ ıa de la Barrera A, Garc´ ıa-Rodr´ ıguez de Guzm´ an I, Polo M and Piattini M 2023Journal of Software: Evolution and Process 35 e2419 Supplementary Materials: Context-Aware Unit Testing for Quantum Subroutines Mykhailo Klymenko1, Thong Hoang 2, Sam Wilkinson 1, Bahar Goldozian1, Suyu Ma 1, Xiwei Xu2,3, Qinghua Lu 2,3, Muhammad Usman1,4, Liming Zhu 2...

  79. [79]

    Error : gcd ({ b } ,{ N }) > 1

    Subroutine 1 The source code of Subroutine 1, written in Qiskit - a high-level quantum programming language - is shown in Fig. 1. 1 from math import gcd , floor , log 2 import numpy as np 3 from qiskit . circuit . library import U n i t a r y G a t e 4 5 6 def m o d _ m u l t _ c i r q u i t ( circ , theta , N , a =2) : 7 """ S u b r o u t i n e 1 8 9 : p...

  80. [80]

    "" 6 S u b r o u t i n e 2 7 8 : param circ : input quantum r eg ist er 9 : return : qiskit circuit for S u b r o u t i n e 1 10

    Subroutine 2 The subroutine for the inverse quantum Fourier transform has been taken from the Qiskit circuit library. The code listing for this subroutine used in this work is shown in Fig. 2. 1 from qiskit . circuit . library import QFT 2 3 4 def fourier ( circ ) : 5 """ 6 S u b r o u t i n e 2 7 8 : param circ : input quantum r eg ist er 9 : return : qi...

Showing first 80 references.