Okay I think I have a potential solution, but I don't know if it's plausible or theoretically correct.
Standard Grover's algorithm
Here is an example of the original Grover's algorithm with just three qubits; the oracle negates the phase of $$|011\rangle$$ I'll post the image also:
At the various steps you can see the probabilities and the amplitudes. In particular, after the oracle, you can see that there is precisely one state whose phase is negated, the
011 one. Then the oracle rotates all the qubits around the superposition, by amplifying the
After one repetition of Grover's algorithm we have a 78% chance of reading the right state, which grows to 94.5% after two repetition.
Grover with W3 and standard diffusion
The trick should be to rotate around one of the basis states, say the first one i.e. $$|001\rangle$$ Here is the circuit representing it:
Because we only have 3 overall possible states, a single iteration should suffice. The above circuits correctly select the state $$|001\rangle$$
Grover with W5 state and standard diffusion
Here is another example with a W5 state selecting $$|00010\rangle$$ while rotating around $$|00001\rangle$$.
As we can see, in both cases the standard diffusion selects the right amplitude with a not so huge probability
Grover with W4 and W4 conjugate transpose
A much better algorithm is the one described by this circuit
The idea is pretty similar to the original Grover algorithm. Basically, you apply the conjugate transpose of the
W4 state (and in the general case, the conjugate transpose of whatever you have applied to obtain the initial state of the Grover's algorithm). In this way, you have a non zero probability of obtaining the all zero state, which in this case is $$|0000\rangle$$. Then, you invert about this state and reapply the
In this case, because we starts with 4 possible answers, the Grover's algorithm works 100% of the time.