# A Graph-Based Approach for Modelling Quantum Circuits
## 1 Introduction  
In their seminal article, [PERSON] [1] described an implementation of a Turing machine by using Quantum Mechanics effects, while [PERSON] [2] subsequently suggested that quantum computers could outperform classical (electronic) computers in performing some types of computation, in particular, the simulation of physical systems. These two articles launched the new field of Quantum Computing (QC) in Computer Science, which finally attracted the world's attention following the publication of an article by [PERSON] [3], describing a quantum algorithm that could factorize prime numbers (and thus break RSA encryption) in \(\Theta(\log^{3}(N))\), and an article by [PERSON] [4], describing a quantum algorithm for searching in an unordered data set in \(\Theta(\sqrt{N})\). Since these articles were published, the development of QC has experienced incredible growth, both in theory and in practice. Given the new computing power offered by computers that can exploit quantum mechanical effects to execute the aforementioned (and other) quantum algorithms, the applications of QC are almost endless [5]: economics, privacy, chemistry, physics, logistics, energy, artificial intelligence, optimization, machine learning, and medicine, among others. Quantum software development has experienced spectacular growth in recent years thanks to the reality of quantum computers and the improvements in their computing power. For the first time in the recent history of computing, there are two coexisting computing models: classical computing and quantum computing, both based on different physical principles. Each has its own rules and characteristics, its own set of guiding principles and basic computing units to develop programs that solve real-world problems. Regardless of the enormous differences that exist in the hardware needed to run a program and the abstractions that support software development in each computing model, it isthe task of the Software Engineering discipline to support each of them with techniques, methodologies and tools, based on knowledge acquired since the 1960s [5; 6], to ensure that the software developed meets requirements regarding functionality, quality, time and budget. There are several models of quantum computation (see [7] for an in-depth review) tailored in some cases to specific hardware technologies. But all of them share a common thread in that they allow the user to develop quantum software that exploits the unique effects of quantum mechanics, superposition and entanglement, to develop quantum algorithms that can achieve exponential speedups in solving some problems compared to the performance of their classical counter-parts (i.e., those running in digital computers). A quantum system consisting of 'n' qubits is described by a \(2^{n}\)-dimensional Hilbert space. When a qubit is superposed, its state is modelled as a linear combination of the basis states \(|0\rangle\) and \(|1\rangle\), and thus the state of the system is no longer unique, but is rather a combination of the individual states of the system's qubits. The second effect, entanglement, implies that the state of the system can no longer be described as a combination of the individual states of the qubits, but that only the state of the group of qubits as a whole exists. Among the available models of QC, this paper focuses on the Unitary Circuit Model [8], given its wide spread usage in the QC community (it is the one employed by major QC providers, such as IBM) and its generality (it is also Turing-complete [8]). This quantum circuit is one of the best-known models for quantum computing in which, like classical circuits, a computation is modelled as a sequence of quantum gates operating on qubits. More recently, the Software Engineering community, and particularly within the discipline Software Language Engineering, is taking the first steps towards applying systematic, disciplined, and quantifiable approaches to the development, use, and maintenance of quantum software languages.