Static analysis is the process of analyzing software code without executing the software. It can help find bugs and potential problems in software that may only appear at runtime. Although many static analysis tools have been developed for classical software, due to the nature of quantum programs, these existing tools are unsuitable for analyzing quantum programs. This paper presents QChecker, a static analysis tool that supports finding bugs in quantum programs in Qiskit. QChecker consists of two main modules: a module for extracting program information based on abstract syntax tree (AST), and a module for detecting bugs based on patterns. We evaluate the performance of QChecker using the Bugs4Q benchmark. The evaluation results show that QChecker can effectively detect various bugs in quantum programs.
翻译:静态分析是一种在不执行软件的情况下分析软件代码的过程。它可以帮助发现常常只在运行时出现的软件错误和潜在问题。尽管许多静态分析工具已经开发出来用于经典软件,但由于量子程序的特殊性质,这些现有工具都不适用于分析量子程序。本文介绍了一种名为 QChecker 的静态分析工具,它支持在 Qiskit 中找到量子程序中的错误。QChecker 由两个主要模块组成:一个基于抽象语法树(AST)的程序信息提取模块和一个基于模式的错误检测模块。我们使用 Bugs4Q 基准测试对 QChecker 的性能进行了评估。评估结果表明,QChecker 可以有效地检测量子程序中的各种错误。