Pith. sign in

REVIEW 2 major objections 6 minor 25 references

Benchmarking API Drift in LLM-Generated Quantum Code Across Successive SDK Versions

T0 review · 2 major / 6 minor · reviewed 2026-07-11 · grok-4.5

Pith's one-line read Version alignment is a distinct failure mode for LLM-written quantum code, and intermediate SDK releases are the hardest targets.

desk verdict Solid empirical SE paper: version fidelity is a real, measurable axis for LLM quantum code, with a clean matched multi-model protocol and public artifacts. read the letter →

arxiv 2607.04072 v1 pith:U3HHZLCF submitted 2026-07-05 cs.SE cs.AIquant-ph

classification cs.SEcs.AIquant-ph
keywords APIdriftquantumcodegenerationversionfidelityQiskitLLMevaluationPass@kdocumentation-guidedrepairSDKmigration
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

Large language models can write quantum programs that look right, yet still fail when the user asks for a specific SDK release. This paper treats that mismatch as API drift and builds a benchmark, quantum-api-drift, to measure version fidelity: whether generated code runs on the requested version, how it behaves on other versions, what errors it hits, and whether migration notes can repair failures. Instantiated on Qiskit across v0.43, v1.3, and v2.0, the study runs 17 models on 50 tasks with three samples each. Among 16 matched REST models, success on the requested version ranges from nearly none to about 85 percent, and v1.3 is consistently the weakest target in both generation and repair. Weaker models mostly break on imports; stronger models more often produce deprecated but structured code. Documentation-guided repair recovers only part of the failures, and far more for migration to v2.0 than to v1.3. The practical claim is that quantum code evaluation must treat the named SDK version as part of the task, not as incidental context.

What carries the argument

The quantum-api-drift drift matrix: each sample is prompted for one Qiskit version and executed in all three, so diagonal cells measure target-version success and off-diagonal cells measure cross-version compatibility, with soft-fail (deprecation) versus hard-fail classification and a one-shot migration-note repair loop.

What would settle it

Re-run the same 50 tasks with semantic oracles (correct gate sequences or expected measurement distributions) or on another quantum SDK with the same three-epoch design; if high diagonal scores collapse or the v1.3 anomaly disappears, the claimed version-fidelity axis is not measuring what the paper attributes to it.

Watch

Extended reading notes

Core claim

Version fidelity is a first-class evaluation axis for quantum code generation, separate from general coding skill. Across matched models, diagonal Pass@1 spans 0.02 to 0.85; Qiskit v1.3 is the hardest target in both direct generation and documentation-guided repair; failure modes shift from broken imports in weak models to deprecation-heavy code in strong ones; and repair recovers only 0.19 to 0.59 of attempts overall, with a large advantage for migration to v2.0 over v1.3.

Load-bearing premise

The paper treats execution against version-agnostic structural tests as enough to measure version fidelity, even though those tests do not check that the generated quantum circuit is semantically correct.

Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

2 major / 6 minor

Summary. The paper introduces quantum-api-drift, a benchmark for version fidelity in LLM-generated quantum SDK code, defined as target-version execution success, cross-version compatibility, failure modes, and documentation-guided repair. Instantiated on Qiskit v0.43, v1.3, and v2.0 with 50 version-agnostic tasks rewritten from Qiskit HumanEval, it evaluates 17 models (16 under a matched REST 1024-token protocol; GPT-5.4 Codex CLI as a non-comparable reference), with 3 samples per prompt and execution in all three environments. Across matched models, diagonal Pass@1 ranges from 0.02 to 0.85; v1.3 is consistently the weakest target; weaker models fail mainly with ImportError while stronger models shift toward DeprecationWarning; and single-pass migration-note repair recovers 0.19–0.59 of attempts overall, with much higher success toward v2.0 than v1.3. The authors conclude that version alignment is a distinct evaluation axis and that API drift is only partly recoverable even with migration guidance. Artifacts are released publicly.

