🤖 AI Summary
This study addresses the lack of systematic empirical analysis on how quantum software patterns are combined and sourced in real-world projects. To bridge this gap, the authors propose a novel pattern detection approach that integrates multi-channel matching with lexical expansion, constructing a traceable component call graph stored in a graph database. By combining static analysis, natural language processing, and large language model (LLM)-enhanced classification, their method enables fine-grained mining of pattern co-occurrence relationships and direct invocation ratios for the first time. Evaluated on the Qrisp framework, the approach achieves a micro F1-score of 0.712—an improvement of 63%—and validates the practical usage of all 23 known quantum patterns across 80 real projects. The work also contributes an open-source quantum pattern analysis pipeline (qpa) with 286 component mappings and a cross-framework dataset capturing pattern usage across five quantum software ecosystems.
📝 Abstract
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.