Have a personal or library account? Click to login
On Quantum Solvers for Linear Algebraic Systems Cover
Open Access
|Mar 2026

Full Article

1.
Introduction

There exist no quantum computing computers that formally comply with the principles of quantum mechanics. Nevertheless, many vendors have already delivered intermediate-scale quantum computers that follow different development approaches which are rather “noisy”. Currently, the largest quantum computer consists of 433 qubits, and it has been recently announced the first such computer with more than 1000 qubits while other companies will probably surpass this mark very soon.

Regardless of the fact that quantum systems with millions of qubits are not expected to be developed in the short run, the unprecedented potential that such systems offer has been widely accepted mainly through the study of several R&D use cases in disciplines such as financial technology, medicine, and data science. In particular, these studies have shown that quantum computers can perform calculations much faster than classical computers by exploiting certain principles and properties of quantum mechanics. Such supremacy is for example shown in [1] for computations in cryptography.

Quantum commercialization reports originating from various countries around the globe seem to be rather convincing and present impressive spending intentions and revenue predictions [2].

The benefit from the computing throughput provided by quantum computers has the potential to change many industries. Several quantum applications have recently been proposed and applied to use cases with great success. Demonstrations have been constructed using various types of qubits. However, many important problems might very well not have the inherent properties required for benefiting from quantum computing. Is this the case for scientific computing in general and numerical linear algebra in particular?

For more than half a century numerical linear algebra has been motivating early explorers, as John von Neumann [3] and Alan Turing [4], computer architects and developers, and generally the whole Computer industry [5]. It still does so, as new computer architectures such as FPGAs, GPUs, and TPUs (Tensor Processor Units) emerge.

It is worth recalling that numerical linear algebra and in particular, the LINPACK Benchmark has been, since 1993, the basis to assemble and maintain a list of the 500 most powerful computer systems around the globe [6].

Linear algebra mainly deals with systems of linear algebraic equations of the form Ax=bA\vec x = \vec b where A ∈ ℝm×n, xn\vec x \in {^n} and bm\vec b \in {^m}, where xi are the unknown variables that need to be calculated, and aij’s and bi’s are given. To avoid complexity in the presentation and without any loss of generality for the rest of this paper we assume that m = n.

Linear algebra plays a significant role in almost all fields of science and engineering and linear systems of algebraic equations either constitute the core of many applications or are cornerstones of larger algorithms. In either case, they often include enormous amounts of data as n increases arbitrarily.

There is a variety of classical methods for the solution of Linear Systems Problem (LSP) which may be categorized as follows:

Direct Methods like the Gaussian elimination, which is suitable for dense matrices and has a time complexity of O(n3).

Iterative Methods like the conjugate gradient descent which is used for sparse matrices and has a time complexity of O(nκ){\rm{O}}(n\sqrt \kappa ), where κ relies on the condition number of A having a logarithmic, polynomial or even exponential dependence on n.

In general, all these classical linear solvers are of polynomial complexity. Further improving their performance in a classical computer seems almost impossible. This alone justifies the turn of the researchers’ attention to algorithms that can be implemented in quantum computers and can solve the LSP fast and efficiently.

The objective of our study is two-fold.

  • Survey the peer-reviewed literature focusing on articles that examine whether quantum computing is suitable for numerical scientific computing in general and numerical linear algebra in particular.

  • Present our efforts that lead to improvements of already proposed methods.

This review allows us to claim that the intersection between quantum computing and high-performance scientific computing has not yet received the attention it deserves. To the best of our knowledge, our paper is one of the few attempts to address this particular issue. It offers an updated exposition of the subject through a much-missing literature review.

Our motivation is further supported by the necessity of linear solvers, which exhibit efficiency that can only be achieved by quantum algorithms. Such necessity recently led to the exploitation of quantum solvers for several specific use-cases. Next, we briefly mention a few.

Linear systems describing geologic fracture networks are too vast to be fully solved, even with the most advanced classical techniques, and simplifying them through methods like up-scaling yields only rough approximations that might miss key network properties [7]. For example, omitting smaller fractures could disrupt percolation, eliminating full connectivity within a fracture region.

The computational core in many areas of computational geophysics, in general, and hydrological modeling, in particular, is a linear algebraic system whose size and characteristics prohibit the use of direct solvers. The plethora of existing commercial computational systems rely on iterative methods that apparently require preconditioning. Such an inverse Laplacian preconditioner is introduced in [8] that reduces the system’s condition number scaling from O(N) to O(N)O(\sqrt N ) and supports quantum implementation. This is a key step toward a quantum linear system solver that leads a new real-world application in hydrology.

For more related case studies that appeared very recently in the peer, we refer to Section VIII, entitled ”Applications of quantum linear systems solvers”, in [9] and the references within as well as the article entitled at https://quantumzeitgeist.com/quantum-algorithms-for-solving-linear-systems-why-they-matter/ which accurately represent the overall activities presented in the peer-review articles as well as in grey literature reports.

Our review does not focus on quantum mechanics and assumes readers with introductory quantum computing knowledge (e.g., basic gates and states) and some linear algebra background, supplemented by the paper’s preliminaries. We mainly consider this subject from a theoretical standpoint; however, we also proceed to the analysis of a few practical experiments using Qiskit, an open-source SDK for working with quantum computers.

The rest of this paper is organized as follows. In Section 2 we present the necessary theoretical background of quantum mechanics and quantum computing. We mainly focus on the fundamental concepts which are related to the motivation of our study. Section 3 provides the state of the art in the area of quantum numerical linear algebra. In Section 4 we discuss our experimental results on a hybrid quantum-classical linear solver and propose a quantum circuit that enhances the performance of the algorithm. The synopsis and our preliminary concluding remarks can be found in Section 5.

2.
Background

This paper assumes that the reader is aware of the basics of quantum computing. These include, among others, the knowledge of the qubit as the unit of quantum information, quantum states and bra-ket notation, quantum gates and unitary operators, Hermitian matrices, as well as the concepts of quantum systems of n qubits and quantum parallelism. We will take just the meaning of these preliminary terms for granted, however, absolute beginners should not be discouraged, as [10], and a plethora of other sources, provide a thorough and comprehensible introduction to the subject of quantum computing. For example, we assume familiarity with basic quantum state preparation (as in [11], Ch. 5); for a quick recap, see the related material at https://www.youtube.com/channel/UCs9jqTGwJgVpBe50KxLozkw.

Specifically, we first introduce approximation methods of inner products of quantum states, which are necessary for quantum linear algebra as anticipated. In this regard, Sections 2.1 and 2.2 provide insight into the swap test and the Hadamard test respectively. Then in Section 2.3 we explain the concept of density operators which are essential for the description of the quantum solution of an LSP. We conclude with the presentation of the Quantum Fourier Transform in Section 2.4 and the consequent quantum phase estimation in Section 2.5.

2.1.
Inner Products and the Swap Test

In quantum computing inner products 〈x|y〉 express how similar arbitrary quantum states are - the inner product of identical states is 1, while the inner product of orthogonal states is 0. Despite the fact that inner products emerge in numerous quantum formulas and algorithms, in practice it is only possible to approximate them.

For their estimation, a probabilistic implementation called swap test is used. This is based on the 3-register quantum circuit of Figure 1 which includes two input registers for the quantum states and an output register.

Figure 1.

The Swap (left) and the Hadamard (right) tests.

The transformation of the quantum state of the registers is expressed mathematically as follows: |0,x,yH12|0,x,y+12|1,x,yCSWAP12|0,x,y+12|1,y,xHH12|0,x,y+12|1,x,y+12|0,y,x12|1,y,x=12|0(|x,y+|y,x)+12|1(|x,y|y,x).\matrix{ {\left. {|0,x,y} \right\rangle \mathop \to \limits^H {1 \over {\sqrt 2 }}|\left. {0,x,y} \right\rangle + {1 \over {\sqrt 2 }}|\left. {1,x,y} \right\rangle \buildrel {C - SWAP} \over \longrightarrow {1 \over {\sqrt 2 }}|\left. {0,x,y} \right\rangle + {1 \over {\sqrt 2 }}|\left. {1,y,x} \right\rangle \mathop \to \limits^H } \cr {\mathop \to \limits^H {1 \over 2}|\left. {0,x,y} \right\rangle + {1 \over 2}|\left. {1,x,y} \right\rangle + {1 \over 2}|\left. {0,y,x} \right\rangle - {1 \over 2}|\left. {1,y,x} \right\rangle = {1 \over 2}|\left. 0 \right\rangle (|\left. {x,y} \right\rangle + |\left. {y,x} \right\rangle ) + {1 \over 2}|\left. 1 \right\rangle (|\left. {x,y} \right\rangle - |\left. {y,x} \right\rangle ).} \cr }

After the measurement occurs, the probabilities of the output qubit being in the state |0〉 or |1〉 can easily be calculated as follows Pr(|0)=12(x,y|+y,x|)12(|x,y+|y,x)=214+214|x|y|2=12+12|x|y|2Pr(|1)=1Pr(|0)=1212|x|y|2.\matrix{ {\Pr (|0\rangle ) = {1 \over 2}(\langle x,y| + \langle y,x|){1 \over 2}(|x,y\rangle + |y,x\rangle ) = 2 \cdot {1 \over 4} + 2 \cdot {1 \over 4}|\langle x|y\rangle {|^2} = {1 \over 2} + {1 \over 2}|\langle x|y\rangle {|^2}} \cr {\Pr (|1\rangle ) = 1 - \Pr (|0\rangle ) = {1 \over 2} - {1 \over 2}|\langle x|y\rangle {|^2}.} \cr }

The output of the circuit can be considered as a Bernoulli random variable which produces |1〉 with probability 1212|x|y|2{1 \over 2} - {1 \over 2}|\langle x|y\rangle {|^2}. The results of multiple iterations of this experiment can be gathered in order to estimate the value of |〈x|y〉| based on their mean. It has been proved for the additive error of this estimation to be less than ϵ,O(1ϵ2),{\rm{O}}\left( {{1 \over {{^2}}}} \right) such iterations are required.

2.2
The Hadamard Test

Another quantum circuit for the calculation of inner products is the Hadamard test. It computes a value of the form ℜ𝔢(〈ψ|U|ψ〉), where U is an arbitrary unitary operator and |ψ〉 is an arbitrary quantum state. The Hadamard test is a 2-register quantum circuit, illustrated in Figure 1.

The input quantum state of the circuit evolves as follows: |0|ψH12(|0+|1)|ψCU12|0|ψ+12|1U|ψHH12|0|ψ+12|1|ψ+12|0U|ψ12|1U|ψ=12|0(I+U)|ψ+12|1(IU)|ψ.\matrix{ {|0\rangle \otimes |\psi \rangle \mathop \to \limits^H {1 \over {\sqrt 2 }}(|0\rangle + |1\rangle ) \otimes |\psi \rangle \mathop \to \limits^{C - U} {1 \over {\sqrt 2 }}|0\rangle \otimes |\psi \rangle + {1 \over {\sqrt 2 }}|1\rangle \otimes U|\psi \rangle \mathop \to \limits^H } \cr {\mathop \to \limits^H {1 \over 2}|0\rangle |\psi \rangle + {1 \over 2}|1\rangle |\psi \rangle + {1 \over 2}|0\rangle U|\psi \rangle - {1 \over 2}|1\rangle U|\psi \rangle = {1 \over 2}|0\rangle \otimes (I + U)|\psi \rangle + {1 \over 2}|1\rangle \otimes (I - U)|\psi \rangle .} \cr }

After the measurement occurs, the probabilities of taking |0〉 or |1〉 from the output qubit can be estimated: Pr(|0)=14ψ|(I+U)(I+U)|ψ=14ψ|(I+U+U+UU)|ψ==14(2+ψ|U|ψ+ψ|U|ψ)=12(1+e(ψ|U|ψ))Pr(|1)=1Pr(|0)=12(1e(ψ|U|ψ))\matrix{ {\Pr (|0\rangle ) = {1 \over 4}\langle \psi |{{(I + U)}^\dag }(I + U)|\psi \rangle = {1 \over 4}\langle \psi |(I + {U^\dag } + U + {U^\dag }U)|\psi \rangle = } \cr { = {1 \over 4}(2 + {{\langle \psi |U|\psi \rangle }^ * } + \langle \psi |U|\psi \rangle ) = {1 \over 2}(1 + \Re (\langle \psi |U|\psi \rangle ))} \cr {\Pr (|1\rangle ) = 1 - \Pr (|0\rangle ) = {1 \over 2}(1 - \Re (\langle \psi |U|\psi \rangle ))} \cr }

Following the same concept as the one used for the swap test, the output of the Hadamard test circuit is a Bernoulli random variable which produces |1〉 with probability 12(1Re(ψ|U|ψ)){1 \over 2}(1 - \Re (\langle \psi |U|\psi \rangle )). Therefore, collecting multiple such outputs is sufficient to approximate ℜ𝔢(〈ψ|U|ψ〉).

2.3
Pure and Mixed States, Density Operators

Quantum states are divided into two categories:

Pure states: They can be sufficiently represented with a vector |x〉 in bra-ket notation and can be defined without uncertainty even when they are complex superpositions of the basis states.

Mixed states: They include some uncertainty about the quantum state. For this reason, these quantum states are a probabilistic combination of multiple pure states.

