On the Feasibility of Quantum Unit Testing

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Miranskyy, Andriy, Campos, José, Mjeda, Anila, Zhang, Lei, de Guzmán, Ignacio García Rodríguez
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866908462181515264
author Miranskyy, Andriy
Campos, José
Mjeda, Anila
Zhang, Lei
de Guzmán, Ignacio García Rodríguez
author_facet Miranskyy, Andriy
Campos, José
Mjeda, Anila
Zhang, Lei
de Guzmán, Ignacio García Rodríguez
contents The increasing complexity of quantum software presents significant challenges for software verification and validation, particularly in the context of unit testing. This work presents a comprehensive study on quantum-centric unit tests, comparing traditional statistical approaches with tests specifically designed for quantum circuits. These include tests that run only on a classical computer, such as the Statevector test, as well as those executable on quantum hardware, such as the Swap test and the novel Inverse test. Through an empirical study and detailed analysis on 1,796,880 mutated quantum circuits, we investigate (a) each test's ability to detect subtle discrepancies between the expected and actual states of a quantum circuit, and (b) the number of measurements required to achieve high reliability. The results demonstrate that quantum-centric tests, particularly the Statevector test and the Inverse test, provide clear advantages in terms of precision and efficiency, reducing both false positives and false negatives compared to statistical tests. This work contributes to the development of more robust and scalable strategies for testing quantum software, supporting the future adoption of fault-tolerant quantum computers and promoting more reliable practices in quantum software engineering.
format Preprint
id arxiv_https___arxiv_org_abs_2507_17235
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle On the Feasibility of Quantum Unit Testing
Miranskyy, Andriy
Campos, José
Mjeda, Anila
Zhang, Lei
de Guzmán, Ignacio García Rodríguez
Software Engineering
Quantum Physics
The increasing complexity of quantum software presents significant challenges for software verification and validation, particularly in the context of unit testing. This work presents a comprehensive study on quantum-centric unit tests, comparing traditional statistical approaches with tests specifically designed for quantum circuits. These include tests that run only on a classical computer, such as the Statevector test, as well as those executable on quantum hardware, such as the Swap test and the novel Inverse test. Through an empirical study and detailed analysis on 1,796,880 mutated quantum circuits, we investigate (a) each test's ability to detect subtle discrepancies between the expected and actual states of a quantum circuit, and (b) the number of measurements required to achieve high reliability. The results demonstrate that quantum-centric tests, particularly the Statevector test and the Inverse test, provide clear advantages in terms of precision and efficiency, reducing both false positives and false negatives compared to statistical tests. This work contributes to the development of more robust and scalable strategies for testing quantum software, supporting the future adoption of fault-tolerant quantum computers and promoting more reliable practices in quantum software engineering.
title On the Feasibility of Quantum Unit Testing
topic Software Engineering
Quantum Physics
url https://arxiv.org/abs/2507.17235