Choosing the number of iterations
Die Sigg es noch nit övversatz. Ehr luurt üch de änglesche Originalversion aan.
We have established that the state vector of the register in Grover's algorithm remains in the two-dimensional subspace spanned by and once the initialization step has been performed.
The goal is to find an element and this goal will be accomplished if we can obtain the state — for if we measure this state, we're guaranteed to get a measurement outcome Given that the state of after iterations in step 2 is
we should choose so that
is as close to as possible in absolute value, to maximize the probability to obtain from the measurement. For any angle the value oscillates as increases, though it is not necessarily periodic — there's no guarantee that we'll ever get the same value twice.
Naturally, in addition to making the probability of obtaining an element from the measurement large, we would also like to choose to be as small as possible, because applications of the operation requires queries to the function Because we're aiming to make close to in absolute value, a natural way to do this is to choose so that
Solving for yields