# How can I derive the very basic formulas used in Grover's algorithm?

I have been studying the Grover's algorithm for quite some time. I have used David McMohan (Quantum Computing Explained), M. Suhail Zubairy (Quantum Mechanics For Beginners) and some research papers. Also, from different sites. I know how it works and the step-wise protocol. What I am interested in is how I can derive the diffusion operator $$(2|0\rangle\langle0| − \mathbb{I})$$ and the oracle. I think it just depends on the function $$f(x)$$.

After this, how can I use this with those HASH codes (SHA-2 or SHA-3) or AES etc., which I am currently trying to understand. Some papers use cost functions, equality functions and some kind of expansion keys. All of which I don't understand. I want to understand how Grover's algorithm is implemented in actuality, which I think is somewhat different than the books.

• what do you mean with "derived" here? How to derive it mathematically? How to show that it works? How to implement it as a circuit? Something else?
– glS
Sep 3 at 13:04
• @glS♦ Mathematically derive the formulas. Sep 3 at 15:54
• to have a mathematical derivation you need to specify your starting point though. Normally you'd show that the operations in Grover's algorithm (diffusion operator etc) achieve what you want them to do (amplify the amplitude marked by the oracle). You can also understand somewhat more "intuitively" these operations are rotations, see eg quantumcomputing.stackexchange.com/q/5293/55. Is this what you're asking about?
– glS
Sep 3 at 17:06