The density operators ρ are matrices that are designed to express both pure and mixed states:

  • For pure states, they are defined as the outer product of the quantum state: 1ρ=|xx|.{p_j}(\mathop \sum \limits_j {p_j} = 1)

  • For mixed states that consist of a set of pure states |xj〉 with probabilities of occurrence pj(jpj=1)\rho = \mathop \sum \limits_j {p_j}|{x_j}\rangle \langle {x_j}|., they are defined as the weighted sum of the outer products of these pure states: 2ρ=jpj|xjxj|.Tr(\rho ) = \sum\nolimits_j {{\rho _{jj}}} = 1

Density operators are Hermitian positive semi-definite matrices with unit trace, so Tr(ρ)=jρjj=1\{ |j\rangle \} _{j = 0}^{{2^n} - 1}. The diagonal elements ρjj in a given orthonormal basis {|j}j=02n1\{ |j\rangle \} _{j = 0}^{{2^n} - 1} represent the probabilities of obtaining the outcome |j〉 when measuring in that basis.

2.4
Quantum Fourier Transform

The counterpart of the discrete Fourier transform (DFT) in quantum computing is the Quantum Fourier Transform (QFT), whose input sequence includes a total number of samples (quantum states) equal to a power of 2. The QFT formula is given by: 3|x12ny=02n1e2πixy2n|y.|x\rangle \to {1 \over {\sqrt {{2^n}} }}\sum\limits_{y = 0}^{{2^n} - 1} {{e^{{{2\pi ixy} \over {{2^n}}}}}} |y\rangle

An important property of the resulting state in (3) is that it can be expressed as a tensor product of single-qubit states. To see this, we write the integers x and y in binary form: x=j=0n12jxj,y=j=0n12jyj,\matrix{ {x = \sum\limits_{j = 0}^{n - 1} {{2^j}} {x_j},} \hfill & {y = \sum\limits_{j = 0}^{n - 1} {{2^j}} {y_j},} \hfill \cr }

where each xj, yj ∈ {0, 1} and x0, y0 denote the least significant bits. We also use binary fraction notation: 0.x1x2xn=x12+x222++xn2n,0.{x_1}{x_2} \cdots {x_n} = {{{x_1}} \over 2} + {{{x_2}} \over {{2^2}}} + \cdots + {{{x_n}} \over {{2^n}}},

where x1 denotes the first digit after the binary point (contributing 1/2), x2 the second digit (contributing 1/22), and so on. With this notation, the exponential factor can be decomposed as 4e2πixy2n|yn1y0=(e2πi(0.xn1))yn1|yn1(e2πi(0.xn2xn1))yn2|yn2(e2πi(0.x0x1xn1))y0|y0.\matrix{ {{e^{{{2\pi ixy} \over {{2^n}}}}}|{y_{n - 1}} \cdots {y_0}\rangle } \hfill & = \hfill & {{{({e^{2\pi i(0.{x_{n - 1}})}})}^{{y_{n - 1}}}}|{y_{n - 1}}\rangle \otimes } \hfill \cr {} \hfill & {} \hfill & {{{({e^{2\pi i(0.{x_{n - 2}}{x_{n - 1}})}})}^{{y_{n - 2}}}}|{y_{n - 2}}\rangle \otimes \cdots \otimes } \hfill \cr {} \hfill & {} \hfill & {{{({e^{2\pi i(0.{x_0}{x_1} \cdots {x_{n - 1}})}})}^{{y_0}}}|{y_0}\rangle .} \hfill \cr }

This shows that the state in (3) factorizes as 512ny=02n1e2πixy2n|y=12n(|0+e2πi(0.xn1)|1)(|0+e2πi(0.xn2xn1)|1)(|0+e2πi(0.x0x1xn1)|1).\matrix{ {{1 \over {\sqrt {{2^n}} }}\sum\limits_{y = 0}^{{2^n} - 1} {{e^{{{2\pi ixy} \over {{2^n}}}}}} |y\rangle = } \cr {{1 \over {\sqrt {{2^n}} }}(|0\rangle + {e^{2\pi i(0.{x_{n - 1}})}}|1\rangle )(|0\rangle + {e^{2\pi i(0.{x_{n - 2}}{x_{n - 1}})}}|1\rangle ) \cdots (|0\rangle + {e^{2\pi i(0.{x_0}{x_1} \cdots {x_{n - 1}})}}|1\rangle ).} \cr }

Figure 2 illustrates how (5) can be implemented in a quantum system that consists of Hadamard gates and controlled phase shift gates:

Figure 2.

