Automatic Diagnosis of Quantum Software Bug-Fix Motifs

Date

2023

Department

Program

Citation of Original Publication

Rights

This item is likely protected under Title 17 of the U.S. Copyright Law. Unless on a Creative Commons license, for uses protected by Copyright Law, contact the copyright holder or the author.

Subjects

Abstract

Bug-fix pattern detection has been investigated in the past in the context of classical software. However, while quantum software is developing rapidly, the literature is still lacking automated methods and tools to identify, analyze, and detect bug-fix patterns. To the best of our knowledge, our work is the first to leverage classical techniques to detect bug-fix patterns in quantum code. In this paper, we propose an automated framework, called Q-Diff, for detecting bug-fix patterns in IBM Qiskit quantum code. In the framework, we develop a proof-of-concept tool based on Abstract Syntax Trees. To validate our method, we test Q-Diff with a variety of quantum bug-fix patterns using examples. We hope our work will attract the attention of the quantum software engineering community to improve the quality of quantum software.