Significance. If the empirical patterns hold, the work establishes version alignment as a first-class, measurable axis for quantum code generation rather than a minor environment detail. Strengths include a large matched multi-environment protocol (450 samples and 1,350 executions per model), Wilson 95% CIs, an explicit soft/hard-fail and exception taxonomy, careful separation of the Codex CLI reference from REST comparisons, and public release of tasks, harnesses, and results. The structured v1.3 dip, ImportError-vs-deprecation regimes, and repair asymmetry are practically useful for users and for future quantum-SDK tooling. The contribution is primarily empirical and methodological rather than theoretical, but it fills a clear gap between Pass@k-style quantum code benchmarks and classical API-evolution work.

major comments (2)
  1. [§2.1, §6, Abstract, §7] §2.1 and §6 correctly state that harnesses use structural checks (isinstance, non-null returns) and deliberately avoid execute() and version-specific primitives, so results measure API-level executability rather than semantic circuit correctness. The abstract and §7, however, frame conclusions as applying to “quantum code generation” and “version alignment” without restating that bound as prominently as the Limitations section. Because diagonal Pass@1 is the headline metric (Table 2; Fig. 1), the abstract and conclusion should explicitly say that high fidelity means version-compatible execution under structural tests, not verified gate sequences or measurement distributions. This is a framing fix, not a redesign, but it is load-bearing for how the central claim will be cited.
  2. [§2.9, §3.5, Abstract] §2.9 restricts repair to snippets that already pass on the prompted version and fail on a newer version. Abstract and §3.5 report overall repair rates of 0.19–0.59 and the strong v2.0 vs v1.3 asymmetry (Table 4; Fig. 5). That population is forward-migration of already-correct-on-target code, not repair of the dominant ImportError failures that drive low-fidelity models (Fig. 4; Table 3). The claim that “API drift remains only partly recoverable even with migration guidance” is defensible for this repair set, but the manuscript should state the eligibility filter whenever those rates are summarized so readers do not treat them as recovery rates over all version-induced failures.
minor comments (6)
  1. [§2.5, Table 2] §2.5 defines Pass, Soft-fail (DeprecationWarning with otherwise correct execution), and Hard-fail, but the main tables report Pass@1 without a short reminder that Soft-fail is excluded from the Pass numerator. A one-sentence clarification near Table 2 or Eq. (1)–(2) would prevent readers from equating “executes correctly with warnings” with diagonal success.
  2. [§2.1] §2.1 says the 50 tasks are a “representative” subset of Qiskit HumanEval. A brief note on selection criteria (category coverage, exclusion rules, or randomization) would help reproducibility beyond the public repo link.
  3. [§3.7, Table 5] Table 5 aggregates Pass@1 across models and environments for category difficulty. Because model strength varies widely (Table 2), a short sensitivity check (e.g., category ranks restricted to the top closed models) would show whether Execution & Simulation remains hardest under a less heterogeneous average.
  4. [Figure 3] Figure 3’s three panels are useful, but the left-to-right ordering of models differs across panels, which makes cross-transition comparison harder. Align model order (e.g., by mean diagonal fidelity) across panels if space allows.
  5. [§4.2, Table 7] In §4.2 and Table 7, several knowledge cutoffs are “?” or estimated. Marking those rows as uncertain in the prose (not only the table) would keep the temporal-tier discussion from reading as firmer than the metadata support.
  6. [§2.2, §5] Minor polish: consistent hyphenation of “open-weight” vs “open weight,” and ensure Qiskit package/API names (e.g., SamplerV2, BackendV1, qiskit.pulse) use uniform code formatting in §2.2 and the discussion.

Circularity Check

0 steps flagged · score 0.0 of 10

Empirical benchmark with operational metrics; no derivation reduces to its inputs by construction.

full rationale