Implementation of the Quantum Fourier Transform. (Reproduced from https://commons.wikimedia.org/wiki/File:Q_fourier_nqubits.pngviaWikimediaCommons).

The Rk gates used in the circuit are phase shift gates of the form: Rk=P(2π2k)=[ 100e2πi2k ].{R_k} = P\left( {{{2\pi } \over {{2^k}}}} \right) = \left[ {\matrix{ 1 & 0 \cr 0 & {{e^{{{2\pi i} \over {{2^k}}}}}} \cr } } \right].

The inverse of the QFT can easily be implemented by reversing the circuit. This inverse is of vital importance, since it can take an input state of the form (3) and recover the corresponding computational basis state |x=|xn1xn2x0|x\rangle = |{x_{n - 1}}{x_{n - 2}} \cdots {x_0}\rangle . Its significance will become evident in Section 2.5.

2.5
Phase Estimation

The quantum phase estimation problem [12] refers to an unknown unitary operator U that has an eigenvector |ψ〉 with a corresponding eigenvalue e2πiϕ(0ϕ<1){e^{2\pi i\phi }}(0 \le \phi \lt 1) and acts on n -qubit quantum systems. The problem aims to calculate the value of ϕ – and by extension the eigenvalue of U. It assumes the availability of gates that perform controlled U2k operations (k ∈ ℕ) although the form of U is undetermined. Its solution is based on the circuit depicted in Figure 3.

Figure 3.

Phase Estimation Algorithm.

Based on properties of eigenvectors and eigenvalues we get that U2k|ψ=(e2πiϕ)2k|ψ{U^{{2^k}}}|\psi \rangle = {({e^{2\pi i\phi }})^{{2^k}}}|\psi \rangle . Therefore, when a Hadamard and a controlled U2k operator are applied to one of the qubits of the circuit which are set to |0〉, the resulting state is: 6|0|ψH12(|0|ψ+|1|ψ)U2kU2k12(|0|ψ+|1U2k|ψ)=12(|0|ψ+|1e2πi2kϕ|ψ)=12(|0+e2πi2kϕ|1)|ψ.\matrix{ {|0\rangle |\psi \rangle \buildrel H \over \longrightarrow {1 \over {\sqrt 2 }}(|0\rangle |\psi \rangle + |1\rangle |\psi \rangle )\mathop \to \limits^{{U^{{2^k}}}} } \cr {\buildrel {{U^{{2^k}}}} \over \longrightarrow {1 \over {\sqrt 2 }}(|0\rangle |\psi \rangle + |1\rangle {U^{{2^k}}}|\psi \rangle ) = {1 \over {\sqrt 2 }}(|0\rangle |\psi \rangle + |1\rangle {e^{2\pi i{2^k}\phi }}|\psi \rangle ) = {1 \over {\sqrt 2 }}(|0\rangle + {e^{2\pi i{2^k}\phi }}|1\rangle ) \otimes |\psi \rangle .} \cr }

Using (6) for all the qubits of the circuit, the subsequent state of the quantum system before the inverse QFT is applied is 7(|0+e2πi2n1ϕ|1)(|0+e2πi2n2ϕ|1)(|0+e2πiϕ|1)=y=02n1e2πiϕy|y.(|0\rangle + {e^{2\pi i{2^{n - 1}}\phi }}|1\rangle )(|0\rangle + {e^{2\pi i{2^{n - 2}}\phi }}|1\rangle ) \cdots (|0\rangle + {e^{2\pi i\phi }}|1\rangle ) = \sum\limits_{y = 0}^{{2^n} - 1} {{e^{2\pi i\phi y}}} |y\rangle .

As the quantum state of (7) resembles the one of (3), if ϕ can be written with ≤ n binary decimals (ϕ = 0. a1 a2an), the inverse QFT can produce the precise value of ϕ. On the other hand, in cases where this is not possible, it has been proved that the phase estimation algorithm outputs a best n-bits approximation of the value of ϕ with probability 4π2 \ge {4 \over {{\pi ^2}}}.

3.
Literature Review

Next, we review selected recent papers that present quantum linear system solvers. In particular, we describe in Section 3.1 the quantum mechanical version of the linear system problem. Then we discuss the main eigenvalue quantum methods for linear systems. Specifically, in Section 3.2 we focus on the most well-known quantum solver, the HHL algorithm, and in Section 3.3 we analyze the WZP algorithm which is similar to the HHL algorithm and can be efficiently applied both to dense and sparse matrices. In Section 3.4 we discuss the iterative solution algorithms and in particular we describe the row and column iterative methods. In Section 3.5 we focus on the variational quantum linear solver which is a hybrid method that requires both a classical and a quantum computer in order to compensate for the flawed nature of the current quantum computers. Finally, in Section 3.6 we present another hybrid algorithm that is based on random walks. We summarize and briefly compare the above algorithms in Section 3.7.

3.1
Quantum Linear System Problem

A Linear Systems Problem (LSP) takes as input a matrix ARm×n and a vector bRm\vec b \in {{\bf{R}}^{\bf{m}}} and aims to find a vector xRn\vec x \in {{\bf{R}}^{\bf{n}}} such that Ax=bA\vec x = \vec b. The quantum mechanical version of LSP, commonly referred as Quantum Linear Systems Problem (QLSP), has the form A|x=|b,A|x\rangle = |b\rangle ,

where A is a quantum operator, while |x〉 and |b〉 are quantum states represented by quantum vectors. A and |b〉 are given and the purpose of the QLSP is to construct a quantum state |x〉 such that: |x=A1|b.|x\rangle = {A^{ - 1}}|b\rangle .

Contrary to the classical LSP, |x〉 is not the exact solution of the linear system, because such quantum vectors are normalized by default, but it is proportional to the actual solution vector: |x=i=1nxi|ii=1n|xi|2.|x\rangle = {{\mathop \sum \nolimits_{i = 1}^n {x_i}|i\rangle } \over {\sqrt {\mathop \sum \nolimits_{i = 1}^n |{x_i}{|^2}} }}

For a quantum solution to be successful, given a threshold ϵ > 0, the produced quantum density operator ρx needs to satisfy the following inequality for the trace distance Dρx,x Dρx,x=12Tr|ρx|xx||ϵ.{D_{{\rho _x},x}} = {1 \over 2}Tr|{\rho _x} - |x\rangle \langle x|| \le .

3.2.
The HHL Solution Method

The most prominent quantum solution method for linear systems of equations was proposed by Harrow, Hassidim, and Lloyd [13]. Their approach, which is commonly referred to as HHL, involves n × n linear systems of the form Ax=bA\vec x = \vec b where the matrix A is Hermitian and the vectors x,b\vec x,\vec b are normalized so that they can be represented as quantum states. The algorithm can be extended for non-Hermitian matrices, by transforming the system into the form Ax=b{A^\prime }\vec x' = \overrightarrow {{b^\prime }} where A=[ 0AA0 ],x=[ 0x ],b=[ b0 ].{A^\prime } = \left[ {\matrix{ 0 & A \cr {{A^\dag }} & 0 \cr } } \right],{{\vec x}^\prime } = \left[ {\matrix{ 0 \hfill \cr {\vec x} \hfill \cr } } \right],\overrightarrow {{b^\prime }} = \left[ {\matrix{ {\vec b} \hfill \cr 0 \hfill \cr } } \right].

The new matrix A′ is Hermitian, since A = A′. The preference for Hermitian matrices is due to their capability to be decomposed as follows: A=i=1nλi|uiui|,A = \sum\limits_{i = 1}^n {{\lambda _i}|{u_i}\rangle \langle {u_i}|}

where λi are their eigenvalues and |ui〉 their corresponding eigenvectors. This simplifies the calculation of their inverse matrix A1=i=1nλi1|uiui|.{A^{ - 1}} = \mathop \sum \limits_{i = 1}^n \lambda _i^{ - 1}|{u_i}\rangle \langle {u_i}|.

Expressing the vector |bb|b\rangle \propto \vec b as a linear combination of the eigenvectors of A |b=i=1nbi|ui|b\rangle = \sum\limits_{i = 1}^n {{b_i}|{u_i}\rangle }

it is possible to find the solution of the linear system using the formula |x=A1|b=i=1nλi1bi|ui.|x\rangle = {A^{ - 1}}|b\rangle = \sum\limits_{i = 1}^n {\lambda _i^{ - 1}} {b_i}|{u_i}\rangle

3.2.1.
Description of the Algorithm

The output of the HHL algorithm is a solution quantum state of the form |x=i=0n1xi|i|x\rangle = \sum\nolimits_{i = 0}^{n - 1} {{x_i}|i\rangle } whose elements are proportional to the ones of the actual solution vector. Not every element of this vector is extracted when the knowledge of the whole solution is not essential because this would need at least n iterations of the implementation. An alternative proposed is to estimate xMx\overrightarrow {{x^\dag }} M\vec x where M is an operator. This requires only one iteration and can reveal a variety of features and properties about x{\vec x}. The qubit requirements of the HHL algorithm are the following:

  • m qubits of working space initialized in |0〉⊗m

  • ⌈log2 n⌉ qubits which host the vector |b

  • an ancilla – supplementary – qubit initialized in |0〉.

The preparation of the vector |b〉 is based on the work of Grover et al. [14] and is taken for granted for the purposes of this algorithm. Using the eigenvectors |ui〉 as the basis of the state space, |b〉 can be represented as follows: 8|b=i=1nβi|ui|b\rangle = \sum\limits_{i = 1}^n {{\beta _i}|{u_i}\rangle }

where βi = 〈ui|b〉. The HHL solution method can be divided into the following steps:

  • Phase estimation: The working space qubits constitute the control qubits while the conditional Hamiltonian evolution unitary operator [15] is used: U=k=0T1|kk|eiAkt0/T.U = \sum\limits_{k = 0}^{T - 1} {|k\rangle \langle k| \otimes {e^{iAk{t_0}/T}}.}

    A full analytical derivation of this operator can be found in [15]. Its purpose is to construct the exponentiated eiAt for a superposition of different values of t which is then applied to |b〉, as an operator of this form is suitable for mapping the eigenvalues of A on the working space.

    So, phase estimation yields the eigenvalue-encoded state 9i=1nβi|ui|λi,\sum\limits_{i = 1}^n {{\beta _i}|{u_i}\rangle |{\lambda _i}\rangle ,}

    as seen in Section 2.5 with a precision of m bits.

  • Controlled rotation: This process is applied on the ancilla qubit. As A is Hermitian, λi1\lambda _i^{ - 1} are the eigenvalues of the inverse of A which need to be incorporated in the state (9). The values of λi first need to be extracted mechanically in order to calculate the angle θi of the rotation, for which sin(θi)=Cλi\sin ({\theta _i}) = {C \over {{\lambda _i}}} with CR. The state that occurs from this process is 10i=1nβi|ui|λi(1C2λi2|0+Cλi|1),CR.\sum\limits_{i = 1}^n {{\beta _i}|{u_i}\rangle |{\lambda _i}\rangle } \left( {\sqrt {1 - {{{C^2}} \over {\lambda _i^2}}} |0\rangle + {C \over {{\lambda _i}}}|1\rangle } \right),C \in {\bf{R}}.

  • Inverse phase estimation: This is the reverse of the first step, so the qubits of the working space are reset to |0〉 and the resulting state is: 11i=1nβi|ui(1C2λi2|0+Cλi|1).\sum\limits_{i = 1}^n {{\beta _i}|{u_i}\rangle } \left( {\sqrt {1 - {{{C^2}} \over {\lambda _i^2}}} |0\rangle + {C \over {{\lambda _i}}}|1\rangle } \right).

The algorithm terminates with a post-selection on the ancilla qubit being in the state |1〉. This means that we condition on the outcome of the measurement of this qubit being |1〉, so the quantum state that occurs from this process is: i=1nCβiλi|ui\mathop \sum \limits_{i = 1}^n C{{{\beta _i}} \over {{\lambda _i}}}|{u_i}\rangle

which is proportional to the theoretical solution. A schematic diagram that summarizes the steps of the HHL algorithm is given in Figure 4:

Figure 4.

Schematic representation of the HHL algorithm ([16]).

3.2.2.
Summarizing the HHL Algorithm

Contrary to the optimal classical linear solvers which solve a linear system with a time complexity that scales polynomially with the size of the system, the corresponding complexity of the proposed quantum HHL algorithm is O(s2κ2 log n/ϵ) in the case A is s-sparse. This translates into an exponential speed-up. The density of the matrix is a significant, but not the sole factor that determines the performance of the algorithm. The condition number κ also needs to be taken into consideration, as it sometimes scales polynomially or even exponentially with n. In this case, it is doubtful that HHL can be faster than its classical counterparts and the scaling of κ must be controlled. This could possibly be achieved in two ways according to [13]:

  • By processing only the well-conditioned part of A: j,λj<1/κλj1βj|uj|well+j,λj1/κβj|uj|ill\mathop \sum \limits_{j,{\lambda _j} \lt 1/\kappa } \lambda _j^{ - 1}{\beta _j}|{u_j}\rangle |well\rangle + \mathop \sum \limits_{j,{\lambda _j} \ge 1/\kappa } {\beta _j}|{u_j}\rangle |ill\rangle

  • By applying preconditioners in order to improve the condition of the matrix before proceeding with the algorithm.

The dependence of the complexity of HHL on the precision parameter ϵ is also noteworthy. This is mainly related to the use of the phase estimation routine which can significantly reduce the performance of the algorithm if high accuracy of the solution is required. Finally, possible sources of failure need to be considered. Phase estimation is one of them because it can produce wrong results under certain circumstances (Section 2.5). In addition, postselection is not guaranteed to succeed. According to [13], if the constant C is O(1/κ), O(κ) repetitions of the routine including the post-selection step seem to be enough to produce the desired result.

The HHL algorithm is a breakthrough in the field of quantum linear solvers although it has certain limitations. This work is the cornerstone of the field of quantum linear solvers and this is illustrated by the fact that it inspired several solvers developed recently.

3.3
WZP Method for Dense Matrices

Another notable quantum solver for linear sets of equations is that proposed by Wossnig, Zhao, and Prakash [17] which is commonly referred to as WZP. This algorithm bears some resemblance to the HHL algorithm, but it is appropriate for both dense and sparse matrices. Similar to HHL, the matrix A needs to be Hermitian, but non-Hermitian matrices may also be treated as described for HHL above.

3.3.1.
Quantum Singular Value Estimation

The WZP algorithm relies on quantum singular value estimation (QSVE) which has been proposed in [18] for the implementation of a quantum recommendation system. QSVE is a factorization method that estimates the eigenvalues of the matrix A. It takes as an input a state of the form iai|vi\sum\nolimits_i {{a_i}|{v_i}\rangle } where vi are the singular vectors of A and transforms it to a state of the form iai|vi|σ¯i\sum\nolimits_i {{a_i}|{v_i}\rangle |{{\bar \sigma }_i}\rangle } where σ¯i{{\bar \sigma }_i} are approximations of the singular values of A. Recall that any matrix ARn×n can be decomposed using the singular value decomposition (SVD) as A=UΣV,A = U{\rm{\Sigma }}{V^\dag },

where U and V are unitary matrices whose columns are the left and right singular vectors of A, and Σ is a diagonal matrix whose nonnegative entries σi are called the singular values of A. In particular, for each singular value σi we have Avi=σiui,Aui=σivi,\matrix{ {A{v_i} = {\sigma _i}{u_i},} & {{A^\dag }{u_i} = {\sigma _i}{v_i}} \cr }

where vi is a right singular vector and ui is the corresponding left singular vector. We will use this notation throughout the description of QSVE. This process is based on two matrices P and Q which are defined as follows:

  • The i-th column of the matrix PRn2×n is equal to eiAiAi{e_i} \otimes {{{A_i}} \over {{{\left\| A \right\|}_i}}} with 1 ≤ in, where Ai is the i-th row of the matrix A.

  • The j-th column of the matrix QRn2×n is equal to AFAFej{{{A_F}} \over {{{\left\| A \right\|}_F}}} \otimes {e_j} with 1 ≤ jn, where AFRn is a vector which contains the Frobenius norms of the rows of the matrix A and ‖AF is the Frobenius norm of the matrix A.

P and Q are orthogonal, as P P = In and Q Q = In and the following equalities hold 12|Pei=|i,Ai=1Aij=1nAij|i,j,1in,|P{e_i}\rangle = |i,{A_i}\rangle = {1 \over {\left\| {{A_i}} \right\|}}\sum\limits_{j = 1}^n {{A_{ij}}|i,j\rangle ,} 1 \le i \le n 13|Qej=|AF,j=1AFi=1nAi|i,j,1jn.|Q{e_j}\rangle = |{A_F},j\rangle = {1 \over {{{\left\| A \right\|}_F}}}\sum\limits_{i = 1}^n {\left\| {{A_i}} \right\||i,j\rangle ,} 1 \le j \le n

For the implementation of these quantum states, a data structure is used that performs the mappings: UM:|i,0|i,Ai=1Aij=1nAij|i,j,UN:|0,j|AF,j=1AFi=1nAi|i,j.\matrix{ {{U_M}:|i,0\rangle \to |i,{A_i}\rangle = {1 \over {\left\| {{A_i}} \right\|}}\sum\limits_{j = 1}^n {{A_{ij}}|i,j\rangle ,} } \cr {{U_N}:|0,j\rangle \to |{A_F},j\rangle = {1 \over {{{\left\| A \right\|}_F}}}\sum\limits_{i = 1}^n {\left\| {{A_i}} \right\||i,j\rangle .} } \cr }

The complete presentation of this data structure is available in the cited literature [18], while we include here the essential elements relevant to our discussion. The combination of (12) and (13) proves that the matrices P and Q can be used to factorize a normalized version of the matrix A: 14(PQ)i,j=i,Ai|AF,j=AijAiAiAF=AijAFPQ=AAF.{({P^\dag }Q)_{i,j}} = \langle i,{A_i}|{A_F},j\rangle = {{{A_{ij}}} \over {\left\| {{A_i}} \right\|}}{{\left\| {{A_i}} \right\|} \over {{{\left\| A \right\|}_F}}} = {{{A_{ij}}} \over {{{\left\| A \right\|}_F}}} \Rightarrow {P^\dag }Q = {A \over {{{\left\| A \right\|}_F}}}.

Based on the matrices P and Q, two other matrices U and V are defined as follows U=2PPIn2,V=2QQIn2.U = 2P{P^\dag } - {I_{{n^2}}},\quad V = 2Q{Q^\dag } - {I_{{n^2}}}

These are the reflections in the column space of P and Q respectively. The matrix W=UVW = UV

is the basis of the QSVE algorithm. It can be proved that given a singular vector vi of A with singular value σi, Qvi is an eigenvector of W with eigenvalue ei where cosθi/2 = σi/‖AF. This result stems from the research on bipartite quantum walks [19]. A preliminary element of its proof is the fact that an orthogonal projection that maps a vector Qv of the column space of Q to the column space of P is based on the orthogonal projector PP while mapping a vector Pw to the column space of Q is based on the orthogonal projector QQ: (PP)Qv=1AFPAv,(QQ)Pw=1AFQAw.\matrix{ {(P{P^\dag })Qv = {1 \over {{{\left\| A \right\|}_F}}}PAv,} & {(Q{Q^\dag })Pw = {1 \over {{{\left\| A \right\|}_F}}}Q{A^\dag }w.} \cr }

Given a singular value σi of A with right singular unit vector vi and left singular unit vector ui, it follows that: 15Avi=σiuiPPQvi=σiAFPui,A{v_i} = {\sigma _i}{u_i} \Rightarrow P{P^\dag }Q{v_i} = {{{\sigma _i}} \over {{{\left\| A \right\|}_F}}}P{u_i} 16Aui=σiviQQPui=σiAFQvi.{A^\dag }{u_i} = {\sigma _i}{v_i} \Rightarrow Q{Q^\dag }P{u_i} = {{{\sigma _i}} \over {{{\left\| A \right\|}_F}}}Q{v_i}

It can be observed that (15) transforms Qvi to Pui, thus it transforms a vector from the column space of Q to the column space of P. On the other hand, (16) does the inverse. Furthermore, it can be proved that: |Qvi|=viQQvi=vivi=|vi||Q{v_i}| = \sqrt {v_i^\dag {Q^\dag }Q{v_i}} = \sqrt {v_i^\dag {v_i}} = |{v_i}|

and similarly |Pui| = |ui|. Taking these observations into consideration, it is evident that |σiAF|1|{{{\sigma _i}} \over {{{\left\| A \right\|}_F}}}| \le 1, so an angle θi/2 can be defined such that: cos(θi/2)=σiAF.\cos ({\theta _i}/2) = {{{\sigma _i}} \over {{{\left\| A \right\|}_F}}}.

Geometrically θi/2 is equal to the angle between Pui and Qvi, as: uiPQvi=1AFuiAvi=1AFuiσiui=σiAF=cos(θi/2).u_i^\dag {P^\dag }Q{v_i} = {1 \over {{{\left\| A \right\|}_F}}}u_i^\dag A{v_i} = {1 \over {{{\left\| A \right\|}_F}}}u_i^\dag {\sigma _i}{u_i} = {{{\sigma _i}} \over {{{\left\| A \right\|}_F}}} = \cos ({\theta _i}/2).

Thus, an alternative expression for (15) and (16) is the following: PPQvi=cos(θi/2)Pui,QQPui=cos(θi/2)Qvi.P{P^\dag }Q{v_i} = \cos ({\theta _i}/2)P{u_i},\quad Q{Q^\dag }P{u_i} = \cos ({\theta _i}/2)Q{v_i}.

The subspace with basis {Pui, Qvi} can be 2-dimensional on the non-trivial case. This subspace is invariant under the action of the matrix W, as W is a reflection in the column space of Q followed by a reflection in the column space of P which in the case of the aforementioned 2-dimensional space translates to a reflection on axis Qvi followed by a reflection on axis Pui. The total effect of these two reflections is a rotation by an angle that is double the angle θi/2 between the axes. Therefore eθi is an eigenvalue of W and the following equality holds: W(Qvi)=eθi(Qvi)W(Q{v_i}) = {e^{{\theta _i}}}(Q{v_i})

The previous analysis is essential for the comprehension of the steps of QSVE. These include:

  • The preparation of the quantum state of an arbitrary vector which can be expressed using a basis of the vector space that consists of the singular vectors vi of ARn×n: |x=iai|vi.|x\rangle = \sum\limits_i {{a_i}|{v_i}\rangle .}

  • The transformation of the previous quantum state using a Q operator: |Qx=iai|Qvi.|Qx\rangle = \sum\limits_i {{a_i}|Q{v_i}\rangle } .

    Then ⌈log2n⌉ qubits initialized in |0〉 are appended to the resulting state. These qubits will be required for the next step.

  • Phase estimation extracts θ¯i{{\bar \theta }_i} as an estimation of the eigenvalues of W, building on the |Qx〉 state. The resulting state of this step is iai|Qvi,θ¯i.\mathop \sum \limits_i {a_i}|Q{v_i},{{\bar \theta }_i}\rangle .

  • The transformation of the previous state in order to approximate the singular values σi of A, taking into account θ¯i{{\bar \theta }_i}. This is achieved using the formula σ¯i=cos(θ¯i/2)AF.{{\bar \sigma }_i} = \cos ({{\bar \theta }_i}/2){\left\| A \right\|_F}.

  • The reversion of the effect of the operator Q which was used in step 2 so that the final state is reached iai|vi|σi.\mathop \sum \limits_i {a_i}|{v_i}\rangle |\overline {{\sigma _i}} \rangle .

3.3.2.
Description of the WZP Algorithm

The above process is a significant part of the proposed WZP method. As the algorithm works with Hermitian matrices, the knowledge of the approximations σ¯i{{\bar \sigma }_i} of the singular values of A translates to the knowledge of the absolute value of the eigenvalues of A, thus σi=|λi|\overline {{\sigma _i}} = |\overline {{\lambda _i}} |. This facilitates the solution of a linear system, however, the signs of the eigenvalues of A remain to be found. This is achieved through the following complete algorithm of the WZP method which assumes that A has been scaled so that λi[1,1/κ][1/κ,1]{\lambda _i} \in [ - 1, - 1/\kappa ]\mathop \cup \nolimits^ [1/\kappa ,1], where κ is the condition number of A

  • Prepare the state of an arbitrary vector and express it as a linear combination of the singular vectors vi of A: |b=iβi|vi.{\lambda _i} \in [ - 1, - 1/\kappa ]\mathop \cup \nolimits^ [1/\kappa ,1]

  • Use the QSVE routine for the matrices A and A + μI with μ = 1/κ. The matrix A + μI has the same eigenvectors as A and its eigenvalues are equal to μ + λi giving us that iβi|viA||λ¯i|B||λi¯+μ|C.\sum\limits_i {{\beta _i}|{v_i}{\rangle _A}\left\| {{{\bar \lambda }_i}|{\rangle _B}} \right\|\overline {{\lambda _i}} + \mu |{\rangle _C}} .

    The notation A, B, C divides the generated quantum state into individual registers. The values of the registers B and C reveal the sign of the eigenvalues λi. If λi > 0, then |λi + μ| > |λi|, so the value of register C is larger than the value of register B. On the other hand, if λi < 0, then λi<1/kλi<μλi+μ<0{\lambda _i} \lt - 1/k \Rightarrow {\lambda _i} \lt - \mu \Rightarrow {\lambda _i} + \mu \lt 0

    because of the aforementioned scaling of A. Thus, this means that: λi<λi+μ|λi|<|λi+μ||λi|>|λi+μ|{\lambda _i} \lt {\lambda _i} + \mu \Rightarrow - |{\lambda _i}| \lt - |{\lambda _i} + \mu | \Rightarrow |{\lambda _i}| \gt |{\lambda _i} + \mu |

    and, as a consequence, the value of register B now is larger than the value of register C.

  • Introduce an additional ancilla register D which is set to |1〉 if register B contains a larger value than register C, namely when λi < 0. We apply a conditional phase gate so that the state that occurs is the following i(1)fiβi|viA||λ¯i|B||λ¯i+μ|C|fiD.\sum\limits_i {{{( - 1)}^{{f_i}}}{\beta _i}|{v_i}{\rangle _A}\left\| {{{\bar \lambda }_i}|{\rangle _B}} \right\||{\lambda _i} + \mu |{\rangle _C}|{f_i}{\rangle _D}.}

  • Add another ancilla register and apply a controlled rotation by γ = O(1/κ) conditioned on the register B. Afterward, the registers B, C, D are no longer required, so we reset them and reach the state i(1)fiβi|vi(γ|λ¯i||0+1(γλi¯)2|1).\sum\limits_i {{{( - 1)}^{{f_i}}}{\beta _i}|{v_i}\rangle ({\gamma \over {|{{\bar \lambda }_i}|}}|0\rangle + \sqrt {1 - {{({\gamma \over {\overline {{\lambda _i}} }})}^2}} |1\rangle ).}

    To obtain a state |x〉 proportional to the solution of the linear system, we post-select on the register that was introduced in this step being in state |0〉. The choice of the value of γ is such that the measurement produces |0〉 with high probability, so in any case, not too many iterations should be required.

3.3.3.
Summarizing the WZP Method

The WZP method proves quantum supremacy and achieves an exponential speed-up in the size of a linear system, while it works quite well for dense matrices. The complexity of the algorithm is O(κ2lognAF/ϵ){\rm{O}}({\kappa ^2}\log n{\left\| A \right\|_F}/). According to [17], in a few cases, the Frobenius norm of A is bounded so that AF=O(n)A{_F} = {\rm{O}}(\sqrt n ) and as a result, the complexity of the algorithm is approximately O(κ2lognn/ϵ){\rm{O}}({\kappa ^2}\log n\sqrt n /). This is comparable to the other linear solvers which are presented in our paper.

The WZP method has some resemblance to the HHL algorithm, mainly because it is based on the eigenvalues of A in order to calculate the solution vector. In addition, both algorithms use phase estimation as part of their routines. However, this can significantly increase their cost, as phase estimation is an expensive procedure when high accuracy is required. On the other hand, WZP has an important advantage over HHL. In particular, HHL requires the preparation of suitable Hamiltonians which are difficult to implement in order to appropriately represent A, whereas WZP relies on a tree-like data structure which seems easier to construct. Therefore, it would be justified to prefer WZP over HHL under certain conditions.

3.4.
Row and Column Iteration Methods
3.4.1.
Theoretical Presentation of the Algorithms

The use of iterative methods as quantum solvers for linear sets of equations has been actively investigated in recent years [2022], as the potential of quantum parallelism can lead to a speed-up in comparison to the corresponding classical algorithms. Classical iterative methods are widely used nowadays for large-scale linear systems, because they are faster than the direct methods, especially in cases where not a very precise solution is required or the matrix is sparse. The complexity of these classical algorithms is approximately O(Tn) where T is the total number of iterations and n is the size of the system Ax=bA\vec x = \vec b.

Quantum iterative algorithms achieve an exponential acceleration in n, however, their main limitation is that T significantly reduces their performance – some of them even have an exponential dependence on it. This is mainly due to the requirement on multiple copies of the approximation xk of the solution, which is calculated during the k-th iteration, in order to proceed to the (k + 1)-th iteration. The algorithms often need to restart repeatedly from x0 for an exponential number of times until the desired number of copies of xk is reached.

Current research indicates that it is probably not feasible to implement a quantum algorithm that can outperform classical iterative solution methods both in n and T. An exponential speed-up in n is definitely possible, however, a polynomial complexity in T is the best we can expect at the moment.

An interesting work towards that direction is proposed in [20] and is based on the row and column iteration methods which are used in a lot of large-scale data science applications. The main advantage of these methods is that for every iteration, not the whole matrix A is needed. The two methods are defined as follows:

  • Row (or Kaczmarz) iteration method: It selects in each iteration a row with index 1 ≤ ikn with probability proportional to the norm of the rows of the matrix. If we denote the i-th row of A as ai and the i-th element of the vector b{\vec b} as bi, the (k + 1)-th approximation of the solution of the system is calculated as follows 17xk+1=xk(aikTxkaikbikaik)aikaik.{x_{k + 1}} = {x_k} - \left( {{{a_{{i_k}}^T{x_k}} \over {\left\| {{a_{{i_k}}}} \right\|}} - {{{b_{{i_k}}}} \over {\left\| {{a_{{i_k}}}} \right\|}}} \right){{{a_{{i_k}}}} \over {\left\| {{a_{{i_k}}}} \right\|}}.

    Geometrically a step of the row iteration method is equivalent to the orthogonal projection of the vector xk on the plane aikTx=bika_{{i_k}}^Tx = {b_{{i_k}}}.

  • Column (or coordinate descent) iteration method: It selects in each iteration a column with index 1 ≤ jkn with probability proportional to the norm of the columns of the matrix. If we denote the j-th row of A as cj and the j-th column of the identity matrix as ej, the (k + 1)-th approximation of the solution of the system is calculated as follows 18xk+1=xk+cjkT(bAxk)cjk2ejk.{x_{k + 1}} = {x_k} + {{c_{{j_k}}^T(b - A{x_k})} \over {{{\left\| {{c_{{j_k}}}} \right\|}^2}}}{e_{{j_k}}}.

    If we denote the residual of the k-th iteration as rk = bAxk, the expression of (18) can be written as follows: 19xk+1=xk+cjkTrkcjk2ejk,{x_{k + 1}} = {x_k} + {{c_{{j_k}}^T{r_k}} \over {{{\left\| {{c_{{j_k}}}} \right\|}^2}}}{e_{{j_k}}},

    where the residual also follows an iterative scheme: 20rk+1=bAxk+1=bAxkAcjkTrkcjk2ejk=rkcjkcjkTcjk2rk.{r_{k + 1}} = b - A{x_{k + 1}} = b - A{x_k} - A{{c_{{j_k}}^T{r_k}} \over {{{\left\| {{c_{{j_k}}}} \right\|}^2}}}{e_{{j_k}}} = {r_k} - {{{c_{{j_k}}}c_{{j_k}}^T} \over {{{\left\| {{c_{{j_k}}}} \right\|}^2}}}{r_k}.

3.4.2.
Quantum Row Iteration Method

The quantum algorithm of Shao assumes the existence of a QRAM [23] which is responsible for preparing a row at in the form of a quantum state and is equivalent to a unitary operator Vt such that: Vt|0=|at.{V_t}|0\rangle = |{a_t}\rangle .

All the rows of A are supposed to be scaled to ‖at‖ = 1 for the purpose of their representation as quantum states. The solution unit vector approximations |xk〉 are assumed to be included in quantum states |Xk〉 such that |Xk=p|0|xk+1p|1|.|{X_k}\rangle = \sqrt p |0\rangle |{x_k}\rangle + \sqrt {1 - p} |1\rangle | \cdots \rangle .

Here and in what follows, we use the notation |⋯〉 as a placeholder for an unspecified quantum state, whose explicit form is not relevant to the argument. The basic idea of the algorithm involves preparing a quantum state of the form β|0|Xk+γ|1|0|at,withβ2+γ2=1.\beta |0\rangle |{X_k}\rangle + \gamma |1\rangle |0\rangle |{a_t}\rangle ,{\rm{with}}{\beta ^2} + {\gamma ^2} = 1.

Applying a SWAP gate between the first two qubits of such a state we get 21|0(βp|0|xk+γ|1|at)+β1p|1|0|.|0\rangle (\beta \sqrt p |0\rangle |{x_k}\rangle + \gamma |1\rangle |{a_t}\rangle ) + \beta \sqrt {1 - p} |1\rangle |0\rangle | \cdots \rangle .

For the next step, the algorithm deploys the following unitary operator: 22Ut=[ In|atat||atat||atat|In|atat| ]=I2(In|atat|)+X(|atat|).{U_t} = \left[ {\matrix{ {{I_n} - |{a_t}\rangle \langle {a_t}|} & {|{a_t}\rangle \langle {a_t}|} \cr {|{a_t}\rangle \langle {a_t}|} & {{I_n} - |{a_t}\rangle \langle {a_t}|} \cr } } \right] = {I_2} \otimes ({I_n} - |{a_t}\rangle \langle {a_t}|) + X \otimes (|{a_t}\rangle \langle {a_t}|).

Through equality Vt|0=|at|atat|=Vt|00|Vt{V_t}|0\rangle = |{a_t}\rangle \Rightarrow |{a_t}\rangle \langle {a_t}| = {V_t}|0\rangle \langle 0|V_t^\dag (22) becomes 23Ut=(I2Vt)(I2(In|00|)+X|00|)(I2Vt).{U_t} = ({I_2} \otimes {V_t})({I_2} \otimes ({I_n} - |0\rangle \langle 0|) + X \otimes |0\rangle \langle 0|)({I_2} \otimes V_t^\dag ).

Using (22) and applying the operator Ut on the first part of the quantum state of (21), the quantum state which is calculated below is produced 24Ut(βp|0|xk+γ|1|at)==|0(βp(In|atat|)|xk+γ|atat||at)++|1(βp|atat||xk+γ(Inat||at)|at)==|0(βp(In|atat|)|xk+γ|at)+|1(βpat|xk|at)\matrix{ {{U_t}(\beta \sqrt p |0\rangle |{x_k}\rangle + \gamma |1\rangle |{a_t}\rangle ) = } \cr { = |0\rangle \otimes (\beta \sqrt p ({I_n} - |{a_t}\rangle \langle {a_t}|)|{x_k}\rangle + \gamma |{a_t}\rangle \langle {a_t}\parallel {a_t}\rangle ) + } \cr { + |1\rangle \otimes (\beta \sqrt p |{a_t}\rangle \langle {a_t}\parallel {x_k}\rangle + \gamma ({I_n} - \langle {a_t}\parallel {a_t}\rangle )|{a_t}\rangle ) = } \cr { = |0\rangle \otimes (\beta \sqrt p ({I_n} - |{a_t}\rangle \langle {a_t}|)|{x_k}\rangle + \gamma |{a_t}\rangle ) + |1\rangle \otimes (\beta \sqrt p \langle {a_t}|{x_k}\rangle |{a_t}\rangle )} \cr }

From (17) it can be observed that in terms of quantum states we have |xk+1xk(In|atat|)|xk+bt|at|{x_{k + 1}}\rangle \propto \left\| {{x_k}} \right\|({I_n} - |{a_t}\rangle \langle {a_t}|)|{x_k}\rangle + {b_t}|{a_t}\rangle

and this expression resembles the first part of (24) if the values of β, γ are chosen appropriately. For example, β = ‖xk‖ and γ=btp\gamma = {b_t}\sqrt p .

Following this intuitive explanation of the concept of the quantum row iteration algorithm, the analytical sequence of its steps is presented next.

  • An initial approximation |x0〉 of the unit vector of the solution is selected. We set k = 0 and a variable vk = 1 to express the state of the quantum system as follows: 25|Xk=xkvk|0k|xk+|0k|.|{X_k}\rangle = {{\left\| {{x_k}} \right\|} \over {{v_k}}}|0{\rangle ^{ \otimes k}}|{x_k}\rangle + |{0^ \bot }{\rangle ^{ \otimes k}}| \cdots \rangle .

    Here |0k|{0^ \bot }{\rangle ^{ \otimes k}} denotes a tensor product of states orthogonal to |0〉. The explicit form of these states is not needed, as they serve only to complete the expression.

  • The row with index tk{1,,n}{t_k} \in \{ 1, \cdots ,n\} , is chosen in order to prepare a state of the form |Yk=βtk|0|Xk+γtk|1|0k|atk,|{Y_k}\rangle = {\beta _{{t_k}}}|0\rangle |{X_k}\rangle + {\gamma _{{t_k}}}|1\rangle |0{\rangle ^{ \otimes k}}|{a_{{t_k}}}\rangle ,

    where βtk2=vk2vk2+btk2\beta _{{t_k}}^2 = {{v_k^2} \over {v_k^2 + b_{{t_k}}^2}} and γtk2=1βtk2\gamma _{{t_k}}^2 = 1 - \beta _{{t_k}}^2. To implement this state, the transformation |00(βtk|0+γtk|1)|0\gamma _{{t_k}}^2 = 1 - \beta _{{t_k}}^2 is achieved with a suitable rotation operator, whereas |Xk〉 and |atk〉 are incorporated using appropriate controlled operations.

  • A SWAP operator exchanges the first with the (k + 1)-th qubit of |Yk〉 and an operator of the form I2kUtkI_2^{ \otimes k} \otimes {U_{{t_k}}} is applied: 26|Xk+1=(I2kUtk)swap1,k+1|Yk|Xk+1=(I2kUtk)swap1,k+1(βtk|0|Xk+γtk|1|0k|atk)|Xk+1=(I2kUtk)swap1,k+1(βtkxkvk|0k|0|xk+γtk|1|0k|atk+|0(k+1)|)|Xk+1=|0(k+1)(βtkxkvk(In|atkatk|)|xk+γtk(|atkatk|)|atk)+|0(k+1)||Xk+1=|0(k+1)(βtkxkvk(In|atkatk|)|xk+γtk|atk)+|0(k+1)|\matrix{ {|{X_{k + 1}}\rangle = (I_2^{ \otimes k} \otimes {U_{{t_k}}}){\rm{swa}}{{\rm{p}}_{1,k + 1}}|{Y_k}\rangle \Rightarrow } \cr {|{X_{k + 1}}\rangle = (I_2^{ \otimes k} \otimes {U_{{t_k}}}){\rm{swa}}{{\rm{p}}_{1,k + 1}}({\beta _{{t_k}}}|0\rangle |{X_k}\rangle + {\gamma _{{t_k}}}|1\rangle |0{\rangle ^{ \otimes k}}|{a_{{t_k}}}\rangle ) \Rightarrow } \cr {|{X_{k + 1}}\rangle = (I_2^{ \otimes k} \otimes {U_{{t_k}}}){\rm{swa}}{{\rm{p}}_{1,k + 1}}\left( {{{{\beta _{{t_k}}}\left\| {{x_k}} \right\|} \over {{v_k}}}|0{\rangle ^{ \otimes k}}|0\rangle |{x_k}\rangle + {\gamma _{{t_k}}}|1\rangle |0{\rangle ^{ \otimes k}}|{a_{{t_k}}}\rangle + |{0^ \bot }{\rangle ^{ \otimes (k + 1)}}| \cdots \rangle } \right) \Rightarrow } \cr {|{X_{k + 1}}\rangle = |0{\rangle ^{ \otimes (k + 1)}} \otimes \left( {{{{\beta _{{t_k}}}\left\| {{x_k}} \right\|} \over {{v_k}}}({I_n} - |{a_{{t_k}}}\rangle \langle {a_{{t_k}}}|)|{x_k}\rangle + {\gamma _{{t_k}}}(|{a_{{t_k}}}\rangle \langle {a_{{t_k}}}|)|{a_{{t_k}}}\rangle } \right) + |{0^ \bot }{\rangle ^{ \otimes (k + 1)}}| \cdots \rangle \Rightarrow } \cr {|{X_{k + 1}}\rangle = |0{\rangle ^{ \otimes (k + 1)}} \otimes \left( {{{{\beta _{{t_k}}}\left\| {{x_k}} \right\|} \over {{v_k}}}({I_n} - |{a_{{t_k}}}\rangle \langle {a_{{t_k}}}|)|{x_k}\rangle + {\gamma _{{t_k}}}|{a_{{t_k}}}\rangle } \right) + |{0^ \bot }{\rangle ^{ \otimes (k + 1)}}| \cdots \rangle } \cr }

    From the previous step we have βtk2=vk2vk2+btk2\beta _{{t_k}}^2 = {{v_k^2} \over {v_k^2 + b_{{t_k}}^2}} and γtk2=1βtk2=btk2vk2+btk2\gamma _{{t_k}}^2 = 1 - \beta _{{t_k}}^2 = {{b_{{t_k}}^2} \over {v_k^2 + b_{{t_k}}^2}}, so btk2βtk2=γtk2vk2γtk=βtkbtkvkb_{{t_k}}^2\beta _{{t_k}}^2 = \gamma _{{t_k}}^2v_k^2 \Rightarrow {\gamma _{{t_k}}} = {{\beta {t_k}{b_{{t_k}}}} \over {{v_k}}}. As a result, Ref. (26) can alternatively be written as follows |Xk+1=βtkvk|0(k+1)(xk(In|atkatk|)|xk+btk|atk)+|0(k+1)||Xk+1=xk+1vk+1|0(k+1)|xk+1+|0(k+1)|withvk+1=vkβtk.\matrix{ {|{X_{k + 1}}\rangle = {{{\beta _{{t_k}}}} \over {{v_k}}}|0{\rangle ^{ \otimes (k + 1)}} \otimes (\left\| {{x_k}} \right\|({I_n} - |{a_{{t_k}}}\rangle \langle {a_{{t_k}}}|)|{x_k}\rangle + {b_{{t_k}}}|{a_{{t_k}}}\rangle ) + |{0^ \bot }{\rangle ^{ \otimes (k + 1)}}| \cdots \rangle \Rightarrow } \cr {|{X_{k + 1}}\rangle = {{\left\| {{x_{k + 1}}} \right\|} \over {{v_{k + 1}}}}|0{\rangle ^{ \otimes (k + 1)}}|{x_{k + 1}}\rangle + |{0^ \bot }{\rangle ^{ \otimes (k + 1)}}| \cdots \rangle {\rm{with}}{v_{k + 1}} = {{{v_k}} \over {{\beta _{{t_k}}}}}.} \cr }

    It can be observed that the produced state has the form of (25), thus an iteration of the algorithm is completed at this point. To proceed to the next iteration of the algorithm, we set k = k + 1 and go to step 2.

3.4.3.
Quantum Column Iteration Method

Similarly to the row iterative method, for the column iterative method, the existence of a unitary operator Sj which prepares the column vectors |cj〉 is assumed Sj|j=|cj.S_j^\dag |j\rangle = |{c_j}\rangle .

These columns are scaled to ‖cj‖ = 1 so that they can be represented as quantum states. The algorithm initially selects an approximation x0, calculates the initial residual r0 = bAx0 and then updates the respective quantum states |xk〉 and |rk〉 as follows during each iteration 27|xk+1xk|xk+rk|tkctk|rk=xk|xk+rk|tktk|Stk|rk|rk+1rk(In|ctkctk|)|rk\matrix{ {|{x_{k + 1}}\rangle \propto \left\| {{x_k}} \right\||{x_k}\rangle + \left\| {{r_k}} \right\||{t_k}\rangle \langle {c_{{t_k}}}|{r_k}\rangle = \left\| {{x_k}} \right\||{x_k}\rangle + \left\| {{r_k}} \right\||{t_k}\rangle \langle {t_k}|{S_{{t_k}}}|{r_k}\rangle } \cr {|{r_{k + 1}}\rangle \propto \left\| {{r_k}} \right\|({I_n} - |{c_{{t_k}}}\rangle \langle {c_{{t_k}}}|)|{r_k}\rangle } \cr }

|xk〉’s and |rk〉’s are included in quantum states |Xk〉 and |Rk〉 respectively of the form |Rk=rk|0k|rk+|0k|,|Xk=xkk+1|02k|xk+|02k|.|{R_k}\rangle = \left\| {{r_k}} \right\||0{\rangle ^{ \otimes k}}|{r_k}\rangle + |{0^ \bot }{\rangle ^{ \otimes k}}| \cdots \rangle ,\quad |{X_k}\rangle = {{\left\| {{x_k}} \right\|} \over {k + 1}}|0{\rangle ^{ \otimes 2k}}|{x_k}\rangle + |{0^ \bot }{\rangle ^{ \otimes 2k}}| \cdots \rangle .

The update of |rk〉 is achieved with a SWAP operator which exchanges the first with the (k + 1)-th qubit and a I2kUtkI_2^{ \otimes k} \otimes {U_{{t_k}}} operator applied to the state |0〉 |Rk〉 as illustrated below |Rk+1=(I2kUtk)swap1,k+1|0|Rk|Rk+1=|0(k+1)rk(In|ctkctk|)|rk+|0(k+1)||Rk+1=rk+1|0(k+1)|rk+|0(k+1)|\matrix{ {|{R_{k + 1}}\rangle = (I_2^{ \otimes k} \otimes {U_{{t_k}}}){\rm{swa}}{{\rm{p}}_{1,k + 1}}|0\rangle |{R_k}\rangle \Rightarrow } \cr {|{R_{k + 1}}\rangle = |0{\rangle ^{ \otimes (k + 1)}}\left\| {{r_k}} \right\|({I_n} - |{c_{{t_k}}}\rangle \langle {c_{{t_k}}}|)|{r_k}\rangle + |{0^ \bot }{\rangle ^{ \otimes (k + 1)}}| \cdots \rangle \Rightarrow } \cr {|{R_{k + 1}}\rangle = \left\| {{r_{k + 1}}} \right\||0{\rangle ^{ \otimes (k + 1)}}|{r_k}\rangle + |{0^ \bot }{\rangle ^{ \otimes (k + 1)}}| \cdots \rangle } \cr }

This resembles the update of |xk〉 in the row iteration algorithm if we set vk = 1. For the update of |xk〉 it is assumed that the approximations are represented as follows: |Rk~=rk|0Stk|rk+|0||X~k=xkv|0|xk+|0|\matrix{ {|\widetilde {{R_k}}\rangle = \left\| {{r_k}} \right\||0\rangle {S_{{t_k}}}|{r_k}\rangle + |{0^ \bot }\rangle | \cdots \rangle } \cr {|{{\tilde X}_k}\rangle = {{\left\| {{x_k}} \right\|} \over v}|0\rangle |{x_k}\rangle + |{0^ \bot }\rangle | \cdots \rangle } \cr }

Using two ancilla qubits these quantum states are combined in a state of the form: |ϕ1=β|00|X~k+γ|10|Rk~withβ2+γ2=1|{\phi _1}\rangle = \beta |00\rangle |{{\tilde X}_k}\rangle + \gamma |10\rangle |\widetilde {{R_k}}\rangle {\rm{with}}{\beta ^2} + {\gamma ^2} = 1

A Wtk operator is applied, where: Wt=[ In000In|tt||tt|0|tt|In|tt| ]{W_t} = \left[ {\matrix{ {{I_n}} & 0 & 0 \cr 0 & {{I_n} - |t\rangle \langle t|} & {|t\rangle \langle t|} \cr 0 & {|t\rangle \langle t|} & {{I_n} - |t\rangle \langle t|} \cr } } \right]

as well as a SWAP operator exchanging the second with the third qubit, to produce: |ϕ2=swap2,3Wtk|ϕ1|ϕ2=swap2,3Wtk(β|00|X~k+γ|10|R~k)|ϕ2=swap2,3(β|00|X~k+γ|01|tktk||X~k+|10|)|ϕ2=|00(βxkv|0|xk+γrk|1|tktk|Stk|rk)+|02|.\matrix{ {|{\phi _2}\rangle = {\rm{swa}}{{\rm{p}}_{2,3}}{W_{{t_k}}}|{\phi _1}\rangle \Rightarrow } \cr {|{\phi _2}\rangle = {\rm{swa}}{{\rm{p}}_{2,3}}{W_{{t_k}}}(\beta |00\rangle |{{\tilde X}_k}\rangle + \gamma |10\rangle |{{\tilde R}_k}\rangle )} \cr {|{\phi _2}\rangle = {\rm{swa}}{{\rm{p}}_{2,3}}(\beta |00\rangle |{{\tilde X}_k}\rangle + \gamma |01\rangle |{t_k}\rangle \langle {t_k}\parallel {{\tilde X}_k}\rangle + |10\rangle | \cdots \rangle ) \Rightarrow } \cr {|{\phi _2}\rangle = |00\rangle ({{\beta \left\| {{x_k}} \right\|} \over v}|0\rangle |{x_k}\rangle + \gamma \left\| {{r_k}} \right\||1\rangle |{t_k}\rangle \langle {t_k}|{S_{{t_k}}}|{r_k}\rangle ) + |{0^ \bot }{\rangle ^{ \otimes 2}}| \cdots \rangle .} \cr }

The first part of |ϕ2〉 is similar to (27), but to compute |xk + 1〉 it is essential to rotate its third qubit with an appropriate rotation operator of the form Gk=[ cssc ]with c2+s2=1.{G_k} = \left[ {\matrix{ c & s \cr { - s} & c \cr } } \right]{\rm{with}}{c^2} + {s^2} = 1

This leads to the following state 28|ϕ3=(I4GkIn)|ϕ2=|000(cβxkv|xk+sγrk|tktk|Stk|rk)+|03|.|{\phi _3}\rangle = ({I_4} \otimes {G_k} \otimes {I_n})|{\phi _2}\rangle = |000\rangle \left( {{{c\beta \left\| {{x_k}} \right\|} \over v}|{x_k}\rangle + s\gamma \left\| {{r_k}} \right\||{t_k}\rangle \langle {t_k}|{S_{{t_k}}}|{r_k}\rangle } \right) + |{0^ \bot }{\rangle ^{ \otimes 3}}| \cdots \rangle .

Combining (27) and (28), the expected quantum state of |Xk + 1〉 has the form: |Xk+1=1k+2(xk|xk+rk|tktk|Stk|rk)+|0(2k+2)|.|{X_{k + 1}}\rangle = {1 \over {k + 2}}(\left\| {{x_k}} \right\||{x_k}\rangle + \left\| {{r_k}} \right\||{t_k}\rangle \langle {t_k}|{S_{{t_k}}}|{r_k}\rangle ) + |{0^ \bot }{\rangle ^{ \otimes (2k + 2)}}| \cdots \rangle .

Comparing this state with (28) and setting v = k + 1, it is evident that cβk+1=sγ=1k+2{{c\beta } \over {k + 1}} = s\gamma = {1 \over {k + 2}}. In [20] c=β=k+1k+2c = \beta = \sqrt {{{k + 1} \over {k + 2}}} and s=γ=1k+2s = \gamma = \sqrt {{1 \over {k + 2}}} is proposed.

At this point, the reader should have a sufficient understanding of how the quantum column iteration algorithm works. Next, we summarize and analyze its main steps.

  • The algorithm begins with an initial approximation |x0〉 of the unit vector of the solution. An initial residual r0 = bAx0 is calculated. The iteration number k is set to 0 and the quantum states |Xk〉 and |Rk〉 are prepared.

  • The column with index tk{1,,n}{t_k} \in \{ 1, \cdots ,n\} , which is used for each iteration, is chosen in order to prepare a state of the form |ψ0=k+1k+2|00|Xk+1k+2|10(I2kStk)|0k|Rk.|{\psi _0}\rangle = \sqrt {{{k + 1} \over {k + 2}}} |00\rangle |{X_k}\rangle + \sqrt {{1 \over {k + 2}}} |10\rangle ({I^{ \otimes 2k}} \otimes {S_{{t_k}}})|0{\rangle ^{ \otimes k}}|{R_k}\rangle .

  • Two SWAP operators exchange the second with the (k + 2)-th qubit and the first with the (k + 1)-th qubit of the state |ψ0〉. Afterwards, in order to update |Xk〉, an operator of the form (I2(2k+1)GkIn)(I22kWtk)(I_2^{ \otimes (2k + 1)} \otimes {G_k} \otimes {I_n})(I_2^{ \otimes 2k} \otimes {W_{{t_k}}}) is applied. To provide more insight into this process, by substituting |Xk〉 and |Rk〉, |ψ0〉 can alternatively be expressed as follows |ψ0=k+1k+2|00(xkk+1|02k|xk+|02k|)++1k+2|10(rk|02kStk|rk+|02k|).\matrix{ {|{\psi _0}\rangle = \sqrt {{{k + 1} \over {k + 2}}} |00\rangle \left( {{{\left\| {{x_k}} \right\|} \over {k + 1}}|0{\rangle ^{ \otimes 2k}}|{x_k}\rangle + |{0^ \bot }{\rangle ^{ \otimes 2k}}| \cdots \rangle } \right) + } \cr {\quad + \sqrt {{1 \over {k + 2}}} |10\rangle \left( {\left\| {{r_k}} \right\||0{\rangle ^{ \otimes 2k}}{S_{{t_k}}}|{r_k}\rangle + |{0^ \bot }{\rangle ^{ \otimes 2k}}| \cdots \rangle } \right)} \cr }

    The use of the SWAP gates leads to state |ψ1〉: |ψ1=|02k(k+1k+2xkk+1|00|xk+1k+2rk|10Stk|rk)+|02k|.|{\psi _1}\rangle = |0{\rangle ^{ \otimes 2k}} \otimes \left( {\sqrt {{{k + 1} \over {k + 2}}} {{\left\| {{x_k}} \right\|} \over {k + 1}}|00\rangle |{x_k}\rangle + \sqrt {{1 \over {k + 2}}} \left\| {{r_k}} \right\||10\rangle {S_{{t_k}}}|{r_k}\rangle } \right) + |{0^ \bot }{\rangle ^{ \otimes 2k}}| \cdots \rangle .

    The operator I22kWtkI_2^{ \otimes 2k} \otimes {W_{{t_k}}} transforms the previous state to a new state |ψ2|ψ2=|0(2k+1)(k+1k+2xkk+1|0|xk+1k+2rk|1|tktk|Stk|rk)+|0(2k+1)||{\psi _2}\rangle = |0{\rangle ^{ \otimes (2k + 1)}} \otimes (\sqrt {{{k + 1} \over {k + 2}}} {{\left\| {{x_k}} \right\|} \over {k + 1}}|0\rangle |{x_k}\rangle + \sqrt {{1 \over {k + 2}}} \left\| {{r_k}} \right\||1\rangle |{t_k}\rangle \langle {t_k}|{S_{{t_k}}}|{r_k}\rangle ) + |{0^ \bot }{\rangle ^{ \otimes (2k + 1)}}| \cdots \rangle

    Finally the operator I2(2k+1)GkInI_2^{ \otimes (2k + 1)} \otimes {G_k} \otimes {I_n} leads to a state |ψ3〉 of the form |ψ3=|0(2k+2)(k+1k+2xkk+1k+1k+2|xk+1k+21k+2rk|tktk|Stk|rk)+|0(2k+2)||ψ3=|0(2k+2)(xkk+2|xk+1k+2rk|tktk|Stk|rk)+|0(2k+2)|=|Xk+1.\matrix{ {|{\psi _3}\rangle = |0{\rangle ^{ \otimes (2k + 2)}} \otimes (\sqrt {{{k + 1} \over {k + 2}}} {{\left\| {{x_k}} \right\|} \over {k + 1}}\sqrt {{{k + 1} \over {k + 2}}} |{x_k}\rangle + \sqrt {{1 \over {k + 2}}} \sqrt {{1 \over {k + 2}}} \left\| {{r_k}} \right\||{t_k}\rangle \langle {t_k}|{S_{{t_k}}}|{r_k}\rangle )} \cr { + |{0^ \bot }{\rangle ^{ \otimes (2k + 2)}}| \cdots \rangle \Rightarrow } \cr {|{\psi _3}\rangle = |0{\rangle ^{ \otimes (2k + 2)}} \otimes ({{\left\| {{x_k}} \right\|} \over {k + 2}}|{x_k}\rangle + {1 \over {k + 2}}\left\| {{r_k}} \right\||{t_k}\rangle \langle {t_k}|{S_{{t_k}}}|{r_k}\rangle )} \cr { + |{0^ \bot }{\rangle ^{ \otimes (2k + 2)}}| \cdots \rangle = |{X_{k + 1}}\rangle } \cr }

  • The state of |Rk〉 is updated using the same operators that are used for the update of |Xk〉 in the row iteration algorithm, as explained above. We set k = k + 1 and go to step 2 to proceed to the next iteration.

3.4.4.
Summarizing the Iteration Algorithms

The row and column iteration algorithms are an innovative idea for a quantum linear solver. Their main advantage compared to the classical iterative methods is that in order to solve a linear system of the form Ax=bA\vec x = \vec b neither the whole matrix A nor the vector b{\vec b} need to be represented in quantum states. Moreover, the algorithms only need a QRAM for the preparation of the quantum states and unlike the HHL algorithm, there are no requirements for Hamiltonian simulations or phase estimation.

The performance of the quantum row and column iteration algorithms is approximately O(κs2(logn)log1ϵ)O(Tlogn){\rm{O}}(\kappa _s^2(\log n)\log {1 \over }) \approx {\rm{O}}(T\log n), where κs=AFA1{\kappa _s} = {\left\| A \right\|_F}\left\| {{A^{ - 1}}} \right\| is the scaled condition number and ‖AF is the Frobenius norm of A. This is comparable to the other quantum solvers like HHL and also shows the supremacy of the algorithms in comparison to their classical counterparts whose performance is approximately O(κs2nlog1ϵ){\rm{O}}(\kappa _s^2n\log {1 \over }).

On the other hand, the main drawback of these algorithms is their dependence on ancilla qubits which are used during step 2 of both row and column algorithms. It can be observed that this leads to a linear increase of the qubit requirements with the number of iterations, which might be a problem if a lot of iterations are necessary in order to achieve high accuracy.

3.5
Variational Quantum Linear Solver
3.5.1.
Outline of the Algorithm

All the above described quantum linear solvers exhibit quantum supremacy and promise to solve linear systems faster than their classical counterparts. However, in practice, they have not been implemented in actual quantum computers for large-scale systems of equations. This is due to the fact that currently only noisy intermediate-scale quantum (NISQ) computers have been created which contain a limited number of qubits and are susceptible to quantum decoherence. This is a significant limitation, especially when error correction methods cannot easily be applied to such quantum systems.

Large-scale quantum computers are not expected to emerge soon, so we are forced to lower our expectations concerning the immediate application of the aforementioned quantum algorithms for linear systems and resort to more realistic options. In this regard, Bravo-Prieto proposed the variational quantum linear solver (VQLS) [24], a hybrid quantum – classical algorithm which current quantum computers can handle. The concept of this algorithm is to incorporate classical computations in order to reduce the complexity of the quantum circuits that are needed.

In this subsection, we focus on a short description of the structure of the VQLS algorithm which is summarized in Figure 5:

Figure 5.

Diagram of the VQLS algorithm ([24]).

Considering a linear system of the form Ax=bA\vec x = \vec b, the input to the algorithm includes an operator U such that U|0〉 = |b〉, where |b〉 is proportional to b{\vec b}, and the matrix A in the form of a linear combination of unitary matrices Al A=l=1LclAl,clC.A = \mathop \sum \limits_{l = 1}^L {c_l}{A_l},{c_l} \in {\bf{C}}

To find |x〉 that is proportional to the solution x{\vec x}, an ansatz is used for the combination of gates V(a) which are required for an approximation of the solution |x(a)〉 such that |x(a)=V(a)|0.|x(a)\rangle = V(a)|0\rangle .

The parameters a are inputs from the classical computer to the quantum computer and the latter calculates |x(a)〉, as well as the value of a cost function C(a). The calculated C(a) is sent to the classical computer which runs an optimization algorithm that changes the values of a in order to minimize the cost function. The new a is sent to the quantum computer and the whole process is repeated until an optimal value a = aopt is found which leads to a sufficient approximation of the solution |x|x(aopt)=V(aopt)|0|x\rangle \approx |x({a_{opt}})\rangle = V({a_{opt}})|0\rangle

and also C(aopt)γC({a_{opt}}) \le \gamma is satisfied, where γ is a termination parameter that acts as a threshold.

3.5.2.
Implementation Details

In this subsection, more details about the implementation of the VQLS algorithm are discussed. First, the form of the cost function needs to be defined, so that it measures the component of |Φ〉 = A|x〉 which is orthogonal to |b〉. Four different cost functions are proposed in [24]

  • Two global cost functions consisting of the

    • CG^=Tr(|ΦΦ|(I|bb|))=x|HG|x\widehat {{C_G}} = Tr(|{\rm{\Phi }}\rangle \langle {\rm{\Phi }}|(I - |b\rangle \langle b|)) = \langle x|{H_G}|x\rangle where HG=A(I|bb|))A{H_G} = {A^\dag }(I - |b\rangle \langle b|))A

    • and its normalized version CG=CG^/Φ|Φ{H_G} = {A^\dag }(I - |b\rangle \langle b|))A.

  • Two local cost functions consisting of the function

    • CL^=x|HG|x\widehat {{C_L}} = \langle x|{H_G}|x\rangle where HL=AU(11nj=1n|0j0j|Ij¯)UA{H_L} = {A^\dag }U(1 - {1 \over n}\mathop \sum \limits_{j = 1}^n |{0_j}\rangle \langle {0_j}| \otimes {I_{\bar j}}){U^\dag }A and where |0j〉 is the zero state on the j-th qubit, whereas Ij¯{I_{\bar j}} is the identity matrix which excludes the j-th qubit.

    • and its normalized version CL=CL^/Φ|Φ{C_L} = \widehat {{C_L}}/\langle {\rm{\Phi }}|{\rm{\Phi }}\rangle .

