QSPE:枚举量子程序骨架以用于量子库测试
QSPE: Enumerating Skeletal Quantum Programs for Quantum Library Testing
AI总结:
QSPE通过差分测试原理和基于状态向量的验证方法,高效生成量子程序变体并检测编译错误,显著提升量子库测试的准确性与效率。
摘要:
量子计算的快速发展推动了各种量子库的发展,使编译、模拟和硬件后端接口得以实现。然而,由于缺乏成熟的测试方法,确保这些库的正确性仍然是一个基本挑战。目前最先进的工具往往依赖于领域特定的配置和专家知识,这限制了它们在实践中的可访问性和可扩展性。此外,尽管这些工具表现出色,但它们在测试中采用基于测量的验证方法,这导致了假阳性报告。为缓解这些限制,我们提出QSPE,一种遵循差分测试原理并扩展现有方法SPE的实用方法。QSPE是全自动的,不需要预设配置或领域专业知识,能够有效地生成大量多样化的程序变体,全面探索量子编译空间。为了减轻可能的假阳性报告,我们提出基于状态向量的验证作为基于测量验证的替代方法。在我们的实验中,QSPE方法在多个量子计算平台上生成了22,770个程序变体。通过在量子和经典程序层面避免α等价,QSPE可以减少冗余生成并节省超过90%的执行成本。最后,基于状态向量的验证方法帮助QSPE减少假警报,并在多个量子库中有效检测了708个编译错误。值得注意的是,81个发现的错误已被官方批准并认可,证明了我们方法的实用影响。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。