I am confused about what to input to Oracle in Grover's algorithm.
Don't we need to input what we are looking for and where to find what we are looking for to Oracle, in addition to the superpositioned quantum states?
For example, assume we have a list of people's names {"Alice", "Bob", "Corey", "Dio"}, and we want to find if "Dio" is on the list. Then, Oracle should take $1/2(|00\rangle + |01\rangle + |10\rangle + |11\rangle)$ as an input and output $1/2(|00\rangle + |01\rangle + |10\rangle - |11\rangle)$. I kind of understand that.
But don't we also need to input the word "Dio" and the list {"Alice", "Bob", "Corey", "Dio"} to Oracle? Otherwise, how can Oracle return output? Is it not explicitly mentioned since Oracle is a black box and we do not have to think about how to implement it?
My understanding about Oracle is,
- Oracle has the ability to recognize if the word "Dio" is in the list.
- To do so, Oracle takes the superpositioned quantum states as an input, where each quantum state represents the index of the list.
- So, input $|00\rangle$ to Oracle means, check if the word "Dio" is in the index 0 of the list and return $-|00\rangle$ if yes and return $|00\rangle$ otherwise.
- In our case, Oracle returns $1/2(|00\rangle + |01\rangle + |10\rangle - |11\rangle)$.
- But what about the list and the word?