= Phase oracle
{title2=$O_f|x\rangle=(-1)^{f(x)}|x\rangle$}
A phase oracle encodes a <Boolean function> in the signs of <computational basis> states. Its diagonal entries have <modulus> one, so it is a <unitary operator>. The usual convention $O_f$ changes the sign when $f(x)=1$. A complemented convention $U_f|x\rangle=(-1)^{f(x)\oplus1}|x\rangle$ instead changes the sign when $f(x)=0$, with $U_f=-O_f$; $\oplus$ denotes <exclusive or>. The two conventions differ by a <global phase> when used without coherent control, but the <global phase of a controlled quantum gate> makes that difference observable when the <quantum oracle> is controlled.
Back to article page