Quantum computing has emerged as a promising domain for the machine learning (ML) area, offering significant computational advantages over classical counterparts. With the growing interest in quantum machine learning (QML), ensuring the correctness and robustness of software platforms to develop such QML programs is critical. A necessary step for ensuring the reliability of such platforms is to understand the bugs they typically suffer from. To address this need, this paper presents the first comprehensive study of bugs in QML frameworks. We inspect 391 real-world bugs collected from 22 open-source repositories of nine popular QML frameworks. We find that 1) 28% of the bugs are quantum-specific, such as erroneous unitary matrix implementation, calling for dedicated approaches to find and prevent them; 2) We manually distilled a taxonomy of five symptoms and nine root cause of bugs in QML platforms; 3) We summarized four critical challenges for QML framework developers. The study results provide researchers with insights into how to ensure QML framework quality and present several actionable suggestions for QML framework developers to improve their code quality.
翻译:量子计算已成为机器学习领域的一个前景广阔方向,与经典计算相比展现出显著的计算优势。随着量子机器学习(QML)兴趣的增长,确保开发此类QML程序的软件平台正确性与鲁棒性至关重要。保障此类平台可靠性的必要前提是理解其常见缺陷类型。为满足这一需求,本文首次对QML框架中的缺陷进行系统性研究。我们检查了从9个主流QML框架的22个开源代码库中收集的391个真实缺陷。研究发现:1)28%的缺陷为量子特有缺陷(例如错误的酉矩阵实现),需要专门的方法进行检测与预防;2)我们通过人工归纳,构建了QML平台缺陷的五类症状与九类根本原因分类体系;3)我们总结了QML框架开发者面临的四项关键挑战。研究结果为如何保障QML框架质量提供了洞见,并为QML框架开发者提升代码质量提出了若干可行建议。