[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-84710-en":3,"doc-seo-84710-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},84710,549758252649,"Ivy","https://ap-avatar.wpscdn.com/avatar/8000253669c5317157?_k=1778319167496531819",8,"Research & Report","Benchmarking API Drift in LLM-Generated Quantum Code Across Successive SDK Versions","Large language models can generate convincing quantum programming code, yet their ability to target the specific SDK version requested by users remains uncertain. The study frames this as API drift and introduces quantum-api-drift, a benchmark capturing version fidelity via execution success on the requested SDK, cross-version compatibility, observed failure modes, and documentation-guided repairs. Instantiated on Qiskit across v0.43, v1.3, and v2.0, evaluations measure 17 models over 50 tasks with extensive sampling.","arXiv :2607 .04072v 1 [ cs . SE] 5 Jul 2026  \nBenchmarking API Drift in LLM-Generated Quantum Code Across Successive SDK Versions  \nMohammad Arif Rasyidi and Syahirul Faiz  \nDepartment of Computer Science  \nKhalifa University  \nAbu Dhabi, United Arab Emirates  \n{100066916, [100065736}@ku.ac.ae](100065736}@ku.ac.ae)  \nAbstract  \nLarge 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 LLMgenerated 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](https://github.com/arasyi/quantum-api-drift. These)[. These](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.  \n1 Introduction  \nLarge language models are increasingly used as programming assistants for scientific software, including quantum software development kits (SDKs) . In practice, however, users rarely ask for code against an abstract SDK. They ask for code that must run against a specific installed version. This creates a failure mode that is easy to recognize but still poorly measured: a model may generate code that appears sensible, yet targets the wrong API surface for the environment in which it will be executed. We study this problem as API drift in LLM-generated quantum code.  \nThe problem is broader than any single framework. Quantum software stacks evolve rapidly, tutorials age quickly, and generated code often sits at the boundary between static model knowledge and dynamic tool environments. As a result, version mismatches can arise even when the model appears strong on general code generation. Despite this practical importance, existing quantum-code evaluation mostly asks whether a generated solution passes a task, not whether it targets the requested SDK version or remains robust across version transitions.  \nThis gap sits at the intersection of two mature literatures. In code generation, executionbased benchmarks commonly evaluate correctness with Pass@k and related success metrics [4 , 2] . In software evolution, API change is a long-established source of downstream breakage [5 , 3 , 7] .  \nPrior work on quantum code generation, including Qiskit HumanEval, shows that executionbased evaluation is feasible for quantum programming tasks [20] . What remains underexplored is the versioned setting: if a model is explicitly asked to write code for one SDK release, how often does it actually align with that release, how often does the code remain executable in other releases, and how often can version-induced failures be repaired from migr","cbCaikUuz5h1lI2V","https://ap.wps.com/l/cbCaikUuz5h1lI2V","pdf",947893,1,23,"English","en",105,"# Abstract\n# 1 Introduction","[{\"question\":\"What problem does the paper study in LLM-generated quantum code?\",\"answer\":\"The paper studies API drift: when a model is asked to target a specific quantum SDK version, the generated code may still fail because it targets the wrong API surface for the execution environment.\"},{\"question\":\"What is quantum-api-drift and how is version fidelity measured?\",\"answer\":\"quantum-api-drift is a benchmark for measuring version fidelity, defined by execution success on the requested SDK version, cross-version compatibility, failure modes, and documentation-guided repair performance in LLM-generated quantum SDK code.\"},{\"question\":\"How do model strengths relate to failure modes and repair results?\",\"answer\":\"Weaker models more often fail due to broken imports, while stronger models more frequently reach deprecation-level failures. Documentation-guided repair succeeds for a fraction of attempts overall and is substantially more effective for migrating to v2.0 than to v1.3.\"}]",1784197779,58,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"benchmarking-api-drift-in-llm-generated-quantum-code-across-successive-sdk-versions","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/benchmarking-api-drift-in-llm-generated-quantum-code-across-successive-sdk-versions/84710/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does the paper study in LLM-generated quantum code?","Question",{"text":75,"@type":76},"The paper studies API drift: when a model is asked to target a specific quantum SDK version, the generated code may still fail because it targets the wrong API surface for the execution environment.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"What is quantum-api-drift and how is version fidelity measured?",{"text":80,"@type":76},"quantum-api-drift is a benchmark for measuring version fidelity, defined by execution success on the requested SDK version, cross-version compatibility, failure modes, and documentation-guided repair performance in LLM-generated quantum SDK code.",{"name":82,"@type":73,"acceptedAnswer":83},"How do model strengths relate to failure modes and repair results?",{"text":84,"@type":76},"Weaker models more often fail due to broken imports, while stronger models more frequently reach deprecation-level failures. Documentation-guided repair succeeds for a fraction of attempts overall and is substantially more effective for migrating to v2.0 than to v1.3.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":45,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":45,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":45,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":45,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":45,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]