quantum machine learning Artificial Intelligence

What is Quantum Machine Learning (QML)?

31/01/23 5 min. read

If Machine Learning (ML) is interesting, Quantum Machine Learning (QML) o Automatic Learning is doubly interesting 💡. During the last few years, we have seen very significant advances in both fields, and together they create an area of infinite opportunities. Do you dare to explore them? 🤔

We will look at some basic concepts of Quantum Computing and Quantum Machine Learning and get down to work on an example with code.

What is Machine Learning? 👇👇

Let’s briefly recall some concepts, classical programming focuses on: from data and certain rules pre-defined by the programmer, after the execution of the program we get the results.

Well, in Machine Learning we pass the data along with the expected results and the algorithm seeks to identify patterns and relationships in them (“training”). In a subsequent execution (“inference or prediction”) without knowing the results, but using those rules/patterns previously found, it is able to predict the result.

comparison between classical programming and Machine Learning

What is Quantum Computing? 👇👇

Quantum technology has brought about a paradigm shift in the field of computing. Based on the laws of quantum mechanics, it solves more efficiently some complex problems that cannot be solved by traditional computers.

The main feature is that quantum computers are based on quantum bits and qbits. In classical computing, we work with only one state at a time, either 0 or 1. On the other hand, qbits can be in several states simultaneously and can operate on all of them at the same time. We explain how qubits work in this video 👇👇:

👉👉 If you want to know more details about quantum computing, I recommend you to take a look at the following post in which quantum computing concepts are detailed.

The four types of Quantum Machine Learning

Depending on how quantum and machine learning are combined we have four major families, depending on the type of data, whether it is quantum (Q) or classical (C), and where the processing is done, on quantum (Q) or classical (C) computers.

Classification of QML problem types, based on the type of data and where the data processing is performed (classical and/or quantum computing).

CC – Classical Machine Learning that does not directly have a quantum basis, but borrows ideas from quantum physics. The application of tensor networks initially created for quantum systems is an example.

QC – Classical ML problems used to learn from quantum states. Classifying quantum states emitted by a physical experiment would be a problem addressed by this approach.

CQ – using quantum computers to process classical datasets. In other words, finding more efficient solutions to problems typically solved with ML but on quantum computers. Classical systems such as image classification are loaded onto quantum computers to learn the correct algorithm parameters.

QQ – This approach would be the “purest” approach, using quantum computers directly on quantum states. The output state of a quantum simulation is used as input to an ML algorithm.

For example, a quantum polar decomposition algorithm can be used to learn unitary transformations in certain systems.

When we talk about QML problems, experts mainly refer to CQ and QQ problems, since in these the learning is performed on quantum computers.

Let’s get down to business: How to apply Quantum Machine Learning 🙌

One of the most widespread algorithms for solving supervised classification problems is SVM (Support Vector Machine). The main challenge we face is how to apply these methods based on linear combinations to separate/classify real-world data, where linear combinations are not enough.

Representation by means of kernel functions offers a solution to this problem: (a technique for projecting data by non-linear combinations into a higher dimensional space). However, there are limitations when the space becomes very large and kernel functions are computationally expensive to compute.

We are going to apply Quantum Computing to calculate a kernel function with a simple example, to represent the data of the classification problem by a quantum state, and as expected we will obtain a more optimal solution.

In the following image we see how the SVM based on linear combinations cannot optimally classify the data, however, thanks to the calculation of the kernel function with Quantum Computing we manage to separate them in a more efficient way.

Comparativa de como separa los datos el SVM con kernel lineal (computación clásica) vs kernel no lineal (computación cuántica)

We leave you the detail of the code and how to implement it in the following ✨GitHub Repository.

The Future of Artificial Intelligence (AI) using quantum computing 🔮

The future of accelerated AI thanks to quantum computers looks bright, being able to solve complex AI problems and obtain multiple solutions simultaneously. Resulting in AI performing more complex tasks more efficiently.

Given that only a handful of the world’s most prestigious Big Tech Universities are developing quantum computers, it seems we are still a bit far away from reaching that future. Or maybe we are not so far away… 🤗

Santander Digital Services is a company belonging to Grupo Santander, which is based in Madrid and has more than 7,000 employees. We are working to move Santander towards a Digital Bank with branches.

Take a look at the current vacancies here and join this amazing team and Be Tech! with Santander 🚀

Follow us on LinkedIn and Instagram.

Juanjo Prieto Torres

Santander Global T&O

Senior Data Scientist in the Global Cybersecurity team, Mathematician, curious and passionate about math and data-based solutions.

Vision: Curiosity, technology + team as a driver of innovation. Fascinated by AI, ML, Quantum Computing, Blockchain…

👉 My LinkedIn profile

 

Other posts