You are on page 1of 13

Quantum Information and Computation

Homework 3

Due date: 19/4/2020

Question 1
a)The rst eight possible outcome of f (x) read

x 0 1 2 3 4 5 6 7 ...
5x
50
51
5 2 3
5 5 4
55
5 6 7
5 ...
f (x) = 5x mod 39 1 5 25 8 1 5 25 8 ...

It can be seen that f (x) is a periodic function with period r = 4

b) the superposition state read

1 X
|f i = √ |xi|f (x)i
N x∈Z 2m
r−1 m−1
1 XX
=√ |xl + jri|f (xl )i
N l=0 j=0

where m is the number of period is, here N = 211 , m = N


r = 211
4 = 29 .

the possible outcome z are f (xi ) = {1, 5, 25, 8...}where i ∈ 0, 1, 2, 3

Let f (xk )as one of the possible outcome, the measurement on |f i is

r−1 m−1
1 XX
hf (xk )|f i = √ |xl + jrihf (xk )|f (xi )iδlk
N l=0 j=0
m−1
1 X
=√ |xk + jri
N j=0
m
|hf (xk )|f i|2 =
N
1
=
r

0
Png Wen Han R08222077

The probability of each measurrement outcome on the second register is 1


r = 1
4

c) After the measurement on the second register, if the outcome is z = 8. Following the notation in 1b), this
correspond to f (x3 ) = f (3) = 8. Similar opearation can be performed.

r−1 m−1
1 XX
|f (xk )ihf (xk )|f i = √ |xl + jrihf (xk )|f (xl )iδlk
N l=0 j=0
r m−1
1 1 X
|f (xk )i = √ |xk + jri|f (xk )i
r N j=0
r m−1
1 X
|f (xk )i = |xk + jri|f (xk )i
m j=0

P29 −1
the resulting state on the rst register is |αi =
Pm−1
√1 |x3 + jri = √1 |3 + 4ji
m j=0 29 j=0

d) using quantum fourier transform

 
m−1
1 X  X (x3 +jr)y 
QF TN |αi = √ ω |yi
N m j=0 y∈Zn
 
N −1 m−1
1 X x3 y  X jry 
=√ ω ω |yi
N m y=0 j=0
r r−1
1 X x3 lm
= ω |lmi
r
l=0
r r−1
1 X 2πix3 lm
= e N |lmi
r
l=0
r 3
1 X 2πix3 l
= e r |lmi
4
l=0
1 πi

= |0i + e3 2 |29 i + e3·πi |210 i + e3·2πi |3 · 29 i
2
1
= (|0i − i|512i − |1024i + |1536i)
2

Let |βi be the one of the measurement outcome of QF TN |αi, The probability of getting |βi is

r 2
1X3
lm
|hβ|QF TN |αi|2 = e2πix3 N hβ|lmiδβ,lm

r
l=0
1
=
r
1
=
4

Page 1 of 12
Png Wen Han R08222077

e) The period of r can be obtained by calculating the fraction of l0 /r where c = l0 m is the outcome of the
measurement. the possible outcome after the fourier transform are {|0i, |mi, |2mi, |3mi}which correspond
to their respective fraction l0 /r = {0, 41 , 12 , 43 }. The algorithm fail for |0iand |2mi as the l0 = {0, 2} is not
a coprime to r. If |miand, |3miis the measurement outcome as the l0 = {1, 3} is a coprime to r. Hence,
the probability of sucessfully detect r is two out of four measurement or 1/2.The denominator of of lr0 or Nc
represent the period. Take l0 = 3,c = 1536 for example, in reality we only have access to c/N,where c is the
measurement outcome. Using continued fraction,

c 1536
=
N 2048
3
=
4

as the denominator is already< 39, then we can conclude the period is 4.

f)

Theorem:
Suppose there exist a solution satisfying ar = 1( mod N ),then the factor of N are gcd(ar/2 + 1, N ) and
gcd(ar/2 − 1, N ).

For this question, a = 5, r = 4,N = 39, the factors of 39 are

gcd(52 + 1, 39) = gcd(26, 39) = 13

gcd(52 − 1, 39) = gcd(24, 39) = 3

Page 2 of 12
Png Wen Han R08222077

Question 2
a) choose t to be the least integer such that 2t ≥ N 2 . For N 2 = 212 = 441,the suitable t is 9 such that
212 < 29 .

b) continued fraction l
r = c
N :
427 1
= 1 = [1, 5, 42, 2]
512 1 + 5+ 1
42+ 1
2