This paper is an execution-based measurement study, not a first-principles derivation. Version fidelity is defined operationally as Pass@1 / Pass@3 on code run in isolated Conda environments for Qiskit v0.43, v1.3, and v2.0; drift matrices, error taxonomies, and repair rates are computed from those independent runs (450 samples and 1,350 executions per model). The central claim—that version alignment is a distinct evaluation axis—rests on observed diagonal ranges (0.02–0.85), the v1.3 weakness, ImportError vs DeprecationWarning regimes, and asymmetric repair success, none of which are fitted parameters renamed as predictions or results forced by self-citation. Citations (Qiskit HumanEval for task provenance, model cards for metadata, migration guides as repair inputs) supply external materials; they do not close a logical loop that makes the reported Pass@1 values true by definition. Limitations already bound interpretation (API-level harnesses, not semantic circuit correctness). No self-definitional step, fitted-input-as-prediction, load-bearing self-citation uniqueness claim, or renamed known result appears in the load-bearing chain. Score 0 is appropriate.

Assumptions & free parameters 5 free parameters · 4 assumptions · 1 invented entities

The central claims rest on methodological choices rather than physical postulates: execution success under rewritten structural tests as the operational definition of version fidelity; a fixed sampling and decoding setup; a curated 50-task subset; and author-written migration notes for repair. No new physical entities are introduced. The main risk is that the operational definition under-measures semantic correctness while still supporting the API-alignment conclusions.

free parameters (5)
  • temperature T
    All generations use T=0.8; no temperature sweep is reported, so diversity/fidelity trade-offs are fixed by this choice.
  • max output tokens
    Matched REST models are capped at 1024 output tokens; this budget can truncate solutions and affect Pass@k.
  • samples per prompt K
    K=3 is fixed for Pass@1/Pass@3 estimation; more samples could change absolute rates though relative patterns may hold.
  • 50-task subset selection
    Tasks are a representative rewrite of a Qiskit HumanEval subset; category composition affects hardness, especially Execution & Simulation.
  • migration-note content
    Repair success depends on hand-curated plain-text migration summaries for version transitions; note quality is an unmeasured free instrument.
assumptions (4)
  • domain assumption Execution success plus lightweight structural assertions are an adequate operational definition of version fidelity for LLM-generated quantum SDK code.
    Introduced in Sections 2.1 and 2.5; Limitations explicitly note that semantic circuit correctness is not verified.
  • domain assumption Stable releases v0.43, v1.3, and v2.0 are representative of distinct Qiskit API epochs for studying drift.
    Section 2.2 selects these versions and avoids transition releases; conclusions about intermediate-version difficulty depend on this choice.
  • standard math Pass@k with n=3 and Wilson intervals is an appropriate success metric for comparing models under the matched protocol.
    Section 2.7 follows the standard unbiased Pass@k estimator from code-generation evaluation literature.
  • ad hoc to paper A single documentation-augmented repair attempt is informative about recoverability of version-induced failures.
    Section 2.9 and Limitations: only one repair pass is tried; iterative repair could raise rates, especially for v1.3.
invented entities (1)
  • quantum-api-drift benchmark / version fidelity metric suite independent evidence
    purpose: Defines and measures prompted-version success, cross-version compatibility, failure modes, and documentation-guided repair for quantum SDK code generation.
    The paper’s primary constructed instrument; independent evidence is the public task set and execution protocol, not an external physical observable.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Benchmarking API Drift in LLM-Generated Quantum Code Across Successive SDK Versions." pith.science (2026). https://pith.science/paper/U3HHZLCF

@misc{pith2026260704072,
  author       = {Pith},
  title        = {Pith review of: Benchmarking API Drift in LLM-Generated Quantum Code Across Successive SDK Versions},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/U3HHZLCF}},
  note         = {Machine review of arXiv:2607.04072}
}
read the original abstract

