| Gates |
|---|
Barrier |
Hadamard |
Identity |
Measure |
Pauli X |
Pauli Y |
Pauli Z |
Phase |
Rotate about X |
Rotate about Y |
Rotate about Z |
S |
Swap |
T |
| Circuits |
|---|
Quantum Phase Estimation |
Test circuit with basic gates |
Harrow-Hassidim-Lloyd Algorithm |
| Documentation |
|---|
Adding circuits |
Adding gates |
Gates and operations |
Getting started |
Interactive circuits |
Project structure |
Schemas |
Terminology |
The HHL algorithm is a quantum circuit that inverts a Hermitian matrix,
In the following, consider the system of linear equations in matrix form:
The HHL circuit spans three quantum registers: the state register, with
The circuit displayed above is for a system of
The first operation in the circuit, labelled
Next, the HHL algorithm uses Quantum Phase Estimation (QPE) as a subroutine to find the
eigenvalues,
It then uses controlled rotations to invert the eigenvalues in a process called
Ancilla Quantum Encoding (AQE), and uses inverse QPE (that's the second QPE gate,
with the dagger to indicate inverse) to "uncompute" the inverted
eigenvalues, such that the final quantum state encodes
At the end of the algorithm, an observable constructed for the specific application is applied to the state to learn some information from it. The observable is a subcircuit that manipulates the state before measurement. In the vast majority of cases HHL will be executed many times, with the measurements sampling a probability distrubtion, which is generally what is wanted as output.
If the full solution,
If all goes well, the final state of the clock register should be all zeroes. Measurements of these qubits may be used to verify that the circuit worked correctly, and get an estimate of the error due to noise.
Let
The vector,
The values
It follows that the solution state,
The goal of the HHL algorithm is to convert the state
The total HHL state,
Where the subscripts
Using equation 1, this state may be written as:
The HHL algorithm uses Quantum Phase Estimation (QPE) as a subroutine to find the
eigenvalues,
However, in practice, the phases are rounded to a precision defined by
Thus, the precision of the algorithm is defined by
After QPE, the
HHL then uses controlled rotations to encode the eigenvalues into the amplitude of the ancilla qubit in a process called Ancilla Quantum Encoding (AQE):
Where
The HHL algorithm succeeds if the ancilla qubit collapses to a
Finally, inverse QPE is used to
disentangle the
Quantum algorithm for linear systems of equations
[citation]