Mining Quantum Software Patterns in Open-Source Projects
Neilson Carlos Leite Ramalho, Erico A. da Silva, Higor Amario de Souza, Marcos Lordello Chaim
TL;DR
Quantum software engineering tackles the gap between low-level circuit construction and practical, real-world quantum applications. The authors perform an empirical study of 985 Jupyter Notebooks from 80 open-source projects, building a knowledge base from Classiq, PennyLane, and Qiskit, and extend the pattern catalog by nine new patterns to 61. They deploy a reusable semantic search tool based on sentence-transformer embeddings to detect patterns across the dataset, finding 573 matches across 251 files and 22 of 24 framework patterns represented, including all nine new patterns. The results reveal a three-level abstraction in practice—foundational utilities, algorithmic building blocks, and domain-specific applications—signaling a maturing ecosystem and offering a practical reference for researchers and practitioners.
Abstract
Quantum computing has become an active research field in recent years, as its applications in fields such as cryptography, optimization, and materials science are promising. Along with these developments, challenges and opportunities exist in the field of Quantum Software Engineering, as the development of frameworks and higher-level abstractions has attracted practitioners from diverse backgrounds. Unlike initial quantum frameworks based on the circuit model, recent frameworks and libraries leverage higher-level abstractions for creating quantum programs. This paper presents an empirical study of 985 Jupyter Notebooks from 80 open-source projects to investigate how quantum patterns are applied in practice. Our work involved two main stages. First, we built a knowledge base from three quantum computing frameworks (Qiskit, PennyLane, and Classiq). This process led us to identify and document 9 new patterns that refine and extend the existing quantum computing pattern catalog. Second, we developed a reusable semantic search tool to automatically detect these patterns across our large-scale dataset, providing a practitioner-focused analysis. Our results show that developers use patterns in three levels: from foundational circuit utilities, to common algorithmic primitives (e.g., Amplitude Amplification), up to domain-specific applications for finance and optimization. This indicates a maturing field where developers are increasingly using high-level building blocks to solve real-world problems.