Large language models can generate plausible quantum code, but it is unclear whether they can reliably target the specific software development kit (SDK) version requested by the user. We study this problem as API drift and introduce quantum-api-drift, a benchmark for measuring version fidelity, defined here as execution success on the requested SDK version, cross-version compatibility, failure modes, and documentation-guided repair in LLM-generated quantum SDK code. We instantiate the benchmark with Qiskit, a representative quantum SDK that underwent substantial interface changes across v0.43, v1.3, and v2.0. We evaluate 17 models on 50 tasks with 3 samples per prompt, yielding 450 generated samples and 1,350 executions per model. Sixteen models are tested in a matched REST API setting with a 1024-token output cap, while GPT-5.4 (Codex CLI) is reported separately as a reference configuration. Across the 16 matched REST models, diagonal Pass@1 ranges from 0.02 to 0.85. Claude Opus 4.7 is strongest on v0.43 and v2.0, while Grok 4.20 is strongest on v1.3 at 0.513. Error profiles differ systematically by model strength: weaker models fail mainly with broken imports, while stronger models more often reach deprecation-level failures. Documentation-guided repair succeeds for 0.19 to 0.59 of repair attempts overall and is consistently much more effective for migration to v2.0 than to v1.3. The benchmark artifacts are publicly available at https://github.com/arasyi/quantum-api-drift. These results show that version alignment is a distinct evaluation axis for quantum code generation and that API drift remains only partly recoverable even with migration guidance.

Figures

Figures reproduced from arXiv: 2607.04072 by the authors.