All the above cost functions are suitable for the solution of a n × n system, but the local cost functions lead to better convergence for large values of n. It can be proved that CGϵ2κ2,CL1nϵ2κ2{C_G} \ge {{{^2}} \over {{\kappa ^2}}},{C_L} \ge {1 \over n}{{{^2}} \over {{\kappa ^2}}}

where κ is the condition number of the matrix A and ϵ is the precision parameter. The right part of these inequalities can be used to define the termination parameter γ.

V(a) can be mathematically expressed as V(a)=Gk1(a1)Gk2(a2)Gkl(al),V(a) = {G_{{k_1}}}({a_1}){G_{{k_2}}}({a_2}) \cdots {G_{{k_l}}}({a_l}),

where k1, k2,…, kl specify the gate types and their positions in the quantum circuit. In cases where k1 = k2 = ⋯ = kl, only a single gate type is used throughout the circuit, which is overly restrictive. More generally, one can consider a fixed-structure ansatz, where the sequence (k1,…,kl) is kept constant during training and only the parameters a are optimized, or a variable-structure ansatz, where the sequence itself may change. In addition, different training strategies can be applied: one may optimize all parameters simultaneously or proceed layer by layer, optimizing parameters by circuit layers.

Finally, another noteworthy element of the VQLS method is the training algorithm that the classical computer uses in order to minimize C(a). There are a few different approaches to achieve that. Ref. [24] proposes a method which in each iteration randomly selects a direction w in the parameter space and solves the optimization problem minsRC(a + sw) in order to find the most suitable value for s.