The convergents are

[1] = 1
[1, 5] = 56
[1, 5, 42] = 211
253
[1, 5, 42, 2] = 427
512

The convergent with denominator less than 21 is 5


6

c)

Check : f (1) = 2 mod 21 = 2,f (1 + 6) = 7 mod 21 = 2. Yes, 6 is indeed the period of f (x)

using theorem as in 1 f), a = 2, r = 6,N = 21, the factors of 21 are

gcd(23 + 1, 21) = gcd(9, 21) = 3

gcd(23 − 1, 21) = gcd(7, 21) = 7

Page 3 of 12
Png Wen Han R08222077

Question 3
a) As dene in the question f : Zp−1 × Zp−1 → Z∗p ∈{0, 1, ...p − 1}. The function f can also be written
as f (α, β) = g a x−b mod p = g a−b logg x mod p. Now, we need to look for the values of aand b that gives
constant f , namely

2
{(a, b) ∈ Zp−1 : a logp x − b = k}
The reason that for the index Zp−1
2
∈ {0, 1, ...p − 2} indicates the cyclic group ends at index p − 2 and repeat
the sequence again at p − 1. This argument comes from the properties of generator that satised g p−1 = 1
mod p.

Aparrently, the hidden subgroup (say H ) corresponds to k = 0, where b = a logp x.

H = {(0, 0), (1, logg x), , (2, 2 logg x), ...., ((p − 2), (p − 2) logg x)}

The cosets of H in Zp−1 × Zp−1 are of the form (a, k) + H with a, k ∈ Zp−1 . for example, let's consider the
set of cosets of the form

(0, k) + H = {a, k + a logp x} : a ∈ Zp−1 (1)

varying over k ∈ Zp−1 gives complete set of cosets (eg. c = g k mod p where c ∈ Zp∗ )

b) given the state |φi = p−1


1 a−b logg x
mod pi. the mesurement on the thrid register result
P
a,b∈Zp−1 |ai|bi|g
in c0 which still ∈ Zp . From equation (1), we can immediately see the state of |aiand |bi is projected to

{a, b = k + a logp x}where now k is a xed value that correspond to c0 .

1 X
|c0 ihc0 |φi = |ai|bi|c0 ihc0 |g a−b logg x mod pi
p−1
a,b∈Zp−1
1 X
= |ai|k + a logp xi|c0 i
p−1
a∈Zp−1

where we have use c0 = g k mod p, thenhg k mod p|g a−b logg x mod pi = δk,a−b logg x,

The post measurement state of the rst two qubit is √1


P
p−1 a∈Zp−1 |ai|k + a logp xi

c) Applying the QFT on to the postmeasurement state in b) gives

1 X za+y(k+a logp x)
QF Tp−1 |...i = ωp−1 |v, zi
(p − 1)3/2 a,x,v∈Zp−1
1 X
vk
X a(z+v logp x)
= ωp−1 ωp−1 |v, zi
(p − 1)3/2 x,v∈Zp−1 a∈Zp−1
1 X
vk
=√ ωp−1 |v, −v logg xi
p − 1 v∈Z
p−1

Page 4 of 12
Png Wen Han R08222077

where we have use the identity of αβ


= (p − 1)δα,β .
P
a∈Zp−1 ωp−1

After measuring the rst two register, the output pair with non-zero probability is (v, −v logp x) for
uniformly random v ∈ Zp−1 .
d)
Algorithm: Discrete Logarithm
Inputs:
1) A black box performs the operation U |x1 i|x2 i|initi = |ai|bi|init⊕f (a, b)i in which f (a, b) = g a x−b mod p
2) the state |ai|bithat store the function evaluation is initalized to |0i.
3) two t ≡ O(dlog re + log(1/)), where r is the period of the cyclic group Zp−1
Outputs: the least positive integer y such that x = gy mod p

Runtime : One use of U , and O(dlog re2 )operations. Succeed with probability O(1).
Procedure:

1. initalise |ψ0 i = |0i|0i|0i.


2. create superposition H ⊗ H ⊗ I|ψ0 i = 1
|ai|bi|0i,
P
p−1 a,b∈Zp−1

3. apply U ,
1 X
U |...i = |ai|bi|f (a, b)i
p−1
a,b∈Zp−1

,where f (a, b) = g a−b logg x mod p


4. Measure the third qubit, assume the measured state is |g −k mod pi. this step is not essential as
measuremnt always be deered to the end of a quantum algorithm.
using the result from 3b),the post measurement state of the rst two qubit is
1 X
7−→ √ |ai|k + a logp x mod (p − 1)i
p − 1 a∈Z
p−1

