This preview shows page 1. Sign up to view the full content.
Unformatted text preview: is summed up by the following circuit.  0 H H
Uf  0  f ( x)
Figure 4.3: Circuit for Simon’s Algorithm In summary, the above circuit for Simon’s algorithm corresponds to the 4.7. SIMON’S ALGORITHM 47 following sequence of transformations.
1
H ⊗n
0 0 −→ √
x 0
2n x
Uf
1
−→ √
 x f ( x )
2n x
measure 1
−→ √ (x0 + x0 ⊕ s) ⊗ f (x0 )
2
1
H ⊗n
−→ √
α y  y f ( x0 )
2n y for some numbers αy .
As above, √ each y , if s · y = 1, then αy = 0, whereas if s · y = 0, then
for
x0 ·y 2.
αy = (−1)
When we observe the ﬁrst register, we get a uniformly random y such that
s · y = s1 y1 + · · · + sn yn = 0. We repeat to collect more and more equations,
and recover s from n − 1 linearly independent equations.
Example
00 if x = 00 or 10
Let n = 2 and f (x) =
so that s = 10.
01 if x = 01 or 11
First, apply the Hadamard transform to prepare x, then Uf to prepare
 f ( x)
H ⊗2 0 0 −→ 3 3 x=0 x=0 Uf 1
1
x 0 −→
 x f ( x)
2
2 Then measure the second register to ﬁnalize the ﬁrst step of the process.
For the purpose of argument, lets suppose we measure f (x) = 01, so that
x0 = 01 and x0 ⊕ s = 11:
3 1
measure 1
x f (x) −→ √ (01 + 11) ⊗ 01
2
2
x=0 We then impose the Hadamard transform to achieve: 0
11
1
1
1
1 −1 1 −1 1
−1
11
1 = √ √
2 2 1 1 −1 −1 0
2 0 1
1 −1 −1 1
0 We expect it will take 2 runs through the above process to measure y = 01.
Then the only nonzero solution for s is s = 10....
View Full
Document
 Fall '13

Click to edit the document details