# 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 From this With matrix and input  ## 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. 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 The rotation angle of the Y rotation gate is determined by the ratio of eigenvalues. Rotation angle  .
Implement this circuit in the IBM quantum computer Lin solver on IBM QC