Grupo Alarcos · Conference paper · 2024
A preliminary study of the usage of design patterns in quantum software
Ricardo Pérez del Castillo, Míriam Fernández Osuna, José Antonio Cruz Lemus, Mario Piattini Velthuis
Quantum computing deserve more and more attention owing to all the promising applications in several fields. These applications are achieved through quantum software. The development of quantum software still poses some challenges as the complexity of quantum algorithms, lack of abstraction mechanisms and the need to integrate classical and quantum software. These challenges could be addressed by applying some quantum software design patterns, which have been already proposed in the literature. However, there is a lack of insights about what is the extend of application of certain design patterns, and how are the characteristics of quantum circuits where these patterns are applied. Thus, this paper proposes a preliminary code repository analysis to systematically analyze the application of five design patterns: initialization, uniform superposition, oracle, entanglement and uncompute. The obtained dataset with 80 source code files in Qiskit and OpenQASM shows that initialization and uniform superposition are the most common design patterns. This study can help quantum software developers to understand how and when to apply some design patterns. Additionally, insights of this study could help to define new design patterns.