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.
翻译:近年来,量子计算已成为活跃的研究领域,其在密码学、优化和材料科学等领域的应用前景广阔。随着这些发展,量子软件工程领域既存在挑战也蕴含机遇,框架和更高层次抽象的开发吸引了来自不同背景的从业者。与早期基于电路模型的量子框架不同,近期的框架和库利用更高层次的抽象来创建量子程序。本文通过对来自80个开源项目的985个Jupyter Notebook进行实证研究,以探究量子模式在实践中如何被应用。我们的工作包含两个主要阶段。首先,我们基于三个量子计算框架(Qiskit、PennyLane和Classiq)构建了一个知识库。这一过程使我们识别并记录了9个新模式,它们对现有量子计算模式目录进行了细化和扩展。其次,我们开发了一个可复用的语义搜索工具,用于在大型数据集中自动检测这些模式,并提供面向从业者的分析。我们的结果表明,开发者使用模式的三个层次:从基础的电路工具,到常见的算法原语(例如Amplitude Amplification),再到金融和优化等领域的特定应用。这表明该领域正日趋成熟,开发者越来越多地使用高层构建块来解决现实世界问题。