# A Graph-Based Approach for Modelling Quantum Circuits
## 2 Related Work  
The contribution of the Model-Driven Engineering (MDE) approach [10] to software construction over the last 20 years is undoubted, mainly in terms of productivity improvement both by increasing the value of the software artefact and by increasing the expectation of use [11]. These models embed simplified versions of the represented reality where some details are hidden or removed because they are irrelevant from a given perspective or for a given purpose. These models are therefore independent of the language and programming paradigm that will subsequently be used to translate them into code. Moreover, thanks to these models, knowledge sharing between technical and non-technical staff is made easier by facilitating the use of concepts close to the problem domain. Accuracy, predictability, comprehensibility, among others, are some of the desirable attributes for these models [12]. Each model is built according to a metamodel, satisfying the concepts, relationships and constraints determined in it. In other words, a metamodel is \"a model that defines the structure of a modelling language\" [13]. In the context of MDE, model transformations are a set of rules for deriving output (another model or free-form text) from an input model. Useful tools for this process are called 'transformation engines' and include both model-to-model and model-to-text transformations, the latter being an approach to automate the generation of free-form text (including source code). This is where the great potential of MDE lies: the important concepts for the application to be developed are designed and manipulated, instead of lines of code in a programming language. The variety of model transformation approaches is enormous [14], including model checking to determine the presence of desirable properties and the absence of those to be avoided [15]. Models and the transformations between them are the focus of the MDE approach. Regarding QC, quantum algorithms are defined as operations acting on qubits in a given order, where both the operations and the state of the qubits are defined in the complex number plane \(\mathbb{C}\). Therefore, the transformation embedded in a quantum algorithm is a mathematical function that operates in a complex vector space. Furthermore, QC has a probabilistic nature that is intrinsic to the quantum mechanical processes that underpin it. Although the use of quantum gates and circuits partially abstracts away the underlying difficulty of designing quantum algorithms, there is still a large conceptual gap between the way algorithms are conceived in classical and quantum computing. Therefore, QC is a perfect candidate for applying MDE techniques to exploit its abstraction and generation capabilities. Quantum software development is not being neglected by the Software Engineering community, quite the opposite. Some works are beginning to take the first steps towards defining key Software Engineering concepts such as modularity, cohesion and coupling in the context of quantum computing [16]. In [9], a metamodel for representing quantum circuits and a model-to-text transformation for generating quantum code is introduced. In particular, a model-driven infrastructure is used to automatically generate quantum programs from satisfiability problems through model-to-model transformations and embedding the well-known quantum Grover's algorithm. The aforementioned work demonstrates the application of models to the development of quantum software. Other authors are contributing to the adoption of traditional software modelling languages such as UML. Another example is [17], which describes a UML profile for modelling quantum circuits. The immediate benefit of this approach is the ability to integrate quantum models with classical ones, thus contributing to the development of hybrid applications that combine both computational models. In this sense, ref.