Automated Program Repair (APR) is a vital area in software engineering aimed at generating automatic patches for vulnerable programs. While numerous techniques have been proposed for repairing classical programs, the realm of quantum programming lacks a comparable automated repair technique. In this initial exploration, we investigate the use of ChatGPT for quantum program repair and evaluate its performance on Bugs4Q, a benchmark suite of quantum program bugs. Our findings demonstrate the feasibility of employing ChatGPT for quantum program repair. Specifically, we assess ChatGPT's ability to address bugs within the Bugs4Q benchmark, revealing its success in repairing 29 out of 38 bugs. This research represents a promising step towards automating the repair process for quantum programs.
翻译:自动程序修复(APR)是软件工程中一个至关重要的领域,旨在为易受攻击的程序生成自动补丁。尽管已有众多技术被提出用于修复经典程序,但量子编程领域仍缺乏类似的自动化修复技术。在此初步探索中,我们研究了将ChatGPT用于量子程序修复的可能性,并在量子程序基准测试套件Bugs4Q上评估其性能。我们的研究结果证明了利用ChatGPT进行量子程序修复的可行性。具体而言,我们评估了ChatGPT解决Bugs4Q基准测试中缺陷的能力,结果显示其成功修复了38个缺陷中的29个。这项研究为迈向量子程序修复流程自动化迈出了有希望的一步。