Saved in:
Bibliographic Details
Main Authors: Sato, Naoto, Katsube, Ryota
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.20011
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912051418365952
author Sato, Naoto
Katsube, Ryota
author_facet Sato, Naoto
Katsube, Ryota
contents When a bug is detected by testing a quantum program on a quantum computer, we want to determine its 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. These characteristics are unique to quantum programs and complicate locating bugs. We propose an efficient bug-locating method consisting of four approaches, cost-based binary search, early determination, finalization, and looking back, which take these characteristics into account. We present experimental results that indicate that the proposed method can reduce the bug-locating cost, represented as the number of executed quantum gates, compared to naive methods that do not use the four approaches. The limitation and usefulness of the proposed method are also discussed from the experimental results.
format Preprint
id arxiv_https___arxiv_org_abs_2409_20011
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Bug-locating Method based on Statistical Testing for Quantum Programs
Sato, Naoto
Katsube, Ryota
Software Engineering
Quantum Physics
When a bug is detected by testing a quantum program on a quantum computer, we want to determine its 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. These characteristics are unique to quantum programs and complicate locating bugs. We propose an efficient bug-locating method consisting of four approaches, cost-based binary search, early determination, finalization, and looking back, which take these characteristics into account. We present experimental results that indicate that the proposed method can reduce the bug-locating cost, represented as the number of executed quantum gates, compared to naive methods that do not use the four approaches. The limitation and usefulness of the proposed method are also discussed from the experimental results.
title Bug-locating Method based on Statistical Testing for Quantum Programs
topic Software Engineering
Quantum Physics
url https://arxiv.org/abs/2409.20011