SOLUTIONS MANUAL
,iv
Quantum Information: Solutions to Exercises
Stephen M. Barnett
,Preface
The following pages present outline, or sketch solutions, to the exercises
in my book Quantum Information, published by Oxford University Press
in June 2009. The solutions are arranged into eight ‘chapters’ to match
the chapters in the book. Equation numbers refer to the correspondingly
numbered equations in the book.
Glasgow March 2019
Errata
Shannon taught us that all communications channels contain errors and,
inevitably, Quantum Information is no exception. Following is a list of
corrections that I have come across since the initial publication.
p. 74 There is an error in Fig. 3.7. The final Jones matrix in the
table should be
cos2 θ − sin2 θ
2 cos θ sin θ
.
2 cos θ sin θ sin2 θ − cos2 θ
p. 112 In exercise (4.5) “density” should be “density operator”
p. 98 There is an h̄ missing in eqn 4.36, which should be
(x − xm )2
pm x
Z
|xm , pm i = (2πσ 2 )−1/4 dx exp − + i .
4σ 2 h̄
Also on this page, there a normalization factor missing in eqn 4.39, which
should be
(x − xm )2
Z
2 −1/2
P(xm ) = (2πσ ) dx hx|ρ̂|xi exp − .
2σ 2
p. 113 In exercise (4.24) the operator Υ̂ should be defined as
M
X
Υ̂ = π̂j ŵj .
j=1
p. 135 In eqn 5.63, there is an error in the normalization of the
wavefunction. The prefactor should be (πσ 2 )−1/2
p. 162 In exercise (6.23) there is an error in the transformations given
They should be:
1/2
Ûswap |00i = |00i
,vi Preface
1/2 e−iπ/4
Ûswap |01i = √ (|01i + i|10i)
2
−iπ/4
1/2 e
Ûswap |10i = √ (|10i + i|01i)
2
1/2
Ûswap |11i = |11i
p.155 Figure 6.26 has the incorrect powers on the final X gates. The
correct from of the figure is given here in Fig. ??.
p. 194 In exercise (7.20) the condition for the two strings to have the
same parity should be b · c + b · c = 0 mod 2.
p. 228 In exercise (8.21) the inequality is quoted the wrong way
around. It should be
S(C) + S(B) ≤ S(AB) + S(AC) .
p. 230 In exercise (8.44) the two signal states should be
ρ̂1 = q|0ih0| + (1 − q)|1ih1|
ρ̂2 = (1 − q)|0ih0| + q|1ih1| .
,Probability and information
1
(1.1) We know that the joint and single-event probabilities are related
by
X
P (ai ) = P (ai , bj )
j
and that the joint probabilities are necessarily greater than or equal to
zero. It follows immediately that
P (ai ) ≥ P (ai , bj )
with equality occuring only if
P (ai , bk ) = 0 k 6= 0
⇒ P (ai , bk ) = P (ai )δjk .
(1.2) No it does not. The conditional probabilities are related by
Bayes’ theorem and are not in general equal.
(1.3) We can read off from the probability tree the probabilities
1 1 1
P (a1 ) = P (a2 ) = P (a3 ) =
2 3 6
and the conditional probabilities
1 1 1
P (b1 |a1 ) = P (b2 |a1 ) = P (b3 |a1 ) =
4 4 2
2 1
P (b1 |a2 ) = P (b2 |a2 ) = P (b3 |a2 ) = 0
3 3
1 1 1
P (b1 |a3 ) = P (b2 |a3 ) = P (b3 |a3 ) = .
3 3 3
It is now straightforward to construct the joint probabilities P (ai |bj )
and then extract the required probabilities:
29 7 11
P (b1 ) = P (b2 ) = P (b3 ) =
72 24 36
and conditional probabilities:
2 16 4
P (a1 |b1 ) = P (a2 |b1 ) = P (a3 |b1 ) =
29 29 29
3 8 4
P (a1 |b2 ) = P (a2 |b2 ) = P (a3 |b2 ) =
7 21 21
9 2
P (a1 |b3 ) = P (a2 |b3 ) = 0 P (a3 |b3 ) = .
11 11
,2 Probability and information
From this we can readily read off the entries to construct the required
probability tree.
(1.4) The problem gives the probabilities for arriving on time given
that the long and shirt routes are taken:
3
P (bO |as ) = 1 P (bO |al ) =
4
and probabilities for taking the long and short routes:
1 3
P (al ) = P (as ) = .
4 4
From the conditional probabilities we have
P (bL |as ) = 1 − P (bO |as ) = 0
1
P (bL |al ) = 1 − P (bO |al ) = .
4
The required conditional probabilities are, therefore,
P (bL |al )P (al )
P (al |bL ) = =1
P (bL |al )P (al ) + P (bL |as )P (as )
P (as |bL ) = 1 − P (al |bL ) = 0 .
(1.5) Each particle is detected with probability η and missed with
probability 1 − η. This means that if we detect n given that N were
present, then we also miss N − n particles. There are n!(NN−n)!
!
was for
N! n N −n
this to happen and hence P (n|N ) = n!(N −n)! η (1 − η) . We solve
for P (N |n) using Bayes’ theorem:
P (n|N )P (N )
P (N |n) = .
P (n)
In each case we need to find P (n) using
∞
X
P (n) = P (n|N )P (N ) .
n=0
(i) For the Poisson distribution we find
∞
X N! N̄ N
P (n) = η n (1 − η)N −n e−N̄
n!(N − n)! N!
N =n
(η N̄ )n
= e−ηN̄ .
n!
Note that this is a Poisson distribution with mean η N̄ . Bayes’ theorem
gives the answer
[N̄ (1 − η)]N −n
P (N |n) = e−N̄ (1−η) .
(N − n)!
, Probability and information 3
(ii) The case in which all P (N ) are equal needs careful handling as
each of the probabilities is zero! We can overcome this problem by use
fo a suitable limit. Let the probabilities, P (N ), for N = 0, 1, · · · , s each
be 1/(s + 1) and the probabilities for N > s be zero. We shall take the
limit s → ∞ at the end of the calculation. We start by calculating P (n):
s
X N! 1
P (n) = η n (1 − η)N −n .
n!(N − n)! s+1
N =n
Hence
N! n N −n 1
n!(N −n)! η (1 − η) s+1
P (N |n) = P∞ N !
′
n (1 − η)N ′ −n 1
.
N =n n!(N −n)!
′ ′ η s+1
Taking the limit as s → ∞ then gives
N!
P (N |n) = η n+1 (1 − η)N −n .
n!(N − n)!
(iii) The problem here is that we need the probability distribution
P (N ) but we know only that the mean number is N̄ :
∞
X
N P (N ) = N̄ .
N =0
In the absence of any further information we use Jaynes’s Max Ent
method to maximize
X
He = − P (N ) ln P (N )
N
subject to the constraints that the probabilities sum to unity and give
the correct value for N̄ . It is straightforward to use Lagrange’s method
of undertermined multipliers to get
N̄ N
P (N ) = .
(N̄ + 1)N +1
We can now calculate P (n) and hence the required conditional proba-
bility:
∞ ′
X N ′! n N ′ −n N̄ N
P (n) = η (1 − η)
N ′ =n
n!(N ′ − n)! (N̄ + 1)N ′ +1
(η N̄ )n
=
(1 + η N̄ )n+1
N! (1 + η N̄ )n+1
⇒ P (N |n) = [(1 − η)N̄ ]N −n .
n!(N − n)! (N̄ + 1)N +1
It is interesting to compare this result with that from part (ii). In
the limit N̄ → ∞, the conditional probabilities become equal, as they
should.
,4 Probability and information
(1.6)
P (ai , bj , ck ) = P (ai |bj , ck )P (bj , ck )
= P (ck |ai , bj )P (ai , bj )
P (ck |ai , bj )P (ai , bj )
⇒ P (ai |bj , ck ) = .
P (bj , ck )
(1.7) We start from eqn 1.21:
P (ai |bj ) = ℓ(ai |bj )P (ai )
P (ai |bj ) P (ai , bj )
⇒ ℓ(ai |bj ) = = ,
P (ai ) P (ai )P (bj )
which is manifestly symmetric in ai and bj .
(1.8) The prior probabilities are
1 2
P (BB) = P (Bb) = ,
3 3
and the likelihoods are
ℓ(BB|xi = black) = 1 ℓ(Bb|xi = black) = 0 .
It then follows that
1
P (BB|xi = black) ∝ 1n
n 3
1 2
P (Bb|xi = black) ∝ .
2 3
Normalizing then gives
1n 13
P (BB|xi = black) = 1 n 2
1n 13 +
2 3
1
=1− .
2n−1 +1
(1.9) The probabilities that each of the players wins in the first round
are
1 1 1
P (Amy) = P (Barbara) = P (Claire) = .
2 4 8
The probability that each wins on the second round are 1/8 multiplied
by these same probbabilities. In each round the probabilities are in the
ration 4:2:1. It follows that the total probabilities that each player will
win are
4 2 1
P (Amy) = P (Barbara) = P (Claire) = .
7 7 7
(1.10) This is the famous Monty Hall problem. Keeping the origi-
nally chosen box does not take into account the additional information
, Probability and information 5
provided by displaying an empty box. You should change to the remain-
ing unopen box and will then win with probability 2/3. If this seems
strange, then consider that another way of stating the problem is for the
host to offer you to keep your one box or take both the remaining boxes.
There is much scope here for classroom discussion!
(1.11)
(a) The possibilities left are (Boy, Boy), (Boy, Girl) and (Girl, Boy)
and all are equally probable. Hence the probability that they are both
boys is 1/3.
(b) The possibilities are (Reuben, Boy not Reuben). (Boy not
Reuben, Reuben), (Reuben, Girl), (Girl, Reuben) and (Reuben, Reuben).
The probability that they are both boys is
P (R, B(6 R)) + P (B(6 R), R) + P (R, R)
P (BB) =
P (R, B(6 R)) + P (B(6 R), R) + P (R, R) + P (R, G) + P (G, R)
2P (R, B) − P (R, R)
=
2P (R, B) − P (R, R) + 2P (R, G)
P (R) − P (R, R)
=
2P (R) − P (R, R)
1 − P (R)
=
2 − P (R)
1
≈ ,
2
where the last line follows because Reuben is an unusual name. This
problem (and other teasers) is treated in more depth in the book by
Mlodinow.
(1.12) The strategy is for each player to look at the other players cards
and to make a guess or to decline to guess on the basis of what he/she
sees. If a player sees that the colours of the other two players cards are
different then he/she declines to guess. If he/she sees that they are both
red (black) then he/she bets that he/she has a black (red) card. This
strategy wins if there are two cards of the same colour and one that
is different. It loses if all three cards are the same colour. Hence the
winning probability is 34 .
It is true that any individual player will guess the colour of his/her
card correctly with probability 12 , but this strategy ensures that when
a player guesses correctly they are the only player making a guess, but
when they guess incorrectly all the players are guessing. It works by
correlating the guesses.
(1.13) It follows from the definition of the logarithm that
x = aloga x = blogb x .
Taking the logarithm in base b gives
logb x = logb a loga x ,
, 6 Probability and information
which is the required identity. The conversion factor between bits and
nats then follows from the fact that ln 2 ≈ 0.693.
(1.14)
H = −p log p − (1 − p) log(1 − p)
1
= [−p ln p − (1 − p) ln(1 − p)] .
ln 2
Differentiating with respect to p gives
dH 1 p
=− ln
dp ln 2 1−p
which is zero only at p = 1/2. This is the only stationary point. Differ-
entiating a second time gives
d2 H
1 1 1
=− + ,
dp2 ln 2 p 1 − p
which is clearly negative at p = 1/2 confirming that this is a maximum.
The fact that H is a continuous function means that the minimum occurs
at the edge of the allowed range, and the fact that it is symmetric in p
and 1 − p means that the minima occur at p = 0 and p = 1.
(1.15) Let us start by assuming that the inequality holds for k terms:
k k
!
X X
f pki xi ≤ pki f (xi ) ,
i=1 i=1
where the subscript serves to remind us that
k
X
pki = 1 .
i=1
Let
k
X
pki xi = Xk .
i=1
Eqn 1.37 then means that
f [λXk + (1 − λ)xk+1 ] ≤ λf (Xk ) + (1 − λ)f (xk+1 )
Xk
≤ λpki f (xi ) + (1 − λ)f (xk+1 ) .
i=1
If we introduce the probabilities
pk+1
i = λpki pk+1
k+1 = 1 − λ ,
as we clearly can (normalization is correct). Then we have
k+1
! k+1
X X
f pk+1
i xi ≤ pk+1
i f (xi ) .
i=1 i=1