Analyzing Quantum Programs with LintQ: A Static Analysis Framework for Qiskit

Author:

Paltenghi Matteo1ORCID,Pradel Michael1ORCID

Affiliation:

1. University of Stuttgart, Stuttgart, Germany

Abstract

As quantum computing is rising in popularity, the amount of quantum programs and the number of developers writing them are increasing rapidly. Unfortunately, writing correct quantum programs is challenging due to various subtle rules developers need to be aware of. Empirical studies show that 40–82% of all bugs in quantum software are specific to the quantum domain. Yet, existing static bug detection frameworks are mostly unaware of quantum-specific concepts, such as circuits, gates, and qubits, and hence miss many bugs. This paper presents LintQ, a comprehensive static analysis framework for detecting bugs in quantum programs. Our approach is enabled by a set of abstractions designed to reason about common concepts in quantum computing without referring to the details of the underlying quantum computing platform. Built on top of these abstractions, LintQ offers an extensible set of ten analyses that detect likely bugs, such as operating on corrupted quantum states, redundant measurements, and incorrect compositions of sub-circuits. We apply the approach to a newly collected dataset of 7,568 real-world Qiskit-based quantum programs, showing that LintQ effectively identifies various programming problems, with a precision of 91.0% in its default configuration with the six best performing analyses. Comparing to a general-purpose linter and two existing quantum-aware techniques shows that almost all problems (92.1%) found by LintQ during our evaluation are missed by prior work. LintQ hence takes an important step toward reliable software in the growing field of quantum computing.

Funder

Deutsche Forschungsgemeinschaft

European Research Council

Publisher

Association for Computing Machinery (ACM)

Reference56 articles.

1. [n. d.]. Flake8: Your Tool For Style Guide Enforcement — Flake8 6.0.0 Documentation. https://flake8.pycqa.org/en/latest/.

2. [n. d.]. Nbconvert: Convert Notebooks to Other Formats — Nbconvert 7.2.9 Documentation. https://nbconvert.readthedocs.io/en/latest/index.html.

3. [n. d.]. OptimizeSwapBeforeMeasure Pass Drops Swap Gate (Even If There Is NO Measure after It) ⋅ Issue #7642 ⋅ Qiskit/Qiskit. https://github.com/Qiskit/qiskit/issues/7642.

4. [n. d.]. Pylint - Code Analysis for Python | Www.Pylint.Org. https://www.pylint.org/.

5. 2021. Qiskit/Qiskit. https://github.com/Qiskit/qiskit.

Cited by 1 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3