🤖 AI Summary
To address challenges in quantum program testing—including the difficulty of quantum state quantification, absence of symbolic modeling, inefficient path exploration, and insufficient branch coverage—this paper proposes the first concolic (combined concrete and symbolic) testing framework tailored for quantum programs. Methodologically, it introduces a novel constraint modeling mechanism for quantum control statements, designs symbolic representations for quantum variables, and develops a dedicated quantum constraint-solving strategy; it further integrates Qiskit to enable quantum-state quantification and constraint-driven path guidance. Experimental evaluation on programs with up to five qubits achieves a branch coverage of 74.27%, substantially outperforming baseline approaches. Moreover, the framework generates higher-quality quantum input samples, effectively exposing logical errors and quantum gate sequence defects. This work establishes a scalable symbolic execution paradigm and provides a practical toolset for quantum software testing.
📝 Abstract
This paper presents the first concolic testing framework explicitly designed for quantum programs. The framework introduces quantum constraint generation methods for quantum control statements that quantify quantum states and offers a symbolization method for quantum variables. Based on this framework, we generate path constraints for each concrete execution path of a quantum program. These constraints guide the exploration of new paths, with a quantum constraint solver determining outcomes to create novel input samples, thereby enhancing branch coverage. Our framework has been implemented in Python and integrated with Qiskit for practical evaluation. Experimental results show that our concolic testing framework improves branch coverage, generates high-quality quantum input samples, and detects bugs, demonstrating its effectiveness and efficiency in quantum programming and bug detection. Regarding branch coverage, our framework achieves more than 74.27% on quantum programs with under 5 qubits.