
Quantum Computing with Silq Programming
By :

Until now, we have looked into Grover's search for finding only one solution, which we termed as the marked element. But Grover's algorithm can also be used to find multiple solutions, which means multiple marked elements. The number of iterations in the case of multiple solutions is around , where M is the number of marked elements. Let's now start with the extensive mathematical treatment for the case of multiple solutions in the next section.
Consider that the number of marked elements is M such that ; so, therefore, we start with state
, which is the superposition of all the M marked elements.
We also have our original state prepared, which is . Now, the original state can be written in terms of N and M as coefficients by a bit of mathematical manipulation, as follows:
To simplify the preceding...