一句话:首个量子计算平台蜕变测试方法,用程序生成与变换暴露 Qiskit 崩溃并发现 13 个缺陷。
量子计算日益普及,其底层平台的规模与复杂度不断增长,但测试面临两大困难:现有量子程序数量稀少,且缺少预期行为规约,即存在 oracle 问题。本文提出 MorphQ,首个面向量子计算平台的蜕变测试方法。其两项核心贡献是:一,一个程序生成器,能够生成大量多样且合法(即不会崩溃)的量子程序;二,一组程序变换,利用量子特有的蜕变关系来缓解 oracle 问题。作者在流行的 Qiskit 平台上评估该方法,两天内生成超过 8000 对程序,其中许多对暴露了崩溃。通过人工检查这些崩溃,共发现 13 个缺陷,其中 9 个已被确认。MorphQ 拓宽了量子计算平台本就稀少的测试技术组合,有助于为这一日益重要的领域构建可靠的软件栈。
As quantum computing is becoming increasingly popular, the underlying quantum computing platforms are growing both in ability and complexity. Unfortunately, testing these 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) a 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 8k program pairs within two days, many of which expose crashes. Inspecting the crashes, we find 13 bugs, nine 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.