The Deutsch-Jozsa algorithm uses phase kickback and interference to distinguish constant from perfectly balanced Boolean functions with one oracle call.
For an even-length Boolean string, one phase query followed by a known unitary extension can produce a zero-pair outcome with amplitude proportional to the zero-minus-one imbalance, or an index pair with amplitude proportional to the difference of their phase signs. A zero-pair observation certifies nonbalance. Every nonzero pair has opposite bits, so deleting it preserves the imbalance and allows recursion on two fewer indices. Ending with an empty list certifies balance. This quantum circuit is exact on all inputs and uses at most half the original length in queries, even without the constant-or-balanced promise.
Articles by others on the same topic
The Deutsch–Jozsa algorithm is a quantum algorithm designed to solve a specific problem more efficiently than any classical algorithm can. It was introduced by David Deutsch and Richard Jozsa in 1992 and is notable for demonstrating the potential advantages of quantum computation over classical computation.