DJA

Deutsch-Jozsa Algorithm

Core Primitives

The n-bit generalisation of Deutsch's algorithm: it distinguishes a constant function from a balanced one with one oracle query and no error. A classical deterministic algorithm needs up to 2^(n-1) + 1 queries in the worst case, although a randomised classical algorithm with bounded error also solves it efficiently.

Key factExact quantum query complexity O(1) vs deterministic classical O(2^(n-1)). The exponential gap vanishes against randomised classical algorithms.
Leader lensTeach this honestly: the famous exponential separation is against deterministic classical computation only. It demonstrates oracle structure, not a real-world speedup.