HHL#
- diffqc.lib.HHL(op, c: Array, wires: Tuple[int], U: Array, aux: Tuple[int], anc: int) Array #
Solving Linear Equation with Harrow-Hassidim-Lloyd Algorithm
Solve
A|x> = |b>
and get|x> = A^(-1)|b>
.- Parameters
op –
dense
orsparse
modulec (jnp.ndarray) – qubits state
wires (tuple of ints) – wires.
|b>
U (jnp.ndarray) – unitary matrix of exp(iA)
aux (tuple of ints) – auxiliary qubits for QPE. These should be
|00...0>
anc (int) – ancilla qubits for HHL
- Returns
applied qubits state.
- Return type
jnp.ndarray