Quantum Machine Learning for Image Classification

Quantum Computing (QC) was born as a purely theoretical subject. Thus, in the beginning, the main category of researchers in the area was physicists and mathematicians. Since IBM introduced the first quantum computer, global interest in this emerging technology has been growing more and more, involving computer science and engineering researchers. Machine learning is another rapidly growing technology, used in a wide range of applications where traditional computing is not sufficient. The two technologies are merged in the thesis work. The different ways in which a combination of them can occur are discussed, as well as the explanation why there is not a single definition of Quantum Machine Learning (QML). Firstly, quantum computing is examined in depth. The basic elements of quantum computation theory, based on the fundamental principles of quantum mechanics, are introduced. The attention is focused on the qubit description on the Bloch sphere, the fundamental quantum gates, and examples of quantum algorithms. Therefore, the differences between quantum simulators and quantum processors are analysed, including the frameworks that provide tools to interact with them. Focusing on Quantum Machine Learning, the different definitions of the technology are described. There are four distinct approaches that are differentiated by the type of data used (quantum or classical) and by the device processing them (quantum or classical). In this thesis, QML is defined as the approach that uses classical data to feed a quantum device. The two possible methods for developing QML algorithms are: 1) to translate existing classical models into the terms of quantum computing; 2) to leave the existing models of classical machine learning completely, and explore new possible ways of doing QML to take full advantage of the physical characteristics of a quantum computer. The strategy adopted is the first one, thus it is used a state-of-the-art hybrid model of Quanvolutional Neural Network (QNN), composed of both quanvolutional and classical convolutional layers. The quanvolutional layers reproduce the same concept of the classical ones: they are made of quantum filters that generate feature maps through locally transforming input data. The transformation can be performed by variational quantum circuits or random quantum circuits. The specific field where Quantum Machine Learning is applied is image classification. The considered case study is a labeled dataset with X-ray images of lungs (labels: pneumonia, normal). The images are pre-processed and cropped for being used by quantum circuits, thus some information is lost. The main aim of the thesis is to understand whether and in which ways Quantum Machine Learning could bring advantages in the mentioned classification in terms of timing, accuracy, or dataset reduction, despite the large decrease in images' resolution. Different configurations of the hybrid model (with a different number of quantum filters and different settings of convolutional layers) are analysed and tested. The current quantum devices have many limitations, thus the time is still immature to observe a significant change in perspective. Nevertheless, the obtained results are promising for the future of QML in terms of dataset and hyperparameters reduction.