Behind phase Oracles

Quantum algorithms such as Deutsch, Bernstein-Vazirani, Simon and Grove rely on Oracles. A particular class of Oracles, the phase Oracles, allows to selectively switch phases of the input state, thus helping these algorithms to distinguish states by their phases. In this blog I will explore a bit more this class of Oracles Firstly. lets revisit the superposition state for a single qubit $|0\rangle$ after applying the Hadamard gate: $ H\otimes|0\rangle = \frac {1} {\sqrt{2}} ( |0\rangle + |1\rangle ) = |+\rangle $ To recap, this is a state of maximum uncertainty when measured in the computational basis. In simple terms, it represents a state where, when measured, has equal probability of being 0 or 1. As mentioned before, the trick to make the information conveyed by a state more useful is to include a local phase to it. This can be achieved by adding a new qubit in the superposition state $|-\rangle =...