Abstract. Quantum algorithms are typically understood in terms of the evolution of a multiqubit quantum system under a prescribed sequence of unitary transformations. The input to the algorithm prescribes some of the unitary transformations in the sequence with others remaining fixed. For oracle query algorithms, the input determines the oracle unitary transformation. Such algorithms can be regarded as devices for discriminating amongst a set of unitary transformations. In quantum algorithms a given oracle, f , is invoked via unitary transformation,Û f , whose structure depends on the nature of the oracle. For example, in both the DeutschJozsa algorithm [5] and Grover's algorithm the oracle is defined on computational basis states, |x ≡ |x n . . . x 1 with x i ∈ {0, 1} , to beÛ f |x = (−1) f (x) |x and this is extended linearly to superpositions of computational basis states. The general structure of such oracle algorithms is encapsulated in an algorithm unitarŷwhereV 0 , . . . ,V M are oracle independent unitary transformations and the oracle is invoked M times. This is applied to a quantum system in an oracle independent initial state |Ψ i , giving an oracle dependent final state Ψ f =Û alg |Ψ i , upon which a computational basis measurement is performed. It is important to note that the input to the algorithm is the oracle unitary and not the initial state. The output from the algorithm potentially identifies the oracle unitary or a class of oracle unitaries. For example, in Grover's algorithm for searching a database one marked item at location s, f (x) = 0 whenever x = s and f (s) = 1. The standard Grover's algorithm terminates in a compu-