[Quantum Information] Grover Search Algorithm

 Grover Search Algorithm


Notes from RWTH Aachen University course 
“Quantum Information” Summer semester 2020
professor: Müller, Markus

Grover Search Algorithm

Complexity

  • Complexity class P

    • example: Eulerian path
    • Finding the solution: polynomially with the size of the problem
    • checking the solution is easy as well
  • Complexity class NP

    • example: Hamiltonian path
    • finding the solution is hard (cannot be achieved in polynomial time)
    • checking the solution is easy
    • NP: solution can be found by non-deterministic (N) Turing machine in polynomial  time

    such machine does not exist

  • Hamiltonian Cycle (HC) can be reduced to Traveling Salesman Problem (TSP)

    • If we can solve TSP, then we can solve HC
      (G of HC, the original edges weight 1 and the non-existing edges weight 2, if there is a cycle value < (n+1), where n=(# nodes), it contains HC.)
    • If TSP is tractable, then HC is also tractable
    • If HC is hard, then TSP must also be hard
  • example: k-coloring


    • Graph 2-coloring is P
    • Graph 3-coloring is in NP-complete
    • sudoku: NP-complete
    • 2-SAT (satisfiability) is P
      • (x1¯x3)(x2¯x4)...
    • 3-SAT (satisfiability) is NP-complete
      • (x1¯x2¯x4)(x2¯x3¯x5)...
  • BQP: bounded-error quantum polynomial time

    • with error probability of at most ε
  • many decision problem can be considered as search problem

Grover Search Algorithm

  • Problem:
    • Search through the space of N=2n elements
    • n bits information of the element
    • assume that the number of solutions is exatly M,MN
    • can be represented by a function f
      • f(x)=1, then x is the answer
      • f(x)=0, then x is not the answer
  • Algorithm:
    • Oracle: Of
      • |x|Of(1)f(x)|x|
      • If measure |x, then x is not a solution
        If measure |x, then x is a solution

    the oracle does not know any of the solution, it only able to recognize a solution

  1. Prepare the initial state
    • |ψ=1Nx|x
    • 1Nx|x=1N(NM1NMf(x)1|x+M1Mf(x)=1|x)=NMN|α+MN|β=1ε|α+ε|β
      where ε=M/N1
    • probability to find any solution. projector onto the solution space:
      ˆP=f(x)=1|xx|

      probability = ψ|ˆP|ψ=ε
  2. Prepare a grover step G iteratively k times
    • applying oracle Of,±
      • The oracle
        O=12ˆP=12f(x)=1|xx|

        then
        O|x=|x, if |x is not a solution
        O|x=|x, if |x is a solution
      1ε|α+ε|βOf1ε|αε|β=(1ε|α+ε|β)2ε|β=|ψ2ε|β
    • applying reflection operator U=2|ψψ|1
      • $UO|ψ=(2|ψψ|1)(|ψ2ε|β)=(14ε)1ε|α+(34ε)ε|β

        $
      • now, the probability to find any solution is 9ε
        increase by a factor of 9
      • geometric visualization
        • Of: reflect |ψ over |β
        • G: reflect O|ψ over |ψ
        • the original angle θ/2
          after GOf, rotated by θ to |β
      • after k iterations
        Gk|ψ=cos(2k+12θ)|α+sin(2k+12θ)|β



      • the optimal k steps
        kπ4NM
      • complexity:
        O(NM)

        classical: O(N/M), a quadratic speedup
  3. measuring all n-qubits yields an outcome x


  • Discussion
    • Is not reaching the solution state |β exatly?
      • in generally ˜k is not an integer
      • choose the nearest k still with small error probability
    • Quantum computer cannot solve the NP-complete problem efficiently.
      • example: Hamiltonian Path
      • complexity O(nn)=O(2nlog(n))
      • quantum computing O(p(n)2nlog(n)/2)
        • p(n): polynomial overhead
        • /2: quantum speedup
    • Grover Search is optimal
      • can be proved no quantum algorithm can use less than O(NM) oracle access

Reading
Nielsen and Chuang
    6.1 The quantum search algorithm

留言

這個網誌中的熱門文章