- #1
Malamala
- 311
- 27
Hello! I am just getting started learning about quantum computing so I apologize if this questions is trivial, but I am a bit confused about the Grover's algorithm. As far as I understand (I read it from here), assuming there is just one solution, you start with N qubits, you put them in an equal superposition (using Hadamard gates), you pass them thorough an oracle that inverts the phase of the right solution, then you have a diffuser operator that reflects this new vector relative to the original one and doing this ##\sqrt{N}## times you get a high probability of measuring the right solution. I think I understand the math behind it and the geometrical interpretation, but I don't understand how it is used in practice. What is that oracle? In both examples given on that page, in order to build the oracle i.e. to make sure that the right solution gets a minus sign, you need to know the right solution beforehand. But if you know it, you don't need an algorithm to find it. Can someone help me understand this? What is the oracle in a real problem and how can I implement it in practice without knowing the answer to my question beforehand? Thank you!