Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quantum-kittens
GitHub Repository: quantum-kittens/platypus
Path: blob/main/notebooks/summer-school/2021/lec5.1.ipynb
3855 views
Kernel: Python 3

Building a Quantum Classifier

In this lecture, Amira integrates everything presented in the previous lectures to perform Quantum Machine Learning. This talk gives a high level overview of what it means to build a quantum machine learning model via the presentation of a quantum classifier. Amira presents the limitations of this model, discusses whether it is advantageous compared to classical versions, and how to think about more interesting and complex models. After a small recap on the theoretical perfomances of quantum computing thanks to the properties of interference or exponential state space, Amira explains what we think of when talking about quantum machine learning: classical data that is somehow processed by a quantum computer.

Indeed, quantum machine learning takes place in the general framework of classical machine learning where we try to find any piece of calculation that is proven to have some kind of advantage when run on a quantum computer. The question now is to think of what can be done with our near-term quantum computers. This leads to the concept of variational models or ansatz that are quantum circuits containing trainable parameters. Amira then explains how this model can be used to build a quantum classifier. The goal is finally to train a quantum circuit on labelled samples in order to predict labels for new data. To do so, Amira explains in details during the rest of the lecture the different required steps: encode the classical data into a quantum state, apply a parameterized model, measure the circuit to extract labels and finally use optimization techniques like a quanutm equivalent of gradient descent to update model parameters. The lecture conlcudes on the discussion about the advantages of such techniques for present or future applications regarding the development of quantum computers.

FAQ

What does quantum data mean? It can be thought as data information that comes from a quantum system. In quantum chemestry, at the end of an experiment on a studied particle following the properties of quantum mechanics, the state is considered as quantum information.
Why is entanglement needed in variational models? When talking about quantum computing and the advantages compared to the classical counterpart, we want something that is difficult to be represented classically. Entanglement is a key setup that we do not have classically to help building a different architecture.
Many qubits are needed to encode the data thus increasing the complexity and computation, is that rigth? Not always. It is very depending on how you choose to encode your data. In theory, you could take one qubit and even encode a high dimensional datapoint. In terms of the increasing number of qubits, it is not necessarily true. However, a large dataset requires a large circuit that will be rerun for different datapoints.
How do you approach the creation of an Ansatz to a new problem and choose the right rotations or entanglement parts to solve this problem? We draw a lot of inspiration from different papers like one studying different types of architectures for a given problem and see what happens when they become more and more expressive with circuits sampling from the full Hilbert space. However, such expressive circuits also come with a lot of different problems. Finding a good Ansatz is not an easy thing to do and we are still trying to figure out how to do it efficiently. To do so, we need knowledge about the type of data and problem we are trying to solve and then think about how to structure the variational circuit. For the rotations, it is all about the final measurement: some rotations will not have any effects on certain measurements so they need to be complementary. About the entanglement if we do it on two or more qubits is an exploratory process.
How can these quantum machine learning models be implemented in noisy devices such as the current quantum computers and take into account this noise? These variational circuits are actually very nice because they are a little bit robust to the noise. That is why they seem to work well even on these devices. Indeed, on average, they can give us good solutions that are approximate to the solution we want to find for a given problem more specifically with the QAOA circuit which will be later discussed.

Other resources