or N=23 8: (19.52) |001) + |010) + |011) + |100) + |101) + |110) + |111)). Thus, the state superposition s), which is to become the quantum database, can be generated by using n ancilla qubits |0) and 2 x 2 Hadamard gates H. The second task is to define a quantum circuit for the "oracle" operator Uw. To recall, the oracle has the following properties: Uw/x) = - /w) if X = W and Uwlx) = /x) if x # W. Let f(x) be a function defined over x = {0, 1,..., N - 1} with binary output f(x) = 1 if x = W and f(x) = 0 if x # W. Assume that it is possible to build a quantum circuit (or quantum operator Uw) acting on the tensor state /x)|i> (with |i) = |0) or |1) Quantum database search algorithms being an ancilla qubit) yielding the following output: (19.53) It is clear from the above definitions that Uw/x) |i> = xx |i> if X # W and Uwlx) |i> = |x>|i 1 1) if x = W. More generally, if we let |i> |-> = (|0) |1)) IV2, we obtain (19.54) Call the tensor state |R) = s)|-> the "register" in the GQSD algorithm. If we apply the oracle U to the register |R), and use the definitions in Eqs. (19.34) and (19.54), we obtain: (19.55) which is precisely the oracle operation defined in Eq. (19.36). Since we have assumed that the oracle operator Us S = I - 2/w) (w/ can be thus realized, we can also assume that similarly, one can realize the unitary transformation Us = 2/s) (s| - I, in similar ways (this being beyond the scope of this book). 19.4 Grover quantum database search algorithm Figure 19.10 Quantum-gate circuit showing the initialization of the register state from n|0) ancilla qubit and one |1) ancilla qubit, and n + 1 Hadamard gates H. The circuit shown in the dashed-line box is the iterative Grover operator G = UsUw, with Us =2|s)(s|-I. 0) n H X kmaxtimes Figure 19.11 Quantum-gate circuit architecture for the full Grover quantum database search algorithm implementation up to iteration k = Kmax showing eventual measurement of eigenvalue Aw through the observable S (with success probability p(w) 2 1). The basic GQDS quantum-gate circuit