AI 中文总结
本研究扩展了量子模式挖掘工具,经评估其在Qrisp上准确率提升,构建了模式组件调用组合图并发布相关流水线、知识库与数据集,支持量子模式采用与演化的可复现研究。
AI 中文摘要
量子软件模式为构建量子程序提供了高层抽象,但目前关于它们在实践中如何被采用的实证证据仍很少。在之前的工作中,我们将现有的量子模式图谱扩展为包含61种模式的目录,创建了一个将框架组件与这些模式关联的知识库,并构建了一个从开源代码中挖掘模式实现的工具。我们将该工具应用于80个项目,发现所有23种模式都在实践中出现。在本研究中,我们为该工具增加了两个额外的匹配通道和一个词汇扩展步骤,并在Qrisp(一个未包含在知识库中的框架)上对其准确率进行了定量评估,结果显示,经过词汇扩展步骤的微F1值达到0.712,而未经过该步骤的微F1值为0.449。随后,我们构建了组合图,记录与模式关联的高层框架组件之间的调用关系,并将这些图存储在图数据库中。我们利用这些图研究模式实现如何在每个框架内组装、模式为何共同出现,以及一个模式的检测数量中有多少来自开发者直接调用的组件,而非框架内部调用引入的组件。我们发布了开源挖掘流水线qpa,以及将五个来源中的286个框架组件映射到模式目录的知识库(该知识库由对新提取组件进行分类的LLM ensemble支持维护)和生成的模式使用数据集,以支持关于量子模式采用和演化的可复现研究。
英文摘要
Quantum software patterns provide high-level abstractions for building quantum programs, but there is still little empirical evidence on how they are adopted in practice. In prior work, we extended an existing quantum-pattern atlas into a 61-pattern catalog, created a knowledge base that links framework components to those patterns, and built a tool that mines pattern implementations from open-source code. We applied this tool on 80 projects and find that all 23 patterns occur in practice. In this work, we extend the tool with two additional matching channels and a vocabulary expansion step, and execute a quantitative evaluation of its accuracy on Qrisp, a framework not present in the knowledge base, reaching a micro-F1 of 0.712 against 0.449 without the expansion step. We then construct composition graphs that record calls among the high-level framework components associated with patterns and store them in a graph database. We use these graphs to examine how pattern implementations are assembled inside each framework, why patterns co-occur, and how much of a pattern's detection count comes from components called directly by developers rather than introduced through internal framework calls. We release qpa, an open-source mining pipeline, together with the knowledge base, which maps 286 framework components across five sources to the pattern catalog, maintained with the support of an LLM ensemble that classifies newly extracted components, and the resulting pattern usage dataset, to support reproducible studies on the adoption and evolution of quantum patterns.