Searching using Quantum Rules
System State is
 captured by a
  Probability
                        Our Two Worlds
  Distribution

                             Σ vi = 1 , 0<=vi<=1

                   T is stochastic (non-neg, col sums 1)

            Classical
                               Measurement
           Quantum

                           |v|2 = v†v = Σ |vi|2 = 1

 System State is            T is Unitary T†T = I
 captured by an
   Amplitude
  Distribution
What does this mean for
    computation?
Simple Search
• Given n items, A[1..n]

• Exactly one satisfies f()=1
  – all others have f()=0

• Find the unique object for which f()=1

• How many f() calls are needed?
Classical Algorithm
x  Random item in 1..n

Repeat
   –
   – If f(x)=1
      • Stay at x

   – Else
      • Choose another (never previously picked) value for x,
        each possible value equi-probably

K times
Classical Algorithm: Analysis


                The state for
                 which f()=1




                           K needs to be np
                           before this prob
                              exceeds p
Grover’s Quantum Algorithm
x  Random item in 1..n

Repeat

   – If f(x)=1
         • then stay at x with amplitude -1
         • else stay at x with amplitude 1

   – Choose
             – this x with amplitude a
             – another value for x, each possible value with equal
               amplitude, say b

K times
Unitariness Constraints
                     Diagonals A, non-
                        diagonals B
Unitariness Constraints




        Diagonal Matrix, so
          clearly Unitary
Algorithm Analysis

                 k
State Progression




                       For n=4, one
                    iteration suffices!
                     With certainity!!
State Progression in General
            The state for
             which f()=1




                            What progress have
                               we made?
Progress per Iteration   Dot Product
Geometry




           Destination
           State Vector
            [0 0……1]
Wrapping Up

Searching using Quantum Rules