arrow
Return

Context-aware unit testing for quantum subroutines

delete2026-04-30
delete0
PRE
AI
M
Mykhailo V. Klymenko *
T
Thong Hoang
S
Samuel A Wilkinson
B
Bahar Goldozian
S
Suyu Ma
X
Xiwei Xu
Q
Qinghua Lu
M
Muhammad Usman
L
Liming Zhu
DOI:10.1088/2058-9565/ae629edelete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
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 propose a unifying theoretical framework based on probabilistic assertions, which encompasses several testing approaches—such as quantum tomography and statistical tests—for developing practical unit tests for quantum subroutines. The framework is built upon the semantic equivalence between quantum subroutines and parameterized quantum channels, as established in this work. 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.
Keywords:
quantum software testing
probabilistic assertions
quantum subroutines
unit testing
context-awareness

Journal

Quantum Science and Technology cover
Quantum Science and Technology
IF:
5
Papers:
1.4K
Citations:
5.1K

Organization

C
csiro
Scholars:
1.0K
Papers: 509
Citations: 0
Cited Papers

Cited Papers

errShare
errSave
Projection-based runtime assertions for testing and debugging Quantum programs
err2020-11-13
err0
errOAAI
errGushu Li; Li Zhou; Nengkun Yu; Yufei Ding; Mingsheng Ying; Yuan Xie
errShare
errSave
OpenQASM3: A Broader and Deeper Quantum Assembly Language
err2022-09-06
err70
errOAAI
errCross, Andrew; Javadi-Abhari, Ali; Alexander, Thomas; de Beaudrap, Niel; Bishop, Lev S.; Heidel, Steven; Ryan, Colm A.; Sivarajah, Prasahnt; Smolin, John; Gambetta, Jay M.; Johnson, Blake R.
errShare
errSave
Bell’s theorem without inequalities
err1990-12-01
err0
errOAAI
errDaniel M. Greenberger; Michael A. Horne; Abner Shimony; Anton Zeilinger
errShare
errSave
Confidence Polytopes in Quantum State Tomography
err2019-05-15
err0
errOAAI
errJinzhao Wang; Volkher B. Scholz; Renato Renner
errShare
errSave
Quantum software testing: State of the art
err2021-12-24
err0
PREAI
errAntonio García de la Barrera; Ignacio García‐Rodríguez de Guzmán; Macario Polo; Mario Piattini
errShare
errSave
A practical and efficient approach for Bayesian quantum state estimation
err2020-06-22
err0
errOAAI
errJoseph M Lukens; Kody J H Law; Ajay Jasra; Pavel Lougovski
errShare
errSave
Reliable Quantum State Tomography
err2012-09-19
err0
errOAAI
errMatthias Christandl; Renato Renner
errShare
errSave
researcher View more