Beyond Rules: LLM-Powered Linting for Quantum Programs
- URL: http://arxiv.org/abs/2605.03943v1
- Date: Tue, 05 May 2026 16:31:14 GMT
- Title: Beyond Rules: LLM-Powered Linting for Quantum Programs
- Abstract summary: We introduce LintQ-LLM+CoT and LintQ-LLM+RAG, novel approaches that redefine the detection of quantum programming problems.<n>LLMs specialized via Chain-of-Thought (CoT) prompting and a Retrieval-Augmented Generation (RAG) system grounds the model's reasoning in a curated knowledge base.<n>Our results show that LLM-based approaches, with and without RAG, outperform LintQ in terms of quantum programming problems detection correctness (precision) and completeness (recall)
- Score: 4.968531828144473
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: As quantum computing transitions from theoretical experimentation to its practical application, the reliability of quantum software has become a critical bottleneck. Traditional static analysis techniques for quantum programs, primarily rule-based linters, are increasingly inadequate; they struggle to keep pace with rapidly evolving APIs and fail to capture complex, context-dependent quantum programming problems. This results in high maintenance overhead and limited detection capabilities. In this paper, we introduce LintQ-LLM+CoT and LintQ-LLM+RAG, novel approaches that redefine the detection of quantum programming problems by employing Large Language Models (LLMs) specialized, respectively, via Chain-of-Thought (CoT) prompting and a Retrieval-Augmented Generation (RAG) system that grounds the model's reasoning in a curated knowledge base of verified quantum programming problems and best practices. We conducted a rigorous and manual comparative evaluation against the state-of-the-art rule-based tool, LintQ, using a corpus of 55 Qiskit programs. Our results show that LLM-based approaches, with and without RAG, outperform LintQ in terms of quantum programming problems detection correctness (precision) and completeness (recall). Overall, LLM-based approaches were more effective than LintQ (F1-score equal to 0.70 and 0.68 vs. 0.41). Furthermore, the RAG-enhanced variant demonstrated a slightly superior precision, effectively reducing false positives. Our findings suggest that LLMs provide a scalable and adaptive foundation for the next generation of linters in quantum software engineering.
Related papers
- QBugLM: An Agentic Benchmarking Framework for LLM-based Quantum Software Debugging [0.8609132348927196]
Large language models (LLMs) have shown strong performance on classical software engineering tasks.<n>We propose QBugLM, a multi-agent framework that automates the quantum software debug pipeline.
arXiv Detail & Related papers (2026-06-05T14:34:46Z) - Verifying Adversarial Robustness in Quantum Machine Learning: from theory to physical validation via a software tool [6.869173462284015]
Certifying the robustness of quantum machine learning (QML) models is a fundamental step toward trustworthy quantum AI.<n>This chapter reviews our recently developed comprehensive formal framework for verifying adversarial robustness in QML.<n>We incorporate these results into: (1) an efficient formal verification framework; (2) VeriQR, the first dedicated QML robustness verification tool; and (3) the first experimental benchmark of quantum adversarial robustness on a 20-qubit superconducting processor.
arXiv Detail & Related papers (2026-05-28T13:00:48Z) - Can LLMs Solve Science or Just Write Code? Evaluating Quantum Solver Generation [4.121927985291393]
Large Language Models (LLMs) show strong capabilities in code generation, motivating their use in automated quantum solver development.<n>This work introduces Q-SAGE, an iterative methodology to evaluate LLMs' capability in generating solvers for scientific problems.
arXiv Detail & Related papers (2026-05-08T09:55:50Z) - AQER: a scalable and efficient data loader for digital quantum computers [62.40228216126285]
We develop AQER, a scalable AQL method that constructs the loading circuit by systematically reducing entanglement in target states.<n>We conduct systematic experiments to evaluate the effectiveness of AQER, using synthetic datasets, classical image and language datasets, and a quantum many-body state datasets with up to 50 qubits.
arXiv Detail & Related papers (2026-02-02T14:39:42Z) - What Makes Low-Bit Quantization-Aware Training Work for Reasoning LLMs? A Systematic Study [59.44848132298657]
Post-training quantization (PTQ) usually comes with the cost of large accuracy drops, especially for reasoning tasks under low-bit settings.<n>In this study, we present a systematic empirical study of quantization-aware training (QAT) for reasoning models.
arXiv Detail & Related papers (2026-01-21T11:22:29Z) - Continual Quantum Architecture Search with Tensor-Train Encoding: Theory and Applications to Signal Processing [68.35481158940401]
CL-QAS is a continual quantum architecture search framework.<n>It mitigates challenges of costly encoding amplitude and forgetting in variational quantum circuits.<n>It achieves controllable robustness expressivity, sample-efficient generalization, and smooth convergence without barren plateaus.
arXiv Detail & Related papers (2026-01-10T02:36:03Z) - QUASAR: Quantum Assembly Code Generation Using Tool-Augmented LLMs via Agentic RL [8.823588193058727]
Large language model (LLM)-based quantum circuit generation has emerged as a promising automatic solution.<n>We propose QUASAR, an agentic reinforcement learning framework for quantum circuits generation and optimization.
arXiv Detail & Related papers (2025-10-01T14:40:04Z) - QAgent: An LLM-based Multi-Agent System for Autonomous OpenQASM programming [8.73473101831257]
We present QAgent, a multi-agent system that fully automates OpenQASM programming.<n>Our evaluations demonstrate substantial improvements across multiple LLMs of varying sizes.<n>We envision this multi-agent system as a key enabler for democratizing quantum programming, bridging expertise gaps, and accelerating the practical adoption of quantum computing.
arXiv Detail & Related papers (2025-08-26T18:40:02Z) - End-to-End On-Device Quantization-Aware Training for LLMs at Inference Cost [53.25965863436039]
Quantization-aware training (QAT) provides a more principled solution, but its reliance on backpropagation incurs prohibitive memory costs.<n>We propose ZeroQAT, a zeroth-order optimization-based QAT framework that supports both weight and activation quantization.<n>Experiments show that ZeroQAT consistently outperforms representative PTQ and QAT baselines while requiring significantly less memory.
arXiv Detail & Related papers (2025-08-21T01:18:27Z) - Agent-Q: Fine-Tuning Large Language Models for Quantum Circuit Generation and Optimization [5.2374261493530065]
Large language models (LLMs) have achieved remarkable outcomes in complex problems, including math, coding, and analyzing scientific reports.<n>We describe Agent-Q, an LLM fine-tuning system to generate and optimize quantum circuits.
arXiv Detail & Related papers (2025-04-15T11:56:54Z) - Quantum Program Linting with LLMs: Emerging Results from a Comparative Study [5.062046608347911]
This study investigates the feasibility of employing Large Language Models (LLMs) to develop a novel linting technique for quantum software development.<n>We introduce LintQ-LLM, an LLM-based linting tool designed to detect quantum-specific problems comparable to those identified by LintQ.
arXiv Detail & Related papers (2025-04-07T15:51:31Z) - QCircuitBench: A Large-Scale Dataset for Benchmarking Quantum Algorithm Design [63.02824918725805]
Quantum computing is recognized for the significant speedup it offers over classical computing through quantum algorithms.<n>QCircuitBench is the first benchmark dataset designed to evaluate AI's capability in designing and implementing quantum algorithms.
arXiv Detail & Related papers (2024-10-10T14:24:30Z) - LLMC: Benchmarking Large Language Model Quantization with a Versatile Compression Toolkit [55.73370804397226]
Quantization, a key compression technique, can effectively mitigate these demands by compressing and accelerating large language models.
We present LLMC, a plug-and-play compression toolkit, to fairly and systematically explore the impact of quantization.
Powered by this versatile toolkit, our benchmark covers three key aspects: calibration data, algorithms (three strategies), and data formats.
arXiv Detail & Related papers (2024-05-09T11:49:05Z) - Unifying (Quantum) Statistical and Parametrized (Quantum) Algorithms [65.268245109828]
We take inspiration from Kearns' SQ oracle and Valiant's weak evaluation oracle.
We introduce an extensive yet intuitive framework that yields unconditional lower bounds for learning from evaluation queries.
arXiv Detail & Related papers (2023-10-26T18:23:21Z) - Zero-Shot Sharpness-Aware Quantization for Pre-trained Language Models [88.80146574509195]
Quantization is a promising approach for reducing memory overhead and accelerating inference.
We propose a novel-aware quantization (ZSAQ) framework for the zero-shot quantization of various PLMs.
arXiv Detail & Related papers (2023-10-20T07:09:56Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.