УДК 339.54.012

Applications of quantum machine learning

Хуснутдинов Линар Расимович – аспирант Казанского (Приволжского) федерального университета

Abstract: Article provides an overview of quantum machine learning methods, including how machine learning can be applied in various tasks related to quantum computing.

Keywords: quantum machine learning, machine learning, NQS, CNN, RNN.

Introduction

Quantum machine learning is a huge field, and this article covers only a small part of it. In this overview, we will look at the big picture and see what directions there are in this interesting and dynamically developing field.

In machine learning tasks we have two important components – data and algorithm. In the case of quantum machine learning, we have some “variability”:

  • quantum data;
  • quantum algorithm;
  • classical data;
  • classical algorithm.

Based on this, it is possible to build a classification of machine learning. When we have classical data and a classical algorithm, then this is just ordinary machine learning. But we will consider the other types.

image001

Figure 1. Types of machine learning depending on the data type and algorithm.

Quantum data and the classical algorithm

Classical machine learning applied to quantum data is a very actively developing field of quantum physics and quantum chemistry. The main question in this case is what exactly we mean by “quantum data". Next, let’s look at an examples of possible applications of ML in problems of quantum physics and chemistry.

NQS

Neural Quantum States is a very promising improvement of quantum Monte Carlo, a popular method for approximate solution of quantum physics problems. These problems are computation- ally difficult and their direct numerical solution becomes impossible very quickly as the size of the system and the number of interacting particles increase. In the NQS approach, first published in the journal Science [1], it is proposed to model the wave function |Ψ⟩ of a physical system using a deep neural network. This gives a number of advantages over the usual quantum Monte Carlo in terms of modeling accuracy, and also allows you to explicitly simulate the time-dependent Schrodinger equation. In compare to another popular method called Matrix Product State, NQS gives better scalability and a smaller approximation of complexity, which turns out to be linear in the number of particles in the physical system.

image002

Figure 2. Convergence of NQS in energy depending on the number of training epochs. Vertically, the energy value per spin, horizontally the learning epoch. The dotted line marks the exact value obtained by the direct diagonalization of the Hamiltonian. On the left is the general view, on the right is the hyperfine convergence near the ground state energy. Source [1].

CNN over potentials

Another interesting approach is to apply Convolutional Neural Networks (CNN), a special class of deep neural networks designed for image processing, to physical potentials. The fact is that the three-dimensional energy potential can be represented as a 2D image. For example, you can take the periodic potential energy generated by atoms in a crystal lattice and explore how an electron will behave in such a potential.

image003

Figure 3. An illustration of the use of CNN on energy potentials. Source [2].

There is a limited set of special cases when this problem can be solved analytically. Using such precise solutions, we make a training sample, train CNN, and then we can apply it to other, more complex potentials.

Classical data and quantum algorithm

Now consider classical data (classification and regression problems) and apply machine learning to them, implemented on a quantum computer as a set of operations on qubits.

HHL

One of the most famous algorithms of quantum machine learning is the HHL algorithm [3]. This is an algorithm for solving a system of linear equations in O (N log N) operations. Since a huge number of real-world problems can be reduced to solving a system of equations, this algorithm has enormous potential.

Unfortunately, today its practical application is very limited to a few things:

  • the need for efficient generation of the initial state – without this achievement of HHL superiority is impossible;
  • high requirements for the accuracy of operations, as well as the need for a large number of qubits.

This algorithm is an example of a purely quantum algorithm, where absolutely all operations are performed on a quantum computer.

Quantum k-NN

Another example of a fully quantum algorithm is a modification of the classical nearest neighbor algorithm, with the only difference that to calculate the distances between points in N-dimensional space we use a quantum computer. This algorithm is called Quantum kNN (quantum k nearest neighbors). Today there are quite a few potentially effective implementations of this algorithm, which differ mainly in what distance metric is used in Hilbert space. Unfortunately, the practical use of such algorithms today is limited by the fact that they require efficient quantum memory - quantum memory with random access.