3.5.3.
Summarizing the VQLS Algorithm

The performance of the VQLS algorithm was evaluated in [24] by solving up to 1024 × 1024 linear systems using Rigetti’s Quantum Cloud Services. Thus, the complexity of the algorithm which we present here is based on experimental data and not theoretical formulas. The time that a linear system needs to be solved has a close to linear dependence on the condition number κ, a logarithmic dependence on the inverse of the precision parameter 1ϵ{1 \over } and a logarithmic dependence on the size n of the system. Therefore, the overall complexity of the algorithm is approximately O(κlog(1ϵ)logn){\rm{O}}(\kappa \log ({1 \over })\log n).

Although the calculated complexity is not so reliable, as it is based on a limited number of specific experiments, it is sufficient to show that VQLS leads to an exponential speed-up in n compared to the classical solvers of linear systems, despite the fact that it is implemented in the currently available flawed quantum computers.

3.6
Random Walks Solver
3.6.1.
Classical Random Walks

Linear algebraic methods that use random walks can handle linear systems of the form x=Hx+b\vec x = H\vec x + \vec b where H is a n × n matrix. This is equivalent to the classical form Ax=bA\vec x = \vec b if we set A = IH. We know that, if ‖H‖ < 1, then I+H+H2+H3+=i=0Hi=(IH)1=A1I + H + {H^2} + {H^3} + \cdots = \sum\limits_{i = 0}^\infty {{H^i} = {{(I - H)}^{ - 1}} = {A^{ - 1}}}