5. apply QF Tp−1 on the rst two qubit state, using the result from 3c) we get
1 X
vk
QF Tp−1 |...i = √ ωp−1 |v, −v logg xi
p − 1 v∈Z
p−1

6. Measure the rst two register give the pair (v, −v logg x) for unformly random v ∈ Zp−1
7. CASE 1: v and p − 1 are not coprime and v does not have a multiplicative inverse of modulo p − 1.
Repeat from step one again
CASE 2 : v and p − 1 are coprime and v does have a multiplicative inverse of modulo p − 1. divide
the rst register by −v to get the desired solution (eg. logg x which correspond to y).

Remarks
Because we are choosing among all possible v with equal probability, the chance that v and p−1 are relatively
prime is φ(p−1)/(p−1),where φ is the Euler-function. It can be shown that φ(p−1)/(p−1) ' e−γ / log log p >
1/ log p. Therefore, the probability of success for each independent attempt is O(poly(log p)),so we dont have
to repeat the procedure many times before we nd an invertible v .

Page 5 of 12
Png Wen Han R08222077

Question 4
a)

Provided no three orthogonal basis can be exist in 2 dimensional system , PVM subject to

π0 = |pihp|, π1 = |sihs|, π ∗ = 1 − π0 − π1 = 0

π ∗ = 0 has zero projection, indicating the inconclusive measurement is useless, then it lead to relaxing the
constraint of accepting wrong answer P r (outcome is j |Hi = |ψi i) 6= 0. The success probability of each state
reduced from 1
2 to 14 , as th other half correspond to wrong measurment.
1
outcome is i|Hi = |ψi i) + 1
outcome is j |Hi = |ψi i)
P P
Ptotal = i=0,1 4 P r ( i=0,1 4 P r (

PVM elements should strictly bound to the properties of projectors.

let an arbitrary projector be π0 = |sihs|, where |si = cos θ|0i + sin θ|1i. Then, the correspong orthogonal
projector read π0 = |pihp|, where |pi = + sin θ|0i − cos θ|1i. Note that the phase term is ommited without
losing the genrality. A quick check show

i. they are hermitian operator


cos2 θ

cos θ sin θ
π0 = π0† = , same goes for π1
sin θ cos θ sin2 θ
ii. they are positive operators
iii.they are complete π0 + π1 = 1
iv. the are orthonormal. π0 π1 = 0
   
1 0 1 1
given that |ψ0 i = |0i,|ψ1 i = √1 (|0i
2
+ |1i), |ψ0 ihψ0 | = ,|ψ1 ihψ1 | = 1
2
0 0 1 1

X 1
Ps = P r (outcome is i|Hi = |ψi i)
i=0,1
4
1
= [T r[π0 |ψ0 ihψ0 |] + T r[π1 |ψ1 ihψ1 |]]
4
1
= [1 + T r[π0 ∆]]
4

 
−1 1
∆ = |ψ0 ihψ0 | − |ψ1 ihψ1 | = − 12
1 1

cos2 θ
   
1 1 cos θ sin θ −1 1
Ps = 1− T r[ ]
4 2 sin θ cos θ sin2 θ 1 1
− cos2 θ + cos θ sin θ cos2 θ + cos θ sin θ
  
1 1
= 1− T r[ ]
4 2 − sin θ cos θ + sin2 θ sin θ cos θ + sin2 θ
 
1 1
= 1− (− cos 2θ + sin 2θ)
4 2

In seek of the optimum Ps∗ ,use dPs


dθ = 0,

Page 6 of 12
Png Wen Han R08222077

dPs
= − (2 sin 2θ + 2 cos 2θ)

0 = sin 2θ + cos 2θ
π 3π
θ=− ,
8 8

The optimum θ that gives Ps∗ is 3π


8 , Then ,we shall see

π
Ps∗ = Ps (3 )
 8  
1 1 π π
= 1− − cos 3 + sin 3
4 2 4 4
1
=
4

b)

Ambiguous discrimination:
 
cos u − sin u
let an arbitrary projector be Π0 = |sihs|, where |si = R(u)|ψ1 i and R(u) = is the rotation
sin u cos u
operator . Then, the other projector read Π1 = |pihp|, where |pi = R(v)|ψ2 i. Note that the phase term is
ommited without losing the genrality. A quick check show

i. they are hermitian operator


1 1
cos2 u
   
cos u sin u − cos v sin v cos 2v
Π0 = Π†0 = , same goes for Π1 = Π†1 = 2 2
sin u cos u sin2 u 1
2 cos 2v
1
2 + cos v sin v
ii. Π1 , Π0 are positive operators for θ ∈ [0, π/2],Π non-positivity will be handled afterwards.

iii.they are complete Π0 + Π1 + Π∗ = 1, with Π∗ = 1 − Π0 − Π1


iv. the are not orthonormal. Π0 Π1 6= 0
   
1 0 1 1
given that |ψ0 i = |0i,|ψ1 i = √1 (|0i
2
+ |1i), |ψ0 ihψ0 | = ,|ψ1 ihψ1 | = 1
2
0 0 1 1

X 1
Ps = P r (outcome is i|Hi = |ψi i)
i=0,1
2
1
= [T r[π0 |ψ0 ihψ0 |] + T r[π1 |ψ1 ihψ1 |]]
2

The inconclusive measerement is ommited as it does not contribute to probability of succes measureement.
 
−1 1
∆ = |ψ0 ihψ0 | − |ψ1 ihψ1 | = − 12
1 1

Page 7 of 12
Png Wen Han R08222077

    
1 1 0 1 1 1
Ps = T r[|sihs| ] + T r[|pihp| ]
4 0 0 2 1 1
 1 1

1 4 (3 + cos 2u + sin 2u − 2 sin 2v) 4 (1 + cos 2u + sin 2u)
= Tr 1 1
4 4 (1 − cos 2u + 2 cos 2v + 2 sin 2u) 2 sin 2u(cos u + sin u)
1
= [2 + sin 2u − sin 2v]
8
1 2
cos u + cos2 v

Ps =
8

Using the optimization in Mathematica with condition of positive F2 (eg. 0 < k < kmax ) , maximum prob-
ability Ps∗ = 0.375 which correspond tou = π4 ,v = π2 Meanwhile the minimum probability Ps = 0.125 cor-
respond to u = 0, v = π4 . Therefore, we can conlcude the POVM in ambiguous discrimination still able to out-
1 1
cos2 u
   
cos u sin u − cos v sin v cos 2v
performed the one using PVM. Π0 = ,Π†1 = 2 2 ,Π∗ =
sin u cos u sin2 u 1
2 cos 2v
1
2 + cos v sin v
1 − Π0 − Π1 where 0 < u < 2 , and 0 < v < 2 .
π π

Unambiguous discrimination require (Π0 |ψ0 i = 0, Π1 |ψ1 i = 0), the only possibility is that the projection
operator be orthogonal to the state in the quantum system . Let the projection operator with succes
measurement be Π0 = I − |ψ0 ihψ0 |, Π1 = I − |ψ1 ihψ1 |. and the projection measurement with inconclusive
(fail) outcome be Π∗ = I − Π0 − Π1 . The projection measurement operator in matrix form are
 
0 0
Π0 = |1ih1| =
0 1
 
1 1 1 −1
Π1 = (|0ih0| − |0ih1| − |1ih0| + |1ih1|) =
2 2 −1 1
 
∗ 1 1 1
Π = 1 − Π0 − Π1 = 2
1 −1

Note that the spectra of Π2 is not positive. To achieve the positivity, we look for the allowed range of spectra
for the POVM and lead us to the construction

F0 = kΠ0
F1 = kΠ1
F2 = 1 − F0 − F2

where their correspond spectra are {k, 0},{k, 0}and {1 − (1 − |hψ0 |ψ1 i|)k, 1 − (1 + |hψ0 |ψ1 i|)k}. the positivity
of F2 requires

1 − (1 + |hψ0 |ψ1 i|)k > 0


1
k<
1 + |hψ0 |ψ1 i|

This render the kmax = 1


1+|hψ0 |ψ1 i| and k is bounded by [0, kmax ]. Here kmax = 3.41 as |hψ0 |ψ1 i| = √1 .
2

The probability with sucees outcome is given by

Page 8 of 12
Png Wen Han R08222077

1
Ps = [T r[Π1 |ψ0 ihψ0 |] + T r[Π0 |ψ1 ihψ1 |]]
2
       
1 1 1 −1 0 0 1 0 1 1 −1
= T r[ ] + T r[ ]
2 2 −1 1 0 1 0 0 2 −1 −1
    
1 1 0 −1 1 1 −1
= T r[ ] + T r[ ]
2 2 0 1 2 0 0
1
=
2

This is larger than 1


4

c) Ps∗ = 0.5 in ambiguous discrimination as proved in b)

