Appendix B
Some other Useful Mathematics
Here we collect various identities and other useful mathematical facts needed in parts of the lecture
notes.
The Cauchy-Schwarz inequality:
n
X
i=1
v
v
u n
u n
X uX
u
2t
t
a i bi
ai
b2 .
i
i=1
i=1
Equivalently, w

If "j 2 [0, 1] then 1
k
X
j=1
"j
k
Y
j=1
(1
"j ) e
Pk
j=1 "j
.
The upper bound comes from the preceding item. The lower bound follows easily by induction,
using the fact that (1 "1 )(1 "2 ) = 1 "1 "2 + "1 "2 1 "1 "2 .
When we dont care about constant f

A.7
Dirac Notation
Physicists often write their linear algebra in Dirac notation, and we will follow that custom for
denoting quantum states. In this notation we write |vi = v and hv| = v . The first is called a ket,
the second a bra. Note that
hv|wi = h

A.5
Tensor Products
If A = (Aij ) is an m n matrix and B an m0 n0
is the mm0 nn0 matrix
0
A11 B
B A21 B
B
AB =B
@
Am1 B
matrix, then their tensor or Kronecker product
1
A1n B
A2n B C
C
C.
.
A
.
Amn B
The following properties of the tensor product are ea

explicitly mentioned otherwise. The complex number is an eigenvalue of square matrix A if there
is some nonzero vector v (called an eigenvector ) such that Av = v.
A.2
Unitary Matrices
A matrix A is unitary if A
1
= A . The following conditions are equiva

that S has an inverse, giving A = SDS 1 . A matrix A is unitarily diagonalizable i it can be
diagonalized via a unitary matrix U : A = U DU 1 . By the same argument as before, A will be
unitarily diagonalizable i it has an orthonormal set of d eigenvector

Exercises
1. Let E be an arbitrary 1-qubit unitary. We know that it can be written as
E = 0 I + 1 X + 2 Y + 3 Z,
P
for some complex coe cients i . Show that 3 |i |2 = 1. Hint: Compute the trace Tr(E E) in
i=0
two ways, and use the fact that Tr(AB) = 0 if

unfortunately, implementing this gate fault-tolerantly takes a lot more work, and we wont go into
that here.
When designing schemes for fault-tolerant computing, it is very important to ensure that errors
do not spread too quickly. Consider for instance a

Appendix A
Some Useful Linear Algebra
In this appendix we sketch some useful parts of linear algebra, most of which will be used somewhere
or other in these notes.
A.1
Some Terminology and Notation
We use V = Cd to denote the d-dimensional complex vector

Measuring the ancillas will now probabilistically give us one of the syndromes |ii|j 0 i, and collapse
the state to
Xi Zj |0i|ii|j 0 i.
In a way, this measurement of the syndrome discretizes the continuously many possible errors to
the nite set of Pauli e

of i, which doesnt matter). These four matrices span the space of all possible 2 2 matrices, so
every possible error-operation E on a qubit is some linear combination of the 4 Pauli matrices.
More generally, every 2k 2k matrix can be written uniquely as a

Detecting a bitflip-error. If a bitflip-error occurs on one the first 3 qubits, we can detect its
location by noting which of the 3 positions is the minority bit. We can do this for each of the
three 3-qubit blocks. Hence there is a unitary that writes do

has been reduced from p to less than 3p2 . If the initial error-rate p0 was < 1/3, then the new
error-rate p1 < 3p20 is less than p0 and we have made progress: the error-rate on the encoded bit is
smaller than before. If wed like it to be even smaller, we

A good protocol for bit commitment would be a very useful building block for many other
cryptographic applications. For instance, it would allow Alice and Bob (who still dont trust each
other) to jointly ip a fair coin. Maybe theyre going through a divorc

One can actually do nearly perfect bit commitment, coin ipping, etc., assuming the dishonest
party has bounded quantum storage, meaning that it cant keep large quantum states coherent
for longer times. At the present state of quantum technology this is a