so the solution vector can be calculated as follows 29x=A1b=(IH)1b=i=0Hib.\vec x = {A^{ - 1}}\vec b = {(I - H)^{ - 1}}\vec b = \sum\limits_{i = 0}^\infty {{H^i}\vec b}

Random walks γ = (i0, i1,⋯,ik) which are required for these methods and terminate after k steps are implemented using Markov chains expressed with a n × n matrix P such that P(in+1=j|in=i,n<k)=Pij.P({i_{n + 1}} = j|{i_n} = i,n \lt k) = {P_{ij}}.

To construct the matrix P and to define how the corresponding random walk terminates

  • Neumann and Ulam [25] suggested that the matrix P meets the following requirements: Pij0,jPij1,Hij0Pij0.{P_{ij}} \ge 0,\sum\limits_j {{P_{ij}} \le 1,{H_{ij}} \ne 0 \to {P_{ij}} \ne 0}

    In addition, a vector T is defined which contains the termination probabilities: Ti=1jPij.{T_i} = 1 - \sum\limits_j {{P_{ij}}.}

    After a random walk γ=(i0,i1,,ik)\gamma = ({i_0},{i_1}, \cdots ,{i_k}) finishes, an approximation of the i0-th element of the solution vector can be calculated using the formula xi0˜=Hi0i1Hik1ikbikPi0i1Pik1ikTik.\widetilde {{x_{{i_0}}}} = {{{H_{{i_0}{i_1}}} \cdots {H_{{i_{k - 1}}{i_k}}}{b_{{i_k}}}} \over {{P_{{i_0}{i_1}}} \cdots {P_{{i_{k - 1}}{i_k}}}{T_{{i_k}}}}}.

  • Dimov et al. [26] proposed that Pij=|Hij|j|Hij|{P_{ij}} = {{|{H_{ij}}|} \over {\sum\nolimits_j {|{H_{ij}}|} }}. Given a random walk γ=(i0,i1,)\gamma = ({i_0},{i_1}, \cdots ), there are no termination probabilities, but some weights Wi are used instead, such that: W0=1,W1=W0Hi0i1Pi0i1,,Wn=Wn1Hin1inPin1in.{W_0} = 1,\quad {W_1} = {W_0}{{{H_{{i_0}{i_1}}}} \over {{P_{{i_0}{i_1}}}}}, \cdots ,\quad {W_n} = {W_{n - 1}}{{{H_{{i_{n - 1}}{i_n}}}} \over {{P_{{i_{n - 1}}{i_n}}}}}.

    The random walk finishes after its k-th step if |Wk| < ϵ, where ϵ is a predefined tolerance. Then an approximation of the i0-th element of the solution vector is calculated as follows xi0˜=n=0kWnbin.\widetilde {{x_{{i_0}}}} = \sum\limits_{n = 0}^k {{W_n}{b_{{i_n}}}.}

