As quantum computing is becoming increasingly popular, the underlying quantum computing platforms are growing both in ability and complexity. This growth may cause bugs in the platforms, which hinders the adoption of quantum computing. Unfortunately, testing quantum computing platforms is challenging due to the relatively small number of existing quantum programs and because of the oracle problem, i.e., a lack of specifications of the expected behavior of programs. This paper presents MorphQ, the first metamorphic testing approach for quantum computing platforms. Our two key contributions are (i) a program generator that creates a large and diverse set of valid (i.e., non-crashing) quantum programs, and (ii) set of program transformations that exploit quantum-specific metamorphic relationships to alleviate the oracle problem. Evaluating the approach by testing the popular Qiskit platform shows that the approach creates over 50k program pairs within two days, many of which expose crashes. Inspecting the crashes, we find twelve bugs, eight of which have already been confirmed. MorphQ widens the slim portfolio of testing techniques of quantum computing platforms, helping to create a reliable software stack for this increasingly important field.
翻译:随着量子计算越来越受欢迎,基本量子计算平台在能力和复杂性两方面都在增长。这种增长可能会在平台上造成错误,从而阻碍采用量子计算。不幸的是,由于现有量子程序数量相对较少,以及由于甲骨文问题,即缺少程序预期行为规范,量子计算平台具有挑战性。本文介绍了量子计算平台的第一个非变形测试方法MorphQ。我们的两个关键贡献是(一)一个程序生成器,生成了一套大型和多样化的有效(即非崩溃)量子程序,以及(二)一套程序转换器,利用量子特定变形关系缓解甲骨文问题。通过测试流行的基斯基特平台来评估这一方法显示,该方法在两天内创造了50多对程序配对,其中很多都暴露了碰撞的风险。我们发现了12个错误,其中8个已经得到确认。莫菲克扩大了量子计算平台的微量子测试技术组合,有助于为这个日益重要的领域创建可靠的软件堆。