When a bug is detected by testing a quantum program on a quantum computer, we want to determine its detailed location to fix it. To locate the bug, the quantum program is divided into several segments and each segment is tested. However, to prepare a quantum state that is input to a segment, it is necessary to execute all the segments ahead of that segment in a quantum computer. This means that the cost of testing each segment depends on its location. We can also locate a buggy segment only if it is confirmed that there are no bugs in all segments ahead of that buggy segment. Since a quantum program is tested statistically on the basis of measurement results, there is a tradeoff between testing accuracy and cost. Although these characteristics are unique to quantum programs and complicate locating bugs, they have not been investigated. We suggest for the first time that these characteristics should be considered to efficiently locate bugs. We are also the first to propose a bug-locating method that takes these characteristics into account. The results from experiments indicate that the bug-locating cost that is represented as the number of executed quantum gates can be reduced with the proposed method compared with naive methods.
翻译:在量子计算机上测试量子程序检测到错误时,我们需要确定其具体位置以进行修复。为定位错误,将量子程序划分为多个片段并逐一测试。然而,要制备输入至某片段的量子态,必须先在量子计算机上执行该片段之前的所有片段。这意味着每个片段的测试成本取决于其位置。只有当确认有缺陷片段之前的所有片段均无错误时,我们才能定位该缺陷片段。由于量子程序的测试基于测量结果进行统计分析,因此测试精度与成本之间存在权衡。尽管这些特性为量子程序所独有且增加了错误定位的复杂性,但此前尚未被研究。我们首次提出应考虑这些特性以高效定位错误,并首创了兼顾这些特性的错误定位方法。实验结果表明,与朴素方法相比,所提方法能够降低以量子门执行次数表示的错误定位成本。