CC4Q工作台:从量子代码仓库到可分析的代码注释
CC4Q Workbench: From Quantum Repositories to Analyzable Code Comments
AI总结:
CC4Q Workbench是整合注释提取等步骤的开源工作台,可处理量子SDK仓库,经实验验证其在Qiskit仓库上运行良好,分类预测与人工标注一致性达85.0%。
摘要:
量子软件开发工具包(SDK)提供高级应用程序编程接口(API),使用这些API需要理解底层数学原理、电路语义和硬件属性。代码注释可提供API调用中未明确的自然语言或结构性解释。然而,研究新量子SDK中的注释仍需研究人员协调注释提取、量子特定分类和人工验证等独立步骤,导致重复的集成工作。为解决该问题,我们提出CC4Q Workbench,这是一个开源工作台,将这些步骤整合为可复用的工作流。给定指定修订版本的Python仓库,CC4Q Workbench自动提取代码-注释对,将注释分割为句子级单元,并应用两个训练好的分类器识别量子特定内容并分配量子知识类别。其网页界面支持捆绑数据集的探索、代码片段的检查、从新仓库构建语料库、在二元标注中隐藏模型预测的人工标注,以及使用导出的标注进行分类器微调。该发布提供了包含39593个句子级代码注释单元(SCCU)的六个SDK数据集的汇总统计,其中17517个可在网页界面中浏览。将该工作流应用于原始CC4Q数据集之外的三个额外应用层Qiskit仓库时,无需修改代码即可运行,并生成11517个SCCU。对379个SCCU的人工验证显示,人工标注与二元分类器预测之间的一致性为85.0%。
英文摘要:
Quantum software development kits (SDKs) expose high-level APIs whose use requires an understanding of underlying mathematical principles, circuit semantics, and hardware properties. Code comments can provide natural-language or structural explanations that are not explicit in API calls. However, studying comments in a new quantum SDK still requires researchers to coordinate separate steps for comment extraction, quantum-specific classification, and manual verification, resulting in repeated integration effort. To address this problem, we present CC4Q Workbench, an open-source workbench that integrates these steps into a reusable workflow. Given a Python repository at a specified revision, CC4Q Workbench automatically extracts code-comment pairs, segments comments into sentence-level units, and applies two trained classifiers to identify quantum-specific content and assign quantum-knowledge categories. Its web interface supports exploration of bundled datasets, inspection of code snippets, corpus construction from new repositories, manual annotation with model predictions hidden during binary labeling, and classifier fine-tuning using exported annotations. The release provides aggregate statistics for six SDK datasets comprising 39,593 sentence-level code comment units (SCCUs), of which 17,517 are browsable in the web interface. Applied to three additional application-layer Qiskit repositories outside the original CC4Q dataset, the pipeline ran without code changes and produced 11,517 SCCUs. Manual verification of 379 SCCUs showed 85.0% agreement between human annotations and the binary classifier's predictions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。