I tried to run Grover's search for basis states with complex coefficients, including the marked basis (complex coefficients because the states are obtained from inverse QFT), but it could not amplify the marked basis effectively. I think it has to do with the inverse-about-the-mean part since now the mean is complex but I'm not sure how to analyse the behavior exactly. Can someone help to explain why is that so and is there any way to salvage the situation? And also if I want to amplify multiple marked states concurrently what is the most optimal diffusion operator?
This is the circuit I used: first I initialized the initial state as 1 / sqrt(8),1 / sqrt(8),1 / sqrt(8),1 / sqrt(8),1 / sqrt(8),1 /sqrt(8),1 /sqrt(8),1 / sqrt(8),0,0,0,0,0,0,0,0 (a four-qubit system)
then I applied this inverse QFT circuit. The resultant state vector is 0. 707+0.j, 0.088-0.444j, 0, 0.088-0.059j, 0, 0.088-0.132j, 0, 0.088-0.018j, 0, 0.088+0.018j, 0, 0.088+0.132j, 0, 0.088+0.059j, 0, 0.088+0.444j (rounded values)
Then I negated the states of interest 0000, 0001, 1111 by using this circuit (I believe you guys can tell which part of it is for which states if now please let me know:
Then I applied the diffusion operator. Notice that I negated the phase of 0000 instead of the rest. This resulted in a 180 degree global phase difference. In the Grover search case where all coefficients are real the result for measurement is identical to marking all the rest states but I'm not sure for complex-valued coefficient will there be any difference.