Due to the similarity of the computational and probabilistic nature of quantum computing and machine learning, the idea arose to optimize the learning process using quantum methods. There are both fundamentally new algorithms, such as HHL, and quantum-improved ones: QPCA, QSVM. In this article, we will look at the QSVM algorithm step by step, starting from the basics described in section 2 and gradually delving into the composition of the algorithm. Thus, after the basics, we will consider the quantum phase estimation, which is part of the HHL algorithm, and then the QSVM algorithm, the component of which is the HHL. We also will consider the QPCA algorithm, which can be applied before the QSVM algorithm to reduce the dimension of the data sample. In this way, we explore the fundamental difference between classical algorithms and their quantum counterparts. We also implement the QSVM method in practice and compare the obtained practical results with theory. As a result, we obtained high quality of accuracy (100 %) compared to the classical SVM (83 %) on a data sample of dimension 72. However, we found out that the learning time on a quantum device is far from ideal (it can reach 5 min for a sample of this size). The study aims to theoretically argue or disprove the hypothesis about the efficiency of quantum computing for machine learning algorithms. The object of research is the programming of quantum computers. The research subject is the study of quantum computing mechanisms for the implementation of machine learning problems. The research result is a software module that allows evaluating the efficiency of the classification task on a quantum computer. It also can be used to compare the results obtained from classical and quantum devices. Research methods: theoretical analysis of the foundations of quantum computing: principles of superposition and entanglement, linear algebra, probability theory over complex numbers; building a model of one qubit and multi-qubit system; research of quantum machine learning algorithms’ work principles and their complexity; empirical comparison of quantum machine learning methods with their classical counterparts.
The Harrow-Hassidim-Lloyd (HHL) quantum algorithm for sampling from the solution of a linear system provides an exponential speed-up over its classical counterpart. The problem of solving a system of linear equations has a wide scope of applications, and thus HHL constitutes an important algorithmic primitive. In these notes, we present the HHL algorithm and its improved versions in detail, including explanations of the constituent sub- routines. More specifically, we discuss various quantum subroutines such as quantum phase estimation and amplitude amplification, as well as the important question of loading data into a quantum computer, via quantum RAM. The improvements to the original algorithm exploit variable-time amplitude amplification as well as a method for implementing linear combinations of unitary operations (LCUs) based on a decomposition of the operators using Fourier and Chebyshev series. Finally, we discuss a linear solver based on the quantum singular value estimation (QSVE) subroutine.
In this chapter and the next one, we will explore the exciting areas of quantum machine learning and quantum deep learning. Machine learning and deep learning have seen great success in recent years because of the increase in the computational power at our disposal and because of the high-end research in these fields. Quantum machine learning presents an exciting opportunity to increase the computational efficiency of the existing machine learning algorithms as well as presents a way to tackle some of the more computationally intractable problems. In this chapter, we start with the Harrow-Hassidim-Lloyd algorithm, popularly known as HHL, which acts as the matrix inversion routine in the quantum computing domain. Hence, HHL will be the default choice for algorithms such as linear regression and least square support vector machines. Subsequently, we touch upon quantum linear regression and support vector machines in detail in this chapter. We will then move on to implementing quantum routines such as quantum dot product and quantum Euclidean distances since they are integral to several machine learning algorithms such as the k-means clustering and nearest neighbor methods. In this regard, we will implement the k-means clustering method in detail. Also, we will discuss how Grover’s algorithm can be used to optimize quantum objectives by illustrating its usage in the cluster assignment in the k-means algorithm. Principal component analysis is an important machine learning technique, and we will walk through its quantum implementation in great detail as well.
Quantum phase estimation (QPE) is one of the core algorithms for quantum computing. It has been extensively studied and applied in a variety of quantum applications such as the Shor's factoring algorithm, quantum sampling algorithms and the calculation of the eigenvalues of unitary matrices. The QPE algorithm has been combined with Kitaev's algorithm and the inverse quantum Fourier transform (IQFT) which are utilized as a fundamental component of such quantum algorithms. In this paper, we explore the computational challenges of implementing QPE algorithms on noisy intermediate-scale quantum (NISQ) machines using the IBM Q Experience (e.g., the IBMQX4, 5-qubit quantum computing hardware platform). Our experimental results indicate that the accuracy of finding the phase using these QPE algorithms is severely constrained by the NISQ computer's physical characteristics such as coherence time and error rates. To mitigate these physical limitations, we propose implementing a modified solution by reducing the number of controlled rotation gates and phase shift operations, thereby increasing the accuracy of the finding phase in near-term quantum computers.
Abstract This guide is based on the IBM Quantum course Phase Estimation and Factoring and focuses on one of the most important breakthroughs in quantum computing: the quantum phase estimation (QPE) algorithm and its application to Shor’s factoring algorithm. The lesson begins with the phase estimation problem, Solving this problem efficiently is a cornerstone of many quantum algorithms. Spectral Theorem and Mathematical Foundations The discussion starts with the spectral theorem from linear algebra. In the context of this lesson, it is applied to unitary matrices, which can be diagonalized in an orthonormal eigenbasis. This property makes it possible to extract phase information using interference effects and controlled unitary operations. Later, the same mathematical framework extends to Hermitian operators, which are central to quantum mechanics and Hamiltonian simulation. Quantum Phase Estimation (QPE) The Quantum Phase Estimation algorithm combines: Controlled unitary operations Superposition and interference The Quantum Fourier Transform (QFT) The QFT plays a crucial role by transforming phase information encoded in amplitudes into measurable computational basis states. Importantly, the QFT can be implemented efficiently with a quantum circuit whose complexity scales polynomially with the number of qubits. From Phase Estimation to Shor’s Algorithm By applying QPE to a specific modular exponentiation operator, one obtains Shor’s algorithm, an efficient quantum algorithm for integer factorization. Shor’s algorithm demonstrates an exponential speedup over the best-known classical factoring algorithms and has profound implications for cryptography, particularly for RSA-based systems. Significance This lesson illustrates a major milestone in quantum computing: It connects abstract linear algebra (spectral theorem) to concrete algorithmic advantage. It shows how quantum interference enables extraction of hidden periodicity. It demonstrates a real-world cryptographic impact through efficient factorization. Through hands-on experimentation on IBM Q, theoretical concepts are translated into working quantum circuits, reinforcing the deep relationship between mathematics, algorithm design, and quantum computational power.
Most quantum algorithms offering speedups over classical algorithms are based on the three techniques of phase estimation, amplitude estimation and Hamiltonian simulation. In spite of the linear algebraic nature of the postulates of quantum mechanics, until recent work by Lloyd and coauthors cite{LMR13, LMR13a, LMR13b} no quantum algorithms achieving speedups for linear algebra or machine learning had been proposed. A quantum machine learning algorithm must address three issues: encoding of classical data into a succinct quantum representation, processing the quantum representation and extraction of classically useful information from the processed quantum state. In this dissertation, we make progress on all three aspects of the quantum machine learning problem and obtain quantum algorithms for low rank approximation and regularized least squares. The oracle
QRAM, the standard model studied in quantum query complexity, requires time
O(sqrtn) to encode vectors
vinRn into quantum states. We propose simple hardware augmentations to the oracle
QRAM, that enable vectors
vinRn to be encoded in time
O(logn), with pre-processing. The augmented
QRAM incurs minimal hardware overheads, the pre-processing can be parallelized and is a flexible model that allows storage of multiple vectors and matrices. It provides a framework for designing quantum algorithms for linear algebra and machine learning. Using the augmented
QRAM for vector state preparation, we present two different algorithms for singular value estimation where given singular vector
ketv for
AinRmtimesn, the singular value
sigmai is estimated within additive error
epsilonnormAF. The first algorithm requires time
wt1/epsilon3 and uses the approach for simulating
e−irho in cite{LMR13}. However, the analysis cite{LMR13} does not establish the coherence of outputs, we provide a qualitatively different analysis that uses the quantum Zeno effect to establish coherence and reveals the probabilistic nature of the simulation technique. The second algorithm has a running time
wt1/epsilon and uses Jordan's lemma from linear algebra and the augmented
QRAM to implement reflections. We use quantum singular value estimation to obtain algorithms for low rank approximation by column selection, the algorithms are based on importance sampling from the leverage score distribution. We obtain quadratic speedups for a large class of linear algebra algorithms that rely on importance sampling from the leverage score distribution including approximate least squares and
CX and
CUR decompositions. Classical algorithms for these problems require time
O(mnlogn+poly(1/epsilon)), the quantum algorithms have running time
O(sqrtmpoly(1/epsilon,k,Delta)) where
k,Delta are the rank and spectral gap. The running time of the quantum
CX decomposition algorithm does not depend on
m, it is polynomial in problem parameters. We also provide quantum algorithms for
ell2 regularized regression problems, the quantum ridge regression algorithm requires time
wt1/mu2delta to output a quantum state that is
delta close to the solution, where
mu is the regularization parameter.