Marked-state phase oracle from a single faulty identity-oracle query (source code)

= Marked-state phase oracle from a single faulty identity-oracle query

Suppose $U_f$ agrees with the reversible identity-function oracle except at $x_0$, where its answer differs by a fixed one-bit string $a$. Composing $U_f$ with the known identity oracle and preparing the affected answer qubit in $|-\rangle$ kicks back the phase $-1$ exactly on $|x_0\rangle$, using one query to $U_f$.