3.6.2.
Outline of the Algorithm

A hybrid classical-quantum linear solver that utilizes random walks implemented in a quantum computer was proposed in [27] where the reader is referred for a comprehensive explanation of this method. Next, we provide a general description of its structure.

Given a n × n linear system, Ax=bA\vec x = \vec b, the matrix A needs to be expressed as: A=IγP,0<γ<1,A = I - \gamma P,\quad 0 \lt \gamma \lt 1,

where P is a Markov chain transition matrix that satisfies the relations Pij ≥ 0 and jPij=1\mathop \sum \limits_j {P_{ij}} = 1. Consequently, (29) is transformed as follows 30x=s=0γsPsb.\vec x = \sum\limits_{s = 0}^\infty {{\gamma ^s}{P^s}\vec b}

To approximate the I0-th element of x, the following truncated version of (30) is used 31xI0(c)=s=0cγsI1,I2,,Is=1nPI0I1PIs1IsbIs.x_{{I_0}}^{(c)} = \sum\limits_{s = 0}^c {{\gamma ^s}} \sum\limits_{{I_1},{I_2}, \cdots ,{I_s} = 1}^n {{P_{{I_0}{I_1}}} \cdots {P_{{I_{s - 1}}{I_s}}}{b_{{I_s}}}.}

The evaluation of (31) is based on a quantum random walk on a graph consisting of n nodes. Given a tolerance of ϵ, c should be selected to be approximately log(1ϵ)log(1γ)\log ({1 \over })\log ({1 \over \gamma }), as it inserts an error of O(γc) in the calculation of x{\vec x}.

Contrary to the previous quantum solvers that were presented in this paper, the form of this algorithm does not require the vectors x{\vec x} and b{\vec b} to be represented as quantum states. Only the matrix A – or equivalently the matrix P – needs to be appropriately inserted in quantum registers. [27] suggests the Hamming cube structure [28] to encode the n-node graph that corresponds to the transition matrix P. This graph uses m = log2 n qubits by associating each node J{0,1,,n1}J \in \{ 0,1, \cdots ,n - 1\} with a binary string |J=|jm1,,j1,j0|J\rangle = |{j_{m - 1}}, \cdots ,{j_1},{j_0}\rangle , where jl is a binary digit.

The proposed implementation requires an additional qubit which acts as a coin register. Given a node represented as a m -bit binary string (jm1,,j1,j0)({j_{m - 1}}, \cdots ,{j_1},{j_0}), the initial quantum state of the algorithm is |ψ0,J=|0|jm1,,j1,j0q=|0|Jq.|{\psi _{0,J}}\rangle = |0{\rangle _\diamondsuit } \otimes |{j_{m - 1}}, \cdots ,{j_1},{j_0}{\rangle _q} = |0{\rangle _\diamondsuit } \otimes |J{\rangle _q}.

The transitions from one node of the graph to another during the different steps of a random walk are achieved by flipping the bits ji with appropriate probabilities. This functionality is based on the coin register; starting with j0 and continuing with the rest of the graph qubits in sequence, the coin register is rotated by an angle θk, and then a CNOT gate is applied to the graph qubit which is processed. Mathematically this is expressed with the operator U=k=0m1(|00|Iq+|11|Xk)(U(uk)Iq){\cal U} = \prod\limits_{k = 0}^{m - 1} {{{(|0\rangle }_\diamondsuit }{{\langle 0{|_\diamondsuit } \otimes {I_q} + |1\rangle }_\diamondsuit }\langle 1{|_\diamondsuit } \otimes {X_k})(U({u_k}) \otimes {I_q})}

where the operator U is the following general single qubit gate U(u)=U(θ,ϕ,λ)=[cos(θ/2)eiλsin(θ/2)eiϕsin(θ/2)eiλ+iϕcos(θ/2)].U(u) = U(\theta ,\phi ,\lambda ) = [\matrix{ {\cos (\theta /2)} & { - {e^{i\lambda }}\sin (\theta /2)} \cr {{e^{i\phi }}\sin (\theta /2)} & {{e^{i\lambda + i\phi }}\cos (\theta /2)} \cr } ].

The parameters ϕ and λ are phase angles that represent components of a single qubit rotation. Their ranges are typically defined as ϕ ∈[0, 2π) and λ [0, 2π).

After flipping the coin register once for all the graph qubits, the resulting quantum state is the following U|ψ0,J=im1,,i0=01l=0m1U(ul)il,il1|im1|im1jm1,,i1j1,i0j0q{\cal U}|{\psi _{0,J}}\rangle = \mathop \sum \limits_{{i_{m - 1}}, \cdots ,{i_0} = 0}^1 \mathop \prod \limits_{l = 0}^{m - 1} U{({u_l})_{{i_l},{i_{l - 1}}}}|{i_{m - 1}}{\rangle _\diamondsuit } \otimes |{i_{m - 1}} \oplus {j_{m - 1}}, \cdots ,{i_1} \oplus {j_1},{i_0} \oplus {j_0}{\rangle _q}

where i−1 = 0. The transition probabilities can be calculated as follows PJJ=l=0m1|U(ul)il,il1|2=l=0m1|cos2(θl2)|1(ilil1)l=0m1|sin2(θl2)|ilil1{P_{J{J^\prime }}} = \mathop \prod \limits_{l = 0}^{m - 1} |U{({u_l})_{{i_l},{i_{l - 1}}}}{|^2} = \mathop \prod \limits_{l = 0}^{m - 1} |{\cos ^2}({{{\theta _l}} \over 2}){|^{1 - ({i_l} \oplus {i_{l - 1}})}}\mathop \prod \limits_{l = 0}^{m - 1} |{\sin ^2}({{{\theta _l}} \over 2}){|^{{i_l} \oplus {i_{l - 1}}}}

where |Iq=|im1,,i1,i0q|I{\rangle _q} = |{i_{m - 1}}, \cdots ,{i_1},{i_0}{\rangle _q} can be derived from |Jq=|Iq|Jq|{J^\prime }{\rangle _q} = |I{\rangle _q} \oplus |J{\rangle _q}. The calculation of these transition probabilities can be extended for multiple applications of the operator 𝒰, but this leads to complex formulas whose thorough analysis is beyond the scope of this paper and the interested reader is referred to [27].

It can be proved that the transition matrix P cannot be written as a tensor product of independent 2 × 2 matrices, which means that the qubits of the graph are entangled, hence the probability that the one flips depends on the probability that the other one flips.

3.6.3.
Summarizing the Random Walks Solver

The proposed random walks solver exploits the probabilistic nature of the quantum states in order to implement a Markov chain structure. It is noteworthy that it does not have extravagant space requirements, as 1 + log n qubits are sufficient. In addition, according to [27] the time complexity for the computation of an element of the solution vector is O(log n). The only parameter taken into consideration is the size of the linear system, however, the algorithm still seems to outperform the classical methods, especially when only a part of the solution is required. In addition, contrary to the other quantum solvers, it is important to note that the output of this solver is classical data, so it is more accessible and can easily be extracted.

3.7
Synopsis and Comparison of the Algorithms

As Table 1 summarizes, all the quantum solvers presented above exhibit supremacy compared to the bestperforming classical linear solvers.

Table 1.

Comparison of the quantum solvers.

AlgorithmComplexityRef.TypeLimitations
HHLO(s2κ2 log n/ϵ)[13]eigendecompositionphase estimation, matrix density, condition number, Hamiltonians
WZPO(κ2lognAF/ϵ){\rm{O}}({\kappa ^2}\log n{\left\| A \right\|_F}/)[18]eigendecompositionphase estimation, condition number
Row and column iterationO(κs2lognlog1ϵ){\rm{O}}(\kappa _s^2\log n\log {1 \over })[20]iterativeancilla qubits, condition number
VQLSO(κlognlog1ϵ){\rm{O}}(\kappa \log n\log {1 \over })[24]hybridansatz option, condition number
Random walks≥ O(log n) per xi[27]hybrid, Monte Carloscalability

