# On the Definition of Quantum Programming Modules
## 1 Introduction  
Designing quantum programs (QP) is quite different from the way in which it is performed in classical computing, basically because our intuition is anchored in radically different mathematical models and computer architectures [1]. The (surprising) laws of quantum mechanics, which underpin quantum computers, allow us to formulate and solve problems in a new and radically different way from what we are used to in our macroscopic world. To harness the computational power offered by quantum computers, we, as programmers, have to change the way we conceive solutions, at least in terms of their design. At the same time, it only makes sense to resort to the quantum solution if it is better, from a computational point of view, than any solution available in the \"classical\" model. In other words, it would be of little use to have a quantum algorithm to solve a problem that could be solved with a conventional computer with the same order of complexity. This makes the quantum programming paradigm a challenge that becomes even more crucial in terms of what Software Engineering as a discipline can provide [2]. To give support to computation, several quantum architectures [3] and programming languages [2] have been proposed over the last twenty years. Since the first practical quantum programming language QCL was introduced in 1988, many other languages have appeared. They can be categorized into at least four groups [4] attending to the level of abstraction of the primitives they provide: from high level to hardware-specific ones. In all of them, QP are translated into a quantum circuit composed by a set of sequences of quantum gates that manipulate the state of qubits in order to perform a computation [5]. The processing of quantum information is also quite different to classical computing. Quantum computing is based on the phenomenon of quantum mechanics (superposition, entanglement, interference, etc. ), whereas in conventional computing the state at a giventime is either \"on\" or \"off\" (purely binary) [6]. Moreover, with quantum machines the power of computation increases exponentially with the number of bits, in contrast to the linear proportion of conventional computers. Thus, QP are very well suited for tasks including optimization, analysis, and simulation of huge quantity of data [7]. On the downside, very common operations in classical programming are no longer possible for quantum computers, for instance, to produce perfect copies of unknown quantum states [8]. However, perhaps the main difference with classical programming is the fact that quantum algorithms are designed in a probabilistic way to solve the problems. These and other relevant differences form the perfect challenge for a community of software developers used to a set of concepts and rules that are no longer valid for the new paradigm [9]. Very recently, several authors have highlighted the importance of adopting the software engineering discipline in the field of quantum computing. One of the most representative works is [5], where the term \"quantum software engineering\" is redefined and introduces the \"quantum software life-cycle\". Furthermore, the authors identify the main challenges and opportunities for the establishment of the new discipline. The first remark of importance is that quantum software development is much more than only quantum programming. Thus, a new approach is needed to cope with quantum software development. According to that, and in analogy with the classical software engineering approach, quantum software has to be built economically, has to be reliable, and has to work efficiently on real quantum computers by means of using the well-known artifacts, methods, tools, and processes. In [5], the same phases of the classical software development life cycle are imported to the quantum one and are extended to consider the \"quantum\" aspect: quantum software requirements analysis, quantum software design, quantum software implementation, quantum software testing, and quantum software maintenance.