# Quantum oracle in Grover's problem?

Here's the exact problem I'm having with Grover's search algorithm.. Given a function f:{0,...,N-1} -> {0,1}, Grover's problem is to find x such that f(x)=1, provided that there exists such x.

The phase inversion step: Invert the phase of the "key value".

So my question is, when we can already distinguish the key from the others, there is nothing to solve. Why do we need to solve the problem at all when we can already separate the key value? I am missing a point here but I don't understand what it is.

Many thanks for your help.

• "we need to solve the problem" so that we can find the key value, rather than just being able to separate it. ​ ​ ​ ​ ​ ​ ​ Presumably, ​ ​ ​ " ​ Invert the phase of the "key value" ​ " ​ ​ ​ can somehow be done without already knowing the key value. ​ ​ ​ ​ ​ ​ ​ (I have no idea how that might be doable.) ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ – user12859 Jan 12 '18 at 9:31
• Where did you find this phrase? You should probably give a reference, preferably a link if available. – Yuval Filmus Jan 12 '18 at 12:34
• There is probably a quantum register containing the key (initially, a superposition of all keys), and this is what you need to invert the phase of. – Yuval Filmus Jan 12 '18 at 12:34
• The phase inversion step "Invert the phase of the key value" is a bit unclear and circular. If the aim of the algorithm is to find the key value and uses the step "invert the phase of the key value" then the algorithm is begging the question. It's circular reasoning. I don't see how this is legitimate. – acevik Jan 13 '18 at 8:03