Grover Algorithm - PowerPoint PPT Presentation

About This Presentation
Title:

Grover Algorithm

Description:

Grover Algorithm Marek Perkowski I used s of Anuj Dawar, Jake Biamonte, Julian Miller and Orlin Grabbe but I am to be blamed for extensions and (possible) mistakes – PowerPoint PPT presentation

Number of Views:467
Avg rating:3.0/5.0
Slides: 22
Provided by: MarekPe2
Learn more at: http://web.cecs.pdx.edu
Category:

less

Transcript and Presenter's Notes

Title: Grover Algorithm


1
Grover Algorithm
Marek Perkowski
  • I used slides of Anuj Dawar, Jake Biamonte,
    Julian Miller and Orlin Grabbe but I am to be
    blamed for extensions and (possible) mistakes

2
From Grover to general search
3
(No Transcript)
4
(No Transcript)
5
(No Transcript)
6
Graph Coloring
  • Building oracle for graph coloring is a better
    example.
  • This is not an optimal way to do graph coloring
    but explains well the principle of building
    oracles.

The Graph Coloring Problem
1
Color every node with a color. Every two nodes
that share an edge should have different colors.
Number of colors should be minimum
1
3
2
3
2
5
4
5
4
6
7
6
7
This graph is 3-colorable
7
Simpler Graph Coloring Problem
1
3
2
We need to give all possible colors here
4
Two wires for color of node 1
Two wires for color of node 2
Two wires for color of node 3
Two wires for color of node 4
?
?
?
?
?
Gives 1 when nodes 1 and 2 have different colors
1?3
2?3
2?4
3?4
1?2
Value 1 for good coloring
8
Simpler Graph Coloring Problem
We need to give all possible colors here
Give Hadamard for each wire to get superposition
of all state, which means the set of all colorings
H
0gt
0gt
H
0gt
H
H
H
?
?
?
?
?
1?3
2?3
2?4
3?4
1?2
Value 1 for good coloring
9
Block Diagram
All good colorings are encoded by negative phase
Think about this as a very big Kmap with -1 for
every good coloring
Vector Of Hadamards
Vector Of Basic States 0gt
Oracle with Comparators, Global AND gate
Output of AND
Work bits
10
What Grover algorithm does?
  • Grover algorithm looks to a very big Kmap and
    tells where is the -1 in it.

Here is -1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 -1 1 1 1 1 1
1 1 1 1 1 1 1 1
11
What Grover for multiple solutions algorithm
does?
  • Grover algorithm looks to a very big Kmap and
    tells where is the -1 in it.
  • Grover for many solutions will tell all
    solutions.

Here is -1, and here is -1, and here
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 -1 1 1 1 1 1
1 1 1 -1 -1 1 1 1
12
Variants of Grover
  • With this oracle the Grover algorithm for many
    solutions will find all good colorings of the
    graph.
  • If we want to find the coloring, that is good and
    in addition has less than K colors, we need to
    add the cost comparison circuit to the oracle.
  • Then the oracles answers will be one only if
    the coloring is good and has less colors than K.
  • The oracle thus becomes more complicated but the
    Grover algorithm can be still used.

13
Another example
14
(No Transcript)
15
This is a better example of problems for Grover
16
Advantage of Grover, although not tractable
17
Example of oracle
18
Another example of Oracle, more realistic
19
tour
Answer bit or oracle bit
Working bits
20
(No Transcript)
21
Possible Applications
  • Formulate an oracle (reversible circuit) for the
    following problems
  • 1. Graph coloring with of a planar map.
  • 2. Graph coloring with the minimum number of
    colors of an arbitrary graph.
  • 3. Satisfiability.
  • 4. Set Covering.
  • 5. Euler Path in a graph.
  • 6. Hamiltonian Path in a graph.
  • 7. Cryptographic Puzzle like SENDMOREMONEY.
Write a Comment
User Comments (0)
About PowerShow.com