d)

Page 9 of 12
Png Wen Han R08222077

Question 5
a) using the properties of T r[σi ] = 0 and σi σj = Iδij + iεijk σk , where {i, j, k} ∈ x, y, z,.

Let l, p be arbitrary index ∈ x, y, z


1
T r[ρσl ] = T r[Iσl + rx σx σl + ry σy σl + rz σz σl ]
2 
1 X
= T r[Iσl ] + T r[rp σp σl δp,l ] + T r[rp σp σl ]
2
p6=l
 
1 X
= T r[σl ] + T r[rl I] + rp T r[εplk σk ]
2
p6=l

= rl

Straightfowardly, rx = T r[ρσx ], ry = T r[ρσy ], rz = T r[ρσz ]

b) A density operator can only be pure state only if T r[ρ2 ] = T r[ρ] = 1, otherwise T r[ρ2 ] < 1. Thus,
T r[ρ2 ] ≤ 1 serve as the bound of a density matrix. Now

1 h
~

~
i
T r[ρ2 ] = T r I + ~
r · E I + ~
r · E
d2
1
= (1 + ||r||2 )
d
≤1


For a qubit d = 2, ||r|| ≤ ( d − 1 = 1)

c) Let σ = 12 (I + ~s · ~σ )

1
T r[ρσ] = T r[(I + ~r · ~σ ) (I + ~s · ~σ )]
4
1
= T r[I + ~r · ~σ + ~s · ~σ I + ~r · ~s]
4
1
= T r [I(1 + ~r · ~s)]
4
1
= (1 + ~r · ~s)
2

