









































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










































2
1 3
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 ≠ 2 1 ≠^3 2 ≠^3
2 ≠ 4
3 ≠ 4
Value 1 for good coloring
We need to give all possible colors here
F(x)
Simpler Graph Coloring Problem
1 ≠ 2 1 ≠^3 2 ≠^3
2 ≠ 4
3 ≠ 4
Value 1 for good coloring
We need to give all possible colors here H H H H
H
Give Hadamard for each wire to get superposition of all state, which means the set of all colorings
|0> |0> |0>
Discuss naïve non- quantum circuit with a full counter of minterms Now we will generate whole Kmap at once using quantum properties - Hadamard
f(x)
As we remember, these are transformations of Hadamard gate:
|0> H |0> + |1> (^) |1> H |0> - |1>
|x> H |0> + (-1) x^ |1>
In general:
For 3 bits, vector of 3 Hadamards works as follows: (|0>+(-1)a^ |1>) (|0>+(-1)b^ |1>) (|0>+(-1)c^ |1>) =
From multiplication
|000> +(-1)c^ |001> +(-1)b^ |001>+(-1)b+c^ |001>000> +(-1) a^ |001> + (-1)a+c^ |001> + (-1)a+b^ |001> (-1)a+b+c^ |001>
|abc>
This is like a Kmap with every true minterm (1) encoded by -
And every false minterm (0) encoded by 1
f(x)
What Grover algorithm does?
Grover algorithm looks to a very big Kmap and tells where is the -1 in it.
Here is -
What “Grover for m ultiple 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 in 4 search
A practical Example
Pick your needle and I will find you a haystack
The point of this slide is to show examples of 4 different oracles. Grovers search can tell between these oracles in a single iteration, classically we would need 3 iterations.
(( – 1 ) f (^00 )| 00 〉 + ( – 1 ) f (^01 )| 01 〉 + ( – 1 ) f (^10 )| 10 〉 + ( – 1 ) f (^11 )| 11 〉)(| 0 〉 – | 1 〉)
Output state:
Black box for 1-4 search:
Input state to query: (| 00 〉 + | 01 〉 + | 10 〉 + | 11 〉)(| 0 〉 – | 1 〉)
H
H
| 1 〉 H
| 0 〉 | 0 〉
Here we clearly see the Kmap encoded in phase – the main property of many quantum algorithms Docsity.com
H
H
| 1 〉 H
| 0 〉 | 0 〉 H
H
H
H H
X X (^) H H
X X
M M M
Time
state = 0 (^10) (^00) (^00) 0
state =0. -0.3530. -0.3530. -0.3530. -0.
state =0. -0.3530. -0.3530. -0.353-0.
state =0. -0.3530. -0.3530. -0.353-0.
state =-0. 0.3530. -0.3530. -0.3530. -0.
state = 0 -0.5^0 0.50. -0.5 0 0
state = 0 -0.5^0 0.5 0 0.5^0 -0.
00 01 11 10
ab c 0 1 1 00 01 11 10
ab c 0 1 0.3 –0, 0.3 –0, 0.3 –0, 0.3 –0,
ab c 0 1 0.3 –0, 0.3 –0,
- 0.3 0, 0.3 –0,
00 01 11 10
ab c 0 1
0.3 –0,
- 0.3 0,
00 01 11 10
0.3 –0,
0.3 –0,
ab c 0 1
0.3 –0, 0.3 - 0,
00 01 11 10
- 0.3 0,
0.3 – 0,
ab c 0 1
- 0.5 0, 0 0
00 01 11 10
0 0
0.5 – 0,
ab c 0 1
- 0.5 0, 0.5 - 0.
00 01 11 10
0 0
0 0
This slide illustrates how the state of the system is changed as it propagatesthrough the quantum network implementation of Grovers Search algorithm.
|ψ 00 〉 = – | 00 〉 + | 01 〉 + | 10 〉 + | 11 〉 |ψ 01 〉 = + | 00 〉 – | 01 〉 + | 10 〉 + | 11 〉 |ψ 10 〉 = + | 00 〉 + | 01 〉 – | 10 〉 + | 11 〉 |ψ 11 〉 = + | 00 〉 + | 01 〉 + | 10 〉 – | 11 〉
H
H
| 1 〉 H
| 0 〉 | 0 〉 H
H
H
H H
X X (^) H H
X X
M M M
Time
The state corresponding to the input to the oracle that has a output result of 1 is ‘tagged’ with a negative 1.
After Hadamard the solution is “known” in Hilbert space by having value -1. But it is hidded from us
This was a special case where we could transform the state vector without repeating the oracle.
In general we have to repeat the oracle – general Grover Docsity.com
Reed-Muller Transform
Reminder
f
s = R n ( ) × f and f = R −^1 ( ) n × s
1 1
where ( ) (1), 1, 2,..., ( ) (1), 1, 2,...,
i i
R n R i n R −^ n R − i n
= ⊗ = = ⊗ =
(1) 1 0 R (^) 1 1 = ^
1 0 0 0 (2) (1)=^1 1 0 1 0 1 0 1 1 1 1
R (^) iR
= ⊗ ^