I found some examples of implementing the oracle when the marked state is $|000\rangle$. But how can we know what gate we should use inside of the oracle?

enter image description here

Besides, for the part implementation, the example shows like this:

enter image description here

Mathematically, it should be $2|0\rangle\langle 0|-I$, but how can it be realized by X gates and controlled-Z gate?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.