I am currently working on the Grover algorithm again. In many lectures and documents, as well as books, I noticed that there is always talk of looking for a single element of $N$ elements. Now I read to Nielsen that Grovers algorithm can also be used for multiple searches. For example if you are looking for $M>1$ elements from $N$
Now comes the problem, in Nielsen is e.g. said that the process does not change fundamentally. I tried an example by looking for a single element, you can see the result here, I have successively applied the individual steps of the algorithm:
Searched item: $|01\rangle$
Input: $|00\rangle$
Hadamard on n-bits: $$ H|00\rangle=\frac{1}{2}(|00\rangle+|01\rangle+|10\rangle+|11\rangle)$$ Apply $ U_f $ to bits: $$\frac{1}{2}(|00\rangle-|01\rangle+|10\rangle+|11\rangle)$$ Hadamard on n-bits (again): $$\frac{1}{4}(|00\rangle+|01\rangle+|10\rangle+|11\rangle- |00\rangle+|01\rangle-|10\rangle+|11\rangle +|00\rangle+|01\rangle-|10\rangle-|11\rangle +|00\rangle-|01\rangle-|10\rangle+|11\rangle) =\frac{1}{2}(|00\rangle+|01\rangle-|10\rangle+|11\rangle)$$ Phase Shift: $$\frac{1}{2}(|00\rangle-|01\rangle+|10\rangle-|11\rangle)$$ Hadamard transform (again): $\frac{1}{4}(|00\rangle+|01\rangle+|10\rangle+|11\rangle -|00\rangle+|01\rangle-|10\rangle+|11\rangle +|00\rangle+|01\rangle-|10\rangle-|11\rangle -|00\rangle-|01\rangle-|10\rangle-|11\rangle) =\frac{1}{4}(4|01\rangle)$$
So you see directly that the searched (single) element ($|01\rangle$) comes out, the question is, what happens if I say we are looking for two elements e.g $|01\rangle, |10\rangle$?
This is understandable for me as far as possible, especially that even at the end exactly one single element is in the register, that one has searched.
Now my question comes: What happens if I search for several elements? Let's say, how do you stay with the example and are you looking for another element? How about the individual steps of the algorithm and, most importantly, what is in the register afterwards?
I am very much looking forward to your answers and hope that my question is clear and understandable. Thanks in advance!