# How to perform amplitude amplification when the initial amplitude of aiming state is unknown

Let's say, I want to perform amplitude amplification on the quantum state $$|s\rangle=\sum_{i=0}^{2^n-1}m_i |i\rangle\,,$$ And the aiming state is $$|x\rangle\,.$$

Usually, when I perform amplitude amplification with the Grover operator $$G=(2|x\rangle\langle x|-I)H^{\otimes n}(2|0\rangle\langle 0|-I)H^{\otimes n}\,,$$ for $$k$$ times, the amplitude of $$|x\rangle$$ become $$\sin(2k\alpha+\alpha_0)\,.$$ We would like $$k$$ to be something that makes $$2k\alpha+\alpha_0=\frac{\pi}{2}\,.$$ But how can we determine $$k$$, the number of Grover iterations, when we don't know the initial amplitude of aiming state, i.e. we don't know the value of $$\alpha_0$$?

Crudely, what you want to do is think of your grover iterator $$G$$ as a unitary, and your unknown rotation angle $$\alpha$$ corresponds to two eigenvalues of $$G$$, $$e^{\pm i\alpha}$$, and you can prepare an initial state that is a superposition of the two eigenvectors. So, these are all the ingredients that you need in order to perform phase estimation to approximate the angle $$\alpha$$, and hence the number of steps that you require.