Chapter 14
Error-Correction and Fault-Tolerance
14.1
Introduction
When Shors algorithm had just appeared in 1994, most people (especially physicists) were extremely skeptical about the prospects of actually building a quantum computer. In their view, it
w

basis |b1 i, . . . , |bd i for Bobs, and nonnegative reals
| i=
d
X
1, . . . ,
d
whose squares sum to 1, such that
i |ai i|bi i.
i=1
(13.1)
The number of nonzero i s is called the Schmidt rank of the state. For example, an EPR-pair has
p
Schmidt coe cient

3. Bob sends Alice all b0i , and Alice sends Bob all bi . Note that for roughly n/2 of the is, Alice
and Bob used the same basis bi = b0i . For those is Bob should have a0i = ai (if there was no
noise and Eve didnt tamper with the ith qubit on the channel

probability of recovering the incorrect value of ai is at least sin(/8)2 0.15 (if Bob measured in a
dierent basis than Alice, then the result will be discarded anyway). If this i is among the test-bits
Alice and Bob use in step 4 of the protocol (which ha

4. This question examines how well the best quantum protocol can do for CHSH (resulting in the
so-called Tsirelson bound [26]). Consider a protocol where Alice and Bob share a 2k-qubit
state | i = | iAB with k qubits for Alice and k for Bob (the state can

What about classical protocols? Suppose there is a classical protocol that uses C bits of communication. If they ran this protocol, and then Alice communicated her output a to Bob (using
an additional log n bits), he could solve the distributed Deutsch-Jo

Chapter 13
Quantum Cryptography
13.1
Quantum key distribution
One of the most basic tasks of cryptography is to allow Alice to send a message to Bob (whom
she trusts) over a public channel, without allowing a third party Eve (for eavesdropper) to
get any

verify that if the same measurement from cfw_I, X, Y, Z is applied to each qubit of p12 (|01i |10i)
then the outcomes will be distinct: a0 b0 = 1 and a00 b00 = 1. We now have ay = bx , because
ay
12.4
bx = (a0
a00 )
(b0
b00 ) = (a0
b0 )
(a00
b00 ) = 1
1 =

Each is an observable with eigenvalues in cfw_+1, 1. That is, each can be written as P+ P
where P+ and P are orthogonal projectors that sum to identity, and hence dene a two-outcome
measurement with outcomes +1 and 1.6 For example, Z = |0ih0| |1ih1|, corr

strategy can achieve. Tsirelson [26] showed that cos(/8)2 is the best that quantum strategies can
do for CHSH, even if they are allowed to use much more entanglement than one EPR-pair (see the
last exercise of this chapter).
12.3
Magic square game
Is ther

12.2
CHSH: Clauser-Horne-Shimony-Holt
In the CHSH game [27] Alice and Bob receive input bits x and y, and their goal is to output bits
a and b, respectively, such that
a b = x ^ y,
(12.1)
(^ is logical AND; is parity, i.e. addition mod 2) or, failing that

is 1 with probability (1 |h x | y i|2 )/2. Hence if | x i = | y i then we observe a 1 with probability 0,
but if |h x | y i| is close to 0 then we observe a 1 with probability close to 1/2. Repeating this
procedure with several individual ngerprints can m

5. Suppose Alice and Bob each have n-bit agendas, and they know that for exactly 25% of
the timeslots they are both free. Give a quantum protocol that nds such a timeslot with
probability 1, using only O(log n) qubits of communication.
6. The inner produc

behavior. Surprisingly, in the 1960s, John Bell [12] devised entanglement-based experiments whose
behavior cannot be reproduced by any local realist theory. In other words, we can let Alice and Bob
do certain measurements on an entangled state, and the re

Chapter 12
Entanglement and Non-locality
12.1
Quantum non-locality
Entangled states are those that cannot be written as a tensor product of separate states. The most
famous one is the EPR-pair:
1
p (|00i + |11i).
2
Suppose Alice has the first qubit of the