Equivalence, Identity, and Unitarity Checking in Black-Box Testing of Quantum Programs
Peixun Long, Jianjun Zhao
TL;DR
The paper tackles black-box testing of quantum programs by introducing three novel checking algorithms for equivalence, identity, and unitarity, all built around the Swap Test and Pauli-input-state analysis. It provides theoretical foundations, concrete algorithms with complexity bounds, and optimization strategies that leverage purity checks to accelerate detection. An extensive experimental evaluation on a Q# benchmark suite demonstrates effective bug detection and notable runtime improvements from optimization, while also acknowledging limitations and cases needing careful parameter tuning. The work advances practical black-box testing for quantum software, offering concrete guidelines and a benchmark ecosystem to assess future methods. Overall, the methods enable rigorous equivalence, identity, and unitarity verification in quantum programs, contributing to reliable quantum software development.
Abstract
Quantum programs exhibit inherent non-deterministic behavior, which poses more significant challenges for error discovery compared to classical programs. While several testing methods have been proposed for quantum programs, they often overlook fundamental questions in black-box testing. In this paper, we bridge this gap by presenting three novel algorithms specifically designed to address the challenges of equivalence, identity, and unitarity checking in black-box testing of quantum programs. We also explore optimization techniques for these algorithms, including specialized versions for equivalence and unitarity checking, and provide valuable insights into parameter selection to maximize performance and effectiveness. To evaluate the effectiveness of our proposed methods, we conducted comprehensive experimental evaluations, which demonstrate that our methods can rigorously perform equivalence, identity, and unitarity checking, offering robust support for black-box testing of quantum programs.
