I am trying to implement multiple parallel subroutines of HHL algorithm, each working on a different set of matrix $A$ (when solving for $x$, in $A\vec{x} = \vec{b}$), to find the expectation values of $|x\rangle$. The matrix $A$ is randomly generated Hermitian matrix, and may/may not be sparse (checking what happens, is also something I'm wondering).
I have the following queries:
- If I understand correctly, I need to encode eigenvalues of a $2 \times 2$ matrix $A$, say $\lambda_1$ and $\lambda_2$ in the quantum register. Is that right? How do I do that?
- Is the quantum register initialized with the binary values of $\lambda_1$ and $\lambda_2$? Does that mean 2 runs of HHL? Is finding Eigenvalues of matrix $A$ supposed to be a classical subroutine?