For one input bit, a Boolean function is specified by the pair , and counts its satisfying assignments. In the ordered computational basis , the supplied phase oracle convention gives
Here is exclusive or: the oracle changes the sign of the inputs with . With the identity matrix and the Pauli Z gate, all four cases are
The two middle cases are balanced Boolean functions; the others are constant functions. The specified zero-state sign change and the Hadamard gate are
Use the top qubit as the first tensor product factor. Write the controlled unitary gate as . Reading the bracketed quantum circuit from left to right, its four operations are , , , . Thus the target operation in its control-one branch is
where the rightmost matrix acts first. The control-zero branch is the identity operator. The Hadamard conjugation of a controlled gate identity gives
Indeed, on control zero the replacement applies to the target, while on control one both sides apply . By linearity, the identity holds on every quantum superposition and therefore in every repetition of the bracket. This replaces the two internal controlled Hadamard gates as a pair.
The global phase of a controlled quantum gate must be preserved: , whereas . Consequently the minus signs in and the special phase oracles cannot be discarded as an unobservable global phase of the complete quantum circuit.
Phase oracle 2026-10-25
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 changes the sign when . A complemented convention instead changes the sign when , with ; 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.