arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.04860cs.SEcs.ETquant-ph
收藏

利用量子计算机加速软件动态测试

Using Quantum Computers to Speed Up Dynamic Testing of Software

Andriy Miranskyy

摘要:

被测软件可以在执行过程中被动态分析,以发现缺陷。然而,随着输入参数的数量和可能值的增加,动态测试的成本上升。本文研究量子计算机(QC)是否可以帮助加速为经典计算机(CC)编写的程序的动态测试。为了实现这一点,设计了一种方法,包括以下三个步骤:(1)将经典程序转换为量子程序;(2)使用量子计数算法计算引起错误的输入的数量,表示为$K$;以及(3)使用Grover搜索算法获得这些输入的实际值。这种方法可以加速穷举和非穷举动态测试技术。在CC上,这些技术的计算复杂性为$O(N)$,其中$N$表示传递给被测软件的输入参数值的组合的计数。相反,在QC上,复杂度为$O(\varepsilon^{-1} \sqrt{N/K})$,其中$\varepsilon$是测量$K$的相对误差。该文件说明了如何使用这种方法,并讨论了其局限性。此外,它还提供了一个在模拟器和实际QC上执行的玩具示例。本文可能会感兴趣的学者和从业者的方法,在文件中提出的,可以作为一个起点,探索使用QC的CC代码的动态测试。

英文摘要:

Software under test can be analyzed dynamically, while it is being executed, to find defects. However, as the number and possible values of input parameters increase, the cost of dynamic testing rises. This paper examines whether quantum computers (QCs) can help speed up the dynamic testing of programs written for classical computers (CCs). To accomplish this, an approach is devised involving the following three steps: (1) converting a classical program to a quantum program; (2) computing the number of inputs causing errors, denoted by $K$, using a quantum counting algorithm; and (3) obtaining the actual values of these inputs using Grover's search algorithm. This approach can accelerate exhaustive and non-exhaustive dynamic testing techniques. On the CC, the computational complexity of these techniques is $O(N)$, where $N$ represents the count of combinations of input parameter values passed to the software under test. In contrast, on the QC, the complexity is $O(\varepsilon^{-1} \sqrt{N/K})$, where $\varepsilon$ is a relative error of measuring $K$. The paper illustrates how the approach can be applied and discusses its limitations. Moreover, it provides a toy example executed on a simulator and an actual QC. This paper may be of interest to academics and practitioners as the approach presented in the paper may serve as a starting point for exploring the use of QC for dynamic testing of CC code.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