# What is Quantum Machine Learning Exactly?

>>> Lets understand why would anyone use Quantum Computers? For Machine Learning?

Its proven that Quantum Computers cannot solve NP problems in sub-exponential time. Which was the primary purpose of inventing quantum computers. These are all the problems humanity has not been able to solve using Classical Computers.

Then, why does one use Quantum Computers? What do we hope to achieve? What benefits can anyone derive from them?

Well, Quantum Computers can deliver ‘acceleration’ over classical computers for solving the same problems albeit differently using Quantum Mechanics Principles. Normally we expect Quadratic Acceleration or rarely Exponential Acceleration at best. (Over Classical Computers)

So that is our intent in using Quantum Computers for Machine Learning. To get acceleration over classical computers. That is to solve machine learning problems many times faster than classical computers.

>>> So, what does Quantum Machine Learning involve?

The Model, Structure & Parameters

With machine learning we do two things together. Firstly we learn from the data we have. And secondly for unseen data we make predictions using what we have learnt. The thing we learn is called ‘The Model’

The model has a structure and parameters. Structure basically means how it is internally designed or connected, its width, depth, layers etc. And parameters basically mean the numerical values used in the model that represent and correspond to the data we feed into it to learn from.

The Quantum Data & State Preparation

It is also quite clear that what we have at our disposal is Classical Data. While what the Quantum Computer can operate on is quite complex due to its quantum nature. For example we know that 100 Qubits can represent 2^100 combinations. Which a quantum algorithm can use.

Hence we have to load and convert the classical data into a more compressed, complicated form for processing by the Quantum Machine Learning Algorithm. This is done by loading and encoding to prepare the initial quantum state in terms of Qubits. Which are then put into the Quantum Circuit to execute. Please see the second column ‘QML algorithm’ in the first diagram above to understand how this step differs from classical machine learning in the first column.

Parametrized Quantum Circuits

Without going into details about how exactly a Quantum Machine Algorithm is represented as Quantum Circuits that can be executed on a Quantum Computer to learn from data. We should note that the circuit corresponding to ‘any’ quantum machine learning algorithm will have a specific structure and will have a lot of parameters used in it which we hope to learn from data.

Such circuits are in general called parameterized quantum circuits.

>>> The Overall Workflow

Such solutions are called as Hybrid Quantum-Classical Solutions because the higher level logic is executed in a Classical Program which delegates intractable problem solving functionality to a Quantum Program.

In technical terms such solutions are also called Variational Quantum Algorithms. The classical program sets some parameters at a time and executes the parameterized circuit on a quantum computer. It does this many many times e.g. millions. Each time with different parameters for the quantum circuits. In doing this repetitive process the classical program tries to figure out the best parameters for the parameterized quantum circuit. And hence in a sense ‘learns’ the best parameters. Which basically in our case means that the solution will learn the ‘Best’ Quantum Machine Learning Model from the data we had at our disposal.

Such hybrid solutions can run reasonably well on NISQ quantum computers. Because ‘any’ hybrid solution ‘cannot’ give a perfect answer. All such algorithms are heuristics. And they can give approximate answers at best. Which is great for the NISQ quantum computers we have at our disposal because they are also not accurate and can only solve problems approximately or never at all.

>>> The HHL [Quantum] Algorithm

The HHL algorithm is a quantum algorithm for solving a linear systems of equations, designed by Aram Harrow, Avinatan Hassidim, and Seth Lloyd, formulated in 2009. The algorithm estimates the result of a scalar measurement on the solution vector to a given linear system of equations.

https://en.wikipedia.org/wiki/Quantum_algorithm_for_linear_systems_of_equations

Why is HHL Algorithm so important?

The algorithm at the center of the “quantum machine learning” mini-revolution is called HHL. Many of the subsequent quantum learning algorithms extend HHL or use it as a subroutine. It is the single most important underlying quantum algorithm in quantum machine learning.

>>> Conclusion

Simply remember this, if some Quantum Machine Learning Algorithm internally uses Grover’s Algorithm then the Speedup/Benefit is Quadratic, and if it internally uses HHL Algorithm then the Speedup/Benefit is Exponential. This can also be seen in the table below.

http://scitechconnect.elsevier.com/brief-overview-quantum-machine-learning/

Outside Automatski, we are far from developing scalable universal quantum computers. Learning methods, however, do not always require universal quantum computing hardware: special cases of quantum machine learning are attainable with quantum annealing quantum computers just by using optimization models.