In the Grover's algorithm, the solution is already in the Oracle in order to mark winning state(s). I just wonder if we already know the solution, why do we need to run a circuit ?

  • $\begingroup$ quantumcomputing.stackexchange.com/questions/27499/… $\endgroup$ Commented Jul 17, 2023 at 21:51
  • $\begingroup$ This confused the life out of me too... I think it is helpful to think of Grover method as a way to choose a "special" amplitude within the many many state vector distribution, and how to amplify this "special" state only while suppressing all the others... The applications might vary after knowing this. $\endgroup$
    – James
    Commented Jul 19, 2023 at 17:45

1 Answer 1


In the Grover's algorithm, we actually don't know the right answer or the winner state(s), it's search problem to find the state(s) that verify this equation : F(x) = 1, You can imagine this algorithm as hidden layer used by other mechanisms and techniques to speed up their executions

  • $\begingroup$ Ok, but how to actually implement the oracle? We think about oracle as being black box only for purposes of complexity calculation or explaining how the algorithm works. But in practical implementation you need actual oracle . $\endgroup$ Commented Jul 20, 2023 at 21:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.