Quantum computing platforms are susceptible to quantum-specific bugs (e.g., incorrect ordering of qubits or incorrect implementation of quantum abstractions), which are difficult to detect and require specialized expertise. The field faces challenges due to a fragmented landscape of platforms and rapid development cycles that often prioritize features over the development of robust platform testing frameworks, severely hindering the reliability of quantum software. To address these challenges, we present QITE, the first cross-platform testing framework for quantum computing platforms, which leverages QASM, an assembly-level representation, to ensure consistency across different platforms. QITE introduces the novel ITE process to generate equivalent quantum programs by iteratively (I)mporting assembly into platform representations, (T)ransforming via platform optimization and gate conversion, and (E)xporting back to assembly. It uses a crash oracle to detect failures during cross-platform transformations and an equivalence oracle to validate the semantic consistency of the final sets of assembly programs, which are expected to be equivalent by construction. We evaluate QITE on four widely-used quantum computing platforms: Qiskit, PennyLane, Pytket, and BQSKit, revealing 17 bugs, 14 of which are already confirmed or even fixed. Our results demonstrate QITE's effectiveness, its complementarity to existing quantum fuzzers in terms of code coverage, and its ability to expose bugs that have been out of reach for existing testing techniques.
翻译:量子计算平台易受量子特定错误(如量子比特排序错误或量子抽象实现错误)的影响,这些错误难以检测且需要专业知识。该领域面临挑战,原因在于平台生态碎片化以及快速开发周期往往优先考虑功能特性而非构建稳健的平台测试框架,这严重阻碍了量子软件的可靠性。为应对这些挑战,我们提出了QITE,首个用于量子计算平台的跨平台测试框架,它利用汇编级表示QASM来确保不同平台间的一致性。QITE引入了新颖的ITE流程,通过迭代地(I)将汇编导入平台表示、(T)通过平台优化和门转换进行变换,以及(E)导回汇编,来生成等效的量子程序。它使用崩溃预言机检测跨平台变换过程中的故障,并使用等价预言机验证最终汇编程序集的语义一致性,这些程序集在构造上预期是等价的。我们在四个广泛使用的量子计算平台(Qiskit、PennyLane、Pytket和BQSKit)上评估了QITE,发现了17个错误,其中14个已得到确认甚至修复。我们的结果证明了QITE的有效性、其在代码覆盖率方面与现有量子模糊测试工具的互补性,以及其暴露现有测试技术无法触及的错误的能力。