Linear Solver with the quantum computer

Example system of linear equations

The HHL algorithm can be found in the already mentioned links, let’s implement it on a quantum computer. We want to solve a system of linear equations A|x> = |b> From this |x> = A^{-1} |b>
With matrix A = \begin{bmatrix} 1.5 & 0.5 \\ 0.5 & 1.5 \end{bmatrix} and input b = \begin{bmatrix} 1 \\ 0 \end{bmatrix}
A^{-1} . |b> = \begin{bmatrix} 0.75 \\ -0.25 \end{bmatrix}

Quantum circuit design

We use the quantum circuit in arXiv 1302.1210 with 2 qubits,one qubit with input b. The second qubit is a ancilla bit and a one on the output means output is ready.
lineair eqation solver
The circuit uses a PEA circuit (gate R) as input and an inverse PEA circuit at the output. Phase estimation or PEA is used to decompose the quantum state of |b> in a particular basis and the eigenvalues of A are stored in an eigenvalue register. Rotation gate R(y) transforms with an angle depending on the value in the eigenvalue register. Then we run a PEA in reverse to uncompute the eigenvalue and find the answer. In the quantum computer, only the possibility of finding a 1 or 0 can be measured.

Gate parameters

R is the matrix of eigenvectors of matrix A and Rdagger is it’s transpose.
From the Matrix A we find the eigenvalues \lambda_{1} = 1 \; \lambda_{2} = 2 The rotation angle of the Y rotation gate is determined by the ratio of eigenvalues. Rotation angle \theta = -2arccos \dfrac{\lambda_{1}} {\lambda_{2}}
\theta = -2arccos(1/2)= -2\dfrac{\pi}{3}.
Implement this circuit in the IBM quantum computer
linsolv
Lin solver on IBM QC

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

*