Hybrid learning

Next, consider the hybrid method of quantum machine learning. In these methods, part of the algorithm is implemented in the form of quantum gates, and part is performed on a classical computer.

VQC

Variational Quantum Circuits, or simply variational circuits, is one of the central concepts in hybrid quantum–classical learning. The basic idea is that we use a quantum operation that is given by some classical parameter. Usually this is one or more operations of “rotations” on the Bloch sphere. In this case, the variation of the classical parameter is carried out on a classical computer, for example, using gradient descent.

image004

Figure 4. The scheme of operation of the variational quantum scheme.

Quantum neural networks

Quantum “neural networks” are just an example when we combine variational layers together with ordinary layers of neural networks.

image005

Figure 5. An example of a hybrid quantum neural network. Source [4].

The picture above shows an example of a combination of variational quantum circuits and classical layers of conventional deep neural networks. At the same time, parameter optimization is performed using a single backpropagation process, with the only difference that the gradient for the parameters of a particular layer is calculated slightly differently for classical and quantum layers.

Quantum kernel

Quantum kernels and the Support Vector Machine (SVM) quantum algorithm are another example of how quantum gates can be combined with classical algorithms. Mathematics of the classical SVM is that the solution to the problem of the optimal separating hyperplane (in other words, the optimal classification) can be expressed in terms of scalar products of the points of the training sample. And not necessarily in the original space, but in any Hilbert space. And quantum gates are just operations in Hilbert space, and exponentially large. This is how the idea of a hybrid SVM appears – we rewrite the scalar products of points as a result of measuring parameterized quantum circuits, where the parameters are the components of each of the points. And then we apply classical methods for solving the optimization problem.

Energy optimization

Another interesting and promising class of problems that can be solved by hybrid methods is the optimization of the energy of the Hamiltonian. It may seem that this is something else from the field of quantum physics, but in fact, a huge number of real–world problems can be reduced to the problem of finding the main state of a system described by a quantum operator - the Hamiltonian. For example, this is a Traveling Salesman’s task, which is very important in the field of logistics, or the task of finding electron energies, which plays an important role in the development of drugs or the creation of new materials.

Conclusion

The article showed that application of classical machine learning algorithms to the problems of quantum physics and quantum chemistry is a very promising field. Today we live in the so-called IS (Noisy Intermediate-Scale Quantum) era, when we have quantum computers of only limited size and with a relatively high noise level. And purely quantum algorithms of quantum machine learning are very demanding to the accuracy of calculations. Also, in such algorithms, a big problem is the constant need for a complex operation of translating classical data into quantum ones. In theory, this problem will disappear with the advent of qRAM, but today such a “quantum memory” does not yet exist and even there is no clear understanding of how to do it. All this limits the potential of fully quantum approaches. Also, the article reviewed quantum–classical or hybrid machine learning, hybrid algorithms are the most promising in the NISQ era.

Literature

  1. Giuseppe Carleo and Matthias Troyer, “Solving the quantum many-body problem with artificial neural networks” Science, 355(6325):602–606, 2017. URL: https://arxiv.org/abs/1606.02318.
  2. Kyle Mills, Michael Spanner, Isaac Tamblyn, “Deep learning and the schrödinger equation” Physical Review A, 96(4):042113, 2017. URL: https://arxiv.org/abs/1702.01361.
  3. Aram W. Harrow, Avinatan Hassidim, Seth Lloyd, “Quantum algorithm for linear systems of equations” Physical Review Letters, Oct 2009. URL: https://arxiv.org/abs/0811.3171v3, doi:10.1103/physrevlett.103.150502.
  4. Michael Broughton, “Tensorflow quantum: a software framework for quantum machine learning” 2021. URL: https://arxiv.org/abs/2003.02989, arXiv:2003.02989.

Интересная статья? Поделись ей с другими: