# In Grover, how to implement oracle and amplification using Qiskit?

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?

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

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