# Towards Explainable Quantum Machine Learning for Mobile Malware Detection and Classification +
## 2 Background
### Quantum Computing  
Quantum computing was born to give answers to unsolvable problems with the use of classic computing, and it takes into account quantum mechanics laws, i.e., the part of physics that studies the smallest particles and how they assume more than one state at the same time [22]. In a nutshell, we can state that quantum mechanics is the basis of quantum computing. Indeed, it refers to the scientific laws that regulate the behavior of molecules, atoms, and subatomic particles and uses the related physical phenomena known as superposition and entanglement for the calculation [23].  
Computers normally process information in bits that are zeros and one sequence (i.e., on and off), while quantum computers use Quantum Bits (i.e., qubits), which implement the concept of superposition. Simply speaking, the latter is when a bit can assume a value of zero, one, or even both at the same time. The superposition state represents a combination of all possible configurations. Overlapping groups of qubits can create complex and multidimensional computational spaces. It is in these spaces that complex problems are represented in new ways.  
Figure 1: Two examples of Android malware converted into grayscale images: in detail on the left, a sample belonging to the _Mecor_ family, while on the right, a sample obtained from the _Airpush_ family.  
Mathematically, a qubit can be seen as a unit vector described in a two-dimensional complex Hilbert vector space \(\mathbb{C}^{2}\). To represent a complex vectorial space, the use of the notation of Dirac is opportune. It is also possible to obtain the qubit visual representation using the Sphere of Bloch. In that, we can imagine that all possible states are placeable on the surface of a sphere of unit radius, where the two poles represent the two fundamental states, respectively. Starting from Figure 2, it is possible to establish a bi-univocal correspondence between the representation of a generic qubit state:  
\[\ket{\psi}=\alpha\ket{0}+\beta\ket{1}\]  
and its representation on the surface of the sphere in \(\mathbb{R}^{3}\):  
\[\ket{\psi}=\cos(\theta/2)\ket{0}+e^{\varphi\varphi}\sin(\theta/2)\ket{1}\]  
where \(\theta\) and \(\varphi\) are real numbers that identify the spherical coordinates of the point. This formula has its correspondence to the real physical world: any physical system with at least two discrete and sufficiently separated energy levels can indeed be used for the qubit representation.  
Another important difference between classical and quantum computing is that, in the traditional field, the system remains constant from measurement to measurement and the outcome never changes. Indeed, in the quantum world, each operation is irreversible, and the result of a measurement is uncertain. A similarity between classical and quantum computing can be found in the usage of a register. A register is a collection of \(n\) qubits that can be represented in \(2^{n}\) different states. The same happens in classic binary encoding. To represent registers and the qubit union, the _tensor product_ is represented by the following symbol: \(\otimes\).  
Due to its unusual processing capacity, quantum computing is aimed at sectors that are traditionally computationally intensive, such as Machine Learning. Machine Learning models themselves can have generalization problems, and given the task of making more and more precise predictions, they become more complex, require more data, and their compu  
Figure 2: The Bloch Sphere, the geometrical representation of the pure state space of a two-level quantum mechanical system, i.e., a qubit [24].  
tations become more expensive. In this case, quantum computing represents an interesting development, as it promises improved performance and better generalization.