# Is HHL executed in a single run? If yes, how do they carry out controlled rotation without knowing eigenvalues?

Even after reading several papers and almost all HHL related questions and answers here on Quantum Computing Stack Exchange, one thing is yet not clear. In several papers, for illustrating HHL they choose matrix $$A$$ with convenient eigenvalues of the form $$2^k$$ such that the rotation angles are like $$\frac{v\pi}{2^r}$$; and show a full circuit of HHL. It's not always the case. Eigenvalues can be anything. So how can one find the angles for rotation without measuring the eigenvalues?

Does HHL need to be run in two steps? First to get the eigenvalues and then perform the rotation and QPE-inverse?

• May 9 '19 at 19:02
• In short, for reading out one component of the solution vector $\vec{x}$, only 1 run is needed. The eigenvalues are effectively calculated by the phase estimation algorithm cf. this, although you can't "read" them out. See DW's answer here to understand the general idea behind how the controlled rotation circuits are implemented. May 9 '19 at 19:16