The angle between the two bloch vector is given by 180

1
θ = cos−1 ( )
1−d
= cos−1 (−1)
= 180

Page 10 of 12
Png Wen Han R08222077

d) the measurement is the projection to the basis of |ψi i, the respective probability of the measurement
outcome i ∈ {0, 1}is

P (outcome ψi ) = T r[ρ
Y
]
i

= T r[ρ|ψi ihψi |]
= T r[(I + ~r · ~σ ) (I + r~i · ~σ )]
1
= (1 + ~r · r~i )
2

be a positive semi-denite or hermitian operator hu, P ui ≥ 0 and statisfy


e) a valid POVM should P
completeness relation i Πi = 1.
The hermicity properties is apparent (I + (−1)b σa )† = (I + (−1)b σa ).

Let examine the rst condition with |ui as the arbitrary quantum state

hu, Π(a,b) ui = ||Π(a,b) u|| − E||u|| where E is the eigenvalue. The eigenvalues of pauli matrices is either -1 or
1, and the eigenvalue of identity matrix is denitely be 1. Then the eigenvalue E becomes 16 (1 ± (−1)b ) ≥ 0.
Therefore hu, Π(a,b) ui ≥ 0

Now, let's examine the completeness relation.

XX 1 XX
I + (−1)b σa

Πa,b =
a
6 a
b b
!
1 X X
= 6I + σa − σa
6 a a

=1

Πa,b statisfy both semi-denite operator condition hu, P ui ≥ 0 and the completeness relation Πi = 1 ,
P
i
thus it's a POVM.

f)
P = T r[ρΠa,b ]
1
T r[(I + ~r · ~σ ) I + (−1)b σa ]

=
12
1
T r[ I + (−1)b σa + ~r · ~σ + (−1)b~r · ~σ σa ]

=
12  
1  X
= T r[I] + T r[(−1)b σa ] + T r[(−1)b rl σa2 δl,a ] + rp T r[εplk · σk ]
12
p6=l
1
1 + (−1)b ra σa 2

P (a, b) =
6
1
1 + (−1)b ra

=
6

Page 11 of 12
Png Wen Han R08222077

g) The POVM elements project an aibitrary qubit state to their respective basis of bloch vector in i ∈ {x, y, z}.
The length of the bloch vector in each dimension r = (rx , ry , rz ),is implicit in the measurement probability.
For example, the measuremnt outcome of P (x, 1) = Sx can use to get back the magnitude of vector r
projected to x direction using linear equation (eg . S = 16 (1 − rx )). the similar arguments goes for y and z
direction.

If we prepade many copies of ρ, and made the measurment in respective basis Πx,b , Πy,b , Πz,b , b ∈{0,1} many
times (once for each copy of qubit.). then we can generate a statistic regarding the (rx , ry , rz ). According to
weak law of large number, the more copies of qubit ensure the convergence toward the accurate bloch vector
r.

Page 12 of 12

You might also like