Figure 1
Figure 1. Version fidelity (Pass@1 on the target version, i.e., diagonal of the drift matrix) for all models and all three Qiskit versions. Error bars show 95% Wilson confidence intervals. The v1.3 column is consistently the weakest across models. 6 [PITH_FULL_IMAGE:figures/full_fig_p006_1.png] view at source ↗
Figure 2
Figure 2. Drift matrices (Pass@1) for the four strongest models. Rows denote the prompted Qiskit version; columns denote the execution environment. The diagonal represents version fidelity. Low values in the middle column (v1.3) are a consistent finding across models. 7 [PITH_FULL_IMAGE:figures/full_fig_p007_2.png] view at source ↗
Figure 3
Figure 3. isolates a different aspect of the same story: the forward compatibility drop, defined as the reduction in Pass@1 when code generated for version s is executed in the newest version t > s. The left panel shows the v0.43 → v2.0 drop, and the right panel shows the v1.3 → v2.0 drop. A few models show only a small forward drop from v0.43 to v2.0, which suggests that they sometimes generate newer idioms even when prompte… view at source ↗
Figures from the paper (8 more)
Figure 4
Figure 4. Figure 4: Normalized error taxonomy across models. Weaker models are dominated by ImportError, indicating structural module confusion. Stronger models shift toward DeprecationWarning, suggesting version-lagged but structurally correct code. Error types shown are those with the h…
Figure 5
Figure 5. Figure 5: Repair success rates for all models: overall (gray), repair targeting v1.3 (green), and repair targeting v2.0 (red). Models are ordered left-to-right by their index in the evaluation suite. Note the consistently higher success rates for v2.0 repairs. 10 [PITH_FULL_IMA…
Figure 6
Figure 6. Figure 6: shows the relationship between Pass@1 and Pass@3 on the v2.0 → v2.0 cell for all models. All models lie above the diagonal, confirming that sampling three independent candidates reliably increases the probability of at least one success. The improvement is especially l…
Figure 7
Figure 7. Figure 7: Complete drift heatmaps for all evaluated models Darker cells indicate higher Pass@1. Diag￾onal cells correspond to version fidelity, while off-diagonal cells capture cross-version transfer. 19 [PITH_FULL_IMAGE:figures/full_fig_p019_7.png]
Figure 8
Figure 8. Figure 8: compares Pass@1 and Pass@3 on the diagonal cells for all three target versions [PITH_FULL_IMAGE:figures/full_fig_p021_8.png]
Figure 9
Figure 9. Figure 9: Normalized error taxonomy for prompts targeting Qiskit v0.43. 22 [PITH_FULL_IMAGE:figures/full_fig_p022_9.png]
Figure 10
Figure 10. Figure 10: Normalized error taxonomy for prompts targeting Qiskit v1.3. Claude Opus 4.7 Claude Sonnet 4.6 Devstral 2 GLM-4.7 Flash GPT-5.3 Codex GPT-5.4 (API) GPT-5.4 (Codex CLI) GPT-5.4 nano GPT-OSS 120B Gemma 4 31B Grok 4.20 Kimi K2 Llama 3.3 Llama 4 Scout Nemotron 3 Super Qwe…
Figure 11
Figure 11. Figure 11: Normalized error taxonomy for prompts targeting Qiskit v2.0. 23 [PITH_FULL_IMAGE:figures/full_fig_p023_11.png]

Discussion (0). Sign in to comment.

Reference graph

Works this paper leans on

25 extracted references · 7 linked inside Pith

  1. [1]

    Claude 4 system card.https://platform.claude.com/docs/en/resources/ claude-4-system-card, 2025

    Anthropic. Claude 4 system card.https://platform.claude.com/docs/en/resources/ claude-4-system-card, 2025

  2. [2]

    Program synthesis with large language models.arXiv preprint arXiv:2108.07732, 2021

    Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models.arXiv preprint arXiv:2108.07732, 2021

  3. [3]

    How the apache community upgrades dependencies: An evolutionary study.Em- pirical Software Engineering, 20(5):1275–1317, 2015

    Gabriele Bavota, Gerardo Canfora, Andrea De Lucia, Massimiliano Di Penta, and Rocco Oliveto. How the apache community upgrades dependencies: An evolutionary study.Em- pirical Software Engineering, 20(5):1275–1317, 2015

  4. [4]

    Evaluating large language models trained on code.arXiv preprint arXiv:2107.03374, 2021

    Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harrison Edwards, Yura Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code.arXiv preprint arXiv:2107.03374, 2021

  5. [5]

    How do apis evolve? a story of refactoring

    Danny Dig and Ralph Johnson. How do apis evolve? a story of refactoring. InJournal of Software Maintenance and Evolution, volume 18, pages 83–107, 2006

  6. [6]

    Gemma 4 model card.https://ai.google.dev/gemma/docs/core/model_card_4, 2026

    Google. Gemma 4 model card.https://ai.google.dev/gemma/docs/core/model_card_4, 2026

  7. [7]

    Api change and fault proneness: A threat to the success of android apps

    Andre Hora, Marco Tulio Valente, Romain Robbes, and Nicolas Anquetil. Api change and fault proneness: A threat to the success of android apps. InProceedings of the 2015 ACM/IFIP/USENIX Middleware Conference, 2015

  8. [8]

    Qiskit 1.0 migration guide.https://docs.quantum.ibm.com/ migration-guides/qiskit-1.0-features, 2024

    IBM Quantum. Qiskit 1.0 migration guide.https://docs.quantum.ibm.com/ migration-guides/qiskit-1.0-features, 2024

Show all 25 references
  1. [9]

    Qiskitsdk1.3releasenotes.https://docs.quantum.ibm.com/api/qiskit/ release-notes/1.3, 2024

    IBMQuantum. Qiskitsdk1.3releasenotes.https://docs.quantum.ibm.com/api/qiskit/ release-notes/1.3, 2024

  2. [10]

    Qiskit 2.0 migration guide.https://docs.quantum.ibm.com/ migration-guides/qiskit-2.0, 2025

    IBM Quantum. Qiskit 2.0 migration guide.https://docs.quantum.ibm.com/ migration-guides/qiskit-2.0, 2025

  3. [11]

    Qiskitsdk2.0releasenotes.https://docs.quantum.ibm.com/api/qiskit/ release-notes/2.0, 2025

    IBMQuantum. Qiskitsdk2.0releasenotes.https://docs.quantum.ibm.com/api/qiskit/ release-notes/2.0, 2025

  4. [12]

    Llama 3.3 model card.https://github.com/meta-llama/llama-models/blob/ main/models/llama3_3/MODEL_CARD.md, 2024

    Meta. Llama 3.3 model card.https://github.com/meta-llama/llama-models/blob/ main/models/llama3_3/MODEL_CARD.md, 2024. 17

  5. [13]

    Llama 4 model card.https://github.com/meta-llama/llama-models/blob/main/ models/llama4/MODEL_CARD.md, 2025

    Meta. Llama 4 model card.https://github.com/meta-llama/llama-models/blob/main/ models/llama4/MODEL_CARD.md, 2025

  6. [14]

    Devstral 2 model card.https://docs.mistral.ai/models/model-cards/ devstral-2-25-12, 2025

    Mistral AI. Devstral 2 model card.https://docs.mistral.ai/models/model-cards/ devstral-2-25-12, 2025

  7. [15]

    Kimi k2: Open agentic intelligence.arXiv preprint arXiv:2507.20534, 2025

    Moonshot AI. Kimi k2: Open agentic intelligence.arXiv preprint arXiv:2507.20534, 2025

  8. [16]

    NVIDIA. Nemotron 3 super: Open, efficient mixture-of-experts hybrid mamba-transformer model for agentic reasoning.https://research.nvidia.com/labs/nemotron/files/ NVIDIA-Nemotron-3-Super-Technical-Report.pdf, 2025

  9. [17]

    Introducing gpt-oss.https://openai.com/index/introducing-gpt-oss/, 2025

    OpenAI. Introducing gpt-oss.https://openai.com/index/introducing-gpt-oss/, 2025

  10. [18]

    Openai gpt-5 system card.https://arxiv.org/abs/2601.03267, 2026

    OpenAI. Openai gpt-5 system card.https://arxiv.org/abs/2601.03267, 2026

  11. [19]

    The impact of ai cod- ing tools on developer productivity: An empirical study at microsoft.arXiv preprint arXiv:2302.06590, 2023

    Sida Peng, Eirini Kalliamvakou, Peter Cihon, and Mert Demirer. The impact of ai cod- ing tools on developer productivity: An empirical study at microsoft.arXiv preprint arXiv:2302.06590, 2023

  12. [20]

    Qiskit humaneval: An evaluation benchmark for quantum code generative models

    Sanjay Vishwakarma, Francis Harkins, Siddharth Golecha, Vishal Sharathchandra Bajpe, Nicolas Dupuis, Luca Buratti, David Kremer, Ismael Faro, Ruchir Puri, and Juan Cruz- Benito. Qiskit humaneval: An evaluation benchmark for quantum code generative models. arXiv preprint arXiv:...

  13. [21]

    Probable inference, the law of succession, and statistical inference.Journal of the American Statistical Association, 22(158):209–212, 1927

    Edwin B Wilson. Probable inference, the law of succession, and statistical inference.Journal of the American Statistical Association, 22(158):209–212, 1927

  14. [22]

    Grok 4.https://x.ai/news/grok-4, 2025

    xAI. Grok 4.https://x.ai/news/grok-4, 2025

  15. [23]

    Qwen3 technical report.arXiv preprint arXiv:2505.09388, 2025

    An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jia...

  16. [24]

    Glm-4.7 overview.https://docs.z.ai/guides/llm/glm-4.7, 2025

    Z.ai. Glm-4.7 overview.https://docs.z.ai/guides/llm/glm-4.7, 2025

  17. [25]

    Docprompting: Generating code by retrieving the docs

    Shuyan Zhou, Uri Alon, Frank F Xu, Zhiruo Wang, Zhengbao Jiang, and Graham Neubig. Docprompting: Generating code by retrieving the docs. InProceedings of ICLR 2023, 2022. 18 A Appendix: Complete Experimental Results Thisappendixprovidesthecompletevisualizationsetandcompactsumm...

Pith tools

Reviewed July 11, 2026 · model on record in the stance chip above.