All of these algorithms theoretically achieve an exponential speed-up. However, a lot depends on the condition number κ of the matrix A which sometimes scales polynomially with the size of the linear system. If A is ill-conditioned, the quantum algorithms may be slower than the classical methods. This problem can partially be solved using several approaches like preconditioners, but it is often impossible to restrict κ in a scale logarithmic to the number of equations. Moreover, the dependence of the complexity of the algorithms on the precision parameter ϵ should also be considered. If very accurate solutions are required, then an arbitrary increase in the runtime of the algorithms should be expected.

The aforementioned observations can lead to some skepticism about the effectiveness of the quantum linear solvers, but their performance is anyway undoubtedly impressive. It is also encouraging that some of them, like the VQLS algorithm, have been tested, so this confirms that these solvers are not limited to theoretical studies that can not be practically implemented in quantum computers. Nevertheless, asymptotic complexity is not the only factor that determines their viability, and it is equally important to examine the trade-offs between theoretical guarantees and hardware feasibility.

Algorithms such as HHL and WZP rely on quantum phase estimation and deep controlled operations; while they enjoy strong asymptotic guarantees, their circuit depth and noise sensitivity make them infeasible on today’s NISQ devices. By contrast, hybrid solvers like VQLS are explicitly designed for hardware efficiency, since they use shallow variational circuits and shift part of the computational burden to a classical optimizer. This reduces qubit and gate overhead but introduces other challenges: measurement noise can accumulate due to the repeated sampling required, convergence heavily depends on the choice of ansatz, and optimizer robustness is not guaranteed. Thus, the comparison highlights a fundamental balance: algorithms with phase estimation achieve stronger guarantees in theory but lack near-term feasibility, whereas VQLS is practical and moderately robust under current hardware constraints, provided that careful ansatz design and optimizer selection are employed.

4.
Experimental Results

In this Section we propose an implementation of the hybrid quantum-classical VQLS algorithm we discussed in Section 3.5. The requisite mathematical formulas required are the following: { A=l=1LclAl,clC|x(a)=V(a)|0|Φ=A|x(a)U|0=|b. \left\{ {\matrix{ {A = \sum\limits_{l = 1}^L {{c_l}{A_l},{c_l} \in {\bf{C}}} } \hfill \cr {|x(a)\rangle = V(a)|0\rangle } \hfill \cr {|{\rm{\Phi }}\rangle = A|x(a)\rangle } \hfill \cr {U|0\rangle = |b\rangle .} \hfill \cr } } \right.

Given a quantum linear system of the form A|x〉 = |b〉, the matrix A has to be written as a linear combination of unitary operators Al, as the first formula indicates. The second formula introduces the ansatz V(a) which transforms a set of qubits initialized to |0〉 to an approximation of the solution |x(a)〉. The goal of the VQLS algorithm is to construct the best possible V(a) by finding the optimal a. The third formula calculates a quantum state |Φ〉 which stems from the multiplication of A with the approximate solution |x(a)〉. Finally, the last formula includes the operator U which is responsible for the preparation of |b〉. The cost function used for this implementation is the following C=Φ|(I|bb|)|ΦΦ|Φ=Φ|ΦΦ|bb|ΦΦ|Φ=1|b|Φ|2Φ|Φ.C = {{\langle {\rm{\Phi }}|( - |b\rangle \langle b|)|{\rm{\Phi }}\rangle } \over {\langle {\rm{\Phi }}|{\rm{\Phi }}\rangle }} = {{\langle {\rm{\Phi }}|{\rm{\Phi }}\rangle - \langle {\rm{\Phi }}|b\rangle \langle b|{\rm{\Phi }}\rangle } \over {\langle {\rm{\Phi }}|{\rm{\Phi }}\rangle }} = 1 - {{|\langle b|{\rm{\Phi }}\rangle {|^2}} \over {\langle {\rm{\Phi }}|{\rm{\Phi }}\rangle }}.

To calculate this in practice using a quantum computer, we have to decompose the terms 〈Φ|Φ〉 and |〈b|Φ〉|2 as follows and apply the Hadamard test (See Section 2.2)

  • Φ|Φ=x(a)|AA|x(a)=0|V(a)AAV(a)|0=mmcmcn0|V(a)AmAnV(a)|0\langle {\rm{\Phi }}|{\rm{\Phi }}\rangle = \langle x(a)|{A^\dag }A|x(a)\rangle = \langle 0|V(a){A^\dag }AV(a)|0\rangle = \sum\nolimits_m {\sum\nolimits_m {c_m^ * {c_n}\langle 0|V{{(a)}^\dag }A_m^\dag {A_n}V(a)|0\rangle } }

  • |b|Φ|2=|b|Ax(a)|2=|0|UAV(a)|0|2=0|UAV(a)|00|V(a)AU|0=|\langle b|{\rm{\Phi }}\rangle {|^2} = |\langle b|Ax(a)\rangle {|^2} = |\langle 0|{U^\dag }AV(a)|0\rangle {|^2} = \langle 0|{U^\dag }AV(a)|0\rangle \langle 0|V{(a)^\dag }{A^\dag }U|0\rangle = =mncmcn0|UAnV(a)|00|V(a)AmU|0 = \mathop \sum \limits_m \mathop \sum \limits_n c_m^ * {c_n}\langle 0|{U^\dag }{A_n}V(a)|0\rangle \langle 0|V{(a)^\dag }A_m^\dag U|0\rangle

    Given that all involved operators exclusively include real numbers, we note that 0|UAiV(a)|0=0|V(a)AiU|0.\langle 0|{U^\dag }{A_i}V(a)|0\rangle = \langle 0|V{(a)^\dag }A_i^\dag U|0\rangle .

In all our experiments, the coding for the quantum computation routines relies on the Qiskit framework which allows access to both simulators and cloud-based quantum processors. For the purposes of our study, the Aer simulators has been used. Inspired by the approach described in [29], we solve 8 × 8 linear systems utilizing the VQLS algorithm. Our main contributions to [29] are the following improvements.

  • We construct and code quantum operator blocks, to reduce the qubit requirements for the inner product calculations.

  • We utilize different optimizers included in the scipy Python library and compare them to discover the one who produces the optimal a and by extension the best ansatz V(a).

  • We propose an alternative ansatz structure to the ones in [29] and [24], tailored to real-valued problem instances. In our simulations this ansatz achieves consistently faster and more stable convergence while using reduced circuit complexity. Although classically simulable, this design illustrates how problem-specific ansatz choices can substantially enhance the practical performance of VQLS.

4.1
Discussion of the Results

Ref. [29] adapts Hadamard test circuits (extending the 2-register design in Section 2.2, Fig. 1) by adding an ancilla for controlled operations, enabling efficient block encoding without full decomposition. Coding the V(a), U, and Ai operators by constructing ”block operators” as illustrated in Figure 6, this additional qubit can be omitted. In cases of more complex linear systems, more than one ancilla qubits may be omitted.

Figure 6.

Inner product circuits for 〈Φ|Φ〉 (left) and |〈b|Φ〉|2 (right).

The ansatz may take many different forms [24] and an indicative fixed ansatz structure is presented which includes alternating Ry gates with controlled-Z gates, as depicted on the left scheme of Figure 10. The question which arises is which optimizer is the most appropriate for the calculation of the optimal values of a, if the ansatz has the above form. To address this, we try to solve a linear system such that A = 0.55𝕀 + 0.45ℤ3, where 𝕀 is the identity operator and ℤ3 is an operator which includes a single qubit Z gate that acts on the third qubit, while U = H⊗3. The optimizers which we experiment with stem from the scipy Python library and an interested reader can discover details about their application in [30]. The convergence behavior of these optimizers is shown in Figure 7.

Figure 7.

The convergence of the optimizers.

It is evident that the best-performing algorithm is the COBYLA optimizer which performs constrained optimization using linear approximation when the derivative of the target function is unknown. The Powell optimizer produces comparable results, but it requires many more iterations to achieve converges and its behavior is very unstable. Furthermore, the solution vector it calculates fails to sufficiently converge to the actual solution, as the residual plot of Figure 8 indicates.

Figure 8.

The cost function of the optimizers (left) and the corresponding residuals |b−Ax| (right).

On the other hand, the use of the COBYLA optimizer leads to a quantum state that is a much better approximation of the solution. Its density matrix can be seen in Figure 9—white squares indicate positive values and black squares correspond to negative values, whereas the size of the squares is proportional to the magnitude of the values.

Figure 9.

Density matrix of the COBYLA quantum solution vector.

Further improving the performance of the VQLS algorithm largely depends on the structure of the ansatz. Thus, we propose an ansatz depicted in Figure 10 consisting of four gates for each qubit (U(θ,0,0), U(θ,0,π), U(θ,π,0) and U(θ,π,π)), where U is the general single qubit unitary gate. This structure is suitable for linear systems that explicitly contain real numbers, as the selected gates cover all the single-qubit gate cases whose operators do not include complex numbers. We note that the proposed U-ansatz does not include entangling gates.

Figure 10.

The initial ansatz structure (Ry, CZ gates) on the left and the proposed ansatz structure (U gates) on the right.

The values of θ are the parameters that are tuned by the optimizer. This structure is suitable for linear systems that explicitly contain real numbers, as the selected gates cover all the single qubit gate cases whose operators do not include complex numbers. We solve the aforementioned linear system using this ansatz, and present in Figure 11 the resulting density matrix.

Figure 11.

Density matrix of the quantum solution vector produced by the proposed ansatz.

The results indicate a clear improvement in the performance of the algorithm since the cost function converges much more efficiently. The same applies to most of the linear systems which we have tested. Due to computational limitations, error bars were not computed for the figure. However, the results reflect averages over 10 independent runs, and the consistent trends across runs suggest robustness of the observed reductions. For instance, for the linear system A = 0.3ℤ1 + 0.4ℤ2, we find comparable results, as shown in Figure 12.

Figure 12.

Comparison of the ansatz structures A = 0.55𝕀 + 0.45Z3 (left) and A = 0.3Z1 + 0.4Z2 (right). The metrics shown are 〈Φ|Φ〉, |〈b|Φ〉|, and the cost C=1|b|Φ|2Φ|ΦC = 1 - {{|\langle b|{\rm{\Phi }}\rangle {|^2}} \over {\langle {\rm{\Phi }}|{\rm{\Phi }}\rangle }}. Here 〈Φ|Φ〉 indicates the norm of A|x(a)〉, while |〈b|Φ〉| measures the raw overlap with |b〉. Since these two quantities are not meaningful in isolation, the cost is the definitive convergence criterion. The additional panel reports the cost reduction Δ = CostRy-CZ − CostU, which is the quantity used to evaluate the improvement achieved by the U-gates ansatz. The trends are averaged over 10 runs. While statistical uncertainties are not quantified due to resource limitations, the consistent reductions suggest improved convergence for the U-gates ansatz.

Future extensions could incorporate real-preserving entangling operations to enhance expressivity while maintaining compatibility with real-valued problem instances. Consequently, it seems that the proposed ansatz is worth considering for the solution of linear systems using the VQLS algorithm, as it serves as a reliable alternative to other quantum circuit structures that have been examined in practice and in theory.

5.
Synopsis and Prospects

The question arising from this research is whether the algorithms studied will possibly replace the well-known classical linear solvers, such as Gaussian elimination. Much depends on whether the scientific community will be able to build universal quantum computers consisting of millions of qubits, and whether error correction techniques will be able to ensure the stability of these systems under all conditions.

The performance of these quantum linear solvers is undoubtedly promising, as they achieve even exponential speed-up in the size of the linear system compared to their classical counterparts. The dependence of most of them on the condition number of the involved matrices raises some concerns though. Therefore, possible future research efforts should focus on limiting or even eliminating this dependence. In addition, the inability to extract the whole solution vector from the output quantum states is something that cannot be overlooked.

The study of the presented algorithms is also still at a theoretical level and minimal practical implementations have been published which mainly concern small linear systems. In this regard, we attempt to contribute to the enhancement of the performance of the VQLS algorithm from an experimental perspective by solving 8 × 8 linear systems using the Aer Qiskit simulators. It remains to be seen if these methods can be effectively extended for largescale systems as our current experimentation indicates. The convergence trends in Figure 12 are based on averaged data without statistical error quantification due to resource constraints. Future work with larger-scale simulations could incorporate confidence intervals to confirm statistical significance.

An alternative approach will very well be through the algorithms considered in [31]. It seems that these randomized approaches could be mapped to quantum computer architectures in a very effective and natural way. Such a method is presented in Section 3.6 above. A comprehensive study of the whole ecosystem of these randomized approaches is beyond the scope of this paper and will be presented elsewhere. We should note that several of these methods have been proposed long time and ignored by the majority of researchers. We believe that this was due to the fact that they could not be properly mapped on the von Neuman computing model and effectively implemented on the existing classical computers. We strongly believe that they have the potential to exhibit their supremacy in quantum computing systems.

Apart from the above-mentioned algorithms, there is a plethora of other related publications [10,3252] which for various reasons we do not comment in our paper. The interested reader can refer to them in order to acquire a global view of the whole research ecosystem of the quantum solvers for linear algebraic systems.

DOI: https://doi.org/10.2478/qic-2025-0035 | Journal eISSN: 3106-0544 | Journal ISSN: 1533-7146
Language: English
Page range: 640 - 667
Submitted on: Jul 7, 2025
|
Accepted on: Sep 10, 2025
|
Published on: Mar 9, 2026
In partnership with: Paradigm Publishing Services
Publication frequency: 1 issue per year

© 2026 Papagiannis Nikos, Vavalis Manolis, published by Cerebration Science Publishing Co., Limited
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.