Lune

FSE2024Top-tier venue

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

Matteo Paltenghi, Michael Pradel

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Bugs in Quantum computing platforms: an empirical study cites Projection-based runtime assertions for testing and debugging Quantum programs
  • Bugs in Quantum computing platforms: an empirical study cites Quantum abstract interpretation
  • Bugs in Quantum computing platforms: an empirical study cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
  • Fuzz4All: Universal Fuzzing with Large Language Models cites Bugs in Quantum computing platforms: an empirical study
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on9

  1. Fuzz4All: Universal Fuzzing with Large Language ModelsChunqiu Steven Xia, Matteo Paltenghi, Jia Le Tian, Michael Pradel et al.ICSE 2024 · 155 citations
  2. Silq: a high-level quantum language with safe uncomputation and intuitive semanticsBenjamin Bichsel, Maximilian Baader, Timon Gehr, Martin T. VechevPLDI 2020 · 145 citations
  3. Projection-based runtime assertions for testing and debugging Quantum programsGushu Li, Li Zhou, Nengkun Yu, Yufei Ding et al.OOPSLA 2020 · 120 citations
  4. Bugs in Quantum computing platforms: an empirical studyMatteo Paltenghi, Michael PradelOOPSLA 2022 · 70 citations
  5. Quantum abstract interpretationNengkun Yu, Jens PalsbergPLDI 2021 · 69 citations

Related papers

  1. The Smelly Eight: An Empirical Study on the Prevalence of Code Smells in Quantum ComputingQihong Chen, Rúben Câmara, José Campos, André Souto et al.ICSE 2023 · 23 citations
  2. IterTestQ: Assembly-Level, Cross-Platform Testing of Quantum Computing PlatformsMatteo Paltenghi, Michael PradelISSTA 2026
  3. An Automata-Based Framework for Verification and Bug Hunting in Quantum CircuitsYu-Fang Chen, Kai-Min Chung, Ondrej Lengál, Jyun-Ao Lin et al.PLDI 2023 · 41 citations
  4. MorphQ: Metamorphic Testing of the Qiskit Quantum Computing PlatformMatteo Paltenghi, Michael PradelICSE 2023 · 44 citations
  5. Quantum Concolic TestingShangzhou Xia, Jianjun Zhao, Fuyuan Zhang, Xiaoyu GuoISSTA 2025 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines