nc-solutions
nc-solutions
|ψi
Introduction:
This document is a (work in progress) collection of comprehensive solutions to the exercises in Nielsen and
Chuang’s “Quantum Computation and Quantum Information”. Each solution has the involved concepts (and
hence rough pre-requisite knowledge) necessary for the problem in addition to the solution. Some problems may
contain additional remarks about implications. Any problems denoted as (Research) are left as exercises to the
reader. Starred exercises are considered to be more difficult (difficulty is assumed for the problems at the end of
the chapter).
1
Contents
1 Introduction and overview 3
4 Quantum circuits 86
2
1 Introduction and overview
Exercise 1.1: Probabilistic Classical Algorithm
Suppose that the problem is not to distinguish between the constant and balanced functions with certainty,
but rather, with some probability of error < 1/2. What is the performance of the best classical algorithm
for this problem?
Solution
Concepts Involved: Deutsch’s Problem, Probability.
Recall that a Boolean function f : {0, 1}n → {0, 1} is said to be balanced if f (x) = 1 for exactly half of
all possible 2n values of x.
A single evaluation tells us no information about whether f is constant or balanced, so our success
rate/error rate after a single evaluation is = 12 (random guessing!). Therefore, consider the case where
we do two evaluations. If we obtain two different results, then we immediately conclude that f is balanced.
Suppose instead that we obtain two results that are the same. If f is balanced, then the probably that
the first evaluation returns the given result is 12 , and the probability that the second evaluation returns
n
the same result is 22n/2−1 n n n
−1 (as there are 2 /2 of each result of 0 and 1, 2 total results, 2 /2 − 1 of the
n
given result left after the first evaluation, and 2 − 1 total uninvestigated cases after the first evaluation).
n
Therefore, if f is balanced, this occurs with probability 12 · 22n/2−1 1
−1 , which we can see is less than 2 as:
2n /2 − 1 1 2n /2 − 1 1
2n < 2n+1 =⇒ 2n − 2 < 2n+1 − 2 =⇒ n
< 1 =⇒ n
<
2 −1 2 2 −1 2
Hence, if we get the same result in two evaluations, we can conclude that f is constant with error < 12 .
We conclude that only 2 evaluations are required for this algorithm.
Exercise 1.2
Explain how a device which, upon input of one of two non-orthogonal quantum states |ψi or |ϕi correctly
identified the state, could be used to build a device which cloned the states |ψi and |ϕi, in violation
of the no-cloning theorem. Conversely, explain how a device for cloning could be used to distinguish
non-orthogonal quantum states.
Solution
Concepts Involved: Quantum Distinguishability, Quantum Measurement.
Given access to a device which can distinguish non-orthogonal quantum states |ψi , |ϕi (without mea-
surement), we can then design a quantum circuit that would map |ψi 7→ |ϕi (or vise versa), allowing us
to clone the states as we like.
Conversely, given a cloning device, we could clone |ψi and |ϕi an arbitrary number of times. Then,
performing repeated measurements of the two states in different measurement bases, we would (given
enough measurements) be able to distinguish the two states based on the measurement statistics (there
will of course be some error based on probabilistic considerations, but given that we have access to as
many measurements of the states as we like, we are able to make this error arbitrarily low).
3
Problem 1.1: (Feynman-Gates conversation)
Construct a friendly imaginary discussion of about 2000 words between Bill Gates and Richard Feynman,
set in the present, on the future of computation (Comment: You might like to try waiting until you’ve
heard the rest of the book before attempting this question. See ‘History and further reading’ below for
pointers to one possible answer for this question).
Problem 1.2
What is the most significant discovery yet made in quantum computation and quantum information? Write
an essay of about 2000 words to an educated lay audience about the discovery (Comment: As for the
previous problem, you might like to try waiting until you’ve read the rest of the book before attempting
this question.)
4
2 Introduction to quantum mechanics
Exercise 2.1: Linear dependence: example
Show that (1, −1), (1, 2) and (2, 1) are linearly dependent.
Solution
We observe that:
" # " # " # " # " #
1 1 2 1+1−2 0
+ − = =
−1 2 1 −1 + 2 − 1 0
showing that the three vectors are linearly dependent by definition. Alternatively, we can apply theorem
that states that for any vector space V with dim V = n, any list of m > n vectors in V will be linearly
dependent (here, V = R2 , n = 2, m = 3).
Suppose V is a vector space with basis vectors |0i and |1i, and A is a linear operator from V to V such
that A |0i = |1i and A |1i = |0i. Give a matrix representation for A, with respect to the input basis
|0i, |1i, and the output basis |0i , |1i. Find input and output bases which give rise to a different matrix
representation of A.
Solution
Concepts Involved: Linear Algebra, Matrix Representation of Operators.
" # " #
1 0
Identifying |0i ∼
= and |1i ∼
= , we have that:
0 1
" #
a a01
A = 00
a10 a11
5
tation:
1 1 1
A |+i = √ A(|0i + |1i) = √ (A |0i + A |1i) = √ (|1i + |0i) = |+i
2 2 2
and:
1 1 1
A |−i = √ A( |0i − |1i) = √ (A |0i − A |1i) = √ ( |1i − |0i) = − |−i ,
2 2 2
Remark: If we choose the input and output bases to be different, we can even represent the A operator
as an identity matrix. Specifically, if the input basis to be chosen to be |0i , |1i and output basis as
|1i , |0i , the matrix representation of A looks like:
" #
1 0
A∼= .
0 1
6
Exercise 2.3: Matrix representation for operator products
Suppose A is a linear operator from vector space V to vector space W , and B is a linear operator from
vector space W to vector space X. Let |vi i , |wj i , |xk i be bases for the vector spaces V, W and X
respectively. Show that the matrix representation for the linear transformation BA is the matrix product
of the matrix representations for B and A, with respect to the appropriate bases.
Solution
Concepts Involved: Linear Algebra, Matrix Representation of Operators.
Taking the matrix of representations of A and B to the appropriate bases |vi i , wj , |xk i of V, W and
X, we have that:
X X
A |vj i = Aij |wi i , B |wi i = Bki |xk i
i k
which shows that the matrix representation of BA is indeed the matrix product of the representations of
B and A.
Show that the identity operator on a vector space V has a matrix representation which is one along the
diagonal and zero everywhere else, if the matrix is taken with respect to the same input and output bases.
This matrix is known as the identity matrix.
Solution
Concepts Involved: Linear Algebra, Matrix Representation of Operators.
Let V be a vector space and |vi i be a basis of V . Let A : V 7→ V be a linear operator, and let its matrix
representation taken to be respect to |vi i as the input and output basis. We then have that for each
7
i ∈ {1, . . . , n}:
X X
A|vi i = 1|vi i + 0|vj i = δij |vj i
j6=i j
Exercise 2.5
Solution
Concepts Involved: Linear Algebra, Inner Products.
Recall that on Cn , (·, ·) was defined as:
z1
X .
((y1 , . . . , yn ), (z1 , . . . , zn )) ≡ yi∗ zi = [y1∗ . . . yn∗ ]
.. .
i
zn
Furthermore, recall the three conditions for the function (·, ·) : V × V 7→ C to be considered an inner
product:
8
(2) We have:
X
((y1 , . . . , yn ), (z1 , . . . , zn )) = yi∗ zi
i
X
= (yi zi∗ )∗
i
∗
X
= zi∗ yi
i
∗
= ((z1 , . . . , zn ), (y1 , . . . , yn ))
For y = (y1 , . . . , yn ) 6= 0 we have that at least one yi (say, yj ) is nonzero, and hence:
X
((y1 , . . . , yn ), (y1 , . . . , yn )) = yi2 ≥ yj2 > 0
i
Exercise 2.6
Show that any inner product (·, ·) is conjugate-linear in the first argument,
X X
λi |wi i , |vi = λ∗i ( |wi i , |vi).
i i
Solution
Concepts Involved: Linear Algebra, Inner Products
Applying properties (2) (conjugate symmetry), (1) (linearity in second argument), and (2) (again) in
9
succession, we have that:
∗
X X
λi |wi i , |vi = |vi, λi |wi i
i i
∗
X
= λi (|vi, |wi i)
i
X
= λ∗i (|vi, |wi i)∗
i
X
= λ∗i (|wi i, |vi)
i
Exercise 2.7
Verify that |wi = (1, 1) and |vi = (1, −1) are orthogonal. What are the normalized forms of these
vectors?
Solution
Concepts Involved: Linear Algebra, Inner Products, Orthogonality, Normalization
Recall that two vectors |vi, |wi are orthogonal if hv|wi = 0, and the norm of |vi is given by |vi =
p
hv|vi.
hw|vi = 1 · 1 + 1 · (−1) = 0
Exercise 2.8
Verify that the Gram-Schmidt procedure produces and orthonormal basis for V .
10
Solution
Concepts Involved: Linear Algebra, Linear Independence, Bases, Inner Products, Orthogonality, Normal-
ization, Gram-Schmidt Procedure, Induction.
Recall that given |w1 i, . . . , |wd i as a basis set for a vector space V , the Gram-Schmidt procedure con-
structs a basis set |v1 i, . . . , |vd i by defining |v1 i ≡ |w1 i/ |w1 i and then defining |vk+1 i inductively for
1 ≤ k ≤ d − 1 as:
Pk
|wk+1 i − i=1 hvi |wk+1 i |vi i
|vk+1 i ≡ Pk
|wk+1 i − i=1 hvi |wk+1 i |vi i
It is evident that each of the |vj i have unit norm as they are defined in normalized form. It therefore
suffices to show that each of the |v1 i, . . . , |vd i are orthogonal to each other, and that this set of vectors
forms a basis of V . We proceed by induction. For k = 1, we have that:
Therefore:
hv1 |w2 i − hv1 |w2 i hv1 |v1 i hv1 |w2 i − hv1 |w2 i
hv1 |v2 i = = =0
|w2 i + hv1 |w2 i |v1 i |w2 i + hv1 |w2 i |v1 i
so the two vectors are orthogonal. Furthermore, they are linearly independent; if they were linearly
dependent, we could write |v1 i = λ|v2 i for some λ ∈ C, but then multiplying both sides by hv1 | we get:
which is a contradiction. This concludes the base case. For the inductive step, let k ≥ 1 and suppose that
|v1 i, . . . , |vk i are orthogonal and linearly independent. We then have that:
Pk
|wk+1 i − i=1 hvi |wk+1 i |vi i
|vk+1 i = Pk
|wk+1 i − i=1 hvi |wk+1 i |vi i
where in the second equality we use the fact that vj vi = δij for i, j ∈ {1, . . . k} by the inductive hypoth-
esis. We therefore find that |vk+1 i is orthogonal to all of |v1 i, . . . , |vk i. Furthermore, |v1 i, . . . , |vk i, |vk+1 i
is lienarly independent. Suppose for the sake of contradiction that this was false. Then, there would exist
λ1 , . . . λk not all nonzero such that:
11
but then multiplying both sides by hvk+1 | we have that:
by orthonormality. This gives a contradiction, and hence |v1 i, . . . , |vk i, |vk+1 i are linearly independent,
finishing the inductive step. Therefore, |v1 i, . . . , |vd i is an orthonormal list of vectors which is linearly
independent. Since |w1 i, . . . , |wd i is a basis for V , then V has dimension d. Hence, |v1 i, . . . , |vd i being
a linearly independent list of d vectors in V is a basis of V . We conclude that it is an orthonormal basis
of V , as claimed.
The Pauli matrices (Figure 2.2 on page 65) can be considered as operators with respect to an orthonormal
basis |0i, |1i for a two-dimensional Hilbert space. Express each of the Pauli operators in the outer product
notation.
Solution
Concepts Involved: Linear Algebra, Matrix Representation of Operators, Outer Products.
Recall that if A has matrix representation:
" #
∼ a00 a01
A=
a10 a11
with respect to |0i, |1i as the input/output bases, then we can express A in outer product notation as:
Furthermore, recall the representation of the Pauli matrices with respect to the orthonormal basis |0i, |1i:
" # " # " # " #
1 0 0 1 0 −i 1 0
I= X= Y = Z=
0 1 1 0 i 0 0 −1
I = |0ih0| + |1ih1|
X = |0ih1| + |1ih0|
Y = −i |0ih1| + i |1ih0|
Z = |0ih0| − |1ih1|
Exercise 2.10
Suppose |vi i is an orthonormal basis for an inner product space V . What is the matrix representation for
the operator |vj ihvj |, with respect to the |vi i basis?
12
Solution
Concepts Involved: Linear Algebra, Matrix Representation of Operators, Outer Products.
The matrix representation of |vj ihvj | with respect to the |vi i basis is a matrix with 1 in the jth column
and row (i.e. the (j, j)th entry in the matrix) and 0 everywhere else.
Exercise 2.11
Find the eigenvectors, eigenvalues, and diagonal representations of the Pauli matrices X, Y and Z.
Solution
Concepts Involved: Linear Algebra, Eigenvalues, Eigenvectors, Diagonalization.
Given an operator A on a vector space V , recall that an eigenvector |vi of A and its corresponding
eigenvalue λ are defined by:
A|vi = λ|vi
Where |ii form an orthonormal set of eigenvectors for A, and λi are the corresponding eigenvalues.
From which we obtain λ1 = 1, λ2 = −1. Solving for the eigenvectors, we then have that:
" #" # " #
−1 1 v11 0
(X − Iλ1 )|v1 i = 0 =⇒ = =⇒ v11 = 1, v12 = 1
1 −1 v12 0
" #" # " #
1 1 v21 0
(X − Iλ2 )|v2 i = 0 =⇒ = =⇒ v21 = 1, v22 = −1
1 1 v22 0
13
We do the same for Y . Solving for the eigenvalues:
" #
−λ −i
det(A − Iλ) = 0 =⇒ det = 0 =⇒ λ2 − 1 = 0
i −λ
From which we obtain λ1 = 1, λ2 = −1. Solving for the eigenvectors, we then have that:
" #" # " #
−1 −i v11 0
(Y − Iλ1 )|v1 i = 0 =⇒ = =⇒ v11 = 1, v12 = i
i −1 v12 0
" #" # " #
1 −i v21 0
(Y − Iλ2 )|v2 i = 0 =⇒ = =⇒ v21 = 1, v22 = −i
i 1 v22 0
We therefore have that |v1 i = |0i + i|1i, |v2 i = |0i − i|1i. Normalizing by dividing by |v1 i = |v2 i ,
we obtain that:
|0i + i|1i |0i − i|1i
|v1 i = |y+ i = √ , |v2 i = |y− i = √ .
2 2
For Z, the process is again the same. We give the results and omit the details:
Z = |0ih0| − |1ih1|
Exercise 2.12
Prove that the matrix
" #
1 0
1 1
is not diagonalizable.
Solution
Concepts Involved: Linear Algebra, Eigenvalues, Eigenvectors, Diagonalization.
14
But since the eigenvalue 1 is degenerate, the matrix only has one eigenvector; it therefore cannot be
diagonalized.
Exercise 2.13
If |wi and |vi are any two vectors, show that (|wihv|)† = |vihw|.
Solution
Concepts Involved: Linear Algebra, Adjoints.
We observe that:
(( |wihv|)† |xi, |yi) = (|xi, ( |wihv|)|yi) = (|xi, hv|yi |wi) = hx| hv|yi |wi
= hx|wi hv|yi
= hx|wi (|vi, |yi)
∗
= (hx|wi |vi, |yi)
= (hw|xi |vi, |yi)
= (( |vihw|)|xi, |yi)
Where in the third-to last equality we use the conjugate linearity in the first argument (see Exercise 2.6)
∗
and in the second-to last equality we use that ha|bi = hb|ai. Comparing the first and last expressions,
†
we conclude that ( |wihv|) = |vihw|.
a∗i A†i .
X X
a i Ai =
i i
Solution
Concepts Involved: Linear Algebra, Adjoints.
We observe that:
†
X X X
ai Ai |ai, |bi = |ai, ai Ai |bi = ai |ai, Ai |bi
i i i
ai A†i |ai, |bi
X
=
i
†
X
= a∗i Ai |ai, |bi
i
15
where we invoke the definition of the adjoint in the first and third equalities, the linearity in the second
argument in the second equality, and the conjugate linearity in the first argument in the last equality. The
claim is proven by comparing the first and last expressions.
Exercise 2.15
Solution
Concepts Involved: Linear Algebra, Adjoints
Applying the definition of the Adjoint twice (and using the conjugate symmetry of the inner product) we
have that:
∗
((A† )† |ai, |bi) = (|ai, A† |bi) = (A† |bi, |ai)∗ = (|bi, A|ai)∗ = (A|ai, |bi)∗ = (A|ai, |bi).
Exercise 2.16
Solution
Concepts Involved: Linear Algebra, Projectors.
Let |1i, . . . , |ki be an orthonormal basis for the subspace W of V . Then, using the definition of the
projector onto W , we have that:
Xk k
X Xk Xk X k
k X k
X
P2 = P · P = |iihi| i0 i0 = |iihi|i0 ihi0 | = |iiδii0 hi0 | = |iihi| = P
i=1 i0 =1 i=1 i0 =1 i=1 i0 =1 i=1
where in the fourth/fifth equality we use the orthonormality of the basis to collapse the double sum.
Exercise 2.17
Show that a normal matrix is Hermitian if and only if it has real eigenvalues.
Solution
Concepts Involved: Linear Algebra, Hermitian Operators, Normal Operators, Spectral Decomposition.
P
=⇒ Let A be a Normal and Hermitian matrix. Then, it has a diagonal representation A = i λi |iihi|
where |ii is an orthonormal basis for V and each |ii is an eigenvector of A with eigenvalue λi . By the
16
Hermicity of A, we have that A = A† . Therefore, we have that:
†
X X X
A† = λi |iihi| = λ∗i |iihi| = A = λi |iihi|
i i i
where we use the results of Exercises 2.13 and 2.14 in the second equality. Comparing the third and last
expressions, we have that λi = λi ∗ and hence the eigenvalues are real.
⇐= Let A be a Normal matrix with real eigenvalues. Then, A has diagonal representation A =
P
i λi |iihi| where λi are all real. We therefore have that:
†
X X
A† = λi |iihi| = λ∗i |iihi| = λi |iihi| = A
i i
where in the third equality we use that λ∗i = λi . We conclude that A is Hermitian.
Exercise 2.18
Show that all eigenvalues of a unitary matrix have modulus 1, that is, can be written in the form eiθ for
some real θ.
Solution
Concepts Involved: Linear Algebra, Unitary Operators, Spectral Decomposition
2
From which we obtain that |λi | = 1, and hence |λi | = 1, proving the claim.
17
Exercise 2.19: Pauli matrices: Hermitian and unitary
Solution
Concepts Involved: Linear Algebra, Hermitian Matrices, Unitary Matrices
We check I, X, Y, Z in turn.
#T ∗ "
" #∗ " #
1 0 1 0 1 0
I† = = = =I
0 1 0 1 0 1
I † I = II = I
#T ∗ "
" #∗ " #
0 1 0 1 0 1
X† = = = =X
1 0 1 0 1 0
18
Exercise 2.20: Basis changes
Suppose A0 and A00 are matrix representations of an operator A on a vector space A on a vector space
V with respect to two different orthonormal bases, |vi i and |wi i . Then the elements of A0 and A00 are
A0ij = hvi |A|vj i and A00ij = hwi |A|wj i. Characterize the relationship between A0 and A00 .
Solution
Concepts Involved: Linear Algebra, Matrix Representations of Operators, Completeness Relation
Exercise 2.21
Repeat the proof of the spectral decomposition in Box 2.2 for the case when M is Hermitian, simplifying
the proof wherever possible.
Solution
Concepts Involved: Linear Algebra, Hermitian Operators, Spectral Decomposition.
Note that the converse of Theorem 2.1 does not hold if we replace “normal” with “Hermitian”. Diagonal-
izability does not imply Hermicity, with a concrete example being S = |0ih0| + i |1ih1|. So, we just prove
the forwards direction.
We proceed by induction on the dimension d of V . The d = 1 case is trivial as M is already diagonal in
any representation in this case. Let λ be an eigenvalue of M , P the projector onto the λ subspace, and
Q the projector onto the orthogonal complement. Then M = (P + Q)M (P + Q) = P M P + QM P +
P M Q + QM Q. Obviously P M P = λP. Furthermore, QM P = 0, as M takes the subspace P into itself.
We claim that P M Q = 0 also. To see this, we recognize that (P M Q)† = Q† M † P † = QM P = 0. and
hence P M Q = 0. Thus M = P M P + QM Q. QM Q is normal, as (QM Q)† = Q† M † Q† = QM Q (and
Hermiticity implies that the operator is normal). By induction, QM Q is diagonal with respect to some
orthonormal basis for the subspace Q, and P M P is already diagonal with respect to some orthonormal
basis for P . It follows that M = P M P + QM Q is diagonal with respect to some orthonormal basis for
the total vector space.
Exercise 2.22
Prove that two eigenvectors of a Hermitian operator with different eigenvalues are necessarily orthogonal.
19
Solution
Concepts Involved: Linear Algebra, Eigenvalues, Eigenvectors, Hermitian Operators.
Let A be a Hermitian operator, and let |v1 i, |v2 i be two eigenvectors of A with corresponding eigenvalues
λ1 , λ2 such that λ1 6= λ2 . We then have that:
where we use the Hermiticity of A in the second line. Substracting the first line from the second, we have
that:
Since λ1 6= λ2 by assumption, the only way this equality is satisfied is if hv1 |v2 i = 0. Hence, |v1 i, |v2 i are
orthogonal.
Exercise 2.23
Show that the eigenvalues of a projector P are all either 0 or 1.
Solution
Concepts Involved: Linear Algebra, Eigenvalues, Eigenvectors, Projectors.
Let P be a projector, and |vi be an eigenvector of P with corresponding eigenvalue λ. From Exercise
2.16, we have that P 2 = P , and using this fact, we observe:
P |vi = λ|vi
P |vi = P 2 |vi = P P |vi = P λ|vi = λP |vi = λ2 |vi.
Since |vi is not the zero vector, we therefore obtain that either λ = 0 or λ = 1.
Show that a positive operator is necessarily Hermitian. (Hint: Show that an arbitrary operator A can be
written A = B + iC where B and C are Hermitian.)
Solution
Concepts Involved: Linear Algebra, Hermitian Operators, Positive Operators
20
Let A be an operator. We first make the observation that we can write A as:
A A A† A† A + A† A − A†
A= + + − = +i .
2 2 2 2 2 2i
A+A† A−A†
So let B = 2 and C = 2i . B and C are Hermitian, as:
!†
† A + A† A† + (A† )† A† + A
B = = = =B
2 2 2
!†
† A − A† A† − (A† )† A − A†
C = = = =C
2i −2i 2i
so we have hence proven that we can write A = B + iC for hermitian B, C for any operator A. Now,
assume that A is positive. We then have that for any vector |vi:
hv|A|vi ≥ 0.
hv|B|vi + ihv|C|vi ≥ 0.
Exercise 2.25
Solution
Concepts Involved: Linear Algebra, Adjoints, Positive Operators
Let A be an operator. Let |vi be an arbitrary vector, and then we then have that:
|vi, A† A|vi = (A† )† |vi, A|vi = A|vi, A|vi .
By the property of inner products, the expression must be greater than zero.
Exercise 2.26
√ ⊗2 ⊗3
Let |ψi = ( |0i + |1i)/ 2. Write out |ψi and |ψi explicitly, both in terms of tensor products like
|0i|1i and using the Kronecker product.
Solution
Concepts Involved: Linear Algebra, Tensor Products, Kronecker Products.
21
Using the definition of the tensor product, we have:
" #
√1
1
√1 2
√1 21
⊗2 2
|0i|0i + |0i|1i + |1i|0i + |1i|1i ∼ " 2 #
|ψi = = = 21
2 √1
1
2
2
√ 1
2 √1 2
2
Exercise 2.27
Calculate the matrix representation of the tensor products of the Pauli operators (a) X and Z; (b) I and
X; (c)X and I. Is the tensor product commutative?
Solution
Concepts Involved: Linear Algebra, Tensor Products, Kronecker Products.
(a)
" # " #
" # 0 1 0
1
1 0 0 0 1 0
0Z 1Z
0 −1 0 −1 0
0 0 −1
X ⊗Z = = " =
# " #
1Z 0Z 1 0 0 0
1 0 1 0
1 0 −1
0 −1 0 −1 0 0 0
22
(b)
" # " #
# 1 0 1 0 1 0 1 0 0
"
1 0 0
1X 0X 1 0 1
0 0 0
I ⊗X = = " =
# " #
0X 1X 0 0 0 1
0 1 0 1
0 1
1 0 1 0 0 0 1 0
(c)
" # " #
" # 0 1 0
1
1 0 0 0 1 0
0 1 0 1
0I 1I 0 0 0 1
X ⊗I = = " =
# " #
1I 0I 1 0 0 0
1 0 1 0
1 0
0 1 0 1 0 1 0 0
Comparing (b) and (c), we conclude that the tensor product is not commutative.
Exercise 2.28
Show that the transpose, complex conjugation and adjoint operations distribute over the tensor product,
Solution
Concepts Involved: Linear Algebra, Adjoints, Tensor Products, Kronecker Products.
. . . . . . . .
Am1 B Am2 B . . . Amn B A∗m1 B ∗ A∗m2 B ∗ ... A∗mn B ∗
T
A11 B A12 B ... A1n B A11 B T A21 B T ... An1 B T
A21 B A22 B ... A2n B A12 B T A22 B ... An2 B T
(A ⊗ B)T = = AT ⊗ B T .
.. .. .. .. = .. .. .. ..
. . . . . . . .
Am1 B Am2 B . . . Amn B A1m B T A2m B T ... Anm B T
The relation for the distributivity of the hermitian conjugate over the tensor product then follows from the
former two relations:
23
Exercise 2.29
Show that the tensor product of two unitary operators is unitary.
Solution
Concepts Involved: Linear Algebra, Unitary Operators, Tensor Products
Suppose A, B are unitary. Then, A† A = I and B † B = I. Using the result of the Exercise 2.28, we then
have that:
Exercise 2.30
Show that the tensor product of two Hermitian operators is Hermitian.
Solution
Concepts Involved: Linear Algebra, Hermitian Operators, Tensor Products
Suppose A, B are Hermitian. Then, A† = A and B † = B. Then, using the result of Exercise 2.28, we
have:
(A ⊗ B)† = A† ⊗ B † = A ⊗ B
Exercise 2.31
Show that the tensor product of two positive operators is positive.
Solution
Concepts Involved: Linear Algebra, Positive Operators
Suppose A, B are positive operators. We then have that hv|A|vi ≥ 0 and hw|B|wi ≥ 0. Therefore, for
any |vi ⊗ |wi:
|vi ⊗ |wi, A ⊗ B(|vi ⊗ |wi) = hv|A|vihw|B|wi ≥ 0
24
Exercise 2.32
Show that the tensor product of two projectors is a projector.
Solution
Concepts Involved: Linear Algebra, Projectors
Let P1 , P2 be projectors. We then have that P12 = P1 and P22 = P2 by Exercise 2.16. Therefore:
so P1 ⊗ P2 is a projector.
Exercise 2.33
The Hadamard operator on one qubit may be written as
1
H = √ [(|0i + |1i)h0| + (|0i − |1i)h1|]
2
1 X
H ⊗n = √ (−1)x·y |xihy|
2n x,y
Solution
Concepts Involved: Linear algebra, Matrix Representation of Operators, Outer Products.
Looking at the form of the Hadamard operator on one qubit, we observe that:
1
H = √ |0ih0| + |0ih1| + |1ih0| − |1ih1|
2
Hence:
1 X
H=√ (−1)x·y |xihy|
2 x,y
Where x, y run over 0 and 1. Taking the n-fold tensor product of this expression, we get:
1 X 1 X 1 X
H⊗ = √ (−1)x·y |xihy| ⊗ √ (−1)x·y |xihy| ⊗ . . . ⊗ √ (−1)x·y |xihy|
2 x,y 2 x,y 2 x,y
1 X
=√ (−1)x·y |xihy|
2n x,y
25
Now explicitly writing H ⊗2 , we have:
1 X
H ⊗2 = √ (−1)(x·y) |xihy|
22 x,y
1 1 1 1
11 −1 1 −1
∼
=
2 1 1 −1 −1
1 −1 −1 1
Note that here, x, y are binary length 2 strings. The sum goes through all pairwise combinations of
x, y ∈ {00, 01, 10, 11}.
Exercise 2.34
Find the square root and logarithm of the matrix
" #
4 3
3 4
Solution
Concepts Involved: Linear Algebra, Spectral Decomposition, Operator Functions
We begin by diagonalizing the matrix (which we call A) as to be able to apply the definition of oper-
ator functions. By inspection, A is Hermitian as it is equal to its conjugate transpose, so the spectral
decomposition exists. Solving for the eigenvalues, we consider the characterstic equation:
" #
4−λ 3
det(A − λI) = 0 =⇒ det = 0 =⇒ (4 − λ)2 − 9 = 0 =⇒ λ2 − 8λ + 7 = 0
3 4−λ
Using the quadratic equation, we get λ1 = 1, λ2 = 7. Using this to find the eigenvectors of the matrix,
we have:
" #" #
4−1 3 v11
= 0 =⇒ v11 = 1, v12 = −1
3 4 − 1 v12
" #" #
4−7 3 v21
= 0 =⇒ v21 = 1, v22 = 1
3 4 − 7 v22
26
Hence our normalized eigenvectors are:
" # " #
√1 √1
|v1 i = 2 , |v2 i = 2
−1
√ √1
2 2
Let v be any real, three-dimensional unit vector and θ a real number. Prove that
Solution
Concepts Involved: Linear Algebra, Spectral Decomposition, Operator Functions.
Recall that σ1 ≡ X, σ2 ≡ Y , and σ3 ≡ Z.
In order to compute the complex exponential of this matrix, we will want to find its spectral decomposition.
27
Using the characterstic equation to find the eigenvalues, we have:
" #
v3 − λ v1 − iv2
det(v · σ − Iλ) = 0 =⇒ det =0
v1 + iv2 −v3 − λ
=⇒ (v3 − λ)(−v3 − λ) − (v1 − iv2 )(v1 + iv2 ) = 0
=⇒ λ2 − v32 − v12 − v22 = λ2 − (v12 + v22 + v32 ) = 0
=⇒ λ2 − 1 = 0
=⇒ λ1 = 1, λ2 = −1
where in the second-to-last implication we use the fact that v is a unit vector. Letting |v1 i, |v2 i be the
associated eigenvectors, v · σ has spectral decomposition:
Where in the last line we use the completeness relation and the spectral decomposition.
Exercise 2.36
Show that the Pauli matrices except for I have trace zero.
Solution
Concepts Involved: Linear Algebra, Trace.
We have that:
" #
0 1
tr(X) = tr =0+0=0
1 0
" #
0 −i
tr(Y ) = tr =0+0=0
i 0
" #
1 0
tr(Z) = tr =1−1=0
0 −1
28
Exercise 2.37: Cyclic property of the trace
tr(AB) = tr(BA)
Solution
Concepts Involved: Linear Algebra, Trace.
P
Let A, B be linear operators. Then, C = AB has matrix representation with entries Cij = k Aik Bkj
P
and D = BA has matrix representation with entries Dij = k Bik Akj . We then have that:
X XX XX X
tr(AB) = tr(C) = Cii = Aik Bki = Bki Aik = Dkk = tr(D) = tr(BA)
i i k k i k
tr(zA) = z tr(A).
Solution
Concepts Involved: Linear Algebra, Trace.
X X
tr(zA) = (zA)ii = z Aii = z tr(A)
i i
29
Exercise 2.39: The Hilbert-Schmidt inner product on operators
The set LV of linear operators on Hilbert space V is obviously a vector space - the sum of two linear
operators is a linear operator, zA is a linear operator if A is a linear operator and z is a complex number,
and there is a zero element 0. An important additional result is that the vector space LV can be given a
natural inner product structure, turning it into a Hilbert space.
is an inner product function. This inner product is known as the Hilbert-Schmidt or trace inner
product.
(3) Find an orthonormal basis of Hermitian matrices for the Hilbert space LV .
Solution
Concepts Involved: Linear Algebra, Trace, Inner Products, Hermitian Operators, Bases
(1) We show that (·, ·) satisfies the three properties of an inner product. Showing that it is linear in the
second argument, we have that:
X X X X
A, λi Bi = trA λi Bi = λi tr(ABi ) = λi (A, Bi )
i i i i
where in the second to last equality we use the result of Exercise 2.38. To see that it is conjugate-
symmetric, we have that:
∗
(A, B) = tr A† B = tr (B † A)† = tr B † A = (B, A)∗
(2) Suppose V has d dimensions. Then, the elements of LV which consist of linear operators A : V 7→ V
have representations as d × d matrices. There are d2 such linearly independent matrices (take the
matrices with 1 in one of the d2 entries and 0 elsewhere), and we conclude that LV has d2 linearly
independent vectors and hence dimension d2 .
(3) As discussed in the previous part of the question, one possible basis for this vector space would
be |vi ihvj | where |vk i form an orthonormal basis of V with i, j ∈ {1, . . . d}. These of course are
just matrices with 1 in one entry and 0 elsewhere. It is easy to see that this is a basis as for any
30
P
A ∈ LV we can write A = ij λij |vi ihvj |. We can verify that these are orthonormal; suppose
|vi1 ihvj1 | =
6 |vi2 ihvj2 |. Then, we have that:
|vi1 ihvj1 | , |vi2 ihvj2 | = tr ( |vi1 ihvj1 |)† |vi2 ihvj2 |
= tr |vj1 ihvi1 |vi2 ihvj2 |
If |vi1 i =
6 |vi2 i, then the above expression reduces to tr(0) = 0. If |vi1 i = |vi2 i, then it follows that
|vj1 i =
6 |vj2 i (else this would contradict |vi1 ihvj1 | =
6 |vi2 ihvj2 |) and in this case we have that:
|vi1 ihvj1 | , |vi2 ihvj2 | = tr |vj1 ihvi1 |vi2 ihvj2 |
= tr |vj1 ihvj2 |
=0
So we therefore have that the inner product of two non-identical elements in the basis is zero.
Furthermore, we have that:
|vi1 ihvj1 | , |vi1 ihvj1 | = tr |vi1 ihvj1 | |vi1 ihvj1 | = tr |vi1 ihvi1 | = 1
so we confirm that this basis is orthonormal. However, evidently this basis is not Hermitian as if
i 6= j, then ( |vi ihvj |)† = |vj ihvi | 6= |vi ihvj |. To fix this, we can modify our basis slightly. We keep
the diagonal entries as is (as these are indeed Hermitian!) but for the off-diagonals, we replace every
pair of basis vectors |vi ihvj |, |vj ihvi | with:
It now suffices to show that these new vectors (plus the diagonals) form a basis and are orthonormal.
To see that these form a basis, observe that:
1 |vi ihvj | + |vj ihvi | i |vi ihvj | − |vj ihvi |
√ √ −√ i √ = |vi ihvj |
2 2 2 2
1 |vi ihvj | + |vj ihvi | i |vi ihvj | − |vj ihvi |
√ √ +√ i √ = |vj ihvi |
2 2 2 2
and since we know that |vi ihvj | for all i, j ∈ {1, . . . d} form a basis, this newly defined set of vectors
must be a basis as well. Furthermore, since the new basis vectors are constructed from orthogonal
|vi ihvj |, the newly defined vectors will be orthogonal to each other if i1 , j1 6= i2 , j2 . The only things
31
left to check is that for any choice of i, j that:
are orthogonal, and that these vectors are normalized. Checking the orthogonality, we have:
!
|vi ihvj | + |vj ihvi | |vi ihvj | − |vj ihvi | |vi ihvj | − |vj ihvi |
|vi ihvj | + |vj ihvi |
√ ,i √ = tr √ i √
2 2 2 2
i
= √ tr |vj ihvj | − |vi ihvi |
2
= 0.
!
|vi ihvj | − |vj ihvi | |vi ihvj | − |vj ihvi | |vi ihvj | − |vj ihvi | |vi ihvj | − |vj ihvi |
i √ ,i √ = tr i √ i √
2 2 2 2
1
= − tr − |vi ihvi | − |vj ihvj |
2
=1
There is an elegant way of writing this using jkl , the antisymmetric tensor on three indices, for which
jkl = 0 except for 123 = 231 = 312 = 1, and 321 = 213 = 132 = −1:
3
X
[σj , σk ] = 2i jkl σl
l=1
Solution
Concepts Involved: Linear Algebra, Commutators.
32
We verify the proposed relations via computation in the computational basis:
" #" # " #" # " # " #
0 1 0 −i 0 −i 0 1 i 0 −i 0
[X, Y ] = XY − Y X = − = − = 2iZ
1 0 i 0 i 0 1 0 0 −i 0 i
" #" # " #" # " # " #
0 −i 1 0 1 0 0 −i 0 i 0 −i
[Y, Z] = Y Z − ZY = − = − = 2iX
i 0 0 −1 0 −1 i 0 i 0 −i 0
" #" # " #" # " # " #
1 0 0 1 0 1 1 0 0 1 0 −1
[Z, X] = ZX − XZ = − = − = 2iY
0 −1 1 0 1 0 0 −1 −1 0 1 0
{σi , σj } = 0
Where i 6= j are both chosen from the set 1, 2, 3. Also verify that (i = 0, 1, 2, 3)
σi2 = I
Solution
Concepts Involved: Linear Algebra, Anticommutators.
We again verify the proposed relations via computation in the computational basis:
" #" # " #" # " # " # " #
0 1 0 −i 0 −i 0 1 i 0 −i 0 0 0
{X, Y } = XY + Y X = + = + =
1 0 i 0 i 0 1 0 0 −i 0 i 0 0
" #" # " #" # " # " # " #
0 −i 1 0 1 0 0 −i 0 i 0 −i 0 0
{Y, Z} = Y Z + ZY = + = + =
i 0 0 −1 0 −1 i 0 i 0 −i 0 0 0
" #" # " #" # " # " # " #
1 0 0 1 0 1 1 0 0 1 0 −1 0 0
{Z, X} = ZX + XZ = + = + = .
0 −1 1 0 1 0 0 −1 −1 0 1 0 0 0
This proves the first claim as {A, B} = AB + BA = BA + AB = {B, A} and the other 3 relations are
33
equivalent to the ones already proven. Verifying the second claim, we have:
" #" # " #
1 0 1 0 1 0
I2 = =
0 1 0 1 0 1
" #" # " #
2 0 1 0 1 1 0
X = =
1 0 1 0 0 1
" #" # " #
2 0 −i 0 −i 1 0
Y = =
i 0 i 0 0 1
" #" # " #
2 1 0 1 0 1 0
Z = =
0 −1 0 −1 0 1
Remark: Note that we can write this result consicely as {σj , σk } = 2δij I
Exercise 2.42
Verify that
[A, B] + {A, B}
AB =
2
Solution
Concepts Involved: Linear Algebra, Commutators, Anticommutators.
Exercise 2.43
Show that for j, k = 1, 2, 3,
3
X
σj σk = δjk I + i jkl σl .
l=1
Solution
Concepts Involved: Linear Algebra, Commutators, Anticommutators.
34
Applying the results of Exercises 2.40, 2.41, and 2.42, we have:
[σj , σk ] + {σj , σk }
σj σk =
2
P3
2i l=1 jkl σl + 2δij I
=
2
X3
= δij I + i jkl σl
l=1
Exercise 2.44
Solution
Concepts Involved: Linear Algebra, Commutators, Anticommutators.
[A, B] = AB − BA = 0
{A, B} = AB + BA = 0.
2AB = 0 =⇒ AB = 0.
A−1 AB = A−1 0 =⇒ IB = 0 =⇒ B = 0.
Exercise 2.45
Solution
Concepts Involved: Linear Algebra, Commutators, Adjoints.
35
Exercise 2.46
Solution
Concepts Involved: Linear Algebra, Commutators
Exercise 2.47
Solution
Concepts Involved: Linear Algebra, Commutators, Hermitian Operators
Suppose A, B are Hermitian. Using the results of Exercises 2.45 and 2.46, we have:
Exercise 2.48
What is the polar decomposition of a positive matrix P ? Of a unitary matrix U ? Of a Hermitian matrix,
H?
Solution
Concepts Involved: Linear Algebra, Polar Decomposition, Positive Operators, Unitary Operators, Her-
mitian Operators
If P is a positive matrix, then no calculation is required; P =√IP = P I√is the polar decomposition
√ (as I is
√
unitary and P is positive). If U is a unitary matrix, then J = U † U = I = I and K = U U † = I = I
so the polar decomposition is U = U I = IU (where U is unitary and I is positive). If H is hermitian, we
then have that:
√ √
sX X
J = H †H = H 2 = λ2i |iihi| = |λi | |iihi|
i i
√
and K = HH † = i |λi | |iihi| in the same way. Hence the polar decomposition is H = U i |λi | |iihi| =
P P
P
i |λi | |iihi| U .
36
Exercise 2.49
Express the polar decomposition of a normal matrix in the outer product representation.
Solution
Concepts Involved: Linear Algebra, Polar Decomposition, Outer Products
P
Let A be a normal matrix. Then, A has spectral decomposition A = i λi |iihi|. Therefore, we have that:
XX XX X 2
A† A = AA† = λi λ∗i0 |iihi| i0 i0 = λi λ∗i0 |iihi0 | δii0 = |λi | |iihi|
i i0 i i0 i
P
and K = i |λi | |iihi| identically. Furthermore, U is unitary, so it also has a spectral decomposition of
P
j µj |jihj|. Hence we have the polar decomposition in the outer product representation as:
A = U J = KU
X X X X
A=U |λi | |iihi| = |λi | |iihi| U
i j i j
XX XX
A= µj |λi ||jihj|iihi| = |λi |µj |iihi|jihj|
j i i j
Exercise 2.50
Find the left and right polar decompositions of the matrix
" #
1 0
1 1
Solution
Concepts Involved: Linear Algebra, Polar Decomposition.
" #
1 0 √
Let A = . We start with the left polar decomposition, and hence find J = A† A. In order to do
1 1
37
this, we find the spectral decompositions of A† A and AA† .
" #" # " # " #
1 1 1 0 λ 0 = 0 =⇒ det 2 − λ 1
det A† A − Iλ = 0 =⇒ det − =0
0 1 1 1 0 λ 1 1−λ
=⇒ λ2 − 3λ + 1 = 0
√ √
3+ 5 3− 5
=⇒ λ1 = , λ2 =
2 2
Solving for the eigenvectors, we have:
" √ # " √ #
2 − 3+2 5 1 √ 1+ 5
|v1 i = 0 =⇒ |v1 i =
1 1 − 3+2 5 2
" √ # " √ #
2 − 3−2 5 1 √ 1− 5
|v2 i = 0 =⇒ |v2 i =
1 1 − 3−2 5 2
Normalizing, we get:
√ #
" √ #
"
1 1+ 5 1 1− 5
|v1 i = p √ , |v2 i = p √
10 + 2 5 2 10 − 2 5 2
The last equality is not completely trivial, but the algebra is tedious so we invite the reader to use a
symbolic calculator, as we have. We make the observation that:
A = U J =⇒ U = AJ −1
So calculating J −1 , we have:
" #
−1 1 1 1 2 −1
J = √ |v1 ihv1 | + √ |v2 ihv2 | = √
λ1 λ2 5 −1 3
Where we again have used the help of a symbolic calculator. Calculating U , we then have that:
" # " # " #
−1 1 0 1 2 −1 1 2 −1
U = AJ = √ =√
1 1 5 −1 3 5 1 2
38
Hence the left polar decomposition of A is given by:
" # " #
1 2 −1 1
√ 3 1
A = UJ = √
5 1 2 5 1 2
We next solve for the right polar decomposition. We could repeat the procedure of solving for the spectral
decomposition of AA† , but we take a shortcut; since we know the K that satisfies:
A = KU
will be unique, and U is unitary, we can simply multiply both sides of the above equation on the right by
U −1 = U † to obtain K. Hence:
" # " # " #
† 1 0 1 2 1 1 2 1
K = AU = √ =√ .
1 1 5 −1 2 5 1 3
Exercise 2.51
Verify that the Hadamard gate H is unitary.
Solution
Concepts Involved: Linear Algebra, Unitary Operators
We observe that:
" # " # " #
† 1 1 1 1 1 1 1 0
H H=√ √ =
2 1 −1 2 1 −1 0 1
Remark: The above calculation shows that H is also Hermitian and Idempotent.
Exercise 2.52
Verify that H 2 = I.
39
Solution
Concepts Involved: Linear Algebra
Exercise 2.53
What are the eigenvalues and eigenvectors of H?
Solution
Concepts Involved: Linear Algebra, Eigenvalues, Eigenvectors
=⇒ λ1 = 1, λ2 = −1
Normalizing, we have:
" # " #
1 1+ √1 1 −1 + √1
|v1 i = p 2 , |v2 i = p 2
√ √1
√ √1
2+ 2 2 2− 2 2
Exercise 2.54
Suppose A and B are commuting Hermitian operators. Prove that exp(A) exp(B) = exp(A + B). (Hint:
Use the results of Section 2.1.9.)
Solution
Concepts Involved: Linear Algebra, Operator Functions, Simultaneous Diagonalization
Since A, B commute, they can be simulatneously diagonalized; that is, there exists some orthonormal
P P
basis |ii of V such that A = i ai |iihi| and B = i bi |iihi|. Hence, using the definition of operator
40
functions, we have that:
X X
exp(A) exp(B) = exp ai |iihi| exp bi0 |i0 ihi0 |
i i0
XX
= exp(ai ) exp(bi0 )|iihi|i0 ihi0 |
i i0
XX
= exp(ai ) exp(bi0 )|iihi0 |δii0
i i0
X
= exp(ai ) exp(bi ) |iihi|
i
X
= exp(ai + bi ) |iihi|
i
X
= exp (ai + bi ) |iihi|
i
= exp(A + B)
Exercise 2.55
Solution
Concepts Involved: Linear Algebra, Unitary Operators, Spectral Decomposition, Operator Functions.
Since the Hamiltonian H is Hermitian, it is normal and hence has spectral decomposition:
X
H= E |EihE|
E
where all E are real by the Hermicity of H, and |Ei is an orthonormal basis of the Hilbert space. We
then have that:
P
−iH(t2 − t1 ) −i E E |EihE| (t2 − t1 )
U (t1 , t2 ) ≡ exp = exp
~ ~
X −iE(t2 − t1 )
= exp |EihE|
~
E
41
Hence calculating U † (t1 , t2 ) we have:
†
!∗
†
X −iE(t2 − t 1 ) X −iE(t 2 − t1 ) †
U (t1 , t2 ) = exp |EihE| = exp |EihE|
~ ~
E E
X iE(t2 − t1 )
= exp |EihE|
~
E
=I
where in the second equality we use the fact that the eigenstates are orthogonal. We conclude that U is
unitary.
Exercise 2.56
Use the spectral decomposition to show that K ≡ −i log(U ) is Hermitian for any unitary U , and thus
U = exp(iK) for some Hermitian K.
Solution
Concepts Involved: Linear Algebra, Hermitian Operators, Unitary Operators, Spectral Decomposition,
Operator Functions.
where |ji are eigenvectors of U with eigenvalues λj , and |ji forms an orthonormal basis of the Hilbert
space. By Exercise 2.18, all eigenvalues of unitary operators have eigenvalues of modulus 1, so we can let
λj = exp iθj where θj ∈ R and hence write the above as:
X
U= exp iθj |jihj|
j
42
We then have that:
X X X
K ≡ −i log(U ) = −i log exp iθj |jihj| = −i log exp iθj |jihj| = −i(iθj ) |jihj|
j j j
X
= θj |jihj|
j
as the θj s are real and (|jihj|)† = |jihj|. Hence K is Hermitian. Then, multiplying both sides in
K = −i log(U ) by i and exponentiating both sides, we obtain the desired relation.
Suppose {Ll } and {Mm } are two sets of measurement operators. Show that a measurement defined
by the measurement operators {Ll } followed by a measurement defined by the measurement operators
{Mm } is physically equivalent to a single measurement defined by measurement operators {Nlm } with
the representation Nlm ≡ Mm Ll .
Solution
Concepts Involved: Linear Algebra, Quantum Measurement.
Suppose we have (normalized) initial quantum state |ψ0 i. Then, the state after measurement of Ll is
given by definition to be:
Ll |ψ0 i
|ψ0 i 7→ |ψ1 i = q .
hψ0 |L†l Ll |ψ0 i
43
Conversely, the state of |ψ0 i after measurement of Nlm = Mm Ll is given by:
Mm Ll |ψ0 i
|ψ0 i 7→ |ψ3 i = q .
hψ0 |L†l Mm
†
Mm Ll |ψ0 i
We see that |ψ2 i = |ψ3 i (that is, the cascaded measurment produces the same result as the single
measurement), proving the claim.
Exercise 2.58
Suppose we prepare a quantum system in an eigenstate |ψi of some observable M with corresponding
eigenvalue m. What is the average observed value of M , and the standard deviation?
Solution
Concepts Involved: Linear Algebra, Quantum Measurement, Expectation, Standard Deviation.
Where in the second equality we use that |ψi is an eigenstate of M with eigenvalue m, and in the last
equality we use that |ψi is a normalized quantum state. Next, calculating M 2 |ψi , we have:
D E
M2 = hψ|M 2 |ψi = hψ|M M |ψi = hψ|M † M |ψi = hψ|m∗ m|ψi = hψ|m2 |ψi = m2 hψ|ψi = m2 .
|ψi
Note that we have used the fact that M is Hermitian (it is an observable) to use that M † = M and
m∗ = m as all eigenvalues of Hermitian operators are real. Now calculating the standard deviation, we
have:
q
2
p
∆(M ) = hM 2 i − hM i = m2 − (m)2 = 0
Exercise 2.59
Suppose we have qubit in the state |0i, and we measure the observable X. What is the average value of
X? What is the standard deviation of X?
Solution
Concepts Involved: Linear Algebra, Quantum Measurement, Projective Measurement, Expectation, Stan-
dard Deviation.
44
Next calculating X 2 |0i
, we have:
D E
X2 = h0|XX|0i = h1|1i = 1
|0i
Exercise 2.60
Show that v · σ has eigenvalues ±1, and that the projectors into the corresponding eigenspaces are given
by P± = (I ± v · σ)/2.
Solution
Concepts Involved: Eigenvalues, Projectors.
Let |vi be a unit vector. We already showed in Exercise 2.35 that v · σ has eigenvalues λ+ = 1, λ− = −1.
We next prove a general statement; namely, that for a observable on a 2-dimensional Hilbert space with
eigenvalues λ± = ±1 has projectors
I ±O
P± =
2
To see this is the case, let P+ = |o+ iho+ |, P− = |o− iho− |, I = |o+ iho+ | + |o− iho− |, and O =
|o+ iho+ | − |o− iho− |. We then have that:
I ±v·σ
P± =
2
as claimed.
Exercise 2.61
Calculate the probability of obtaining the result +1 for a measurement of v · σ, given that the state prior
to measurement is |0i. What is the state of the system after measurement if +1 is obtained?
45
Solution
Concepts Involved: Quantum Measurement, Projective Measurement.
I +v·σ
p(+) = h0|P+ |0i = h0| |0i
2
We recall from from Exercise 2.35 that:
" #
v3 v1 − iv2
v·σ = = v3 |0ih0| + (v1 − iv2 ) |0ih1| + (v1 + iv2 ) |1ih0| − v3 |1ih1| .
v1 + iv2 −v3
Exercise 2.62
Show that any measurement where the measurement operators and the POVM elements coincide is a
projective measurement.
Solution
Concepts Involved: Quantum Measurement, Projective Measurement, POVM Measurement.
Suppose we have that the measurement operators Mm are equal to the POVM elements Em . In this case,
we have that:
†
Mm = Em ≡ Mm Mm
†
Mm Mm is positive by Exercise 2.25, so it follows that Mm is positive and hence Hermitian by Exercise
†
2.24. Hence, Mm = Mm , and therefore:
† 2
Mm = Mm Mm = M m
46
From which we conclude that Mm are projective measurement operators.
Exercise 2.63
Suppose a measurement is described by measurement operators Mm . Show that there exist unitary
√
operators Um such that Mm = Um Em , where Em is the POVM associated to the measurement.
Solution
Concepts Involved: Quantum Measurement, POVM Measurement, Polar Decomposition.
Since Mm is a linear operator, by the left polar decomposition there exists unitary U such that:
q
†
p
M m = U Mm Mm = U Em ,
†
where in the last equality we use that Mm Mm = Em .
Exercise 2.64
(∗) Suppose Bob is given a quantum state chosen from a set |ψ1 i , . . . , |ψm i of linearly independent
states. Construct a POVM {E1 , E2 , . . . , Em+1 } such that if outcome Ei occurs, 1 ≤ i ≤ m, then Bob
knows with certainty that he was given the state |ψi i. (The POVM must be such that hψi |Ei |ψi i > 0
for each i.)
Solution
Concepts Involved: POVM Measurement, Orthogonality
Let H be the Hilbert space where the given states lie, and let V be the m-dimensional subspace spanned
by |ψ1 i, . . . , |ψm i. For each i ∈ {1, . . . , m}, let Wi be the subspace of V spanned by |ψj i : j 6= i . Let
Wi⊥ be the orthogonal complement of Wi which consists of all states in H orthogonal to all states in Wi .
We then have that any vector in V can be written as the sum of a vector in Wi and Wi⊥ ∩ V (see for
example Theorem 6.47 in Axler’s Linear Algebra Done Right). Therefore, for any |ψi i we can write:
|pi ihpi |
Where |wi i ∈ Wi and |pi i ∈ Wi⊥ ∩ V . Define Ei = m . By construction, we have that for any
|ψi ∈ H:
2
hψ|pi i
hψ|Ei |ψi = ≥0
m
Pm
so the Ei s are positive are required. Furthermore, defining Ei+1 = I − i=1 Ei we again see that for any
|ψi ∈ H:
m m m
X X X 1
hψ|Ei+1 |ψi = hψ|I|ψi − hψ|Ei |ψi = 1 − hψ|Ei |ψi ≥ 1 − =0
i=1 i=1 i=1
m
47
so Ei+1 is also positive as required. Finally, to see that the E1 , . . . Em have the desired properties, observe
by construction that since |pi i ∈ Wi⊥ ∩ V , it follows that hψj |pi i = 0 for any j 6= i (as the |pi i will be
orthogonal to all the vectors in |ψj i : j 6= i by construction). Calculating hψi |Ei |ψi i, we observe that:
2
|pi ihpi | hpi |pi i 1
hψi |Ei |ψi i = hwi | + hpi | |wi i + |pi i = = ≥0
m m m
so if Bob measures Ei , he can be certain that he was given the state |ψi i.
Exercise 2.65
√ √
Express the states (|0i + |1i)/ 2 and (|0i − |1i)/ 2 is a basis in which they are not the same up to a
relative phase shift.
Solution
Concepts Involved: Linear Algebra, Phase
√ √
Let us define our basis to be |+i := (|0i + |1i)/ 2 and |−i := (|0i − |1i)/ 2. Our two states are then
just the basis vectors of this basis (|+i, |−i) and are not the same up to relative phase shift.
Exercise 2.66
Show that the√ average value of the observable X1 Z2 for a two qubit system measured in the state
(|00i + |11i)/ 2 is zero.
Solution
Concepts Involved: Quantum Measurement, Expectation, Composite Systems
48
Exercise 2.67
Suppose V is a Hilbert space with a subspace W . Suppose U : W 7→ V is a linear operator which
preserves inner products, that is, for any |w1 i and |w2 i in W ,
Prove that there exists a unitary operator U 0 : V 7→ V which extends U . That is, U 0 |wi = U |wi for all
|wi in W , but U 0 is defined on the entire space V . Usually we omit the prime symbol 0 and just write U
to denote the extension.
Solution
Concepts Involved: Linear Algebra, Inner Products, Unitary Operators
By assumption we have that U is unitary on W as hw1 |U † U |w2 i = hw1 |w2 i and hence U † U = IW .
Hence, it has spectral decomposition:
X
U= λj |jihj|
j
where |ji is an orthonormal basis of the subspace W . Then, let |ji ∪ |ii be an orthnormal basis
of the full space V . We then define:
X X X
U0 = λj |jihj| + |iihi| = U + |iihi|
j i i
where in the last line we use that hi|wi = 0 as |ii are not in the subspace W . Finally, verifying the
unitarity of U 0 we have that:
X X X X
U 0† U 0 = λ∗j |jihj| + |iihi| λj |jihj| + |iihi|
j i j0 i0
XX XX XX XX
= |jihj|j 0 ihj 0 | + |jihj|i0 ihi0 | + |iihi|j 0 ihj 0 | + |iihi|i0 ihi0 |
j j0 j i0 i j0 i i0
XX XX
= hj|j 0 iδjj 0 + hi|i0 iδii0
j j0 i i0
X X
= |jihj| + |iihi|
j i
=I
49
Exercise 2.68
Solution
Concepts Involved: Linear Algebra, Composite Systems, Entanglement.
Recall that:
|00i + |11i
|ψi = √
2
Suppose for the take of contradiction that |ψi = |ai|bi for some single qubit states |ai and |bi. Then, we
2 2
have that |ai = α|0i + β|1i and |bi = γ|0i + δ|1i for some α, β, γ, δ ∈ C such that |α| + |β| = 1 and
2 2
|γ| + |δ| = 1. We then have that:
Where we have used the linearity of the tensor product (though we supress the ⊗ symbols in the above
expression). We then have that:
|00i + |11i
|ψi = √ = αγ|00i + αδ|01i + βγ|10i + βδ|11i
2
which forces αδ = 0 and βγ = 0. However, we then have that at least one of αγ or βδ is also zero, and
we thus reach a contradiction.
Exercise 2.69
Verify that the Bell basis forms an orthonormal basis for the two qubit state space.
Solution
Concepts Involved: Linear Algebra, Orthogonality, Bases, Composite Systems.
Recall that the bell basis is given by:
50
We first verify orthonormality. We observe that:
h00| + h11| |00i + |11i 1
hB00 |B00 i = √ √ = h00|00i + h00|11i + h11|00i + h11|11i = 1
2 2 2
h00| + h11| |00i − |11i 1
hB00 |B01 i = √ √ = h00|00i − h00|11i + h11|00i − h11|11i = 0
2 2 2
h00| + h11| |01i + |10i 1
hB00 |B10 i = √ √ = h00|01i + h00|10i + h11|01i + h11|10i = 0
2 2 2
h00| + h11| |01i − |10i 1
hB00 |B11 i = √ √ = h00|01i − h00|10i + h11|01i − h11|10i = 0
2 2 2
h00| − h11| |00i − |11i 1
hB01 |B01 i = √ √ = h00|00i − h00|11i − h11|00i + h11|11i = 1
2 2 2
h00| − h11| |01i + |10i 1
hB01 |B10 i = √ √ = h00|01i + h00|10i − h11|01i − h11|10i = 0
2 2 2
h00| − h11| |01i − |10i 1
hB01 |B11 i = √ √ = h00|01i − h00|10i − h11|01i + h11|10i = 0
2 2 2
h01| + h10| |01i + |10i 1
hB10 |B10 i = √ √ = h01|01i + h01|10i + h10|01i + h10|10i = 1
2 2 2
h01| + h10| |01i − |10i 1
hB10 |B11 i = √ √ = h01|01i − h01|10i + h10|01i − h10|10i = 0
2 2 2
h01| − h10| |01i − |10i 1
hB11 |B11 i = √ √ = h01|01i − h01|10i − h10|01i + h10|10i = 1
2 2 2
so orthonormality is verified. We know show that it is a basis. Recall that we can write any vector |ψi in
the 2 qubit state space as:
2 2 2 2
where α, β, γ, δ ∈ C and |α| + |β| + |γ| + |δ| = 1. We then observe that this is equivalent to:
α+δ α−δ β+γ β−γ
√ |B00 i + √ |B01 i + √ |B10 i + √ |B11 i (∗)
2 2 2 2
as:
α+δ |00i + |11i α − δ |00i − |11i β + γ |01i + |10i β − γ |01i − |10i
√ √ + √ √ + √ √ + √ √
2 2 2 2 2 2 2 2
α α δ δ α α δ δ
= + + − |00i + − + + |11i
2 2 2 2 2 2 2 2
β β γ γ β β γ γ
+ + + − |01i + − + + |10i
2 2 2 2 2 2 2 2
= α|00i + β|01i + γ|10i + δ|11i = |ψi
51
Exercise 2.70
Suppose E is any positive operator acting on Alice’s qubit Show that hψ|E ⊗ I|ψi takes the same value
when |ψi is any of the four Bell states. Suppose some malevolent third party (‘Eve’) intercepts Alice’s
qubit on the way to Bob in the superdense coding protocol. Can Eve infer anything about which of the
four possible bit strings 00, 01, 10, 11 Alice is trying to send? If so, how, or if not, why not?
Solution
Concepts Involved: Linear Algebra, Superdense Coding, Quantum Measurement
Let E be a positive operator. We have that E for a single qubit can be written as a linear combination
of the Pauli matrices:
E = a1 I + a2 X + a3 Y + a4 Z
To see that this is the case, consider that the vector space of linear operators acting on a single qubit
has dimension 4 (one easy way to see this is that the matrix representations of these operators have 4
entries). Hence, any set of 4 linearly independent linear operators form a basis for the space. As I, X, Y, Z
are linearly independent, it follows that they form a basis of the space of linear operators on one qubit.
Hence any E can be written as above (Remark: the above decomposition into Paulis is possible regardess
of whether E is positive or not).
We then have that:
h00| + h11| |00i + |11i
hB00 |E ⊗ I|B00 i = √ E⊗I √
2 2
h00| + h11| |00i + |11i
= √ (a1 I + a2 X + a3 Y + a4 Z) ⊗ I √
2 2
h00| + h11| |00i + |11i |10i + |01i i|10i − i|01i |00i − |11i
= √ a1 √ + a2 √ + a3 √ + a4 √
2 2 2 2 2
1
= (a1 + a1 + a4 − a4 )
2
= a1
where in the second last equality we use the orthonormality of |00i, |01i, |10i, |11i . Repeating the same
process for the other Bell states, we have:
h00| − h11| |00i − |11i
hB01 |E ⊗ I|B01 i = √ (a1 I + a2 X + a3 Y + a4 Z) ⊗ I √
2 2
h00| − h11| |00i − |11i |10i − |01i i|10i + i|01i |00i + |11i
= √ a1 √ + a2 √ + a3 √ + a4 √
2 2 2 2 2
1
= (a1 + a1 + a4 − a4 )
2
= a1
52
h01| + h10| |01i + |10i
hB10 |E ⊗ I|B10 i = √ (a1 I + a2 X + a3 Y + a4 Z) ⊗ I √
2 2
h01| + h10| |01i + |10i |11i + |00i i|11i − i|00i |01i − |10i
= √ a1 √ + a2 √ + a3 √ + a4 √
2 2 2 2 2
1
= (a1 + a1 + a4 − a4 )
2
= a1
h01| − h10| |01i − |10i
hB01 |E ⊗ I|B01 i = √ (a1 I + a2 X + a3 Y + a4 Z) ⊗ I √
2 2
h01| − h10| |01i − |10i |11i − |00i i|11i + i|00i |01i + |10i
= √ a1 √ + a2 √ + a3 √ + a4 √
2 2 2 2 2
1
= (a1 + a1 + a4 − a4 )
2
= a1
Now, suppose that Eve intercepts Alice’s qubit. Eve cannot infer anything about which of the four
possible bit strings that Alice is trying to send, as any single-qubit measurement that Eve can perform on
the intercepted qubit will return the value:
hψ|M † M ⊗ I|ψi
Where M is the (single-qubit) measurement operator. But, M † M is positive, so by the above argument,
the measurement outcome will be the same regardless of which Bell state |ψi is. Hence, Eve cannot obtain
the information about the bit string.
Solution
Concepts Involved: Linear Algebra, Trace, Density Operators, Pure States, Mixed States.
Recall that a density operator ρ is pure if:
ρ = |ψihψ|
where pi ≥ 0 (due to positivity) and |ii are orthonormal. Furthermore, by the property of density operators,
53
we have that tr(ρ) = 1, hence:
X X X
tr(ρ) = tr pi |iihi| = pi tr |iihi| = pi = 1
i i i
where in the second equality we use the linearity of the trace. We obtain that 0 ≤ pi ≤ 1 for each i.
Calculating ρ2 , we have that:
X X XX XX X
ρ2 = pi |iihi| pi0 |i0 ihi0 | = pi pi0 |iihi|i0 ihi| = pi pi0 |iihi0 | δii0 = p2i |iihi|
i i0 i i0 i i0 i
Hence:
X X 2 X
tr ρ2 = p2i tr |iihi| = pi ≤ pi = 1
i i i
where in the inequality we use the fact that p2i ≤ pi as 0 ≤ pi ≤ 1. The inequality becomes an equality
when p2i = pi , that is, when pi = 0 or pi = 1. In order for tr(ρ) = 1 to hold, we have that pi = 1 for
one i and zero for all others. Hence, ρ in this case is a pure state. Conversely, suppose ρ is a pure state.
Then:
tr ρ2 = tr |ψihψ|ψi hψ| = tr |ψihψ| = 1.
The Bloch sphere picture for pure states of a single qubit was introduced in Section 1.2. This description
has an important generalization to mixed states as follows.
(1) Show that an arbitrary density matrix for a mixed state qubit may be written as
I +r·σ
ρ= ,
2
Where r is a real three-dimensional vector such that krk ≤ 1. This vector is known as the Bloch
vector for the state ρ.
(2) What is the Bloch vector representation for the state ρ = I/2?
(4) Show that for pure states the description of the Bloch vector we have given coincides with that in
Section 1.2.
Solution
Concepts Involved: Linear Algebra, Trace, Density Operators, Pure States, Mixed States
54
(1) Since {I, X, Y, Z} form an basis the vector space of single-qubit linear operators, we can write (for
any ρ, regardless of whether it is a density operator or not):
ρ = a1 I + a2 X + a3 Y + a4 Z
for constants a1 , a2 , a3 , a4 ∈ C. Since ρ is a Hermitian operator, we find that each of these constants
are actually real, as:
from which we obtain that a1 = 21 . Note that in the second equality we use the linearity of the
trace, and in the third equality we use that tr(I) = 2 and tr(σi ) = 0 for i ∈ {1, 2, 3} (Exercise
2.36). Calculating ρ2 , we have that:
1 a2 a3 a4 a2
ρ2 = I + X + Y + Z + X + a22 X 2 + a2 a3 XY + a2 a4 XZ
4 2 2 2 2
a3 a4
+ Y + a3 a2 Y X + a3 Y + a3 a4 Y Z + Z + a4 a2 ZX + a4 a3 ZY + a24 Z 2
2 2
2 2
Now, using that σi , σj = 0 for i, j ∈ {1, 2, 3}, i 6= j and that σi2 = I for any i ∈ {1, 2, 3}
(Exercise 2.41), the above simplifies to:
1
ρ2 = + a22 + a23 + a24 I + a2 X + a3 Y + a4 Z
4
(2) The Bloch representation for the state ρ = I2 is the above form with r = 0. This vector corresponds
to the center of the Bloch sphere, which is a maximally mixed state (tr ρ2 is minimized, with
tr ρ2 = 12 ).
55
(3) From the calculation in part (1), we know that for any ρ:
!
2
1 + rx2 + ry2 + rz2 1 + rx2 + ry2 + rz2
tr ρ = 2 =
4 2
if krk = 1, then rx2 + ry2 + rz2 = 1. Hence, tr ρ2 = 1 and ρ is pure by Exercise 2.71. Conversely,
suppose ρ is pure. Then, tr ρ2 = 1, so:
(4) In section 1.2, we looked at states that lie on the surface of the Bloch sphere, which we parameterized
as:
θ iϕ θ
|ψi = cos |0i + e sin |1i.
2 2
1 + rz rx − iry rx + iry 1 − rz
ρ= |0ih0| + |0ih1| + |1ih0| + |1ih1|
2 2 2 2
Solving for rx , ry , rz by equating the two expressions for ρ (using Euler’s formula and sin(2θ) =
2 cos(θ) sin(θ)), we have:
2 θ
rx = cos(ϕ) sin(θ), ry = sin(ϕ) sin(θ), rz = 2 cos − 1 = cos(θ)
2
so we see that indeed, the two definitions coincide for pure states (as krk = 1).
56
Exercise 2.73
(∗) Let ρ be a density operator. A minimal ensemble for ρ is an ensemble pi , |ψi i containing a number
of elements equal to the rank of ρ. Let |ψi be any state in the support of ρ. (The support of a Hermitian
operator A is the vector space spanned by the eigenvectors of A with non-zero eigenvalues.) Show that
there is a minimal ensemble for ρ that contains |ψi, and moreover that in any such ensemble |ψi must
appear with probability
1
pi = ,
hψi | ρ−1 |ψi i
where ρ−1 is defined to be the inverse of ρ, when ρ is considered as an operator acting only on the support
of ρ. (This definition removes the problem that ρ may not have an inverse.)
Solution
Concepts Involved: Below, we will use the unitary freedom in the ensemble for density matrices which
P P
is also known as Uhlmann’s theorem. Specifically recall that ρ =
i pi |ψi ihψi | = j qj |ϕj ihϕj | for
ensembles pi , |ψi i and qj , |ϕj i if and only if
√ X √
pi |ψi i = uij qj ϕj
j
Assuming that |ψi i occurs with probability pi , we can use the Uhlmann’s theorem quoted above to arrive
at the relation
√ ?
X p √ X
pi |ψi i = uik λk |ki = pi hk|ψi i|ki,
k k
which allows us relate the elements of one of the columns (i th) of the unitary matrix to
p ? √
uik λk = pi hk|ψi i.
57
Such a relation can always be satisfied for a unitary matrix with dimension r. As u is unitary, we have
X X pi hψi |kihk|ψi i
|uik |2 = 1 =⇒ 1 =
λk
k k
X λk
=⇒ pi =
hψi |kihk|ψi i
k
1
= P 1
hψi | k λk |kihk|ψi i
1
= .
hψi |ρ−1 |ψ ii
Thus, the probability associated with the state |ψi i in the ensemble is given by
1
pi = .
hψi |ρ−1 |ψi i
Exercise 2.74
Suppose a composite of systems A and B is in the state |ai |bi, where |ai is a pure state of system A,
and |bi is a pure state of system B. Show that the reduced density operator of system A alone in a pure
state.
Solution
Concepts Involved: Linear Algebra, Density Operators, Reduced Density Operators, Partial Trace, Pure
States.
Suppose we have |ai|bi ∈ A ⊗ B. Then, the density operator of the combined system is given as
ρAB = (|ai|bi)(ha|hb|) = |aiha| ⊗ |bihb|. Calculating the reduced density operator of system A by tracing
out system B, we have
ρA = trB (ρAB ) = trB ( |aiha| ⊗ |bihb|) = |aiha| tr |bihb| = |aiha| hb|bi = |aiha| .
58
Hence we find that ρA = |aiha| is indeed a pure state.
Exercise 2.75
For each of the four Bell states, find the reduced density operator for each qubit.
Solution
Concepts Involved: Linear Algebra, Density Operators, Reduced Density Operators, Partial Trace.
59
We repeat a similar process for the other four bell states. For |B01 i, we have:
|00i − |11i h00| − h11| |00ih00| − |00ih11| − |11ih00| + |11ih11|
ρ= √ √ =
2 2 2
trB ( |00ih00|) − trB ( |00ih11|) − tr B ( |11ih00|) + tr B |11ih11|)
(
ρA =
2
|0ih0| h0|0i − |0ih1| h1|0i − |1ih0| h0|1i + |1ih1| h1|1i
=
2
I
=
2
trA ( |00ih00|) − trA ( |00ih11|) − trA ( |11ih00|) + trA ( |11ih11|)
ρB =
2
h0|0i |0ih0| + h1|0i |0ih1| + h0|1i |1ih0| + h1|1i |1ih1|
=
2
I
=
2
For |B10 i, we have:
|01i + |10i h01| + h10| |01ih01| + |01ih10| + |10ih01| + |10ih10|
ρ= √ √ =
2 2 2
trB ( |01ih01|) + trB ( |01ih10|) + trB ( |10ih01|) + trB ( |10ih10|)
ρA =
2
|0ih0| h1|+i |0ih1| h0|1i + |1ih0| h1|0i + |1ih1| h0|0i
=
2
I
=
2
B trA ( |01ih01|) + trA ( |01ih10|) + trA ( |10ih01|) + trA ( |10ih10|)
ρ =
2
h0|0i |1ih1| + h1|0i |1ih0| + h0|1i |0ih1| + h1|1i |1ih1|
=
2
I
=
2
60
Finally, for |B11 i we have:
|01i − |10i h01| − h10| |01ih01| − |01ih10| − |10ih01| + |10ih10|
ρ= √ √ =
2 2 2
trB ( |01ih01|) − tr B ( |01ih10|) − tr B ( |10ih01|) + tr B |10ih10|)
(
ρA =
2
|0ih0| h1|−i |0ih1| h0|1i − |1ih0| h1|0i + |1ih1| h0|0i
=
2
I
=
2
trA ( |01ih01|) − trA ( |01ih10|) − trA ( |10ih01|) + trA ( |10ih10|)
ρB =
2
h0|0i |1ih1| − h1|0i |1ih0| − h0|1i |0ih1| + h1|1i |1ih1|
=
2
I
=
2
Exercise 2.76
Extend the proof of the Schmidt decomposition to the case where A and B may have state space of
different dimensionality.
Solution
Concepts Involved: Schmidt Decomposition, Singular Value Decomposition.
Note that for this problem we will use a more general form of the Singular Value Decomposition than
proven in Nielsen and Chuang (that may have been encountered in a linear algebra course). Given an
arbitrary m × n rectangular matrix A, there exists an m × m unitary matrix U and n × n unitary matrix
V such that A = U ΣV where Σ is a m × n rectangular diagonal matrix with non-negative reals on the
diagonal (see https://en.wikipedia.org/wiki/Singular_value_decomposition).
Let |mi, |ni be orthonormal bases for A and B. We can then write:
X
A= amn |mi|ni
mn
for some m × n matrix of complex numbers a. Using the generalized SVD, we can write:
X
A= umi dii vin |mi|ni
min
P P
where dii is a rectangular diagonal matrix. We can then define |iA i = m umi |mi, |iB i = n uin |ni,
and λi = dii to yield the Schmidt decomposition. Note that we take i = min(m, n) and our sum only
has as many terms as the dimensionality of the smaller space.
61
Exercise 2.77
(∗) Suppose ABC is a three component quantum system. Show by example that there are quantum
states |ψi of such systems which can not be written in the form
X
|ψi = λi |iA i|iB i|iC i
i
where λi are real numbers, and |iA i, |iB i, |iC i are orthonormal bases of the respective systems.
Solution
Concepts Involved: Linear Algebra, Schmidt Decomposition.
for orthonormal bases |iA i, |iB i, |iC i. Suppose for the sake of contradiction that we could write it in this
form. We then make the observation that:
X
ρA = trBC ( |ψihψ|) = λ2i |iA ihiA |
i
X
ρB = trAC ( |ψihψ|) = λ2i |iB ihiB |
i
X
C
ρ = trAB ( |ψihψ|) = λ2i |iC ihiC | .
i
From this, we conclude that if it is possible to write |ψi in such a form, then the eigenvalues of the reduced
density matrices must all agree and be equal to λ2i . Computing the density matrix of the proposted
|ψi = |0i ⊗ |B00 i, we have:
|0ih0| + |1ih1|
ρB = trAC (ρ) = .
2
However, the former reduced density matrix has eigenvalues λ21 = 1, λ22 = 0, and the latter has λ21 = 12 ,
λ22 = 21 . This contradicts the fact that the λ2i s must match.
62
Remark: Necessary and Sufficient conditions for the tripartite (and higher order) Schmidt decompositions
can be found here https://arxiv.org/pdf/quant-ph/9504006.pdf.
Exercise 2.78
Prove that a state |ψi of a composite system AB is a product state if and only if it has a Schmidt number
1. Prove that |ψi is a product state if and only if ρA (and thus ρB ) are pure states.
Solution
Concepts Involved: Linear Algebra, Schmidt Decomposition, Schmidt Number, Reduced Density Oper-
ators.
Suppose |ψi is a product state. Then, |ψi = |0A i|0B i for some |0A i, |0B i, and we therefore have that
|ψi has Schmidt number 1 (it is already written in Schmidt decomposition form, and has one nonzero λ).
Conversely, suppose |ψi has Schmidt number 1. Then, |ψi = 1|0A i|0B i + 0|1A i|1B i when writing |ψi in
its Schmidt decomposition. Therefore, |ψi = |iA i|iB i and |ψi is a product state.
Next, take any |ψi and write out its Schmidt decomposition. We then get:
X
|ψi = λi |iA i|iB i.
i
Hence:
X
ρ= λ2i |iA ihiA | ⊗ |iB ihiB | .
i
Identically:
X
ρB = trA (ρ) = λ2i |iB ihiB | .
i
Now, suppose that |ψi is a product state. Then, |ψi has Schmidt number 1. Hence, only one of λ1 , λ2 is
nonzero. Hence, ρA = |iA ihiA | and ρB = |iB ihiB |, so ρA , ρB are pure. Conversely, suppose ρA , ρB are
pure. Then, we have that ρA = |iA ihiA | and ρB = |iB ihiB |, so it follows that one of λ1 , λ2 in the above
equations for ρA , ρB must be zero. Therefore, |ψi has Schmidt number 1, and is hence a product state.
63
Exercise 2.79
Consider a composite system consisting of two qubits. Find the Schmidt decomposition of the states
Solution
Concepts Involved: Linear Algebra, Schmidt Decomposition, Reduced Density Matrices, Partial Trace.
|00i + |11i 1 1
√ = √ |0i|0i + √ |1i|1i
2 2 2
|00i + |01i + |10i + |11i
= 1|+i|+i + 0|−i|−i
2
For the third expression, we require a little more work. We first note that the existence of the
Schmidt decomposition guarantees that the state |ψi = |00i+|01i+|10i
√
3
can be written in the form
P2
|ψi = i=1 λi |iA i|iB i for some choice of orthonormal bases |iA i, |iB i. By the definition of reduced
density matrices/partial trace, we can make the observation that:
2
X 2
X
ρA = trB (ρ) = trB ( |ψihψ|) = λ2i |iA ihiA | trB ( |iB ihiB |) = λ2i |iA ihiA |
i=1 i=1
P2
and similarly that ρB = 2
i=1 λi |iB ihiB |. Hence, to find the Schmidt decomposition of |ψi, we can
compute the reduced density matrices and then solve for their eigenvalues λ2i and eigenvectors |ii. First
solving for ρ, we have:
64
Next solving for the reduced density matrix ρB , we have:
" #
B 2 |0ih0| + |0ih1| + |1ih0| + |1ih1| ∼ 1 2 1
ρ = trA (ρ) = = .
3 3 1 1
Exercise 2.80
Suppose |ψi and |ϕi are two pure states of a composite quantum system with components A and B, with
identical Schmidt coefficients. Show that there are unitary transformations U on a system A and V on
system B such that |ψi = (U ⊗ V )|ϕi.
Solution
Concepts Involved: Linear Algebra, Schmidt Decomposition, Unitary Operators.
We first prove a Lemma. Suppose we have two (orthonormal) bases |ii , |i0 i of a (n-dimensional)
vector space A. We claim that the change of basis transformation U where |i0 i = U |ii is unitary.
P 0
To see this is the case, let U = iP|i ihi|. By orthonormality, we see that U |ii = |i0 i as desired.
Computing U † , we have that U † = 0 † 0
P
i ( |i ihi|) = i i i . By orthonormality, we then see that
†
P
U U = i |iihi| = I and hence U is unitary.
P
We now move onto the actual problem. By assumption, we can write |ψi = i λi |iA i|iB i and |ϕi =
P
j λj |jA i|jB i where λi = λj if i = j. By the lemma, there exists unitary change-of-basis matrices U, V
such that |iA i = U |jA i and |iB i = V |jB i. Hence, we have that:
X X X
|ψi = λi |iA i|iB i = λj (U |jA i)(V |jB i) = (U ⊗ V ) λj |jA i|jB i = (U ⊗ V )|ϕi
i j j
Let |AR1 i and |AR2 i be two purifications of a state ρA to a composite system AR. Prove that there
exists a unitary transformation UR acting on system R such that |AR1 i = (IA ⊗ UR )|AR2 i.
65
Solution
Concepts Involved: Linear Algebra, Schmidt Decomposition, Purification, Unitary Operators
Let |AR1 i, |AR2 i be two purifications of ρA to a composite system AR. We can write the orthonormal
decomposition of ρA as ρA = i pi |iA ihiA |, from which it follows that we can write:
P
X√
|AR1 i = pi |iA i|iR i
i
X√
|AR2 i = pi |iA i|i0R i
i
for some bases |ii , |i0 i of R. By the Lemma proven in the previous exercise, the transformation UR
= (IA ⊗ UR )|AR2 i
Exercise 2.82
P
Suppose pi , |ψi i is an ensemble of states generating a density matrix ρ = i pi |ψi ihψi | for a quantum
system A. Introduce a system R with orthonormal basis |ii.
P √
(1) Show that i pi |ψi i|ii is a purification of ρ.
(2) Suppose we measure R in the basis |ii, obtained outcome i. With what probability do we obtain
the result i, and what is the corresponding state of system A?
(3) Let |ARi be any purification of ρ to the system AR. Show that there exists an orthonormal basis
|ii in which R can be measured such that the corresponding post-measurement state for system A
is |ψi i with probability pi .
Solution
Concepts Involved: Linear Algebra, Purification, Schmidt Decomposition.
66
P √
(1) To verify that i pi |ψi i|ii is a purification, we see that:
X √ X √ XX√
trR pi |ψi i|ii pj hψj |hj| = pi pj |ψi ihψj | trR (|iihj|)
i j i j
XX√
= pi pj |ψi ihψj |δij
i j
Xq
= p2i |ψi ihψi |
i
X
= pi |ψi ihψi |
i
=ρ
P P
(2) We measure the observable Mi = IA ⊗ i Pi = IA ⊗ i |iihi|. The probability of obtaining outcome
P √
i is given by p(i) = hAR|(IA ⊗ Pi )|ARi (where |ARi = i pi |ψi i|ii), which we can calculate to
be:
= pi
(3) Let |ARi be any purification of ρ to the combined system AR. We then have that |ARi has Schmidt
Decomposition:
X
|ARi = λi |iA i|iR i
i
for orthonormal bases |iA i, |iR i of A and R respectively. Define a linear transformation U such that
67
P
λi |iA i = j Uij pj |ψj i. We then have that:
X X X X
|ARi = Uij pj |ψj i |iR i = pj |ψj i Uij |iR i.
i j j i
We note that we can move the Uij to system R as R has the same state space as A by construction.
P
Letting |ji = i Uij |iR i be our orthonormal basis of R, the claim follows (by part (2) of the
question.
Let f (·) be any function from complex numbers to complex numbers. Let n be a normalized vector in
three dimensions, and let θ be real. Show
Solution
Concepts Involved: Linear Algebra, Spectral Decomposition, Operator Functions.
From Exercise 2.35, we recall that n · σ has spectral decomposition n · σ = |n+ ihn+ | − |n− ihn− |. We
then have that (by the definition of operator functions):
f (θn · σ) = f θ( |n+ ihn+ | − |n− ihn− |) = f (θ) |n+ ihn+ | + f (−θ) |n− ihn− | .
We then use the fact proven in the solution to Exercise 2.60 that we can write the projectors P± = |n± ihn± |
in terms of the operator n · σ as:
I ±n·σ
|n± ihn± | = .
2
Hence making this substitution we have:
I +n·σ I −n·σ
f (θn · σ) = f (θ) + f (−θ) .
2 2
Remark:
Arguably, the most used application of the above identity in quantum information is when f (θn · σ) =
68
exp i(θ/2)n · σ . In this case (as in Exercise 2.35), we have
exp θ/2 + exp −θ/2 exp θ/2 − exp −θ/2
exp i(θ/2)n · σ = I+ n·σ
2 2
θ θ
= cos I + i sin n·σ .
2 2
(1) Prove that the Schmidt number of |ψi is equal to the rank of the reduced density matrix ρA ≡
trB (|ψihψ|). (Note that the rank of a Hermitian operator is equal to the dimension of its support.)
P
(2) Suppose |ψi = j |αj i|βj i is a representation for |ψi, where |αj i and |βj i are (un-normalized)
states for systems A and B, respectively. Prove that the number of terms in a such a decomposition
is greater than or equal to the Schmidt number of |ψi, Sch(ψ).
Solution
Concepts Involved: Linear Algebra, Schmidt Decomposition, Schmidt Number, Reduced Density Oper-
ators.
(1) We write the Schmidt decomposed |ψi, and therefore the density matrix ρψ as:
X X
|ψi = λi |iA i |iB i =⇒ |ψihψ| = λ2i |iA ihiA | ⊗ |iB ihiB |
i ii0
Taking the partial trace of subsystem B in the |iB i basis, we obtain the reduced density matrix ρA
to be:
X
ρA = trB (|ψihψ|) = λ2i |iA ihiA |
i
Sch(ψ) of the λi s are nonzero, and therefore ρA has Sch(ψ) nonzero eigenvalues - therefore the
rank of its support is Sch(ψ).
PN
(2) Suppose for the sake of contradiction that some decomposition |ψi = j=1 αj βj had less terms
than the Schmidt decomposition of |ψi, i.e. N < Sch(ψ).
The density matrix of |ψi is:
N
X
ρψ = |ψihψ| = αj αk ⊗ βj βk
j=1,k=1
69
Tracing out subsystem B, we obtain the reduced density matrix of subsystem A:
N
X
ρA = TrB (ρψ ) = αj αk βj βk
j=1,k=1
where we have used that Tr |β1 ihβ2 | = hβ1 |β2 i. From the above, it is clear that ρA has rank at
most N , as the support of ρA is spanned by |α1 i , . . . , |αN i . But then the rank of ρA is less than
Sch(ψ), which contradicts our finding in part (a).
(3) If Sch(ϕ) = Sch(γ) then there is nothing to prove as Sch(ψ) is non-negative by definition. Suppose
then that Sch(ϕ) 6= Sch(γ). WLOG suppose Sch(ϕ) > Sch(γ). We can then write:
β 1
|ϕi = |γi − |ψi
α α
If we Schmidt decompose |ϕi and |ψi, we have written |ϕi as the sum of Sch(γ) + Sch(ψ) (unnor-
malized) bipartite states. Applying the result from part (2) of this problem, we then have that:
(Q ⊗ S + R ⊗ S + R ⊗ T − Q ⊗ T )2 = 4I + [Q, R] ⊗ [S, T ]
so the violation of the Bell inequality found in Equation (2.230) is the maximum possible in quantum
mechanics.
Solution
Concepts Involved: Tensor Products, Commutators
70
We first show that N 2 = I for any N = n · σ where n is a unit vector in three dimensions. We have that:
X3
N2 = ( ni σi ) 2
i=1
where we use the fact that n is of unit length. Using this fact, we have that:
(Q ⊗ S + R ⊗ S + R ⊗ T − Q ⊗ T )2 = Q2 ⊗ S 2 + QR ⊗ S 2 + QR ⊗ ST − Q2 ⊗ ST
+ RQ ⊗ S 2 + R2 ⊗ S 2 + R2 ⊗ ST − RQ ⊗ ST
+ RQ ⊗ T S + R2 ⊗ T S + R2 ⊗ T 2 − RQ ⊗ T 2
− Q2 ⊗ T S − QR ⊗ T S − QR ⊗ T 2 + Q2 ⊗ T 2
= I ⊗ I + QR ⊗ I + QR ⊗ ST − I ⊗ ST
+ RQ ⊗ I + I ⊗ I + I ⊗ ST − RQ ⊗ ST
+ RQ ⊗ T S + I ⊗ T S + I ⊗ I − RQ ⊗ I
− I ⊗ T S − QR ⊗ T S − QR ⊗ I + I ⊗ I
= 4I ⊗ I + RQ ⊗ T S − RQ ⊗ ST + QR ⊗ ST − QR ⊗ T S
= 4I + QR ⊗ (ST − T S) − RQ ⊗ (ST − T S)
= 4I + [Q, R] ⊗ [S, T ]
which proves the first equation. We have that h4Ii = 4 hIi = 4. Since each of Q, R, S, T have eigenvalues
±1 (Exercise 2.35), we also ave that [Q, R] ⊗ [S, T ] ≤ 4 as the tensor product of commutators consists
of 4 terms, each of which has expectation less than or equal to 1. We therefore have by the linearity of
expectation (Exercise A1.4) that:
D E
(Q ⊗ S + R ⊗ S + R ⊗ T − Q ⊗ T )2 = 4I + [QR] ⊗ [S, T ] ≤ 8.
71
and again by the linearity of expectation:
√
hQ ⊗ Si + hR ⊗ Si + hR ⊗ T i − hQ ⊗ T i ≤ 2 2
72
3 Introduction to computer science
Exercise 3.1: Non-computable processes in Nature
How might we recognize that a process in Nature computes a function not computable by a Turing
machine?
Solution
Concepts Involved: Turing Machines.
One criteria is natural phenomena that appear to be truly random; Turing machines as defined in the text
are deterministic (though there are probabilistic variations that would solve this issue) and hence would
not be able to compute a random function. From a more direct point, if a process in Nature was to
be found to compute a known non-computable problem (e.g. solve the Halting problem or the Tiling
problem) then we may conclude (trivially) that the process would not be computable. However since the
domain of inputs that we could provide top such a natural process would have to be finite, there would be
no concrete method in which one could actually test if such a process was truly computing a non-Turing
computable function (as a Turing machine that works on a finite subset of inputs for an uncomputable
problem could be devised).
(∗) Show that single-tape Turing machines can each be given a number from the list 1, 2, 3, . . . in such a way
that the number uniquely specifies the corresponding machine. We call this number the Turing number
of the corresponding Turing machine. (Hint: Every positive integer has a unique prime factorization
pa1 1 pa2 2 . . . pakk , where pi are distinct prime numbers, and a1 , . . . ak are non-negative integers.)
Solution
Concepts Involved: Turing Machines, Cardinality.
∞
Lemma 1. If {An }n=1 is a sequence of sets that are countably infinite (that is, they can be put in bijection
S∞
with the natural numbers N) then their union A = n=1 An is also countably infinite.
Proof. Write An = {xn1 , xn2 , xn3 , . . .} (which we can do as each of the An s are countably infinite).
Then, we form an array:
A1 = x11 x12 x13 ···
Then, we can re-number the elements along the diagonal lines (i.e. x11 , x21 , x12 , x31 , x22 , x13 , . . .). This
new enumeration corresponds to a countably infinite set. From there, we let T ⊂ N be the remaining
labels in the enumeration after removing the repeated elements from the sequence. Then, |T | = |A|, and
hence A is at most countably infinite. A cannot be finite as A1 ⊂ A and A1 is not finite. Hence A is
countably infinite.
73
Lemma 2. The set of all finite sequences of elements from a countably infinite set B is also countably
infinite.
Proof. Denote Bn the set of length n sequences consisting of elements from B. We show that Bn is
countably infinite by induction.
Base Case: |B| = |B1 |, so B1 is countably infinite.
Inductive Step: Suppose that Bk is countably infinite for k ≥ 1. Then, define Bk,i which is the set of
k + 1 length sequences, consisting of all sequences in Bk and then terminating with the ith element of B.
S∞
Bk,i = |Bk | so Bk,i is countably infinite, and then Bk+1 = i=1 Bk,i is countably infinite by Lemma 1.
This concludes the argument by induction.
S∞
Finally, the set of all finite sequences of elements from B is simply k=1 Bk , which is a union of countably
infinite sets and therefore countably infinite again by Lemma ‘.
Solution. A single-tape Turing machine can be uniquely specified by a finite integer sequence as follows.
First, we state the number of states |Q| = N , then enumerate the states qs = −1, qh = 0, q1 =
1, . . . , qN −2 = N − 2. We then state the size of the alphabet |Γ| = L and enumerate the alphabet
. = −2, b = −1, 0 = 0, 1 = 1, . . . , L − 3 = L − 3. We then write the sequence of symbols appearing on
the initial tape, starting from square 0, stopping when we encounter the last non-blank symbol. Finally, we
list the program lines, each of which is a five-tuple of integers (as each of the states and symbols appearing
in the program line we have associated to an integer, and the action s is one of −1, 0, 1). Between each
part of this sequence we put a “space integer” -3.
As an example, the Turing machine in the text which computes the constant function (and let us say for
the sake of example the tape starts with the number 7 on it, so 110 in binary followed by infinite blanks)
has the associated finite integer sequence:
5 , −1 , |{z}
|{z} 3 , −3, |{z}
2 , |{z}
1 , |{z}
0 , |{z} 4 , −2 , −1 , 0, 1, −3, 1, 1, 0, −3, −1, −2, 1, −2, 1,
|{z} |{z} |{z} | {z } | {z }
|Q| qs qh q1 q2 q3 |Σ| . b 7 hqs ,.,q1 ,.,+1i
1, 0, 1, −1, 1, 1, 1, 1, −1, 1, 1, −1, 2, −1, −1, 2, −1, 2, −1, −1, 2, −2, 3, −2, 1, 3, −1, 0, 1, 0
| {z } | {z } | {z } | {z } | {z } | {z }
hq1 ,0,q1 ,b,+1i hq1 ,1,q1 ,b,+1i hq1 ,b,q2 ,b,−1i hq2 ,b,q2 ,b,−1i hq2 ,.,q3 ,.,+1i hq3 ,b,qh ,1,0i
Because the number of states is finite, the size of the alphabet is finite, the number of non-blank squares
on the initial tape is finite, and there is a finite number of lines in the program, the above algorithm
produces a finite sequence of integers for a given Turing machine.
Now, observe that the integers are countably infinite, as:
f : N −→ Z
n n even (1)
2
n 7−→
− n−1 n odd
2
is a bijection. So too then is the set of all finite integer sequences by the Lemma 2. Since the finite
integer sequences describing Turing machines as produced by the above prescription are a subset of all
finite integer sequences, we must therefore be able to associate any single-tape Turing machine to a unique
natural number, as claimed.
74
Exercise 3.3: Turing machine to reverse a bit string
Describe a Turing machine which takes a binary number x as input, and outputs the bits of x in reverse
order. (Hint: In this exercise and the next it may help to use a multi-tape Turing machine and/or symbols
other than ., 0, 1 and the blank.)
Describe a Turing machine to add two binary numbers x and y modulo 2. The numbers are input on the
Turing machine tape in binary, in the form x, followed by a single blank, followed by a y. If one number
is not as long as the other then you may assume that it has been padded with leading 0s to make the two
numbers the same length.
Show that given a Turing machine M there is no algorithm to determine whether M halts when the input
to the machine is a blank tape.
Suppose we number the probabilistic Turing machines using a scheme similar to that found in Exercise 3.2
and define the probabilistic halting function hp (x) to be 1 if machine x halts on input of x with probability
at least 1/2 and 0 if machine x halts on input of x with probability less than 1/2. Show that there is no
probabilistic Turing machine which can output hp (x) with probability of correctness strictly greater than
1/2 for all x.
Suppose a black box is made available to us which takes a non-negative integer x as input, and then
outputs the value of h(x), where h(·) is the halting function defined in Box 3.2 on page 130. This type
of black box is sometimes known as an oracle for the halting problem. Suppose we have a regular Turing
machine which is augmented by the power to call the oracle. One way of accomplishing this is to use a
two-tape Turing machine, and add an extra program instruction to the Turing machine which results in the
oracle being called, and the value of h(x) being printed on the second tape, where x is the current contents
of the second tape. It is clear that this model for computation is more powerful than the conventional
Turing machine model, since it can be used to compute the halting function. Is the halting problem for
this model of computation undecidable? That is, can a Turing machine aided by an oracle for the halting
problem decide whether a program for the Turing machine with oracle will halt on a particular input?
Show that the NAND gate can be used to simulate the AND, XOR, and NOT gates, provides wires, ancilla bits
and FANOUT are available.
75
Solution
Concepts Involved: Logic Gates.
We start by showing how we can get a 1 qubit using two 0 ancilla bits and a NAND gate.
0
1
0
We will now show how to simulate the NOT, AND, and XOR gates. We note that we will use “1” to denote
as shorthand a 1 bit constructed using two ancilla bits (as above). a/b represent the input bits. We start
with the NOT gate.
a
¬a
1
a
a∧b
b 1
For the XOR simulated gate, we note that we first use FANOUT twice to copy both input bits.
a
1 b
a⊕b
b a
1
Having simulated the three gates using the NAND gate only, we conclude that the NAND is universal.
Exercise 3.9
Prove that f (n) is O(g(n)) if and only if g(n) is Ω(f (n)). Deduce that f (n) is Θ(g(n)) if and only if
g(n) is Θ(f (n)).
Solution
Concepts Involved: Asymptotic Notation.
Suppose f (n) is O(g(n)). Then, there exists c > 0 such that for all n > n0 , f (n) ≤ cg(n). Therefore,
we have 1c > 0 such that for all n > n0 , 1c f (n) ≤ g(n). Hence, g(n) is Ω(f (n)). Conversely, if g(n) is
Ω(f (n)), there exists c > 0 such that for all n > n0 , cf (n) ≤ g(n). Hence, we have 1c > 0 such that for
all n > n0 , f (n) ≤ 1c g(n) and hence f (n) is O(g(n)).
Therefore, if f (n) is Θ(g(n)) then f (n) is O(g(n)) and Ω(g(n)), and by the above argument, g(n) is
O(f (n)) and Ω(f (n)) and hence g(n) is Θ(f (n)). The converse holds in the same way.
76
Exercise 3.10
Suppose g(n) is a polynomial of degree k. Show that g(n) is O(nl ) for any l ≥ k.
Solution
Concepts Involved: Asymptotic Notation.
Exercise 3.11
Solution
Concepts Involved: Asymptotic Notation.
Let k > 0 and c > 0. By the definition of the exponential we have that:
∞ ∞
X (ank )j X akj nkj
exp cnk = =
j=0
j! j=0
j!
now, there exists some j0 ∈ Z for which kj0 > 1. Since for n ≥ 0 the terms in the above sum are
non-negative, we find:
ckj0 nkj0
exp cnk ≥
j0 !
Now, choose c sufficiently large such that ckj0 ≥ j0 !. We then find that:
ckj0 nkj0
exp cnk ≥ ≥ nkj0
j0 !
Since the logarithm is monotonic, we may take the log of both sides and preserve the inequality:
cnk ≥ log n
So we have shown that for any k > 0, there exists c > 0 such that for all n > 1, cnk ≥ log n. Hence,
log n is O(nk ) for any k > 0.
77
Exercise 3.12: nlog n is super-polynomial
Show that nk is O(nlogn ) for any k, but that nlog n is never O(nk ).
Solution
Concepts Involved: Asymptotic Notation.
First, note that for any k, ek ≤ n for sufficiently large n > n0 and so k ≤ log n by monotonicity of the
logarithm. Therefore, for n > n0 it follows by monotonicity (of exponentiation) that nk ≤ nlog n and so
nk is O(nlog n ).
Now, consider an arbitrary a > 0. It still follows for sufficiently large n > n0 that eak ≤ n and so
ak ≤ log n and na nk ≤ nlog n . But for any c > 0 na > c for sufficiently large n and so:
cnk ≤ nlog n
So since for any c > 0 there exists some n00 for which n > n00 implies cnk ≤ nlog n , it follows that nlog n
is never O(nk ).
Show that cn is Ω(nlog n ) for any c > 1, but that nlog n is never Ω(cn ).
Solution
Concepts Involved: Asymptotic Notation.
First note from Exercise 1.11 that log n is O(nk ) for any k > 0. Specifically, take k = 1/2; then there
exists a > 0 such that for n > n0 :
an1/2 ≥ log n
a2
Now for any c > 1, we can define a0 = log c > 0 and write:
0
na0 log c = log cna ≥ log nlog n
and so there exists a constant c1a0 > 0 such that for n > n0 , cn ≥ c1a0 nlog n and therefore cn is Ω(nlog n ).
Now, let b > 0 be some arbitrarily small constant. For sufficiently large n, we have that na0 logc+log b > 0
78
and so for sufficiently large n it further follows that:
0
log b + na0 log c = log bcna ≥ log nlog n
so for sufficiently large n, for any arbitrarily small constant b0 it follows that b0 cn ≥ nlog n and so nlog n is
never Ω(cn ).
Exercise 3.14
Suppose e(n) is O(f (n)) and g(n) is O(h(n)). Show that e(n)g(n) is O(f (n)h(n)).
Solution
Concepts Involved: Asymptotic Notation.
By assumption, we have that e(n) ≤ c1 f (n) for some c1 > 0 and for all n > n1 and that g(n) ≤ c2 h(n)
for some c2 > 0 and for all n > n2 . Let n0 = max n1 , n2 . We then have that for n > n0 that:
Suppose an n element list is sorted by applying some sequence of compare-and-swap operations to the list.
There are n! possible initial orderings of the list. Show that after k of the compare-and-swap operations
have been applied, at most 2k of the possible initial orderings will have been sorted into the correct order.
Conclude that Ω(n log n) compare and swap operations are required to sort all possible initial orderings
into the correct order.
Solution
Concepts Involved: Asymptotic Notation, Compare-and-Swap.
We prove the first statement by induction. After 0 steps, we have that 1 = 20 out of the n! possible
orderings are already sorted. Let k ∈ N, k ≥ 0 and suppose that after k swaps, at most 2k of the initial
orderings have been sorted into the correct order. We now consider the state of the list after the k + 1th
swap. Each of the 2k initial orderings from the previous step are correctly sorted already (so the swap does
nothing), and there are a further 2k initial orderings that are one swap away from the 2k from the previous
step, and hence the k + 1th swap will put 2k more initial orderings into the correct order. Therefore, after
2k+1 compare and swaps, there are at most 2k + 2k = 2k+1 possible initial orderings that are sorted into
the correct order. This proves the claim.
Using the above fact, we have that in order to have all n! possible initial orderings correct after k
79
steps that 2k ≥ n!. Taking logarithms on both sides, we have that log 2k ≥ log(n!) and hence k ≥
log(n!). Using Stirling’s approximation for factorials (https://en.wikipedia.org/wiki/Stirling%
27s_approximation), we have that:
from which we conclude that k is Ω(n log n) and hence Ω(n log n) compare and swap operations are
required to sort all possible initial orderings into the correct order.
Show there exist Boolean functions on n inputs which require at least 2n / log n logic gates to compute.
Exercise 3.17
Prove that a polynomial-time algorithm for finding the factors of a number m exists if and ony if the
factoring decision problem is in P.
Exercise 3.18
Prove that if coNP 6= NP then P 6= NP.
Exercise 3.19
The Reachability problem is to determine whether there is a path between two specified vertices in a
graph. Show that Reachability can be solved using O(n) operations if the graph has n vertices. Use
the solution to Reachability to show that it is possible to decide whether a graph is connected in O(n2 )
operations.
Show that if a language L1 is reducible to the language L2 and the language L2 is reducible to L3 then
the language L1 is reducible to the language L3 .
Exercise 3.22
Suppose L is complete for a complexity class, and L0 is another language in the complexity class such
that L reduces to L0 . Show that L0 is complete for the complexity class.
Exercise 3.23
Show that SAT is NP-complete by first showing that the SAT is in NP, and then showing that CSAT
reduces to SAT.
80
Exercise 3.24: 2SAT has an efficient solution
Suppose ϕ is a Boolean formula in conjunctive normal form, in which each clause contains only two literals.
(1) Construct a (directed) graph G(ϕ) with directed edges in the following way: the vertices of G
correspond to variables xk and their negations ¬xj in ϕ. There is a (directed) edge (α, β) in G if
and only if the clause (¬α ∨ β) or the clause (β ∧ ¬α) is present in ϕ. Show that ϕ is not satisfiable
if and only if there exists a variable x such that there are paths from x and ¬x and from ¬x to x
in G(ϕ).
(2) Show that given a directed graph G containing n vertices it is possible to determine whether two
vertices v1 and v2 are connected in polynomial time.
The complexity class EXP (for exponential time) contains all decision problems which may be decided
k
by a Turing machine running in exponential time, that is time O(2n ), where k is any constant. Prove
that PSPACE ⊆ EXP. (Hint: If a Turing machine has l internal states, an m letter alphabet, and uses
space p(n), argue that the machine can exist in one of at most lmp(n) different states, and that if the
Turing machine is to avoid infinite loops then it must halt before revisiting a state.)
Exercise 3.26: L ⊆ P
The complexity class L (for logarithmic space) contains all decision problems which may be decided by a
Turing machine running in logarithmic space, that is, in space O(log(n)). More precisely, the class L is
defined using a two-tape Turing machine. The first tape contains the problem instance, of size n, and is a
read-only tape, in the sense that only program lines which don’t change the contents of the first tape are
allowed. The second tape is a working tape which initially contains only blanks. The logarithmic space
requirement is imposed on the second, working tape only. Show that L ⊆ P.
Let G = (V, E) be an undirected graph. Prove that the following algorithm finds a vertex cover for G
that is within a factor of two of being a minimial vertex cover.
VC =∅
E0 = E
while E 0 = ∅ do
let (α, β) be any edge of E 0
V C = V C ∪ {α, β}
remove from E 0 every edge incident on α or β
end
return VC
81
Exercise 3.28: Arbitrariness of the constant in the definition of BPP
Suppose k is a fixed constant, 1/2 < k ≤ 1. Suppose L is a language such that there exists a Turing
machine M with the property that whenever x ∈ L, M accepts x with probability at least k, and whenever
x∈/ L, M rejects x with probability at least k. Show that L ∈ BPP.
Show that applying two consecutive Fredkin gates gives the same outputs as inputs.
Solution
Concepts Involved: Fredkin Gates. Recall the input/output table of the Fredkin gate:
Inputs Outputs
a b c a0 b0 c0
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 1 0 1
1 0 0 1 0 0
1 0 1 0 1 1
1 1 0 1 1 0
1 1 1 1 1 1
We check for all possible 8 input states that applying the Fredkin gate returns the original input state.
Exercise 3.30
Verify that the billiard ball computer in Figure 3.14 computes the Fredkin gate.
82
Exercise 3.31: Reversible half-adder
Construct a reversible circuit which, when two bits x and y are input, outputs (x, y, c, x ⊕ y), where c is
the carry bit when x and y are odd.
What is the smallest number of Fredkin gates needed to simulate a Toffoli gate? What is the smallest
number of Toffoli gates needed to simulate a Fredkin gate?
A Minsky machine consists of a finite set of registers, r1 , r2 , . . . , rk , each capable of holding an arbitrary
non-negative integer, and a program, made up of orders of one of two types. The first type has the form:
The interpretation is that at point m in the program register rj is incremented by one, and execution
proceeds to point n in the program. The second type of order has the form:
The interpretation is that at point m in the program, register rj is decremented if it contains a positive
integer, and execution proceeds to point n in the program. If register rj is zero then execution simply
proceeds to point p in the program. The program for the Minsky machine consists of a collection of such
orders, of a form like:
The starting and all possible halting points for the program are conventionally labeled zero. This program
takes the contents of register r1 and adds them to register r2 , while decrementing r1 to zero.
(1) Prove that all (Turing) computable functions can be computed on a Minsky machine, in the sense
that given a computable function f (·) there is a Minsky machine program that when the registers
start in the state (n, 0, . . . , 0) gives as output (f (n), 0, . . . , 0).
(2) Sketch a proof that any function which can be computed on a Minsky machine, in the sense just
defined, can also be computed on a Turing machine.
83
Problem 3.2: Vector games
A vector game is specified by a finite list of vectors, all of the same dimension, and with integer co-
ordinates. The game is to start with a vector x of non-negative integer co-ordinates and to add to x
the first vector from the list which preserves the non-negativity of all the components, and to repeat this
process until it is no longer possible. Prove that for any computable function f (·) there is a vector game
which when started with the vector (n, 0, . . . , 0) reaches (f (n), 0, . . . , 0) (Hint: Show that a vector game
in k + 2 dimensions can simulate a Minsky machine containing k registers.)
A Fractran program is essentially just a very simple dynamical system taking positive integers to positive
integers. Prove that there is no algorithm to decide whether such a dynamical system ever reaches 1.
Suppose we are trying to build circuits using only one and two bit reversible logic gates, and ancilla bits.
Prove that there are Boolean functions which cannot be computed in this fashion. Deduce that the Toffoli
gate cannot be simulated using one and two bit reversible gates, even with the aid of ancilla bits.
Let r ≥ 1 and suppose that there is an approximation algorithm for TSP which is guaranteed to find the
shorted tour among n cities to within a factor r. Let G = (V, E) be any graph on n vertices. Define
an instance of TSP by identifying cities with vertices in V , and deefinign the distance between cities i
and j to be 1 if (i, j) is an edge of G, and to be dre|V | + 1 otherwise. Show that if the approximation
algorithm is applied to this instance of TSP then it returns a Hamiltonian cycle for G if one exists, and
otherwise returns a tour of length more than dre|V |. From the NP-completeness of HC it follows that no
such approximation algorithm can exist unless P = NP.
(1) Explain how to construct a reversible Turing machine that can compute the same class of functions
as is computable on an ordinary Turing machine. (Hint: It may be helpful to use a multi-tape
construction.)
(2) Give general space and time bounds for the operation of your reversible Turing machine, in terms
of the time t(x) and space s(x) required on an ordinary single-tape Turing machine to compute a
function f (x).
84
Problem 3.8: Find a hard-to-compute class of functions (Research)
Find a natural class of functions on n inputs which requires a super-polynomial number of Boolean gates
to compute.
Prove that a reversible Turing machine operating in polynomial space can be used to solve QSAT. Thus, the
class of languages decidable by a computer operating reversibly in polynomial space is equal to PSPACE.
Let pm be the mth prime number. Outline the construction of a reversible circuit which, upon the input of
m and n such that n > m, outputs the product pm pn , that is (m, n) 7→ (pm pn , g(m, n)) where g(m, n)
is the final state of the ancilla bits used by the circuit. Estimate the number of ancilla qubits your circuit
requires. Prove that if a polynomial (in log n) size reversible circuit can be found that uses O(log(log n))
ancilla bits then the problem of factoring a product of two prime numbers is in P.
85
4 Quantum circuits
Exercise 4.1
In Exercise 2.11, which you should do now if you haven’t already done it, you computed the eigenvectors of
the Pauli matrices. Find the points on the Bloch sphere which correspond to the normalized eigenvectors
of the different Pauli matrices.
Solution
Concepts Involved: Linear Algebra.
Recall that a single qubit in the state |ψi = a|0i + b|1i can be visualized as a point (θ, ϕ) on the Bloch
sphere, where a = cos θ/2 and b = eiϕ sin θ/2 .
|0i+|1i
We recall from 2.11 that Z (and I) has eigenvectors |0i, |1i, X has eigenvectors |+i = √
2
, |−i =
|0i−|1i |0i+i|1i |0i−i|1i
√
2
and Y has eigenvectors |y+ i =
, √
2
, |y− i
= √
2
. Expressing these vectors as points on the
Bloch sphere (using spherical coordinates), we have:
π
|0i ∼
= (0, 0) ; |1i ∼
= (π, 0) ; |+i ∼= ,0 ;
2
π π π π 3π
|−i ∼
= , π ; |y+ i ∼= , ; |y− i ∼
= , .
2 2 2 2 2
Exercise 4.2
Solution
Concepts Involved: Linear Algebra, Operator Functions.
Let |vi be an eigenvector of A with eigenvalue λ. It then follows that A2 |vi = λ2 |vi, and furthermore
we have that A2 |vi = I|vi = |vi by assumption. We obtain that λ2 = 1 and therefore the only possible
eigenvalues of A are λ = ±1. Let |v1 i, . . . , |vk i be the eigenvectors with eigenvalue 1 and |vk+1 i, . . . , |vn i
be the eigenvectors with eigenvalue −1. By the spectral decomposition, we can write:
k
X n
X
A= |vi ihvi | − |vi ihvi |
i=1 i=k+1
86
so by the definition of operator functions we have:
k
X n
X
exp(iAx) = exp(ix) |vi ihvi | + exp(−ix) |vi ihvi | .
i=1 i=k+1
Using the spectral decomposition and definition of I, we therefore obtain the desired relation:
Since all of the Pauli matrices satisfy A2 = I (Exercise 2.41), for θ ∈ R we can apply this obtained relation
to obtain:
" #
cos θ2 −i sin θ2
θ θ
exp −iθX/2 = cos I − i sin X=
2 2 −i sin θ2 cos θ2
" #
cos θ2 − sin θ2
θ θ
exp −iθY /2 = cos I − i sin Y =
2 2 sin θ2 cos θ2
" # " #
cos θ2 − i sin θ2 e−iθ/2
θ θ 0 0
exp −iθZ/2 = cos I − i sin Z= =
2 2 0 cos θ2 − i sin θ2 0 eiθ/2
Exercise 4.3
Solution
Concepts Involved: Linear Algebra, Quantum Gates.
Recall that the T gate is defined as:
" #
1 0
T =
0 exp iπ/4
87
We observe that:
" # " #
e−iπ/8 0 −iπ/8 1 0
Rz (π/4) = =e = e−iπ/8 T.
0 eiπ/8 0 eiπ/4
Exercise 4.4
Express the Hadamard gate H as a product of Rx and Rz rotations and eiϕ for some ϕ.
Solution
Concepts Involved: Linear algebra, Quantum Gates
We claim that H = Rz (π/2)Rx (π/2)Rz (π/2) up to a global phase of e−iπ/2 . Doing a computation to
verify this claim, we see that:
" #" #" #
e−iπ/4 0 cos π4 −i sin π4 e−iπ/4 0
Rz (π/2)Rx (π/2)Rz (π/2) =
0 eiπ/4 −i sin π4 cos π4 0 eiπ/4
" #" #" #
e−iπ/4 0 √1 − √i2 e−iπ/4 0
= 2
0 eiπ/4 − √i2 √1
2
0 eiπ/4
" #" #
1 e−iπ/4 0 e−iπ/4 −ieiπ/4
=√ iπ/4 −iπ/4
2 0 e −ie eiπ/4
" #
1 e−iπ/2 −i
=√
2 −i eiπ/2
" #
1 e−iπ/2 −e−iπ/2
=√
2 −e−iπ/2 eiπ/2
" #
e−iπ/2 1 1
= √
2 1 −1
= e−iπ/2 H
88
Remark: If you are more algebraically minded, the following may appeal to you.
1
Rz (π/2)Rx (π/2)Rz (π/2) = √ (1 − iZ) (1 − iX) (1 − iZ)
2 2
1
= √ (1 − iZ − iX − ZX) (1 − iZ)
2 2
1
= √ (1 − iZ − iX − ZX − iZ − XZ − 1 + iZXZ)
2 2
1
= √ (−2iX − 2iZ) (using ZXZ = −X)
2 2
=: −iH
Exercise 4.5
Prove that (n̂ · σ)2 = I, and use this to verify Equation (4.8)
Solution
Concepts Involved: Linear Algebra
where we use the fact that n̂ is a vector of unit length. With this shown, we can use the result of Exercise
4.2 to conclude that:
θ θ
exp −iθn̂ · σ/2 = cos − i sin (n̂ · σ)
2 2
(∗) One reason why the Rn̂ (θ) operators are referred to as rotation operators is the following fact, which
you are to prove. Suppose a single qubit has a state represented by the Bloch vector λ. Then, the effects
of the rotation Rn̂ (θ) on the state is to rotate it by an angle θ about the n̂ axis of the Bloch sphere. This
fact explains the rather mysterious looking factors of two in the definition of the rotation matrices.
89
Solution
Concepts Involved: Linear Algebra, Quantum Gates.
Let λ be an arbitrary Bloch vector. WLOG, we can express λ in a coordinate system such that n̂ is
aligned with the ẑ axis, so it suffices to consider how the state behaves under application Rz (θ). Let
λ = (λx , λy , λz ) be the vector expressed in this coordinate system. By Exercise 2.72, the density operator
corresponding to this Bloch vector is given by:
I +λ·σ
ρ=
2
We now observe how ρ transforms under conjugation by Rz (θ):
Using that XZ = −ZX from Exercise 2.41, we make the observation that:
!
θ θ
Rz (θ)X = cos I − i sin Z X
2 2
!
θ θ
= X cos I + i sin Z
2 2
!
−θ −θ
= X cos I − i sin Z
2 2
= XRz (−θ)
Similarly, we find that Rz (θ)Y = Rz (−θ)Y (same anticommutation) and that Rz (θ)Z = ZRz (θ) (all
terms commute). With this, the expression for Rz (θ)ρRz (θ)† simplifies to:
I + λx X + λy Y + λz Z
Rz (θ)ρRz (θ)† = Rz (θ) Rz (−θ)
2
IRz (θ) + λx XRz (−θ) + λy Y Rz (−θ) + λz ZRz (θ)
= Rz (−θ)
2
I + λx XRz (−2θ) + λy Y Rz (−2θ) + λz Z
=
2
Calculating each of the terms in the above expression, we have:
!
−2θ −2θ
XRz (−2θ) = X cos − i sin Z
2 2
= X cos(θ) + i sin(θ)Z
= cos(θ)X + i sin(θ)XZ
= cos(θ)X + i sin(θ)(−iY )
= cos(θ)X + sin(θ)Y
90
Y Rz (−2θ) = Y cos(θ) + i sin(θ)Z
= cos(θ)Y + i sin(θ)Y Z
= cos(θ)Y + i sin(θ)(iX)
= cos(θ)Y − sin(θ)X.
Plugging these back into the expression for Rz (θ)ρRz (θ)† and collecting like terms, we have:
From this expression, we can read off the new Bloch vector λ0 after conjugation by Rz (θ) to be:
Alternatively, suppose we apply the 3-dimensional rotation matrix Az (θ) to the original bloch vector λ.
We have that:
cos θ − sin θ 0 λx λx cos θ − λy sin θ
Az (θ)λ = sin θ cos θ 0 λy = λx sin θ + λy cos θ .
0 0 1 λz λz
We see that we end up with the same resulting vector λ0 . We conclude that the conjugation of ρ under
Rz (θ) has the equivalent effect to rotating the Bloch vector by θ about the ẑ-axis, and hence the effect
of Rn̂ (θ) on a one qubit state is to rotate it by an angle θ about n̂.
Exercise 4.7
Show that XY X = −Y and use this to prove that XRy (θ)X = Ry (−θ).
Solution
Concepts Involved: Linear Algebra, Quantum Gates.
For the first claim, we use that XY = −Y X and X 2 = I (Exercise 2.41) to obtain that:
XY X = −Y XX = −Y I = −Y.
91
Using this, we have that:
!
θ θ
XRy (θ)X = X cos I − i sin Y X
2 2
θ θ
= cos XIX − i sin XY X
2 2
θ θ
= cos I + i sin Y
2 2
θ θ
= cos − I − i sin − Y
2 2
= Ry (−θ).
Exercise 4.8
An arbitrary single qubit unitary operator can be written in the form
U = exp(iα)Rn̂ (θ)
for some real numbers α and θ, and a real three-dimensional unit vector n̂.
Solution
Concepts Involved: Linear Algebra, Unitary Operators, Quantum Gates
1. By definition, for any unitary operator U we have that U † U = I, so for any state vector hψ|ψi =
hψ|U † U |ψi. Therefore, all unitary U s are norm-preserving, and hence for a single qubit correspond
to some reflection/rotation in 3-dimensional space (up to a global phase factor). Hence, we can
write U = exp(iα)Rn̂ (θ) for some n̂ (rotation axis), θ (rotation angle) and α (global phase).
X+Z
2. Using the fact that H = √ ,
2
and that modulo a factor of i that X/Z correspond to rotations
92
Rx (π) and Rz (π), we find that:
π
!
I − i sin π2 X − i sin π2 Z
iRx (π) + iRz (π) 2 cos 2
H= √ =i √
2 2
!
π π 1 1
= i cos I − i sin √ X + 0Y + √ Z
2 2 2 2
!
π π 1 1
= eiπ/2 cos I − i sin √ X + 0Y + √ Z
2 2 2 2
3. We observe that:
" −iπ/4 # " #
π e 0 1 0
Rz = = e−iπ/4
2 0 eiπ/4 0 i
Hence:
π
S = eiπ/4 Rz
2
π π
from which we obtain that n̂ = ẑ = (0, 0, 1), θ = 2, and α = 4.
Remark: For part (2), one just can use the definition
θ θ
Rn̂ (θ) ≡ exp −iθn̂ · ~σ /2 = cos I − i sin nx X + ny Y + nz Z ,
2 2
√
and the fact H = (X + Z) / 2, to arrive at cos θ2 = 0, nx = nz = √1 , ny
2
= 0.
Exercise 4.9
Explain why any single qubit unitary operator may be written in the form (4.12).
Solution
Concepts Involved: Linear Algebra, Unitary Operators, Quantum Gates.
Recall that (4.12) states that we can write any single qubit unitary U as:
" #
ei(α−β/2−δ/2) cos γ2 −ei(α−β/2+δ/2) sin γ2
U = i(α+β/2−δ/2)
e sin γ2 ei(α+β/2+δ/2) cos γ2
where α, β, γ, δ ∈ R.
93
Let U be a single qubit unitary operator. We then have that U † U = I, so identifying:
" #
a b h i
U= = v1 v2
c d
we obtain that:
" # " #
2 2
|a| + |c| a∗ b + c∗ d 1 0
2 2 =
ab∗ + cd∗ |b| + |d| 0 1
From the diagonal entries we obtain that |v1 | = |v2 | = 1 and from the off diagonal entries we obtain that
hv1 , v2 i = 0 and hence the columns of U are orthonormal. From the fact that |v|1 is normalized, we can
parameterize the magnitude of the entries with γ ∈ R such that:
γ γ
|a| = cos , |c| = sin .
2 2
From the orthogonality, we further obtain that b = −c∗ and d = a∗ , from which we have that |b| = |c|
and |d| = |a|. Furthermore, (also from the orthogonality) we can parameterize arg(a) = − β2 − 2δ and
arg(b) = β2 − 2δ For β, δ ∈ R. Finally, multiplying U by a complex phase eiα for α ∈ R preserves the
unitarity of U and the orthonormality of the colums. Combining these facts gives the form of (4.12) as
desired.
Exercise 4.11
Suppose m̂ and n̂ are non-parallel real unit vectors in three dimensions. Use Theorem 4.1 to show that
an arbitrary single qubit unitary U may be written
Exercise 4.12
Give A, B, C, and α for the Hadamard gate.
Solution
Concepts Involved: Linear Algebra, Decomposition of Rotations.
Recall that any single qubit unitary U can be written as U = eiα AXBXC where ABC = I and α ∈ R.
94
so defining A, B, C according to the proof of Corollary 4.2, we have:
A = Rz (π)Ry (−π/4)
B = Ry (π/4)Rz (−π/2)
C = Rz (−π/2)
π
and α = 2.
HXH = Z; HY H = −Y ; HZH = X.
Solution
Concepts Involved: Linear Algebra, Quantum Gates.
By computation, we find:
" #" #" # " # " #
1 1 1 0 1 1 1 1 2 0 1 0
HXH = = = =Z
2 1 −1 1 0 1 −1 2 0 −2 0 −1
" #" #" # " # " #
1 1 1 0 −i 1 1 1 0 −2i 0 −i
HY H = = =− = −Y
2 1 −1 i 0 1 −1 2 2i 0 i 0
" #" #" # " # " #
1 1 1 1 0 1 1 1 0 2 0 1
HZH = = = =X
2 1 −1 0 −1 1 −1 2 2 0 1 0
Remark: Notice once we have proved HXH = Z, we can directly say HZH = H(HXH)H = X as
H 2 = I. If one wants to prove everything algebraically, the following calculation suffices.
1 1 1
HXH := (X + Z) X (X + Z) = (I + ZX) (X + Z) = (X + Z + Z + XZX) = Z
2 2 2
1 1 1
HY H := (X + Z) Y (X + Z) = (XY + ZY ) (X + Z) = (XY X + ZXY + ZY X + ZY Z) = −Y
2 2 2
Exercise 4.14
Solution
Concepts Involved: Linear Algebra, Quantum Gates.
95
From Exercise 4.3, we know that T = Rz (π/4) up to a global phase e−iπ/8 . We hence have that:
where in the second last equality we use the previous exercise, as well as the fact that HIH = H 2 = I
from Exercise 2.52.
The Bloch representation gives a nice way to visualize the effect of composing two rotations.
(1) Prove that if a rotation through an angle β1 about the axis n̂1 is followed by a rotation through an
angle β2 about an axis n̂2 , then the overall rotation is through an angle β12 about an axis n̂12 given
by
c12 = c2 − s2 ẑ · n̂2
s12 n̂12 = sc(ẑ + n̂2 ) − s2 n̂2 × ẑ
Solution
Concepts Involved: Linear Algebra
(1) It suffices to show that Rn̂2 (β2 )Rn̂1 (β1 ) is equivalent to Rn̂12 (β12 ).
Rn̂2 (β2 )Rn̂1 (β1 ) = (c2 I − is2 n̂2 · σ) · (c1 I − is1 n̂1 · σ̂)
= c2 c1 I − i (c1 s2 n̂2 · σ + c2 s1 n̂1 · σ) − s2 s1 (n̂2 · σ) · (n̂1 · σ)
| {z }
(n̂2 ·n̂1 )I + i(n̂2 ×n̂1 )·σ
= c2 c1 − s2 s1 (n̂2 · n̂1 ) I − i c1 s2 nˆ2 + c2 s1 nˆ1 + s2 s1 (n̂2 × n̂1 ) · σ
Identifying this operation to a single rotation Rn̂12 (β12 ) ≡ c12 I − is12 n̂12 · σ, we arrive at the
required relations (up to a presumable typesetting error)
96
c12 = c2 c1 − s2 s1 (n̂2 · n̂1 )
s12 n̂12 = c1 s2 nˆ2 + c2 s1 nˆ1 + s2 s1 (n̂2 × n̂1 )
(2) Setting β1 = β2 and n̂1 = ẑ in the formulas proven above combined with the fact that c = c1 =
cos β1 /2 = cos β2 /2 = c2 (and similiarly s = s1 = s2 ), we have:
c12 = c2 − s2 ẑ · n̂2
s12 n̂12 = scẑ + csn̂2 − s2 n̂2 × ẑ = sc(ẑ + n̂2 ) − s2 n̂2 × ẑ.
Remark: For the sake of completeness, we provide a proof of the identity used in part 1 of the solution.
First note the familiar Pauli matrix relation σi σj = δij I + iijk σk (Exercise 2.43). Now massaging this
equation gives
ai σi bj σj = ai bj δij + i ai bj ijk σk
= (a · b) I + i (a × b)k σk ,
where we have used standard Einstein index notation. Thus in matrix form, we have
(a · σ) · (b · σ) = (a · b) I + i (a × b) · σ .
Exercise 4.16
What is the 4 × 4 unitary matrix for the circuit
x2 H
x1
in the computational basis? What is the unitary matrix for the circuit
x2
x1 H
Solution
Concepts Involved: Linear Algebra, Quantum Gates, Tensor Products.
97
The unitary matrix for the second circuit is given by:
" # " # 1 0 1 0
1 1 1 1 0 1 0 1 0 1
H1 ⊗ I2 = √ ⊗ =√
2 1 −1 0 1 2 1 0 −1 0
0 1 0 −1
Construct a CNOT gate from one controlled-Z gate, that is, the gate whose action in the computational
basis is specified by the unitary matrix
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 −1
Solution
Concepts Involved: Linear Algebra, Quantum Gates, Controlled Operations.
We showed in Exercise 4.13 that HZH = X. Hence, to obtain a CNOT gate from a single controlled Z
gate, we can conjugate the target qubit with Hadamard gates:
c c
=
t H Z H t
We can verify this via matrix multiplication, using the result from the previous exercise:
1 1 0 0 1 0 0 0 1 1 0 0
1 1 −1 0 0 0 1 0 0 1 −1 0 0
(I1 ⊗ H2 )(CZ1,2 )(I1 ⊗ H2 ) =
2 0 0 1 1 0 0 1 0 0 0 1 1
0 0 1 −1 0 0 0 −1 0 0 1 −1
2 0 0 0
10 2 0 0
=
2 0 0 0 2
0 0 2 0
= CX1,2
98
Remark:
Exercise 4.18
Show that
Z
=
Z
Solution
Concepts Involved: Linear Algebra, Quantum Gates, Controlled Operations.
It suffices to verify that the two gates have the same effect on the 2-qubit computational basis states (as
it will then follow by linearity that they will have the same effect on any such superposition of the basis
states). Checking the 8 necessary cases, we then have that:
Remark: More compactly, we have CZ1,2 |b1 b2 i = |b1 i ⊗ Z b1 |b2 i = (−1)b1 .b2 |b1 b2 i for computational
basis states b1 , b2 ∈ {0, 1}.
Using this form we can write
99
Exercise 4.19: CNOT action on unitary matrices
The CNOT gate is a simple permutation whose action on a density matrix ρ is to rearrange the elements
in the matrix. Write out this action explicitly in the computational basis.
Solution
Concepts Involved: Linear Algebra, Quantum Gates, Controlled Operations, Density Operators
Let ρ be an arbitrary density matrix corresponding to a 2-qubit state. In the computational basis, we can
write ρ as:
a11 a12 a13 a14
a21 a22 a23 a24
ρ∼ = .
a31 a32 a33 a34
a41 a42 a43 a44
Studying the action of the CNOT gate on this density matrix, we calculate:
1 0 0 0 a11 a12 a13 a14 1 0 0 0
0 1 0 0 a21 a22 a23 a24 0 1 0 0
CX1,2 ρ CX1,2 =
0 0 0 1 a31 a32 a33 a34 0 0 0 1
0 0 1 0 a41 a42 a43 a44 0 0 1 0
a11 a12 a13 a14 1 0 0 0
a a22 a23 a24 0 1 0 0
= 21
a41 a42 a43 a34 0 0 0 1
a31 a32 a33 a34 0 0 1 0
a11 a12 a14 a13
a21 a22 a24 a23
=
a41 a42 a44 a33
a31 a32 a34 a33
100
Exercise 4.20: CNOT basis transformations
Unlike ideal classical gates, ideal quantum gates do not have (as electrical engineers say) ‘high-impedance’
inputs. In fact, the role of ‘control’ and ‘target’ are arbitrary – they depend on what basis you think of a
device as operating in. We have described how the CNOT behaves with respect to the computational basis,
and in this description the state of the control qubit is not changed. However, if we work in a different
basis then the control qubit does change: we will show that its phase is flipped depending on the state of
the ‘target’ qubit! Show that
H H
=
H H
√
Introducing basis states |±i ≡ (|0i ± |1i)/ 2, use this circuit identity to show that the effect of a CNOT
with the first qubit as control and the second qubit as target is as follows:
|+i|+i 7→ |+i|+i
|−i|+i 7→ |−i|+i
|+i|−i 7→ |−i|−i
|−i|−i 7→ |+i|−i.
Thus, with respect to this new basis, the state of the target qubit is not changed, while the state of the
control qubit is flipped if the target starts as |−i, otherwise it is left alone. That is, in this basis, the
target and control have essentially interchanged roles!
Solution
Concepts Involved: Linear Algebra, Quantum Gates, Controlled Operations.
101
Now conjugating CNOT1,2 under H1 ⊗ H2 , we have:
1 1 1 1 1 0 0 0 1 1 1 1
11 −1 1 −1 0 1 0 0 1 −1 1 −1
(H1 ⊗ H2 )CX1,2 (H1 ⊗ H2 ) =
4 1 1 −1 −1 0 0 0 1 1 1 −1 −1
1 −1 −1 1 0 0 1 0 1 −1 −1 1
4 0 0 0
1 0
0 0 4
=
4 0 0 4 0
0 4 0 0
= CX2,1
so using the proven circuit identity and the fact that H|0i = |+i, H|1i = |−i, we obtain the map:
|+i|+i 7→ |+i|+i
|−i|+i 7→ |−i|+i
|+i|−i 7→ |−i|−i
|−i|−i 7→ |+i|−i
Remark: Algebraically,
102
Exercise 4.21
U V V† V
Solution
Concepts Involved:
Let us analyse the second circuit. First, note that circuit in symmetric in the top two control registers. If
c1 = 0, the transformation applied to the final register is either I or V V † = I. The same is the case if
c2 = 0. When c1 = c2 = 1, the unitary applied to the final qubit is V V = U .
Remark: Note that the V † in not applied for c1 = c2 = 1 because of the first CNOT gate. This is the
clever part of the construction.
Exercise 4.22
Prove that a C 2 (U ) gate (for any single qubit unitary U ) can be constructed using at most eight one-qubit
gates, and six controlled-NOTs.
Exercise 4.23
Construct a C 1 (U ) gate for U = Rx (θ) and U = Ry (θ), using only CNOT and single qubit gates. Can you
reduce the number of single qubit gates needed in the construction from three to two?
Exercise 4.24
Verify that Figure 4.9 implements the Toffoli gate.
103
Exercise 4.25: Fredkin gate construction
(1) Give a quantum circuit which uses three Toffoli gates to construct the Fredkin gate (Hint: think of
the swap gate construction – you can control each gate, one at a time).
(2) Show that the first and last Toffoli gates can be replaced by CNOT gates.
(3) Now replace the middle Toffoli gate with the circuit in Figure 4.8 to obtain a Fredkin gate construc-
tion using only six two-qubit gates.
(4) Can you come up with an even simpler construction, with only five two-qubit gates?
Exercise 4.26
Show that the circuit:
differs by a Toffoli gate only by relative phases. That is, the circuit that takes |c1 , c2 , ti to
eiθ(c1 ,c2 ,t) |c1 , c2 , t ⊕ c1 · c2 i, where eiθ(c1 ,c2 ,t) is some relative phase factor. Such gates can be some-
times be useful in experimental implementations, where it may be much easier to implement a gate that
is the same as the Toffoli gate up to relative phases than it is to do the Toffoli directly.
104
Exercise 4.27
Using just CNOTs and Toffoli gates, construct a quantum circuit to perform the transformation
1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
This kind of partial cyclic permutation operation will be useful later, in Chapter 7.
Exercise 4.28
For U = V 2 with V unitary, construct a C 5 (U ) gate analogous to that in Figure 4.10, but using no work
qubits. You may use controlled-V and controlled-V † gates.
Exercise 4.29
Find a circuit containing O(n2 ) Toffoli, CNOT and single qubit gates which implements a C n (X) gate (for
n > 3), using no work qubits.
Exercise 4.30
Suppose U is a single qubit unitary operation. Find a circuit containing O(n2 ) Toffoli, CNOT and single
qubit gates which implements a C n (U ) gate (for n > 3), using no work qubits.
105
Exercise 4.31: More circuit identities
Let subscripts denote which qubit an operator acts on, and let C be a CNOT with qubit 1 the control qubit
and qubit 2 the target qubit. Prove the following identities:
CX1 C = X1 X2
CY1 C = Y1 X2
CZ1 C = Z1
CX2 C = X2
CY2 C = Z1 Y2
CZ2 C = Z1 Z2
Rz,1 (θ)C = CRz,1 (θ)
Rx,2 (θ)C = CRx,2 (θ).
Solution
Concepts Involved:
• Similarly,
CRz,1 (θ)C = C(aI1 + bZ1 )C = aI1 + bCZ1 C = aI1 + bZ1 = Rz,1 (θ)
106
Exercise 4.32
Let ρ be the density matrix describing a two qubit system. Suppose we perform a projective measurement
in the computational basis of the second qubit. Let P0 = |0ih0| and P1 = |1ih1| be the projectors onto
the |0i and the |1i states of the second qubit, respectively. Let ρ0 be the density matrix which would be
assigned to the system after the measurement by an observer who did not learn the measurement result.
Show that
ρ0 = P0 ρP0 + P1 ρP1
Also show that the reduced density matrix for the first qubit is not affected by the measurement, that is
tr2 (ρ) = tr2 (ρ0 ).
Solution
Concepts Involved:
The density matrix for the system after the measurement is given by
ρ0 = p0 ρ0 + p1 ρ1 (2)
P0 ρP0 P1 ρP1
= Tr(ρP0 ) + Tr(ρP1 ) (3)
Tr(ρP0 ) Tr(ρP1 )
= P0 ρP0 + P1 ρP1 (4)
Finally, we have
107
Exercise 4.33: Measurement in the Bell basis
The measurement model we have specified for the quantum circuit model is that measurements are
performed only in the computational basis. However, often we want to perform a measurement in some
other basis, defined by a complete set of orthonormal states. To perform this measurement, simply unitarily
transform from the basis we wish to perform the measurement in to the computational basis, then measure.
For example, show that the circuit
performs a measurement in the basis of the Bell states. More precisely, show that this circuit results in
a measurement being performed with corresponding POVM elements the four projectors onto the Bell
states. What are the corresponding measurement operators?
Solution
Concepts Involved:
The full action of the circuit is equivalent to the following four operators
0
1
M00 = |00i h00| (H1 ⊗ I2 ) CNOT = √ |00i(h00| + h11|) = |00ihβ00 |
2
0
1
M01 = |01i h01| (H1 ⊗ I2 ) CNOT = √ |01i(h01| + h10|) = |01ihβ01 |
2
0
1
M10 = |10i h10| (H1 ⊗ I2 ) CNOT = √ |10i(h00| − h11|) = |10ihβ10 |
2
0
1
M11 = |11i h11| (H1 ⊗ I2 ) CNOT = √ |11i(h01| − h10|) = |11ihβ11 |
2
†
Therefore, it is easy to see that Mk0 Mk0 are projections onto the Bell states
0
†
M00 M00 = |β00 ihβ00 |
0
†
M01 M01 = |β01 ihβ01 |
0 †
M10 M10 = |β10 ihβ10 |
0 †
M11 M11 = |β11 ihβ11 | .
108
Exercise 4.34: Measuring an operator
Suppose we have a single qubit operator U with eigenvalues ±1, so that U is both Hermitian and unitary, so
it can be regarded as both an observable and a quantum gate. Suppose we wish to measure the observable
U . That is, we desire to obtain a measurement result indicating one of the two eigenvalues, and leaving
a post-measurement state which is the corresponding eigenvector. How can this be implemented by a
quantum circuit? Show that the following circuit implements a measurement of U :
|0i H H
|ψin i U |ψout i
Solution
Concepts Involved:
First, let us determine the action of this circuit on the eigenstates of U, |ψin i = |u± i.
1 2 3
|0i H H
|ψin i U |ψout i
1
|Ψ(t1 )i = √ |0i + |1i |u± i .
2
1
|Ψ(t2 )i = √ |0i |u± i + |1iU |u± i
2
1
= √ |0i |u± i ± |1iU |u± i
2
= |±i|u± i
|Ψ(t3 )i = |0/1i|u± i
This shows that the above circuit implements a measurement of U for input states, |ψin i = |u± i.
Now, as U is also Hermitian, |u± i forms a full basis and thereby, we can extend the result to arbitrary
input states simply via linearity.
109
Exercise 4.35: Measurement commutes with controls
A consequence of the principle of deferred measurement is that measurements commute with quantum
gates when the qubit being measured is a control qubit, that is:
= =
U U U
(Recall that the double lines represent classical bits in this diagram.) Prove the first equality. The rightmost
circuit is simply a convenient notation to depict the use of a measurement result to classically control a
quantum gate.
Exercise 4.36
Construct a quantum circuit to add two two-bit numbers x and y modulo 4. That is, the circuit should
perform the transformation |x, yi 7→ |x, x + y mod 4i.
Solution
Concepts Involved:
x1 x1
x2 x2
y1
x + y mod 4
y2
Exercise 4.37
Provide a decomposition of the transform
1 1 1 1
1 1 i −1 −i
2 1 −1 1 1
1 −i −1 i
into a product of two-level unitaries. This is a special case of the quantum Fourier transform, which we
study in more detail in the next chapter.
Solution
Concepts Involved:
110
Exercise 4.38
Prove that there exist a d × d unitary matrix U which cannot be decomposed as a product of fewer than
d − 1 two-level unitary matrices.
Exercise 4.39
Find a quantum circuit using single qubit operations and CNOTs to implement the transformation
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 a 0 0 0 0 c
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 b 0 0 0 0 d
" #
a c
where Ũ = is an arbitrary 2 × 2 unitary matrix.
b d
Exercise 4.40
For arbitrary α and β show that
E(Rn (α), Rn (α + β)) = 1 − exp iβ/2 ,
Solution
Concepts Involved:
where we have used Rn (α + β) = Rn (α)Rn (β) and the fact that operator norms are invariant under
unitary operators.
111
We now notice that I − Rn (β) is normal, i.e. (I − Rn (β))(I − Rn (β))† = (I − Rn (β))† (I − Rn (β)).
For normal operators, the operator norm coincides with the largest eigenvalue.[Ref]
The eigenvalues of I − Rn (β) are given by
β β
1 − ei 2 and 1 − e−i 2 .
Exercise 4.41
This and the next two exercises develop a construction showing that the Hadamard, phase, controlled-NOT
and Toffoli gates are universal. Show that the circuit in Figure 4.17 applies the operation Rz (θ) to the
third (target) qubit if the measurement outcomes are both 0, where cos θ = 3/5, and otherwise applies Z
to the target qubit. Show that the probability of both measurement outcomes being 0 is 5/8, and explain
how repeated use of this circuit and Z = S 2 gates may be used to apply a Rz (θ) gate with probability
approaching 1.
Suppose cos θ = 3/5. We give a proof by contradiction that θ is an irrational multiple of 2π.
(1) Using the fact that eiθ = (3 + 4i)/5, show that if θ is rational, then there must exist a positive
integer m such that (3 + 4i)m = 5m .
(2) Show that (3 + 4i)m = 3 + 4i (mod 5) for all m > 0, and conclude that no m such that (3 + 4i)m =
5m can exist.
Solution
Concepts Involved:
112
If θ is a rational multiple of 2π, then there exist a positive integer m for which
eimθ = 1
(3 + 4i)m
=⇒ =1
5m
=⇒ (3 + 4i)m = 5m .
We want to prove that (3 + 4i)m ≡ 3 + 4i (mod 5) for all m > 0. Base Case (m = 1):
Inductive Step: Assume (3 + 4i)k ≡ 3 + 4i (mod 5) for some k. We show this holds for k + 1:
Now, compute:
(3 + 4i)2 = 9 + 24i + 16i2 = −7 + 24i ≡ 3 + 4i (mod 5).
Thus, (3 + 4i)k+1 ≡ 3 + 4i (mod 5).
By induction, (3 + 4i)m ≡ 3 + 4i (mod 5) for all m > 0.
Exercise 4.43
Use the results of the previous two exercises to show that the Hadamard, phase, controlled-NOT and Toffoli
gates are universal for quantum computation.
Exercise 4.44
Show that the three qubit gate G defined by the circuit:
iRx (πα)
Exercise 4.45
Suppose U is a unitary transform implemented by an n qubit quantum circuit constructed from H, S,
CNOT and Toffoli gates. Show that U is of the form 2−k/2 M for some integer k, where M is a 2n × 2n
matrix with only complex integer entries. Repeat this exercise with the Toffoli gate replaced by the π/8
gate.
113
Exercise 4.46: Exponential complexity growth of quantum systems
Let ρ be a density matrix describing the state of n qubits. Show that describing ρ requires 4n − 1
independent real numbers.
Solution
Concepts Involved:
To show that a density matrix ρ for n qubits requires 4n − 1 independent real parameters, we proceed as
follows:
1. Dimension of the Hilbert Space
n
The state space for n qubits is C2 , which has dimension 2n .
2. Structure of the Density Matrix
A density matrix ρ is:
Hermitian: ρ = ρ† ,
Trace One: Tr(ρ) = 1,
Positive Semidefinite: hv|ρ|vi ≥ 0 for all vectors |vi.
3. Counting Parameters
A. Hermitian Condition: A 2n × 2n Hermitian matrix has:
Total:
B. Trace Condition: The trace condition reduces the number of independent parameters by 1:
22n − 1.
Thus, a density matrix ρ for n qubits indeed requires 4n − 1 independent real numbers.
Exercise 4.47
PL
For H = k=1 Hk , prove that e−iHt = e−iH1 t e−iH2 t . . . e−iHL t for all i if [Hj , Hk ] = 0, for all j, k.
Solution
Concepts Involved:
114
We proceed by induction. For L = 2 we have:
X ([−it]n (H1 + H2 )n
e−i(H1 +H2 )t = n = 0∞
n!
Using the fact that [H1 , H2 ] = 0, we can then write:
∞ n ∞ n ∞ ∞
X 1 X n X X H1k H2n−k X (−itH1 )n X (−itH2 )m
e−i(H1 +H2 )t = H1k H2n−k = (−it)n =
n=0
n! k n=0
k!(n − k)! n=0 n! m=0
m!
k=0 k=0
and so:
where in the second-to-last equality we use the inductive hypothesis. Thus the L case holds and the claim
is proven via induction.
Exercise 4.48
Show that the restriction of Hk to at most c particles implies that in the sum (4.97), L is upper bounded
by a polynomial in n.
Prove that
1 2
e(A+B)∆t = eA∆t eB∆t e− 2 [A,B]∆t + O(∆t3 )
Solution
Concepts Involved:
To prove that
1 2
e(A+B)∆t = eA∆t eB∆t e− 2 [A,B]∆t + O(∆t3 ),
115
(A + B)2 (∆t)2
e(A+B)∆t = I + (A + B)∆t + + O(∆t3 ).
2
Calculating
Thus, we have
!
(A+B)∆t A2 + B 2 [A, B]
e = I + (A + B)∆t + + AB − ∆t2 + O(∆t3 )
2 2
! !
2 2
A2 (∆t) B 2 (∆t)
1
= I + A∆t + I + B∆t + I − [A, B]∆t + O(∆t3 )
2
2 2 2
1 2
= eA∆t eB∆t e− 2 [A,B]∆t + O(∆t3 ).
Exercise 4.50
PL
Let H = k Hk , and define
h ih i
U∆t = e−iH1 ∆t e−iH2 ∆t . . . e−iHL ∆t e−iHL ∆t e−iHL−1 ∆t . . . e−iH1 ∆t
(b) Use the results in Box 4.1 to prove that for a positive integer m,
m
E(U∆t , e−2miH∆t ) ≤ mα∆t3 ,
Exercise 4.51
Construct a quantum circuit to simulate the Hamiltonian
H = X1 ⊗ Y2 ⊗ Z3
116
That is, the function (x, y) 7→ (x, y ⊕ f (x)) may be implemented using T Toffoli gates. Give a quantum
circuit using 2T + n (or fewer) one, two and three qubit gates to implement the unitary operation defined
by
−2iπf (x)
|xi 7→ exp |xi
2n
Problem 4.2
Find a depth O(log n) construction for the C n (X) gate. (Comment: The depth of a circuit is the number
of distinct timesteps at which gates are applied; the point of this problem is that it is possible to parallelize
the C n (X) construction by applying many gates in parllel during the same timestep.)
where hg are real numbers and the sum is over all n-fold tensor products g of the Pauli matrices
{I, X, Y, Z}.
(3) Let ∆ = 1/k, for some positive integer k. Explain how the unitary operation exp −ihg g∆ may be
implemented using O(n) one and two qubit operations.
where the product is taken with respect to any fixed ordering of the n-fold tensor products of Pauli
matrices, g.
(6) Explain how to approximate U to within a distance > 0 using O(n16n /) one and two qubit
unitary operations.
117
Problem 4.4: Minimal Toffoli construction (Research)
The following problems concern constructions of the Toffoli with some minimal number of other gates. ‘
(1) What is the smallest number of two qubit gates that can be used to implement the Toffoli gate?
(2) What is the smallest number of one qubit gates and CNOT gates that can be used to implement the
Toffoli gate?
(3) What is the smallest number of one qubit gates and controlled-Z gates that can be used to implement
the Toffoli gate?
Construct a family of Hamiltonians, {Hn } , on n qubits, such that simulating Hn requires a number of
operations super-polynomial in n. (Comment: This problem seems to be quite difficult.)
Controlled-NOT gates and single qubit gates form a universal set of quantum logic gates. Show that
an alternative universal set of resources is comprised of single qubit unitaries, the ability to perform
measurements of pairs of qubits in the Bell basis, and the ability to prepare arbitrary four qubit entangled
states.
118
8 Quantum noise and quantum operations
Exercise 8.1: Unitary evolution as a quantum operation
Pure states evolve under unitary transforms as |ψi 7→ U |ψi. Show that, equivalently, we may write
ρ 7→ E(ρ) ≡ U ρU † , for ρ = |ψihψ|.
Solution
Concepts Involved: Unitary Transformations, Density Operators, Quantum Operations
Under unitary evolution, a pure state maps to another pure state via |ψi 7→ U |ψi. The density operator
corresponding to the final state is then ρU ψ = U |ψihψ| U † = U ρU † . We can see that this final state is
equivalent to if we started in the density operator formalism ρ = |ψihψ| and acted on it with the quantum
operation E(ρ) = U ρU † .
Recall from Section 2.2.3 (on page 84) that a quantum measurement with outcomes labeled by m is
†
P
described by a set of measurement operators Mm such that m Mm Mm = I. Let the state of the system
†
immediately before the measurement be ρ. Show that for Em (ρ) ≡ Mm ρMm , the state of the system
immediately after the measurement is
Em (ρ)
tr Em (ρ)
Also show that the probability of obtaining this measurement result is p(m) = tr Em (ρ) .
Solution
Concepts Involved: Measurement, Density Operators, Quantum Operations
It suffices to prove the claim for pure states ρ = |ψihψ|, as mixed states are a linear combination of pure
states and Em (·) and the trace are both linear in their arguments.
The postulate of quantum measurement tells us that the probability of measuring outcome m given state
|ψi is:
†
p(m) = hψ| Mm Mm |ψi
119
measurement state (when measuring a pure state) is:
Mm |ψi
|ψi → q .
†
hψ| Mm Mm |ψi
Exercise 8.3
Our derivation of the operator-sum representation implicitly assumed that the input and output spaces
for the operation were the same. Suppose a composite system AB initially in an unknown quantum state
ρ is brought into contact with a composite system CD initially in some standard state |0i, and the two
systems interact according to a unitary interaction U . After the interaction we discard systems A and D,
leaving a state ρ0 of system BC. Show that the map E(ρ) = ρ0 satisfies
Ek ρEk†
X
E(ρ) =
k
for some set of linear operators Ek from the state space of system AB to the state space of system BC,
and such that k Ek† Ek = I.
P
Solution
Concepts Involved: Stinespring Representation, Partial Trace
This problem involves deriving the operator-sum representation for the map E(ρ) = ρ0 , where ρ0 is the
state of subsystems BC after discarding subsystems AD.
Step 1: State evolution via unitary U
Initially, the total state of the system ABCD is
120
Step 3: Kraus decomposition
Now, we can express this map E in terms of Kraus operators. To this end, we express
Ek ρAB Ek† ,
X
E(ρAB ) =
k
where the operators Ek are linear operators from the state space of system AB to the state space of
system BC.
Specifically, the Kraus operators Ek are given by:
Ek = hek |U |0iD ,
where {|ek i} is some orthonormal basis for the combined system AD.
Step 4: Trace-preserving condition
Finally, the requirement that E is trace-preserving implies that the Kraus operators must satisfy
X †
Ek Ek = I.
k
U = P0 ⊗ I + P1 ⊗ X
where X is the usual Pauli matrix (acting on the environment), and P0 ≡ |0ih0| , P1 ≡ |1ih1| are projectors
(acting on the system). Give the quantum operation for this process, in the operator-sum representation,
assuming the environment starts in the state |0i.
Solution
Concepts Involved: Kraus Representation, Measurements, Partial Trace
Simply using the natural form of the Kraus operators Ek ≡ hek |U |e0 i, we have:
E0 = h0E |U |0E i = P0 ,
E1 = h1E |U |0E i = P1 .
121
Exercise 8.5: Spin flips
X Y
U = √ ⊗I + √ ⊗X
2 2
Give the quantum operation for this process, in the operator sum representation.
Solution
Concepts Involved: Kraus Represenations, Partial Trace
X
E0 = h0E |U |0E i = √ ,
2
Y
E1 = h1E |U |0E i = √ .
2
Suppose E and F are quantum operations on the same quantum system. Show that the composition
F ◦ E is a quantum operation, in the sense that is has an operator-sum representation. State and prove
an extension of this result to the case where E and F do not necessarily have the same input and output
spaces.
Solution
Concepts Involved: Krauss Represenation, Linear Maps, Compositions
(F ◦ E)(ρ) = F(E(ρ)).
Ek ρEk† .
X
E(ρ) =
k
122
Next, apply F to the result of E(ρ):
Since F is linear, we can apply it to each term in the sum separately: F(Ek ρEk† ) = Fj Ek ρEk† Fj† .
P
j
Thus, the composition F ◦ E can be written as:
Fj Ek ρEk† Fj† .
X
(F ◦ E)(ρ) =
j,k
This expression is again in the form of an operator-sum representation, where the Kraus operators for the
composed operation F ◦ E are given by the products Fj Ek . Hence, we have shown that the composition
of two quantum operations is itself a quantum operation, with Kraus operators Fj Ek .
k k
We can still write the composition F ◦ E, but now E will have Kraus operators Ek : HA → HB and F
will have Kraus operators Fj : HB → HC .
The composition will act as:
Fj Ek ρEk† Fj† ,
X
(F ◦ E)(ρ) =
j,k
where ρ is a state on HA , and the result will be a state on HC . The Kraus operators for the composed
map are still given by the products Fj Ek , which now act from HA to HC .
123
Exercise 8.7
Suppose that instead of doing a projective measurement on the combined principal system and environment
we had performed a general measurement described by measurement operators {Mm }. Find operator-sum
representations for the corresponding quantum operations Em on the principal system, and show that the
respective measurement probabilities are tr E(ρ) .
P
Next, define projectors Pm ≡ k |m, kihm, k| on the environmental system, E. Show that performing
U on ρ ⊗ |e0 ihe0 |, then measuring Pm gives m with probability tr Em (ρ) , and the corresponding post-
measurement state of the principal system is Em (ρ)/ tr Em (ρ) .
Exercise 8.10
Give a proof of Theorem 8.3 based on the freedom in the operator-sum
representation,
as follows. Let
†
Ej be a set of operation elements for E. Define a matrix Wjk ≡ tr Ej Ek . Show that the matrix W
is Hermitian and of rank at most d2 , and thus there is a unitary matrix u such that uW u† is diagonal
with at most d2 non-zero entries. Use u to define a new set of at most d2 non-zero operation elements
Fj for E.
Exercise 8.11
Suppose E is a quantum operation mapping a d-dimensional input space to a d0 -dimensional output space.
Show that E can be described using a set of at most dd0 operation elements {Ek }.
Exercise 8.12
Exercise 8.13
Show that unitary transformations correspond to rotations of the Bloch sphere.
124
Exercise 8.14
Exercise 8.15
Suppose a projective
√ measurement is performed on a single qubit in the basis |+i , |−i, where |±i ≡
(|0i ± |1i)/ 2. In the event that we are ignorant of the result of the measurement, the density matrix
evolves according to the equation
Exercise 8.16
The graphical method for understanding single qubit quantum operations was derived for trace-preserving
quantum operations. Find an explicit example of a non-trace-preserving quantum operation which cannot
be described as a deformation of the Bloch sphere, followed by a rotation and a displacement.
Exercise 8.17
A + XAX + Y AY + ZAZ
E(A) ≡
4
and show that
Now use the Bloch sphere representation for single qubit density matrices to verify (8.101).
Solution
Concepts Involved:
It is straightforward to check
I + r.σ I
E(ρ) = E =E +0
2 2
ρ + XρX + Y ρY + ZρZ I
=⇒ =
4 2
125
which we set out to prove.
Exercise 8.18
For k ≥ 1 show that tr ρk is never increased by the action of the depolarizing channel.
Solution
Concepts Involved: Trace, Depolarizing, Binomial expansion
I
Ep (ρ) = (1 − p)ρ + p
d
k
I
[Ep (ρ)]k = (1 − p)ρ + p
d
Exercise 8.19
Find an operator-sum representation for a generalized depolarizing channel acting on a d-dimensional
Hilbert space.
Solution
Concepts Involved:
p
E(ρ) = (1 − p)ρ + I,
d
where 0 ≤ p ≤ 1 is the depolarizing probability and I is the identity operator in the d-dimensional space.
126
The operator-sum (Kraus) representation for this channel is:
p
E0 = 1 − pI
r
p
Ei,j = |iihj| i, j = 1, . . . , d.
d
Exercise 8.20
Show that the circuit in Figure 8.13 models the amplitude damping quantum operation, with sin2 (θ/2) =
γ.
Solution
Concepts Involved:
U = (I ⊗ P0 + X ⊗ P1 )(P0 ⊗ I + P1 ⊗ Ry (θ))
= P0 ⊗ P0 + P1 ⊗ P0 Ry (θ) + XP0 ⊗ P1 + XP1 ⊗ P1 Ry (θ)
To match this with the matrix representation in Eq. (8.108), we should have
p
cos θ/2 = 1 − γ
=⇒ γ = sin2 (θ/2).
127
Exercise 8.21: Amplitude damping of a harmonic oscillator
Suppose that our principal system, a harmonic oscillator, interacts with an environment, modeled as
another harmonic oscillator, through the Hamiltonian
H = χ(a† b + b† a)
where a and b are the annihilation operators for the respective harmonic oscillators, as defined in Section
7.3.
(1) Using U = exp(−iH∆t), denoting the eigenstates of b† b at |kb i, and selecting the vacuum state
|0b i as the initial state of the environment, show that the operation elements Ek = hkb |U |0b i are
found to be
s
X nq
Ek = (1 − γ)n−k γ k |n − kihn|
n
k
where γ = 1 − cos2 (χ∆t) is the probability of losing a single quantum of energy, and states such as
|ni are eigenstates of a† a.
(2) Show that the operation elements Ek define a trace-preserving quantum operation.
Solution
Concepts Involved:
!
a b
ρ= , a + c = 1,
b∗ c
128
where the Kraus operators are
! √ !
1 0 0 γ
K0 = √ , K1 = .
0 1−γ 0 0
Show that EAD ⊗ EAD applied to this state gives a process which can be described by the operation
elements
p
E0dr = 1−γ I
√
E1dr
= γ |00ih01| + |00ih10|
that is, either nothing (E0dr ) happens to the qubit, or the qubit is transformed (E1dr ) into the state |00i,
which is orthogonal to |ψi. This is a simple error-detection code, and is also the basis for the robustness
of the ‘dual-rail’ qubit discussed in Section 7.4.
Solution
Concepts Involved:
129
The amplitude damping channel EAD is described by the Kraus operators
! √ !
1 0 0 γ
K0 = √ , K1 = .
0 1−γ 0 0
Hence, EAD ⊗ EAD either applies no change to the qubits (E0dr ) or transforms the state into |00i (E1dr ).
A single atom coupled to a single mode of electromagnetic radiation undergoes spontaneous emission,
as was described in Section 7.6.1. To see that this process is just amplitude damping, take the unitary
operation resulting from the Jaynes–Cummings interaction, Equation (7.77), with detuning δ = 0, and
give the quantum operation resulting from tracing over the field.
Exercise 8.25
If we define the temperature T of a qubit by assuming that in equilibrium the probabilities of being in
the |0i or |1i states satisfy a Boltzmann distribution, that is r0 = e−E0 /kB t /Z and p1 = e−E1 /kB T /Z,
where E0 is the energy of the state |0i, E1 the energy of the state |1i, and Z = e−E0 /kB t + e−E1 /kB T ,
what temperature described the state ρ∞ ?
Show that the circuit in Figure 8.15 can be used to model the phase damping quantum operation, provided
θ is chosen appropriately.
130
Exercise 8.27: Phase damping = phase flip channel
Give the unitary transformation which related the operation elements of (8.127)-(8.128) to those of (8.129)-
P
(8.130); that is, find u such that Ẽk = j ukj Ej .
Show that a single controlled-CNOT gate can be used as a model for phase damping, if we let the initial
state of the environment be a mixed state, where the amount of damping is determined by the probability
of the states in the mixture.
A quantum process E is unital if E(I) = I. Show that the depolarizing and phase damping channels are
unital, while amplitude damping is not.
Exercise 8.30: T2 ≤ T1 /2
The T2 phase coherence relaxation rate is just the exponential decay rate of the off-diagonal elements
in the qubit density matrix, while T1 is the decay rate of the diagonal elements (see Equation (7.144)).
Amplitude damping has both nonzero T1 and T2 rates; show that for amplitude damping T2 = T1 /2. Also
show that if amplitude and phase damping are both applied then T2 ≤ T1 /2.
Using (8.126), show that the element ρnm = hn|ρ|mi in the density matrix of the harmonic oscillator
2
decays exponentially as e−λ(n−m) under the effect of phase damping, for some constant λ.
Exercise 8.32
Explain how to extend quantum process tomography to the case of non-trace-preserving quantum opera-
tions, such as arise in the study of measurement.
Suppose that one wished to completely specify an arbitrary single qubit operation E by describing how a
set of points on the Bloch sphere {rk } transform under E. Prove that the set must contain at least four
points.
131
Exercise 8.34: Process tomography for two qubits
Show that the χ2 describing the black box operations on two qubits can be expressed as
χ2 = Λ2 ρ̄0 Λ2
where Λ2 = Λ ⊗ Λ, Λ is as defined in Box 8.5, and ρ̄0 is a block matrix of 16 measured density matrices,
ρ011 ρ012 ρ013 ρ014
0
ρ ρ022 ρ023 ρ024
ρ̄0 = P T 21 0 P
0
ρ31 ρ032 0
ρ33 ρ34
ρ041 ρ042 ρ043 ρ044
Consider a one qubit black box of unknown dynamics E1 . Suppose that the following four density matrices
are obtained from experimental measurements, performed according to Equations (8.173)–(8.176):
" #
0 1 0
ρ1 =
0 0
" √ #
0 0 1−γ
ρ2 =
0 0
" #
0 0 0
ρ3 = √
1−γ 0
" #
0 γ 0
ρ4 =
0 1−γ
where γ is a numerical parameter. From an independent study of each of these input-output relations, one
could make several important observations: the ground state |0i is left invariant by E1 . the excited state
|1i partially decays to the ground state, and superposition states are damped. Determine the χ matrix
for this process.
In the notation of Section 8.4.1, explicitly work through the steps to solve the differential equation
λ
ρ̇ = − (σ+ σ− ρ + ρσ+ σ− − 2σ− ρσ+ )
2
for ρ(t). Express the map ρ(0) 7→ ρ(t) as ρ(t) = k Ek (t)ρ(0)Ek† (t).
P
132
Solution
Concepts Involved: Differential Equations, Kraus Represenations
Let us use the master equation to obtain the differential equations for the diagonal and off-diagonal
elements: - **Population (diagonal) elements**:
with solutions:
ρ11 (t) = ρ11 (0)e−λt , ρ00 (t) = ρ00 (0) + ρ11 (0)(1 − e−λt ).
- **Coherence (off-diagonal) elements**:
λ λ
ρ̇10 (t) = − ρ10 (t), ρ̇01 (t) = − ρ01 (t),
2 2
with solutions:
! √ !
1 √0 0 1 − e−λt
E0 (t) = , E1 (t) = .
0 e−λt 0 0
Suppose Alice is in possession of a single qubit, denoted as system 1, which she wishes to teleport to
Bob. Unfortunately, she and Bob only share an imperfectly entangled pair of qubits. Alice’s half of this
pair is denoted system 2, and Bob’s half is denoted system 3. Suppose Alice performs a measurement
described by a set of quantum operations Em with result m on systems 1 and 2. Show that this induces an
operation Ẽm relating the initial stat of the system 1 to the final state of system 3, and that teleportation
is accomplished if Bob can reverse this operation using a trace-preserving quantum operation Rm , to
133
obtain
Ẽm (ρ) i
Rm h = ρ,
tr Ẽm (ρ)
Solution
Concepts Involved:
Teleportation Protocol
Let us consider a scenario where Alice holds qubit 1 (state ρ) to be teleported, and shares an imperfectly
entangled pair of qubits with Bob, where Alice holds qubit 2 and Bob holds qubit 3. The initial state of
the combined system (qubits 1, 2, and 3) is:
where |Ψi23 represents the (imperfectly) entangled state between qubits 2 and 3.
This describes how Alice’s measurement modifies the state of Bob’s qubit, based on the initial state ρ1 of
system 1.
134
is:
!
Ẽm (ρ1 )
Rm = ρ1 ,
Tr[Ẽm (ρ1 )]
It is tempting to believe that all unital channels, that is, those for which E(I) = I, result from averaging
over random unitary operations, that is, E(ρ) = k pk Uk ρ Uk† , where Uk are unitary operations and the
P
pk form a probability distribution. Show that while this is true for single qubits, it is untrue for larger
systems.
Solution
Concepts Involved:
1 1
E(X) = Tr(X)I − X T
2 2
for all X ∈ L(X ). It can be confirmed that E is a channel and unital, but it is not a mixed-unitary channel.
To demonstrate that E is not a mixed-unitary channel, observe the decomposition
The validity of this expression for all X ∈ L(X ) can be verified through the Choi representation of the
map, which matches the right-hand side.
Recalling the Choi theorem,
Let X and Y be complex Euclidean spaces. Suppose E ∈ C(X , Y) is a quantum channel, and let
{Aa : a ∈ Σ} ⊂ L(X , Y) be a linearly independent set of operators. Then
X
E(X) = Aa XA†a
a∈Σ
for all X ∈ L(X ). The channel E is an extreme point of the set of channels C(X , Y) if and only if the
collection
{A†b Aa : (a, b) ∈ Σ × Σ} ⊂ L(X )
135
is linearly independent.
For us, the set {A†j Ak : 1 ≤ j, k ≤ 3} contains the following operators:
0 0 0 0 0 0 0 0 0
A†1 A1 = 0 12 0 , A†1 A2 = 21 0 0 , A†1 A3 = 0 0 0 ,
1 1
0 0 2 0 0 0 0 −2 0
0 12 0 0 0 0 0 0 0
A†2 A1 = 0 0 0 , A†2 A2 = 0 0 0 , A†2 A3 = 0 0 12 ,
0 0 0 0 0 21 0 0 0
0 0 − 12 0 0 0 1
2 0 0
A†3 A1 = 0 0 0 , A†3 A2 = 0 0 21 , A†3 A3 = 0 0 0 .
0 0 0 0 0 0 0 0 0
This collection forms a linearly independent set and thus E is an extreme point of the set of channels.
Since E is not a unitary channel, it follows that it cannot be written as a convex combination of unitary
channels.
136
10 Quantum error-correction
Exercise 10.1
Verify that the encoding circuit in Figure 10.2 works as claimed.
|ψi
|0i
|0i
Solution
Concepts Involved: Linear Algebra, Quantum Gates, Controlled Operations.
We calculate:
where we use the definition of the controlled-X gate CX1,2 |0i ⊗ |ϕi = |0i ⊗ |ϕi and CX1,2 |1i ⊗ |ϕi =
|1i ⊗ X2 |ϕi in the last line.
Exercise 10.2
The action of the bit flip channel can be described by the quantum operation E(ρ) = (1 − p)ρ + pXρX.
Show that this may be given an alternative operator-sum representation, as E(ρ) = (1−2p)ρ+2pP+ √ρP+ +
2pP− ρP− where
√ P+ and P− are projectors onto the +1 and −1 eigenstates of X, (|0i + |1i)/ 2 and
(|0i − |1i)/ 2, respectively. This latter representation can be understood as a model in which the qubit
is left alone with probability 1 − 2p, and is ‘measured’ by the environment in the |+i , |−i basis with
probability 2p.
Solution
Concepts Involved: Linear Algebra, Projectors, Spectral Decomposition.
I −X
P− =
2
137
Therefore we can expand:
Exercise 10.3
Show by explicit calculation that measuring Z1 Z2 followed by Z2 Z3 is equivalent, up to labeling of the
measurement outcomes, to measuring the four projectors defined by (10.5)–(10.8), in the sense that both
procedures result in the same measurement statistics and post-measurement states.
Solution
Concepts Involved: Linear Algebra, Projectors, Spectral Decomposition.
The four projection operators corresponding to the four error syndromes of the three-qubit repetition code
are given by:
P0 ≡ |000ih000| + |111ih111|
P1 ≡ |100ih100| + |011ih011|
P2 ≡ |010ih010| + |101ih101|
P3 ≡ |001ih001| + |110ih110|
138
Now, we observe that:
PZ1 Z2 =+1 PZ2 Z3 =+1 = [(|00ih00| + |11ih11|) ⊗ I][I ⊗ (|00ih00| + |11ih11|)] = |000ih000| + |111ih111| = P0
PZ1 Z2 =−1 PZ2 Z3 =+1 = [(|01ih01| + |10ih10|) ⊗ I][I ⊗ (|00ih00| + |11ih11|)] = |011ih011| + |100ih100| = P1
PZ1 Z2 =−1 PZ2 Z3 =−1 = [(|01ih01| + |10ih10|) ⊗ I][I ⊗ (|01ih01| + |10ih10|)] = |010ih010| + |101ih101| = P2
PZ1 Z2 =+1 PZ2 Z3 =−1 = [(|00ih00| + |11ih11|) ⊗ I][I ⊗ (|01ih01| + |10ih10|)] = |001ih001| + |110ih110| = P3
Exercise 10.4
Consider the three qubit bit flip code. Suppose we had performed the error syndrome measurement by
measuring the eight orthogonal projectors corresponding to projections onto the eight computational basis
states.
(1) Write out the projectors corresponding to this measurement, and explain how the measurement
result can be used to diagnose the error syndrome: either no bits flipped or bit number j flipped,
where j is in the range one to three.
(2) Show that the recovery procedure works only for computational basis states.
Solution
Concepts Involved: Linear Algebra, Projectors, Error Syndrome and Recovery, Fidelity
Since the encoded state is |ψi = a |000i + b |111i, if we measure one of |000i , |111i we would
conclude no bits have been flipped. If we measure |001i or |110i, we would conclude that bit 1
was flipped (and so the state had become a |001i + b |110i. If we measure |010i or |101i, then we
would conclude that bit 2 was flipped (and so the state had become a |010i + b |101i). Finally, if
we measure |100i or |011i, we would conclude that bit 3 was flipped (and so the state had become
a |100i + b |011i).
(2) The recovery procedure involves doing nothing if the error syndrome tells us that no bits are flipped,
or flipping the jth bit if the jth bit was flipped. In the no bit flip case, after recovery we have
|000i → |000i , |111i → |111i. In the case we conclude the first bit was flipped, after recovery
we have |001i → |000i , |110i → |111i. In the case we conclude the second bit was flipped, after
recovery we have |010i → |000i , |101i → |111i. Finally if we conclude that the third bit was flipped,
139
after recovery we have |100i → |000i , |011i → |111i. In all cases, the post-recovery state is one
of the computational basis states |000i / |111i, so the recovery only succeeds if the initial state was
one of the computational basis states.
(3) Supposing we use the three qubit error-correcting code to protect |ψi = a |0i + b |1i. The encoded
state is |Ψi = a |000i + b |111i. After applying the noise channel (i.e. each bit flips with probability
p), the state we have is:
2 2
E(ρΨ ) = |a| (1 − p)3 + |b| p3 |000ih000|
2 2
+ |a| p(1 − p)2 + |b| p2 (1 − p) |001ih001| + |010ih010| + |100ih100|
2 2
+ |b| p(1 − p)2 + |a| p2 (1 − p) |110ih110| + |101ih101| + |011ih011|
2 2
+ |b| (1 − p)3 + |a| p3 |111ih111|
The recovery procedure maps any state with ≥ 2 zeros to |000ih000| (and hence back to |0ih0| after
decoding) and any state with ≥ 2 ones to |111ih111| (and hence back to |1ih1| after decoding), so
the final state is:
h i h i
2 3 2 2 3 2
ρ := R(E(ρΨ )) = |a| (1 − p) + 3p(1 − p) + |b| p + 3p (1 − p) |0ih0|
h i h i
2 3 2 2 3 2
+ |b| (1 − p) + 3p(1 − p) + |a| p + 3p (1 − p) |1ih1|
To find the minimum fidelity, it suffices to minimize hψ| ρ |ψi, which we compute to be:
h i h i
2 2 2
hψ| ρ |ψi = |a| |a| (1 − p)3 + 3p(1 − p)2 + |b| p3 + 3p2 (1 − p)
h i h i
2 2 2
+ |b| |b| (1 − p)3 + 3p(1 − p)2 + |a| p3 + 3p2 (1 − p)
2 2
With the normalization constraint on the initial state of |a| + |b| = 1, we can rewrite the above in
2
terms of of |a| alone:
h i h i
2 2 2 2
hψ| ρ |ψi = 2(|a| )2 − 2|a| + 1 (1 − p)3 + 3p(1 − p)2 + 2|a| − 2(|a| )2 p3 + 3p2 (1 − p)
2 2
We take the derivative of the above w.r.t. |a| and set it to zero to find the minimzing value of |a| :
∂ 2
h i
2 hψ| ρ |ψi = (4|a| − 2) (1 − p)3 + 3p(1 − p)2 − p3 + 3p2 (1 − p) = 0
∂|a|
2
Which for any value of p is satisfied when |a| = 21 , i.e. |a| = √12 (and so |b| = √12 as well). So,
the fidelity is minimized for |ψi = √12 (eiϕ0 |0i + eiϕ1 |1i) (which is what we might have expected -
given that the error correction succeeds only for the computational basis states, we should have the
worst fidelity for states which are the furthest from both). For these states, the fidelity is (plugging
140
into our former general expression):
r
p (1 − p)3 + 3p(1 − p)2 + 3p2 (1 − p) + p3 1
Fmin = |ψ|ρ |ψi = =√
2 2
Exercise 10.5
Show that the syndrome measurement for detecting phase flip errors in the Shor code corresponds to
measuring the observables X1 X2 X3 X4 X5 X6 and X4 X5 X6 X7 X8 X9 .
Solution
Concepts Involved: Linear Algebra, Eigenvalues, Eigenvectors, Error Syndrome
A phase flip error on a given block amounts to flipping the phase of the block:
Measuring X1−2 = X1 X2 X3 X4 X5 X6 compares the phase of the first and second blocks (with +1 if they
are the same, -1 if they are different) - we can see this from the eigenvalue relations:
analogously, measuring X2−3 = X4 X5 X6 X7 X8 X9 compares the phase of the second and third blocks.
The codewords have all three blocks with the same phase, so if we measure X1−2 = X2−3 = +1 then we
conclude no phase flip error occured. If we measure X1−2 = +1 and X2−3 = −1 then we conclude that
a phase flip must have occured in the third block (one of qubits 7/8/9). If we measure X1−2 = −1 and
X2−3 = +1 then we conclude that a phase flip occured on the first block (one of qubits 1/2/3). If we
measure X1−2 = X2−3 = −1 then we conclude that a phase flip error occured on the second block (one
of qubits 4/5/6). We thus conclude that measuring these two operators yields the syndrome for detecting
phase flip errors.
141
Exercise 10.6
Show that recovery from a phase flip on any of the first three qubits may be accomplished by applying
the operator Z1 Z2 Z3 .
Solution
Concepts Involved: Linear Algebra, Error Recovery
We saw that Zi (|000i ± |111i) = |000i ∓ |111i for i ∈ {1, 2, 3}, so if a phase flip error occurs on the first
qubit, we have:
Now since Z1 Z2 Z3 (|000i ± |111i) = |000i ± (−1)3 |111i = |000i ∓ |111i, we have:
(|000i − |111i)(|000i + |111i)(|000i + |111i) (|000i + |111i)(|000i − |111i)(|000i − |111i)
Z1 Z2 Z3 α √ +β √
2 2 2 2
(|000i + |111i)(|000i + |111i)(|000i + |111i) (|000i − |111i)(|000i − |111i)(|000i − |111i)
=α √ +β √
2 2 2 2
= |ψL i
Exercise 10.7
Consider the three qubit bit flip code of Section 10.1.1, with corresponding projector P =
|000ih000| + |111ih111|.
n The noise process this code oprotects against has operation elements
p p p p
(1 − p) I, p(1 − p) X1 , p(1 − p)2 X2 , p(1 − p)2 X3 where p is the probability that the bit flips.
3 2
Note that this quantum operation is not trace-preserving, since we have omitted operation elements cor-
responding to bit flips on two and three qubits. Verify the quantum error-correction conditions for this
code and noise process.
Solution
Concepts Involved: Linear Algebra, Projectors, Error Correction Conditions.
We calculate P Ei† Ej P for each of the errors Ei . Note that in this case the errors are all Hermitian,
so this reduces
npto calculation of P Ei Ej P for all combinations of errors.o Furthermore, note that the
p p p
set of errors (1 − p) I, p(1 − p)2 X1 , p(1 − p)2 X2 , p(1 − p)2 X3 is mutually commuting, so
3
142
P Ei Ej P = P Ej Ei P so we only need to check all combinations (and the order does not effect the result).
p p
P (1 − p)3 I (1 − p)3 IP = (1 − p)3 P 2 = (1 − p)3 P
p p
P p(1 − p)2 X1 p(1 − p)2 X1 P = p(1 − p)2 P IP = p(1 − p)2 P 2 = p(1 − p)2 P
p p
P p(1 − p)2 X2 p(1 − p)2 X2 P = p(1 − p)2 P IP = p(1 − p)2 P 2 = p(1 − p)2 P
p p
P p(1 − p)2 X3 p(1 − p)2 X3 P = p(1 − p)2 P IP = p(1 − p)2 P 2 = p(1 − p)2 P
where we have used that Paulis square to the identity and projectors are idempotent. For the other
combinations we find:
p p p
P (1 − p)3 I p(1 − p)2 X1 P = p(1 − p)5 (|000ih000| + |111ih111|)(|100ih000| + |011ih111|) = 0 = 0P
p p p
P (1 − p)3 I p(1 − p)2 X2 P = p(1 − p)5 (|000ih000| + |111ih111|)(|010ih000| + |101ih111|) = 0 = 0P
p p p
P (1 − p)3 I p(1 − p)2 X3 P = p(1 − p)5 (|000ih000| + |111ih111|)(|001ih000| + |110ih111|) = 0 = 0P
p p
P p(1 − p)2 X1 p(1 − p)2 X2 P = p(1 − p)2 (|000ih100| + |111ih011|)(|010ih000| + |101ih111|) = 0 = 0P
p p
P p(1 − p)2 X1 p(1 − p)2 X3 P = p(1 − p)2 (|000ih100| + |111ih011|)(|001ih000| + |110ih111|) = 0 = 0P
p p
P p(1 − p)2 X2 p(1 − p)2 X3 P = p(1 − p)2 (|000ih010| + |111ih101|)(|001ih000| + |110ih111|) = 0 = 0P
So we therefore find:
P Ei† Ej P = αij P
where:
(1 − p)3 0 0 0
0 p(1 − p)2 0 0
α=
0 0 p(1 − p)2 0
0 0 0 p(1 − p)2
143
Exercise 10.8
Verify that the three qubit phase flip code |0L i = |+ + +i , |1L i = |− − −i satisfies the quantum
error-correction conditions for the set of error operators {I, Z1 , Z2 , Z3 }.
Solution
Concepts Involved: Linear Algebra, Projectors, Error Correction Conditions.
First, note the projector onto the code C in this case is:
P = |+ + +ih+ + +| + |− − −ih− − −|
We calculate P Ei† Ej P for each of the errors Ei ∈ {I, Z1 , Z2 , Z3 }. The calculation is completely analogous
to p simply replacing X → Z, |0i → |+i , |1i → |−i, and setting all of the pre-factors
p that in Ex. 10.7,
(1 − p) and p(1 − p)2 to one. The result we find is:
3
P Ei† Ej P = αij P
where:
1 0 0 0
0 1 0 0
α=
0 0 1 0
0 0 0 1
which is of course Hermitian, and the QEC conditions are thus satisfied.
Exercise 10.9
Again, consider the three qubit phase flip code. Let Pi and Qi be the projectors into the |0i and |1i
states, respectively, of the ith qubit. Prove that the three qubit phase flip code protects against the error
set {I, P1 , Q1 , P2 , Q2 , P3 , Q3 }.
Solution
Concepts Involved: Linear Algebra, Error Correction Conditions, Discretization of Errors.
By Theorem 10.2 in the text, we know that if C is a quantum code and R is the error-correction procedure
constructed via the error correction conditions that corrects for a noise process E with operation elements
{Ei }, then R also corrects for arbitrary complex linear combinations of the Ei . We then note that all
errors in {I, P1 , Q1 , P2 , Q2 , P3 , Q3 } can be written as linear combinations of errors in {I, Z1 , Z2 , Z3 }:
I + Zi I − Zi
I = I, Pi = , Qi =
2 2
therefore by Theorem 10.2 and the result of Ex. 10.8, the phase flip code can protect against
{IP1 , Q1 , P2 , Q2 , P3 , Q3 }.
144
Exercise 10.10
Explicitly verify the quantum error-correction conditions for the Shor code, for the error set containing I
and the error operators Xj , Yj , Zj for j = 1 through 9.
Solution
Concepts Involved: Linear Algebra, Projectors, Error Correction Conditions.
We have:
where:
(|000i + |111i)(|000i + |111i)(|000i + |111i)
|0L i = √
2 2
(|000i − |111i)(|000i − |111i)(|000i − |111i)
|1L i = √
2 2
All Ei we consider in the set of errors are Hermitian, so Ei† = Ei . Firstly, since all Pauli operators square
to the identity, we find for all Ei that:
P Ei† Ei P = P Ei2 P = P IP = P 2 = P
Next, we observe:
as all possible bit/phase flips on a single qubit map the codewords to states orthogonal to both codewords.
Next, we find that for k 6= l that:
P Xk Xl P = P Yk Yl P = P Xk Yl P = P Yk Xl P = P Xk Zl P = P Zk Xl P = P Yk Zl P = P Zk Yl P
= 0 = 0P
as in each case we have a bit flip on one or two qubits which maps the codewords to state orthogonal to
both codwords.
Finally, we find that:
P if k, l are in the same block
P Zk Zl P =
0 if k, l are in different blocks
as in the former case the two phase flips cancel out (and thus P is preserved), and in the latter case
we have phase flips on two different blocks and the codewords are mapped to states orthogonal to both
codewords.
145
We thus conclude that:
P Ei† Ej P = αij P
where αij is Hermitian (as it has 1s on the diagonal, 1s on entries for Zi Zj with i, j in the same block
(thus symmetric across the diagonal), and zero elsewhere). We have thus verified the quantum error
correction conditions.
Exercise 10.11
Construct operation elements for a single qubit quantum operation E that upon input of any state ρ
replaces it with the completely randomized state I/2. It is amazing that even such noise models as this
may be corrected by codes such as the Shor code!
Solution
Concepts Involved: Linear Algebra, Density Operators, Quantum Operations.
I
Ek ρEk† =
X
E(ρ) =
2
k
for any input single-qubit state ρ. We claim that 2 I, 21 X, 12 Y, 12 Z are the operation elements with this
1
desired property. First, we verify that they satisfy the completeness relation:
1 2 1
Ek† Ek =
X
(I + X 2 + Y 2 + Z 2 ) = (4I) = I
4 4
k
Next, we verify that they have the claimed property of sending every initial qubit state to the maximally
mixed state. From Ex. 2.72, we can write a single-qubit density operator as:
I + rx X + ry Y + rz Z
ρ=
2
146
where r = (rx , ry , rz ) ∈ R3 and krk = 1. Now calculating E(ρ), we have:
1
E(ρ) = (ρ + XρX + Y ρY + ZρZ)
4
1
= (I + X 2 + Y 2 + Z 2 ) + rx (X + X 3 + Y XY + ZXZ)
8
+ ry (Y + XY X + Y 3 + ZY Z) + rz (Z + XZX + Y ZY + Z 3 )
1
= 4I + rx (2X + 2iY Z) + ry (2Y + 2iZX) + rz (2Z + 2iXY )
8
1
= 4I + rx (2X + 2i(iX) + ry (2Y + 2i(iY )) + rz (2Z + 2i(iZ))
8
1
= (4I)
8
I
=
2
where we use that XY = iZ, Y Z = iX, and XZ = iY . The claim is thus proven.
Remark:
The described channel is of course the single-qubit depolarizing channel of full strength.
Exercise 10.12
p
Show that the fidelity between the state |0i andpE(|0ih0|) is 1 − 2p/3, and use this to argue that the
minimum fidelity for the depolarizing channel is 1 − 2p/3.
Solution
Concepts Involved: Linear Algebra, Density Operators, Quantum Operations, Fidelity.
The density operator corresponding to |0i is |0ih0|, and sending this through the depolarizing channel we
have:
p
E(|0ih0|) = (1 − p) |0ih0| + (X |0ih0| X + Y |0ih0| Y + Z |0ih0| Z)
3
p
= (1 − p) |0ih0| + (|1ih1| + |1ih1| + |0ih0|)
3
2p 2p
= (1 − ) |0ih0| + |1ih1|
3 3
and so:
s r
2p 2p 2p
F (|0i , E(|0ih0|)) = h0| (1 − ) |0ih0| + |1ih1| |0i = 1 − (6)
3 3 3
147
For a more rigorous argument; by from Ex. 2.72, we can write a single-qubit density operator as:
I + rx X + ry Y + rz Z
ρ=
2
where r = (rx , ry , rz ) ∈ R3 and krk = 1 when ρ = |ψihψ| a pure state. We then have that:
X + rx I + ry Y X + rz ZX
hψ| X |ψi = Tr ρψ X = Tr = rx
2
where we use that krk = 1 in the fourth equality. Since this is true for all pure states, it must be the
minimum fidelity.
Exercise 10.13
Show that the minimum fidelity F (|ψi, E(|ψihψ|)) when E is the amplitude damping channel when E is
√
the amplitude damping channel with parameter γ is 1 − γ.
Solution
Concepts Involved: Linear Algebra, Fidelity.
2 2
Let |ψi = a |0i + b |1i with |a| + |b| = 1. Then we have:
" #
2
|a| ab∗
|ψihψ| = ∗ 2
a b |b|
and after applying the amplitude damping channel we have (from Ex. 8.22):
"
2 √ #
1 − (1 − γ)(1 − |a| ) ab∗ 1 − γ
E(|ψihψ|) = √ 2
a∗ b 1 − γ |b| (1 − γ)
148
Calculating the fidelity, we then have:
p
F (|ψi , E(|ψihψ|)) = hψ| E(|ψihψ|) |ψi
v
i 1 − (1 − γ)(1 − |a|2 ) ab∗ √1 − γ a
uh " #" #
u
= ∗ ∗ √
t a b 2
a∗ b 1 − γ |b| (1 − γ) b
q
2 2 2 2 4
p
= |a| (1 − (1 − γ)(1 − |a| )) + 2|a| |b| 1 − γ + |b| (1 − γ)
2 2 2
Using the normalization condition, |b| = 1 − |a| so we can write the above in terms of |a| alone:
q
2 2 2 2 2
p
F (|ψi , E(|ψihψ|)) = |a| (1 − (1 − γ)(1 − |a| )) + 2|a| (1 − |a| ) 1 − γ + (1 − |a| )2 (1 − γ)
q
2 2
p p
= 2(1 − 1 − γ − γ)(|a| )2 + (−2 + 2 1 − γ + 3γ)|a| + 1 − γ
This is minimized when the expression under the square root is minimized. Taking the derivative w.r.t
2
|a| , we find:
∂ 2
p 2
p
2 (F (|ψi , E(|ψihψ|))) = 4(1 − 1 − γ − γ)|a| − 2 + 2 1 − γ + 3γ
∂|a|
2
which is non-negative for |a| ∈ [0, 1] (which is the domain over which it is defined). Therefore
2
F (|ψi , E(|ψihψ|)) is an increasing function of |a| over [0, 1], and hence F (|ψi , E(|ψihψ|)) is minimized
when a = 0 and therefore |ψi = |1i. In this case, the fidelity is:
p
F (|ψi , E(|ψihψ|))min = F (|1i , E(|1ih1|)) = 1−γ
as claimed.
Exercise 10.14
Write an expression for a generator matrix encoding k bits using r repetitions for each bit. This is an
[rk, k] linear code, and should have an rk × k generator matrix.
Solution
Concepts Involved: Linear Algebra, Generator Matrices.
149
Exercise 10.15
Show that adding one column of G to another results in a generator matrix generating the same code.
Solution
Concepts Involved: Linear Algebra, Generator Matrices.
The set of possible codewords of a code corresponds to the vector space spanned by the columns of G.
So if G = [v1 , v2 , . . . vk ] then the possible codewords are:
v = c1 v1 + c2 v2 + . . . + ck vk
where ci ∈ Z2 and addition is done modulo 2. WLOG suppose we add column 2 to colummn 1 (permuting
the columns of G clearly preserves the codespace, as it just amounts to permuting labels in the equation
above), so we have G0 = [v1 + v2 , v2 , . . . , vk ], so the possible codewords are:
where c0i ∈ Z2 . By defining c01 = c1 , c02 = c1 + c2 , and c0j = cj for j ≥ 2 we can see that the codewords
v0 are the same as the codewords v, and thus G and G0 generate the same code.
Exercise 10.16
Show that adding one row of the parity check matrix to another does not change the code. Using Gaussian
elimination and swapping of bits it is therefore possible to assume that the parity check matrix has the
standard form [A|In−k ] where A is an (n − k) × k matrix.
Solution
Concepts Involved: Linear Algebra, Parity Check Matrices.
(n−k)×n
In the parity check matrix formulation, an [n, k] code is all x ∈ Zn2 such that Hx = 0 where H ∈ Z2
is the parity check matrix. We can write:
v1T
T
v2
H= ..
.
vnT
with viT the rows of H. By the definition of matrix multiplication, it follows from Hx = 0 that:
vi · x = 0
for each i and for all codewords x. WLOG suppose we add row 2 to row 1 (permuting the rows of H
150
clearly preserves the codespace, as the above condition is unchanged). We then have:
v1T + v2T
v2T
0
H = ..
.
vnT
(v1 + v2 ) · x = v1 · x + v2 · x = 0 + 0 = 0
v1 · x = (v1 + v2 + v2 ) · x = (v1 · v2 ) · x + v2 · x = 0 + 0 = 0
Exercise 10.17
Find a parity check matrix for the [6, 2] repetition code defined by the generator matrix in (10.54).
Solution
Concepts Involved: Linear Algebra, Generator Matrices, Parity Check Matrices.
The [6, 2] repetition code has generator matrix:
1 0
1 0
1 0
G=0 1
0 1
0 1
To construct H, we pick out 6 − 2 = 4 linearly independent vectors orthogonal to the columns of G. Four
such vectors are:
1 0 0 0
1 1 0 0
0 1 0 0
, , ,
0 0 1 0
0 0 1 1
0 0 0 1
151
Therefore one such parity check matrix is:
1 1 0 0 0 0
0 1 1 0 0 0
0 0 0 1 1 0
0 0 0 0 1 1
Exercise 10.18
Show that the parity check matrix H and generator matrix G for the same linear code satisfy HG = 0
Solution
Concepts Involved: Linear Algebra, Genrator Matrices, Parity Check Matrices.
For a given [n, k] code with parity check matrix H and generator matrix G, we can write:
v1T
T
v2 h i
H= . , G = y1 y2 · · · yk
.
.
T
vn−k
where vi , yj are each n-dimensional vectors which are orthogonal to one another. By the definition of
matrix multiplication, HG is a n − k × k matrix with entries:
(HG)ij = vi · yj = 0
where the last equality follows by orthogonality, thus proving the claim.
Exercise 10.19
Suppose an [n, k] linear code C has a parity check matrix of the form H = [A|In−k ], for some (n − k) × k
matrix A. Show that the corresponding generator matrix is
Ik
G= .
−A
Solution
Concepts Involved: Linear Algebra, Genrator Matrices, Parity Check Matrices.
To get a generator matrix from a parity check matrix, we pick k linearly independent vectors y1 , . . . yk
spanning the kernel of H, and set G to have columns y1 through yyk . In this case, H has standard form
152
H = [A|In−k ] and so we may write:
v1T eT1,n−k
T
v2 eT2,n−k
H=
..
.
T
vn−k eTn−k,n−k
where viT are the rows of A and ei,n−k is a n − k length vector with 1 in the ith position and 0s elsewhere.
We want to find vectors in the kernel of H, i.e. vectors y that satisfy:
for every i ∈ {1, . . . , n − k}. A clear choice that satisfies this relation is y1,...,n−k = en,k and yk+1,...,n =
−wn where wn is the nth column of A; this choice satisfies the above as:
Exercise 10.20
Let H be a parity check matrix such that any d − 1 columns are linearly independent, but there exists a
set of d linearly dependent columns. Show that the code defined by H has distance d.
Solution
Concepts Involved: Linear Algebra, Parity Check Matrices, Code Distance.
x1 h1 + x2 h2 + . . . + xn hn = 0
where hi are the columns of H. Since any d − 1 columns are linearly independent, it follows that any sum
of d − 1 (or less) columns of H is nonzero, and therefore there are no codewords of weight d − 1 or lower.
However, there exists a set of d linearly dependent columns, and therefore there exists a codeword that
is 1 for each of those columns and 0 elsewhere, and is therefore of weight d. There are no codewords of
smaller weight, and therefore we conclude that the code has distance d.
153
Solution
Concepts Involved: Linear Algebra, Parity Check Matrices, Code Distance.
An [n, k, d] code has an n−k×n parity check matrix H. It therefore has at most n−k linearly independent
columns. From the solution to the previous exercise, if a code has distance d then the parity check matrix
must have all sets of d − 1 columns be linearly independent (else there would exist a codeword of weight
d − 1 and hence the code would have distance < d, a contradiction). Combining these two facts, it follows
that:
n−k ≥d−1
as claimed.
Exercise 10.22
Show that all Hamming codes have distance 3, and thus can correct an error on a single bit. The Hamming
codes are therefore [2r − 1, 2r − r − 1, 3] codes.
Solution
Concepts Involved: Linear Algebra, Parity Check Matrices, Code Distance.
Recall that the [2r − 1, 2r − r − 1] Hamming code (for r ≥ 2) is a linear code having parity check matrix
whose columns are all 2r − 1 bit strings of length r which are not zero.
Any two columns of H are different and therefore linearly independent. Furthermore, H has the 3 columns:
1 0 1
0 1 1
0 , 0 , 0
. . .
. . .
. . .
0 0 0
which are linearly dependent as they add together to make zero. By Ex. 10.20, any Hamming code has
distance 3. Since a distance d ≥ 2t + 1 code can correct errors on t bits, all Hamming codes can correct
errors on one bit.
Exercise 10.23
Exercise 10.24
Show that a code with generator matrix G is weakly self-dual if and only if GT G = 0.
154
Solution
Concepts Involved: Linear Algebra, Generator Matrices, Dual codes.
Recall that if we have a [n, k] code C with generator matrix G and parity check matrix H, then the
dual code C ⊥ is the code consisting of all codewords y such that y is orthogonal to all codewords in C.
Furthermore, recall that a code is weakly self-dual if C ⊆ C ⊥ .
=⇒ : Suppose that G is weakly self dual. Then, it follows that every codeword y = Gx ∈ C is
contained in C ⊥ . Since the parity check matrix applied to a codeword of a code gives zero, for C ⊥ we
have that GT y = 0 and thus GT y = GT Gx = 0 for all length k binary vectors x, but this is only possible
if GT G = 0.
⇐= : Suppose that GT G = 0. Suppose that y = Gx, y 0 = Gx0 are codewords of C. We then see that
y · y = x0T GT Gx = x0T 0x = 0. Thus, all codewords of C are orthogonal to each other, and thus all
0
Exercise 10.25
Solution
Concepts Involved: Linear Algebra, Dual Codes
Suppose x ∈ C ⊥ . Then it follows that y · x = 0 for every codeword y ∈ C. Thus, y∈C (−1)x·y =
P
0
/ C ⊥ . Then we claim that half the codewords of
P P
y∈C (−1) = y∈C 1 = |C|. Suppose instead that x ∈
C are orthogonal to x with x · y = 0, and the other half are not orthogonal with x · y = 1. As proof of
/ C ⊥ , it follows that at least one
this fact, suppose there are n basis codewords y1 , . . . , yn of C; since x ∈
of these basis codewords is not orthogonal to x. Let y1 , . . . , yk be the non-orthogonal basis codewords
and yk+1 , . . . , yn be the orthogonal codewords. To form an arbitrary codeword of C, we take a linear
combination of the basis codewords. If an even number fo y1 , . . . , yk are included in the sum then the
codeword is orthogonal to x and otherwise the codeword is not orthogonal to x. There are 2k−1 to choose
an even number of elements out of a set of k elements and 2k−1 ways to choose an odd number, and
therefore there are the same number of codewords in C that are orthogonal to x as there are those that
are not orthogonal. Hence, the contributions of these two evenly weighted parts cancel in the sum to yield
x·y
P
y∈C (−1) = 0.
Exercise 10.26
Suppose H is a parity check matrix. Explain how to compute the transformation |xi|0i 7→ |xi|Hxi using
a circuit composed entirely of controlled-NOTs.
Solution
Concepts Involved: Linear Algebra, Parity Check Matrices, Controlled Operations
155
By the definition of matrix multiplication:
X
(Hx)i = Hij xj (7)
j
So, if we want the ith bit in the second register to become (Hx)i , this can be realized by applying a
CNOT gate with control on the jth qubit of the first register (in |xi) and acting on the ith qubit of the
second register if Hij = 1 (and doing nothing if Hij = 0); each gate (or identity) realizing one term in
the above sum.
Exercise 10.27
Show that the codes defined by
1 X
|x + C2 i ≡ p (−1)u·y |x + y + vi
|C2 | y∈C2
as parameterized by u and v are equivalent to CSS(C1 , C2 ) in the sense that they have the same error-
correcting properties. These codes, which we’ll refer to as CSSu,v (C1 , C2 ) will be useful later in our study
of quantum key distribution, in Section 12.6.5.
Exercise 10.28
Verify that the transpose of the matrix in (10.77) is the generator of the [7, 4, 3] Hamming code.
Solution
Concepts Involved: Linear Algebra, Parity Check Matrices, Generator Matrices
156
Looking at the parity check matrix for the [7, 4, 3] Hamming code, we have:
0 0 0 1 1 1 1
H[C1 ] = 0 1 1 0 0 1 1
1 0 1 0 1 0 1
In order to confirm H[C2 ]T as the generator matrix of the code, we require that the columns are linearly
independent and lie in the kernel of H[C1 ]. The linearly independence is immediately clear by inspection
(as columns i = 1, 2, 3, 4 uniquely have a non-zero ith entry). Let us then just verify that they lie in the
kernel of H, which can equivalently be done by checking that H[C1 ]H[C2 ]T = 0:
1 0 0 0
0 1 0 0
0 0 0 1 1 1 1 0 0 1 0
H[C1 ]H[C2 ]T = 0 1 1 0 0 1 1
0 0 0 1
1 0 1 0 1 0 1 0 1 1 1
1 0 1 1
1 1 0 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
0 0 0 0
= 0 0 0 0
0 0 0 0
Exercise 10.29
Show that an arbitrary linear combination of any two elements of VS is also in VS . Therefore, VS is a
subspace of the n qubit state space. Show that VS is the intersection of the subspaces fixed by each
operator in S (that is, the eigenvalue one eigenspaces of elements of S).
Exercise 10.30
Show that −I ∈
/ S implies ±iI ∈
/ S.
Solution
Concepts Involved: Group Theory, Pauli Group
Subgroups are groups and therefore closed under multiplication. If iI ∈ S, then (iI)2 = (i)2 I = −I ∈ S.
The claim is thus shown via the contrapositive.
157
Exercise 10.31
Suppose that S is a subgroup of Gn generated by elements g1 , . . . , gl . Show that all the elements of S
commute if and only if gi and gj commute for each pair i, j.
Solution
Concepts Involved: Group Theory, Pauli Group
=⇒ : Suppose all elements of S commute. Since each generator is itself an element of S, any pair of
generators will commute.
⇐= : Suppose any pair of generators gi , gj of S commute. Any two elements s1 , s2 ∈ S can be written
as a product of generators:
Using the pairwise commutation of the generators, we can move the gi s together to find that s1 s2 =
s2 s1 = g1n1 +m1 g2n2 +m2 . . . gknk +mk and so all elements of S commute.
Remark: The above argument holds for any group, not just subgroups of Gn .
Exercise 10.32
Verify that the generators in Figure 10.6 stabilize the codewords for the Steane code, as described in
Section 10.4.2.
Exercise 10.33
Show that g and g 0 commute if and only if r(g)Λr(g 0 )T = 0. (In the check matrix representation,
arithmetic is done modulo two.)
Exercise 10.34
Let S = hg1 , . . . , gl i. Show that −I is not an element of S if and only if gj2 = I for all j, and gj 6= −I
for all j.
Exercise 10.35
Let S be a subgroup of Gn such that −I is not an element of S. Show that g 2 = I for all g ∈ S, and
thus g † = g.
Exercise 10.36
158
Solution
Concepts Involved: Linear Algebra, Unitary Operators, Controlled Operations
First note our ability to write the controlled-NOT operation in block diagonal form:
" #
† I 0
U =U =
0 X
Exercise 10.37
What is U Y1 U † ?
Solution
Concepts Involved: Linear Algebra, Unitary Operators, Controlled Operations
Note from the previous Exercise that U X1 U † = X1 X2 and U Z1 U † = Z1 . Hence writing Y = iZX and
using that U † U = I:
Exercise 10.38
Suppose U and V are unitary operators on two qubits which transform Z1 , Z2 , X1 and X2 by conjugation
in the same way. Show this implies that U = V .
159
Solution
Concepts Involved: Linear Algebra, Unitary Operators, Pauli Group
Exercise 10.39
Verify (10.91).
Solution
Concepts Involved: Linear Algebra, Unitary Operators
160
Exercise 10.40
Provide an inductive proof of Theorem 10.6 as follows.
(1) Prove that the Hadamard and phase gates can be used to perform any normalizer operation on a
single qubit.
(3) Show that any gate U ∈ N (Gn+1 ) may be implemented using O(n2 ) Hadamard, pahse, and
controlled-NOT gates.
Exercise 10.41
Exercise 10.42
Use the stabilizer formalism to verify that the circuit of Figure 1.13 on page 27 teleports qubits, as claimed.
Note that the stabilizer formalism restricts the class of states being teleported, so in some sense this is
not a complete description of teleportation, nevertheless it does allow an understanding of the dynamics
of teleportation.
Exercise 10.43
Exercise 10.44
Show that N (S) = Z(S) for any subgroup S of Gn not containing −I.
Suppose C(S) is an [n, k, d] stabilizer code. Suppose k qubits are encoded in n qubits using this code,
which is then subjected to noise. Fortunately, however, we are told that only d − 1 of the qubits are
affected by the noise, and moreover, we are told precisely which d − 1 qubits have been affected. Show
that it is possible to correct the effects of such located errors.
161
Exercise 10.46
Show that the stabilizer for the three qubit pahse flip code is generated by X1 X2 and X2 X3 .
Exercise 10.47
Verify that the generators of Figure 10.11 generate the two codewords of Equation (10.13).
Exercise 10.48
Exercise 10.49
Use Theorem 10.8 to veirfy that the five qubit code can protect against an arbitrary single qubit error.
Exercise 10.50
Show that the five qubit code saturates the quantum Hamming bound, that is, it satisfies the inequality
of (10.51) with equality.
Exercise 10.51
Verify that the check matrix defined in (10.106) corresponds to the stabilizer of the CSS code
CSS(C1 , C2 ), and use Theorem 10.8 to show that arbitrary errors on up to t qubits may be corrected by
this code.
Exercise 10.52
Verify by direct operation on the codewords that the operators of (10.107) act appropriately, as logical Z
and X.
162
Exercise 10.53
Prove that the encoded Z operators are independent of one another.
Exercise 10.54
Prove that with the check matrix for the encoded X operators defined as above, the encoded X operators
are idnependent of one another and of the gnerators, commute with the gnerators of the stabilizer, with
each other, and X̄j commutes with all the Z̄k except with Z̄j , with which it anti-commutes.
Exercise 10.55
Find the X̄ operator for the standard form of the Steane code.
Exercise 10.56
Show that replacing an encoded X or Z operator by g times that operator, where g is an element of the
stabilizer, does not change the action of the operator on the code.
Exercise 10.57
Give the check matrices for the five and nine qubit codes in standard form.
Exercise 10.58
Verify that the circuits in Figures 10.13–10.15 work as described, and check the claimed circuit equiva-
lences.
163
Exercise 10.59
Show that by using the identities of Figures 10.14 and 10.15, the syndrome circuit of Figure 10.16 can be
replaced with the circuit of Figure 10.17.
Exercise 10.60
Construct a syndrome measuring circuit analogous to that in Figure 10.16, but for the nine and five qubit
codes.
Exercise 10.61
Describe explicit recovery operations Ej† corresponding to the different possible error syndromes that may
be measured using the circuit in Figure 10.16.
Exercise 10.62
Show by explicit construction of generators for the stabilizer that concatenating an [n1 , 1] stabilizer code
with an [n2 , 1] stabilizer code gives an [n1 n2 , 1] stabilizer code.
Exercise 10.63
Suppose U is any unitary operation mapping the Steane code into itself, and such that U Z̄U † = X̄ and
U X̄U † = Z̄. Prove that √ of U on the encoded states |0L i and |1L i is
√ up to a global phase the action
|0L i 7→ (|0L i + |1L i)/ 2 and |1L i 7→ (|0L i − |1L i)/ 2.
It is clear that an X error on the control qubit of a CNOT gate propagates to the target qubit. In addition,
it turns out that a Z error on the target propagates back to the control! Show this using the stabilizer
formalism, and also directly using quantum circuit identities. You may find Exercise 4.20 on page 179
useful.
164
Exercise 10.65
An unknown qubit in the state |ψi can be swapped with a second qubit which is prepared in the state |0i
using only two controlled-NOT gates, with the circuit
Show that the two circuits below, which use only a single CNOT gate, with measurement and a classically
controlled single qubit operation, also accomplish the same task:
Exercise 10.66
One way to implement a π/8 gate is to first swap the qubit state |ψi you wish to transform with some
unknown state |0i, then to apply a π/8 gate to the resulting qubit. Here is a quantum circuit which does
that:
Doing this does not seem particularly useful, but actually it leads to something which is! Show that by
using the relations T X = exp −iπ/4 SX and T U = U T (U is the controlled-NOT gate, and T acts on
the control qubit) we may obtain the circuit of Figure 10.25.
Exercise 10.67
Show that the following circuit identities hold:
165
Exercise 10.68: Fault-tolerant Toffoli gate construction
A procedure similar to the above sequence of exercises for the π/8 gate gives a fault-tolerant Toffoli gate.
(1) First, swap the three qubit state |xyzi you wish to transform with some known state |000i, then
apply a Toffoli gate to the resulting qubits¿ Show that the following circuit accomplishes this task:
(2) Using the commutation rules from Exercise 10.67, show that moving the final Toffoli gate all the
way back to the left side gives the circuit
(3) Assuming the ancilla preparation shown in the leftmost dotted box can be done fault-tolerantly,
show that this circuit can be used to give a fault-tolerant implementation of the Toffoli gate using
the Steane code.
Exercise 10.69
Show that a single failure anywhere in the ancilla preparation and verification can lead to at most one X
or Y error in the ancilla output.
Exercise 10.70
Show that Z errors in the ancilla do not propagate to affect the encoded data, but result in an incorrect
measurement result being observed.
166
Exercise 10.71
Verify that when M = e−iπ/4 SX the procedure we have described gives a fault-tolerant method for
measuring M .
Show that the Steane code encoded |0i state can be constructed fault-tolerantly in the following manner.
(1) Begin with the circuit of Figure 10.16, and replace the measurement of each generator, as shown in
Figure 10.30, with each ancilla qubit becoming a cat state |00 . . . 0i + |11 . . . 1i, and the operations
rearranged to have their controls on different qubits, so that errors do not propagate within the code
block.
(3) Calculate the error probability of this circuit, and of the circuit when the generator measurements
are repeated three times and majority voting is done.
(4) Enumerate the operations which should be performed conditioned on the measurement results and
show that they can be done fault-tolerantly.
Exercise 10.74
Construct a quantum circuit to fault-tolerantly generate the encoded |0i state for the five qubit code
(Section 10.5.6).
Problem 10.1
Channels E1 and E2 are said to be equivalent if there exist unitary channels U and V such that E2 =
U ◦ E1 ◦ V.
(2) Show how to turn an error-correcting code for E1 into an error-correcting code for E2 . Assume
that the error-correction procedure for E1 is performed as a projective measurement followed by a
conditional unitary operation, and explain how the error-correction procedure for E2 can be performed
in the same fashion.
167
Solution
Concepts Involved: Unitary operators, Quantum Channels, Quantum Measurement.
Recall that a unitary channel is a quantum channel such that U(ρ) = U ρU † for a unitary operator U .
(2) Suppose that E2 = U ◦ E1 ◦ V. If the error correcting code for E1 consists of a projective measure-
ment Pm followed by a conditional unitary Cm (where the subscript denotes a conditioning on the
measurement outcome m), this means that for a given state ρ which lies in the support of the code
†
that Cm Pm E1 (ρ)Pm Cm ∝ ρ.
If we instead have E2 as our noise channel, let us rotate the measurement basis and carry out the
0
measurement Pm = U Pm U † (note that a unitary conjugation of a projector remains a projector, as
02
Pm = (U Pm U † )2 = U Pm U † U Pm U † = U Pm U † = Pm
0
). Let us also modify the conditional unitary
0 † †
to be Cm = V Cm U . We then have:
0 0 0 0†
Cm Pm E2 (ρ)Pm Cm = (V † Cm U † )(U Pm U † )U E1 (V ρV † )U † (U Pm U † )(V † Cm U † )†
= V † Cm U † U Pm U † U E1 (V ρV † )U † U Pm U † U Cm
†
V
= V † Cm Pm E1 (V ρV † )Pm Cm
†
V
∝ V † V ρV † V
=ρ
which shows that the error-correction procedure for E2 can be performed in the same fashion (with
the unitary-modified measurements/unitaries).
Prove the Gilbert-Varshamov bound for CSS codes, namely, that an [n, k] CSS code correcting t errors
exists for some k such that
k 2t
≥ 1 − 2H .
n n
As a challenge, you may like to try proving the Gilbert–Varshamov bound for a general stabilizer code,
168
namely, that there exists an [n, k] stabilizer code correcting errors on t qubits, with
k 2 log(3)t 2t
≥1− −H
n n n
Suppose we assume that the generators for the code are in standard form, and that the encoded Z and
X operators have been constructed in standard form. Find a circuit taking the n × 2n check matrix
corresponding to a listing of all the generators for the code together with the encoded Z operations from
0 0 0 I 0 0
G = 0 0 0 0 I 0
0 0 0 0 0 0
Suppsoe you are given a qubit |ψi to encode in a stabilizer code, but you are not told anything about how
|ψi was constructed: it is an unknown state¿ Construct a circuit to perform the encoding in the following
manner:
|0i|0L i + |1i|1L i
√ ,
2
(2) Show how to fault-tolerantly perform a Bell basis measurement with |ψi and the unencoded qubit
from this state.
(3) Give the Pauli operations which you need to fix up the remaining encoded qubit after this measure-
ment, so that it becomes |ψi, as in the usual quantum teleportation scheme.
Compute the probability of error of this circuit. Also show how to modify the circuit to perform fault-
tolerant decoding.
Problem 10.5
Suppose C(S) is an [n, 1] stabilizer code capable of correcting errors on a single qubit. Explain how a
fault-tolerant implementation of the controlled-NOT gate may be implemented between two logical qubits
encoded using this code, using only fault-tolerant stabilizer state preparation, fault-tolerant measurement
of elements of the stabilizer, and normalizer gates applied transversally.
169
A1 Notes on basic probability theory
Exercise A1.1
Prove Bayes’ rule.
Solution
Concepts Involved: Probability, Conditional Probability.
Recall that conditional probabilities were defined as:
P (X = x, Y = y)
P (Y = y|X = x) =
P (X = x)
p(x)
p(x|y) = p(y|x)
p(y)
Exercise A1.2
Prove the law of total probability.
Solution
Concepts Involved: Probability, Conditional Probability.
Recall that the law of total probability is given by:
X
p(y) = p(y|x)p(x)
x
P
Using the identity p(Y = y) = x p(X = x, Y = y) and Bayes’ rule, we have
X X
p(y) = p(x, y) = p(y|x)p(x)
x x
Exercise A1.3
Prove that there exists a value of x ≥ E(X) such that p(x) > 0.
170
Solution
Concepts Involved: Probability, Expectation.
Recall that the expectation of a random variable X is defined by:
X
E(X) = p(x)x
x
Let x̃ = max {x : x is a possible value of X}. This maximum exists as we assume X can only take on a
finite set of values. We therefore have that:
X X X
E(X) = p(x)x ≤ p(x)x̃ = x̃ p(x) = x̃
x x x
Where in the last equality we use that the sum over all probabilities must be 1.
Exercise A1.4
Solution
Concepts Involved: Probability, Expectation.
= aE(X) + bE(y)
Exercise A1.5
Solution
Concepts Involved: Probability, Expectation, Independent Random Variables.
171
Recall two random variables X, Y are independent if
We have that:
!
XX XX X X
E(XY ) = xyp(x, y) = xyp(x)p(y) = p(x)x p(y)y = E(x)E(y)
x y x y x y
Exercise A1.6
Solution
Concepts Involved: Probability, Expectation, Variance.
Recall the definition of the variance and standard deviaiton of a random variable X:
p
Var(X) = E[(X − E(X))2 ], ∆(X) = Var(X)
1
p( X − E(X) ≥ λ∆(X)) ≤
λ2
where λ > 0.
We first establish Markov’s inequality for the expectation value E(X). Let a > 0, and then we have that:
X X X X
E(X) = xp(x) = xp(x) + xp(x) ≥ ap(x) + 0 = ap(X ≥ a)
x x≥a x<a x≥a
E(X)
p(X ≥ a) ≤
a
for any random variable X and a > 0. Next, substitute X with (X − E(X))2 and let a = λ2 Var(X) for
λ > 0. Markov’s inequality then states that:
E(X − E(X))2
p((X − E(X))2 ≥ λ2 Var(X)) ≤
λ2 Var(X)
1
p((X − E(X))2 ≥ λ2 Var(X)) ≤
λ2
172
If λ > 0, then p((X − E(X))2 ≥ λ2 Var(X)) = p( X − E(X) ≥ λ∆(X)) by taking square roots, so we
obtain:
1
p( X − E(X) ≥ λ∆(X)) ≤
λ2
as desired.
173
A2 Group theory
Exercise A2.1
Prove that for any element of g of a finite group, there always exists a positive integer r such that g r = e.
That is, every element of such a group has an order.
Solution
Concepts Involved: Group Axioms, Order.
Suppose G is a finite group, and g ∈ G. Then, there exists some r1 , r2 ∈ N such that r1 6= r2 and
g r1 = g r2 . If this was not the case, then g n would be unique for each n ∈ N, contradicting the finiteness
of G. WLOG take r1 < r2 , and let r = r2 − r1 ∈ N. Using associativity, we then have that:
g r1 = g r2 = g r1 +r = g r1 g r
Exercise A2.2
Prove Lagrange’s Theorem.
Solution
Concepts Involved: Group Axioms, Subgroups, Order, Equivalence Relations.
Let H be a subgroup of a group G and define the relation ∼ by a ∼ b iff a = bh for some h ∈ H. ∼
is reflexive as a = ae (so a ∼ a) where e ∈ H is the identity element. ∼ is symmetric as if a ∼ b, then
a = bh for some h ∈ H so b = ah−1 (so b ∼ a) where h−1 ∈ H as H is closed under inverses. Finally ∼
is transitive as if a ∼ b and b ∼ c, there exist h1 , h2 ∈ H such that a = bh1 and b = ch2 so a = ch2 h1 .
As h2 h1 ∈ H (H is closed under multiplication) it follows that a ∼ c. Having shown ∼ to have these
three properties, we conclude it is an equivalence relation. Then, the equivalence classes of ∼ partition
G, where the equivalence class of g ∈ G is [g] = gh|h ∈ H .
Now, let g ∈ G and define the map ϕg : H → [g] as ϕg (h) = gh. ϕg is injective as if ϕg (h1 ) = ϕg (h2 )
then gh1 = gh2 and multiplying by g −1 on both sides h1 = h2 . ϕg is surjective as if k ∈ [g], then there
exists some h ∈ H such that k = gh by the definition of ∼. Hence ϕg is bijective.
Sn
As per our prior observation, the equivalence classes of ∼ partition G, so G = i=1 [gi ] and |G| =
Sn Pn
i=1 [gi ] = i ] . Further, there is a bijection ϕgi from each equivalence class to H, so [gi ] = |H|
i=1 [gP
n
for all i. Thus |G| = i=1 |H| = nH and hence |H| divides |G|, as desired.
Exercise A2.3
174
Solution
Concepts Involved: Group Axioms, Subgroups, Order, Lagrange’s Theorem.
Let g ∈ G with order r. Then, define H = g n |n ∈ N . We claim that H is a subgroup of G. First, g n ∈ G
for any n as G is closed under multiplicaton, so H ⊂ G. Next, if g n1 , g n2 ∈ H then g n1 ·g n2 = g n1 +n2 ∈ H.
Associativity is inherited from the associativity of multiplication in G. Since g r = e ∈ H, H contains the
identity. Finally, for g k ∈ H we have g r−k ∈ H such that g k g r−k = g r−k g k = g r = e so H is closed
under inverses. Hence the claim is proven.
Next, we observe that |H| = r as H contains the r elements e, g, g 2 , . . . g r−1 . Hence by Lagrange’s
Theorem r divides |G|.
Exercise A2.4
Show that if y ∈ Gx then Gy = Gx
Solution
Concepts Involved: Group Axioms, Conjugacy Classes
Suppose y ∈ Gx . Then there exists some g ∈ G such that g −1 xg = y. Multiplying both sides on the left
by g and on the right by g −1 we find that x = gyg −1 . We now show the two inclusions.
⊆ Suppose that k ∈ Gx . Then there exists some g 0 ∈ G such that k = g 0−1 xg 0 . Then using x =
gyg −1 we find k = g 0−1 gyg −1 g 0 . Now, g −1 g 0 ∈ G (by closure) and it has inverse g 0−1 g, and hence
k = g 0−1 gyg −1 g 0 ∈ Gy . So, Gx ⊆ Gy .
⊇ Suppose that l ∈ Gy . Then there exists some g 00 ∈ G such that l = g 00−1 yg 00 . Then with g −1 xg = y
we find l = g 00−1 g −1 xgg 00 . Much like before, gg 00 ∈ G (by closure) with inverse g 00−1 g −1 so l ∈ Gx . So,
Gy ⊆ Gx .
We conclude that Gy = Gx .
Exercise A2.5
Solution
Concepts Involved: Abelian Groups, Conjugacy Classes.
Exercise A2.6
Show that any group of prime order is cyclic.
175
Solution
Concepts Involved: Order, Cyclic Groups.
Suppose |G| = p where p is prime. Since G is finite, every element of G has an order by Exercise A2.1.
Since the order of any element g ∈ G divides |G| = p by Exercise A2.3, and since p is prime, the order of
g is either 1 or p. Since |G| > 1, there exists at least one g ∈ G with order p, and this g is a generator
of G (with g 1 = g, g 2 , g 3 , . . . , g p = e distinct and comprising all the elements of G. In fact this is true of
any non-identity g). Hence G is cyclic.
Exercise A2.7
Show that every subgroup of a cyclic group is cyclic.
Solution
Concepts Involved: Group Axioms, Subgroups, Cyclic Groups, Euclid’s Division Algorithm.
First we prove a necessary Lemma, namely that any nonempty subset of the natural numbers contains a
least element. We show this by proving the contrapositive. Suppose that A ⊆ N has no least element.
Then 1 ∈ / A as then 1 would be the least element. Suppose then that 1, . . . k − 1 ∈
/ A; then k ∈/ A as
then k would be the least element. By strong induction, there exists no k ∈ N such that k ∈ A, i.e. A is
empty. This concludes the proof of the lemma.
Let G = hai be a cyclic group and H a subgroup of G. If H = {e}, it is trivially cyclic and we are
done. If H 6= {e}, then there exists some an ∈ H with n 6= 0. Since H is closed under inverses,
(an )−1 = a−n ∈ H as well which ensures that H contains some positive power of a. Then consider
the set A = k ∈ N|ak ∈ H . Any nonempty subset of the naturals has a minimum element; therefore
let d = min A. It is immediate that ad is a subgroup of H as ad ∈ H and H is a group. To show
the reverse containment, suppose that g ∈ H. Since H is a subgroup of the cyclic G, it follows that
g = ap for some p ∈ Z. We can then write p = qd + r for 0 ≤ r < d by Euclid’s Division algorithm
(see Appendix 4). We then have that ar = ap−qd = ap (ad )−q ∈ H by closure. Now, since d is the least
positive integer for which ad ∈ H and 0 ≤ r < d, it must follow that r = 0. Therefore, p = qd and hence
aqd = (ad )q ∈ ad . So, H is a subgroup of ad . We conclude that H = ad and hence H is cyclic.
Exercise A2.8
Show that if g ∈ G has finite order r, then g m = g n if and only if m = n (mod r).
Solution
Concepts Involved: Order, Modular Arithmetic, Euclid’s Division Algorithm
176
g m−n = g qr+p = g qr g p = e. Furthermore, g qr = (g r )q = eq = e so g p = e. But since g has order r and
0 ≤ p < r, it follows that p = 0. Hence m − n = qr and so m ≡ n (mod r).
Exercise A2.9
Cosets define an equivalence relation between elements. Show that g1 , g2 ∈ G are in the same coset of
H in G if and only if there exists some h ∈ H such that g2 = g1 h.
Solution
Concepts Involved: Equivalence Relations, Cosets
In Exercise A2.2 we showed that the relation ∼ on a group G defined by g1 ∼ g2 iff g1 = g2 h for some
h ∈ H was an equivalence relation. The equivalence classes of this equivalence relation were gh|h ∈ H ,
i.e. precisely the left cosets of H in G. So, g1 , g2 are in the same coset of H in G if and only if g1 = g2 h
for some h ∈ H, which is exactly what we wished to show.
Exercise A2.10
How many cosets of H are there in G?
Solution
Concepts Involved: Equivalence Relations, Cosets
We observe that the map ϕg : H → [g] defined in the solution of Exercise A2.2 is a map from H to a right
coset of H in G defined by g. Since we showed that this map was bijective, this shows that |H| = |Hg|
for any g ∈ G. Furthermore, since the cosets define an equivalence relation between elements of G, the
cosets of H in G partition G. So, we conclude that there are |G|/|H| cosets of H in G, each of cardinality
|H|.
Solution
177
find using the triangle inequality that:
n
X n
X X
χ(g) = tr(g) = e2πijk /r ≤ e2πijk /r = 1=n
k=1 k=1 i
(3) The (complex) triangle inequality |z1 + z2 | ≤ |z1 | + |z2 | is saturated when z1 = kz2 for some k ≥ 0.
This can only occur in the above equation when every λi in the sum is identical (as distinct roots
of unity are not related by a non-negative constant). If the λi s are identical, then g is diagonal with
diagonal entries of unit modulus, so g = eiθ I as claimed.
(4) Let Gx = g −1 xg|g ∈ G be the conjugacy class of x in G. We then have for any h ∈ Gx that
χ(h) = χ(g −1 xg) = tr g −1 xg = tr xgg −1 = tr(xI) = tr(x), using the cyclicity of the trace. We
(5) By the same argument as (2), g ∈ G can be diagonalized with roots of unity e2πij/r on the diagonal:
e2πij1 /r
e2πij2 /r
g=
..
.
2πijn /r
e
So we have that:
∗
Xn n
X n
X
χ(g −1 ) = tr g −1 = e−2πijk /r = (e2πijk /r )∗ = e2πijk /r = (tr(g))∗ = χ∗ (g).
j=1 j=1 j=1
(6) χ(g) is the sum of r-th roots of unity, which are algebraic; hence χ(g) is algebraic as the sum of
algebraic numbers.
(∗) A unitary matrix group is comprised solely of unitary matrices (those who which satisfy U † U = I).
Show that every matrix group is equivalent to a unitary matrix group. If a representation of a group
consists entirely of unitary matrices, we may refer to it as being a unitary representation.
178
Solution
By Ex. 2.25 each term of the above sum is positive, and by Ex. 2.24 each term is Hermitian. The sum
of Hermitian operators is Hermitian, so A is Hermitian. By Ex. 2.21, A is diagonalizable. Let U be the
unitary matrix that diagonalizes A. We then have that D is a diagonal matrix, with:
D = U AU † .
Let D1/2 be the matrix obtained by taking the square root of the diagonal entries of D. Then define
T = D1/2 U . We then claim that GU = {V1 , . . . Vn } is a unitary matrix group equivalent to G, where:
Vi = T Ai T −1 .
We have three points to verify; (i) That the Vi s are unitary, (ii) That ϕ : G → Gu defined by ϕ(Ai ) =
T Ai T −1 = Vi is an isomorphism, and (iii) that the characters of Ai and Vi are equivalent.
Vi† Vi = (T Ai T −1 )† (T Ai T −1 )
= (D1/2 U Ai U † D−1/2 )† (D1/2 U Ai U † D−1/2 )
= (D−1/2 U A†i U † D1/2 )(D1/2 U Ai U † D−1/2 )
= (D−1/2 U A†i U † )D(U Ai U † D−1/2 )
= (D−1/2 U A†i U † )(U AU † )(U Ai U † D−1/2 )
= (D−1/2 U A†i )A(A†i U † D−1/2 )
n
= (D−1/2 U A†i ) A†j Aj (Ai U † D−1/2 )
X
j=1
Xn
= D−1/2 U (Aj Ai )† (Aj Ai ) U † D−1/2
j=1
n
A†k Ak U † D−1/2
X
= D−1/2 U
k=1
−1/2
=D U AU † D−1/2
= D−1/2 DD−1/2
=I
179
Where in the sixth equality we use the unitarity of U , and in the ninth equality we use that Aj Ai = Ak
iterates over all the group elements as Aj iterates over all the group elements. To see that this
is the case, it suffices to show that the map ψi : Mn → Mn defined by ψi (Aj ) = Aj Ai is
a bijection. To see that it is injective, suppose that ψi (Aj1 ) = ψi (Aj2 ). Then it follows that
Aj1 Ai = Aj2 Ai , and multiplying on the left by A−1 i (which exists) we find that Aj1 = Aj2 . To
see that it is surjective, suppose that Aj 0 ∈ Mn . Then, there exists Aj 0 A−1 i ∈ Mn such that
ψi (Aj 0 A−1
i ) = A j 0 A −1
i A i = A j 0 . We conclude that ψ i is bijective.
T Ai T −1 = T Aj T −1
And multiplying both sides on the left by T −1 on the left and T on the right we find that Ai = Aj .
Hence we conclude that ϕ is a bijective homomorphism and hence an isomorphism.
Exercise A2.13
Show that every irreducible Abelian matrix group is one dimensional.
Exercise A2.14
Exercise A2.15
Using the Fundamental Theorem, prove that characters are orthogonal, that is:
r r
X X |G|
ri (χpi )∗ χqi = |G|δpq and (χpi )∗ χqj = δij
i=1 p=1
ri
where p, q, and δpq have the same meaning as in the theorem and χpi is the value the character of the
pth irreducible representation takes on the ith conjugacy class of G and ri is the size of the ith conjugacy
class of G and ri is the size of the ith conjugacy class.
180
Exercise A2.16
S3 is the group of permutations of three elements. Suppose we order these as mapping 123 to:
123;231;312;213;132, and 321, respectively. Show that there exist two one-dimensional irreducible repre-
sentations of S3 , one of which is trivial, and the other of which is 1,1,1,-1,-1,-1, corresponding in order to
the six permutations given earlier. Also show that there exists a two dimensional irreducible representation,
with the matrices
" # " √ # " √ #
1 0 1 −1 − 3 1 −1 3
, √ , √ ,
0 1 2 3 −1 2 − 3 1
" # " √ # " √ #
−1 0 1 1
√ 3 1 1
√ − 3
, ,
0 1 2 3 −1 2 − 3 1
Exercise A2.17
Prove that the regular representation is faithful.
Exercise A2.18
Show that the character of the regular representation is zero except on the representation of the identity
element, for which χ(I) = |G|.
Exercise A2.19
Use Theorem A2.5 to show that the regular representation contains dρp instances of each irreducible
representation ρp . Thus, if R denotes the regular representation, and Ĝ denotes the set of all inequivalent
irreducible representations, then:
X
χR
i = dρ χρi
ρ∈G
Exercise A2.20
The character of the regular representation is zero except for the conjugacy class i containing e, the
identity element in G. Show, therefore, that
X
dρ χρ (g) = N δge .
ρ∈G
Exercise A2.21
Exercise A2.22
181
Exercise A2.23
Let us represent an Abelian group G by g ∈ [0, N − 1], with addition as the group operation, and define
ρh (g) = exp −2πigh/N at the h representation of g. This representation is one-dimensional, so dρ = 1.
Show that the Fourier transform relations for G are
N −1 N −1
1 X 1 X ˆ
fˆ(h) = √ f (g)e−2πigh/N and f (h) = √ f (g)e2πigh/N
N g=0 N g=0
Exercise A2.24
Using the results of Exercise A2.16, construct the Fourier transform over S3 and express it as a 6x6 unitary
matrix.
182