QSPE: Enumerating Skeletal Quantum Programs for Quantum Library Testing

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ye, Jiaming, Zhang, Fuyuan, Xia, Shangzhou, Guo, Xiaoyu, Wu, Xiongfei, Zhao, Jianjun, Xue, Yinxing
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866917236013268992
author Ye, Jiaming
Zhang, Fuyuan
Xia, Shangzhou
Guo, Xiaoyu
Wu, Xiongfei
Zhao, Jianjun
Xue, Yinxing
author_facet Ye, Jiaming
Zhang, Fuyuan
Xia, Shangzhou
Guo, Xiaoyu
Wu, Xiongfei
Zhao, Jianjun
Xue, Yinxing
contents The rapid advancement of quantum computing has led to the development of various quantum libraries, empowering compilation, simulation, and hardware backend interfaces. However, ensuring the correctness of these libraries remains a fundamental challenge due to the lack of mature testing methodologies. The state-of-the-art tools often rely on domain-specific configurations and expert knowledge, which limits their accessibility and scalability in practice. Furthermore, although these tools demonstrate strong performance, they adopt measurement-based for output validation in testing, which makes them produce false positive reports. To alleviate these limitations, we propose QSPE, a practical approach that follows the differential testing principle and extends the existing approach, SPE, for quantum libraries. QSPE is fully automated, requiring no pre-set configurations or domain expertise, and can effectively generate a large set of diverse program variants that comprehensively explore the quantum compilation space. To mitigate the possible false positive reports, we propose statevector-based validation as an alternative to measurement-based validation. In our experiments, the QSPE approach demonstrates remarkable effectiveness in generating 22,770 program variants across multiple quantum computing platforms. By avoiding $α$-equivalence at the quantum and classical program wise, QSPE can reduce redundant generation and save more than 90\% of execution cost. Finally, the statevector-based validation method assists QSPE to reduce false alarms and effectively detects 708 miscompilations across multiple quantum libraries. Notably, 81 of the discovered bugs have been officially approved and acknowledged by the Qiskit development team, demonstrating the practical impact of our approach.
format Preprint
id arxiv_https___arxiv_org_abs_2602_00024
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle QSPE: Enumerating Skeletal Quantum Programs for Quantum Library Testing
Ye, Jiaming
Zhang, Fuyuan
Xia, Shangzhou
Guo, Xiaoyu
Wu, Xiongfei
Zhao, Jianjun
Xue, Yinxing
Quantum Physics
Software Engineering
The rapid advancement of quantum computing has led to the development of various quantum libraries, empowering compilation, simulation, and hardware backend interfaces. However, ensuring the correctness of these libraries remains a fundamental challenge due to the lack of mature testing methodologies. The state-of-the-art tools often rely on domain-specific configurations and expert knowledge, which limits their accessibility and scalability in practice. Furthermore, although these tools demonstrate strong performance, they adopt measurement-based for output validation in testing, which makes them produce false positive reports. To alleviate these limitations, we propose QSPE, a practical approach that follows the differential testing principle and extends the existing approach, SPE, for quantum libraries. QSPE is fully automated, requiring no pre-set configurations or domain expertise, and can effectively generate a large set of diverse program variants that comprehensively explore the quantum compilation space. To mitigate the possible false positive reports, we propose statevector-based validation as an alternative to measurement-based validation. In our experiments, the QSPE approach demonstrates remarkable effectiveness in generating 22,770 program variants across multiple quantum computing platforms. By avoiding $α$-equivalence at the quantum and classical program wise, QSPE can reduce redundant generation and save more than 90\% of execution cost. Finally, the statevector-based validation method assists QSPE to reduce false alarms and effectively detects 708 miscompilations across multiple quantum libraries. Notably, 81 of the discovered bugs have been officially approved and acknowledged by the Qiskit development team, demonstrating the practical impact of our approach.
title QSPE: Enumerating Skeletal Quantum Programs for Quantum Library Testing
topic Quantum Physics
Software Engineering
url https://arxiv.org/abs/2602.00024