The interest in quantum computing is growing, and with it, the importance of software platforms to develop quantum programs. Ensuring the correctness of such platforms is important, and it requires a thorough understanding of the bugs they typically suffer from. To address this need, this paper presents the first in-depth study of bugs in quantum computing platforms. We gather and inspect a set of 223 real-world bugs from 18 open-source quantum computing platforms. Our study shows that a significant fraction of these bugs (39.9%) are quantum-specific, calling for dedicated approaches to prevent and find them. The bugs are spread across various components, but quantum-specific bugs occur particularly often in components that represent, compile, and optimize quantum programming abstractions. Many quantum-specific bugs manifest through unexpected outputs, rather than more obvious signs of misbehavior, such as crashes. Finally, we present a hierarchy of recurrent bug patterns, including ten novel, quantum-specific patterns. Our findings not only show the importance and prevalence bugs in quantum computing platforms, but they help developers to avoid common mistakes and tool builders to tackle the challenge of preventing, finding, and fixing these bugs.
翻译:量子计算的兴趣与日俱增,随之而来的是用于开发量子程序的软件平台的重要性。确保这些平台的正确性至关重要,需要深入理解它们通常存在的缺陷。为满足这一需求,本文首次对量子计算平台中的缺陷进行了深入研究。我们收集并审查了来自18个开源量子计算平台的223个实际缺陷。研究表明,这些缺陷中有很大一部分(39.9%)是量子特有的,需要专门的方法来预防和发现它们。缺陷分布于各个组件,但量子特有缺陷尤其频繁出现在表示、编译和优化量子编程抽象的组件中。许多量子特有缺陷通过意外输出而非更明显的异常行为(如崩溃)来显现。最后,我们提出了一个重复缺陷模式的分层结构,包括十种新颖的量子特有模式。我们的发现不仅揭示了量子计算平台中缺陷的重要性和普遍性,还帮助开发者避免常见错误,并为工具构建者应对预防、发现和修复这些缺陷的挑战提供了方向。