HHL algorithm for quantum linear equation

Posted 安徽思远

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了HHL algorithm for quantum linear equation相关的知识,希望对你有一定的参考价值。

Introduction

Systems of linear equations arise naturally in many real-life applications in a wide range of areas, such as in the solution of Partial Differential Equations, the calibration of financial models, fluid simulation or numerical field calculation. The problem can be defined as, given a m a t r i x A ∈ C N × N matrix A\\in\\mathbb{C}^{N\\times N} matrixACN×N and a vector b ⃗ ∈ C N \\vec{b}\\in\\mathbb{C}^{N} b CN, find x ⃗ ∈ C N \\vec{x}\\in\\mathbb{C}^{N} x CN satisfying A x ⃗ = b ⃗ A\\vec{x}=\\vec{b} Ax =b

For example, take N=2,

A = ( 1 − 1 / 3 − 1 / 3 1 ) , x ⃗ = ( x 1 x 2 ) and b ⃗ = ( 1 0 ) A = \\begin{pmatrix}1 & -1/3\\\\-1/3 & 1 \\end{pmatrix},\\quad \\vec{x}=\\begin{pmatrix} x_{1}\\\\ x_{2}\\end{pmatrix}\\quad \\text{and} \\quad \\vec{b}=\\begin{pmatrix}1 \\\\ 0\\end{pmatrix} A=(11/31/31),x =(x1x2)andb =(10)

Then the problem can also be written as find x 1 , x 2 ∈ C s u c h t h a t { x 1 − x 2 3 = 1 − x 1 3 + x 2 = 0 x_{1}, x_{2}\\in\\mathbb{C} such that \\begin{cases}x_{1} - \\frac{x_{2}}{3} = 1 \\\\ -\\frac{x_{1}}{3} + x_{2} = 0\\end{cases} x1,x2Csuchthat{x13x2=13x1+x2=0

A system of linear equations is called s-sparse if A has at most s non-zero entries per row or column. Solving an s-sparse system of size N with a classical computer requires O ( N s κ log ⁡ ( 1 / ϵ ) ) \\mathcal{ O }(Ns\\kappa\\log(1/\\epsilon)) O(Nsκlog(1/ϵ)) running time using the conjugate gradient method. Here κ \\kappa κ denotes the condition number of the system and ϵ \\epsilon ϵ the accuracy of the approximation.

The HHL is a quantum algorithm to estimate a function of the solution with running time complexity of O ( log ⁡ ( N ) s 2 κ 2 / ϵ ) \\mathcal{ O }(\\log(N)s^{2}\\kappa^{2}/\\epsilon) O(log(N)s2κ2/ϵ) when A is a Hermitian matrix under the assumptions of efficient oracles for loading the data, Hamiltonian simulation and computing a function of the solution. This is an exponential speed up in the size of the system, however one crucial remark to keep in mind is that the classical algorithm returns the full solution, while the HHL can only approximate functions of the solution vector.

The HHL algorithm

Some mathematical background

The first step towards solving a system of linear equations with a quantum computer is to encode the problem in the quantum language. By rescaling the system, we can assume b ⃗ \\vec{b} b and x ⃗ \\vec{x} x to be normalised and map them to the respective quantum states ∣ b ⟩ |b\\rangle b and ∣ x ⟩ |x\\rangle x. Usually the mapping used is such that i t h i^{th} ith component of b ⃗ \\vec{b} b (resp. x ⃗ ) \\vec{x}) x ) corresponds to the amplitude of the i t h i^{th} ith basis state of the quantum state ∣ b ⟩ |b\\rangle b (resp. ∣ x ⟩ ) |x\\rangle) x). From now on, we will focus on the rescaled problem

A ∣ x ⟩ = ∣ b ⟩ A|x\\rangle=|b\\rangle Ax=b

Since A is Hermitian, it has a spectral decomposition

A = ∑ j = 0 N − 1 λ j ∣ u j ⟩ ⟨ u j ∣ , λ j ∈ R A=\\sum_{j=0}^{N-1}\\lambda_{j}|u_{j}\\rangle\\langle u_{j}|,\\quad \\lambda_{j}\\in\\mathbb{ R } A=j=0N1λjujuj,λjR

where ∣ u j ⟩ i s t h e j t h |u_{j}\\rangle is the j^{th} ujisthejth eigenvector of A with respective eigenvalue λ j \\lambda_{j} λj. Then,

A − 1 = ∑ j = 0 N − 1 λ j − 1 ∣ u j ⟩ ⟨ u j ∣ A^{-1}=\\sum_{j=0}^{N-1}\\lambda_{j}^{-1}|u_{j}\\rangle\\langle u_{j}| A1=j=0N1λj1ujuj

and the right hand side of the system can be written in the eigenbasis of A as

∣ b ⟩ = ∑ j = 0 N − 1 b j ∣ u j ⟩ , b j ∈ C |b\\rangle=\\sum_{j=0}^{N-1}b_{j}|u_{j}\\rangle,\\quad b_{j}\\in\\mathbb{ C } b=j=0N以上是关于HHL algorithm for quantum linear equation的主要内容,如果未能解决你的问题,请参考以下文章

量子计算解线性方程:HHL algorithm for quantum linear equation

Coding for Quantum Computing: Creating an Adder Circuit

Password authencated key exchange based on lattice for C/S model&&Resistance to quantum comp

QSAN A Quantum-probability based Signed Attention Network for Explainable False Information Detectio

Python-Struct

Firefox 57 / Quantum:模拟打印样式