Notes 8.370/18.
435 Fall 2022
Lecture 5 Prof. Peter Shor
In the previous few lectures, we saw how to operate on one qubit—or more gen-
erally, one d-dimensional quantum system. We studied how to transform quantum
systems with a unitary matrix, and how to measure them via a complete set of projec-
tion matrices. In this lecture, we explain how the state space of a joint quantum system,
composed of two individual quantum systems, is constructed.
Suppose we have two quantum systems. Each of these has a state space which is a
complex vector space of dimensions d1 and d2 , respectively. When we consider these
two quantum systems together, we get a state space which is the tensor product of their
individual state spaces, and which has dimension d1 d2 .
Some of you probably haven’t see tensor products before. We will show how it
works by exammple. If you have two qubits, each of which has a state space with basis
{| 0⟩ , | 1⟩}, then the state space of the joint system has basis
{| 0⟩ ⊗ | 0⟩ , | 0⟩ ⊗ | 1⟩ , | 1⟩ ⊗ | 0⟩ , | 1⟩ ⊗ | 1⟩}.
The convention is to write the basis in lexicographical order. Thus, if you have two
qubits in state α0 | 0⟩ + α1 | 1⟩ and β0 | 0⟩ + β1 | 1⟩, the system of both qubits is in state
α0 β0 | 0⟩ ⊗ | 0⟩ + α0 β1 | 0⟩ ⊗ | 1⟩ + α1 β0 | 1⟩ ⊗ | 0⟩ + α1 β1 | 1⟩ ⊗ | 1⟩ ,
so the standard distributed law applies to tensor products. Often, rather than writing
| 0⟩ ⊗ | 1⟩, we will write this as | 01⟩.
To illustrate tensor products using a more usual vector notation,
α0 β0
α0 β0 α0 β1
⊗ =
α1 β1 α1 β0
α1 β1
What if you have n qubits? The state space has dimension 2n , and has basis
| 00 . . . 00⟩, | 00 . . . 01⟩, | 00 . . . 10⟩, . . .. (Recall that by notation, | 00 . . . 00⟩ = | 0⟩ ⊗
| 0⟩ ⊗ . . . ⊗ | 0⟩ ⊗ | 0⟩.) As a convention, we list the basis states in lexicographical order.
Now let us count up (real) degrees of freedom. A qubit has a state α | 0⟩ + β | 1⟩,
and since α and β are complex numbers, this would give four real degrees of freedom.
However, it also satisfies i|α|2 + |β|2 = 1, which means that it only has three real
degrees of freedom (if we use the fact that multiplying by a global phase leaves the
state essentially unchanged, there are only two degrees of freedom). However, the joint
state of two qubits has four complex coefficients, leaving 7 (or 6) degrees of freedom.
Thus, because 7 > 2 · 3, there are some states of the joint system which cannot be the
tensor product of states of the individual systems. These states are called entangled. In
fact, because the number of degrees of freedom of tensor product states is less than that
of entangled states, the tensor product states form a lower-dimensional manifold in the
entangled states, and we see that most quantum states are entangled.
1
For example, the state
√ !
1 1 1 1 2 1 1 1
√ | 00⟩+ √ | 01⟩+ √ | 10⟩+ √ | 11⟩ = √ | 0⟩ + √ | 1⟩ √ | 0⟩ + √ | 1⟩
3 3 6 6 3 3 2 2
is a tensor product state, while the state
1 1 1
√ | 00⟩ + √ | 01⟩ + √ | 10⟩
3 3 3
is entangled You can see that the second one is not a tensor product state, and thus
entangled, because if we could represent it as a tensor product state
α0 β0 | 00⟩ + α0 β1 | 01⟩ + α1 β0 | 10⟩ + α1 β1 | 11⟩ ,
then we would need α1 β1 = 0. But if that holds, either α1 or β1 is 0, so one of α0 β1
and α1 β0 must be 0, which is not the case.
What about unitary transformations on a joint state space. Suppose we have two
unitary matrices U and V , of dimensions k and ℓ. The tensor product of them is the
kℓ × kℓ matrix
u11 V u12 V . . . u1k V
u21 V u22 V . . . u2k V
U ⊗V = .. ,
.. ..
. . .
uk1 V uk2 V . . . ukk V
where uij V is the (i, j) entry of U multiplied by V .
Let’s do an example and figure out what σx ⊗ σz is. We have
0 1 1 0
σx ⊗ σz = ⊗
1 0 0 −1
0 0 1 0
0 0 0 −1
= 1
0 0 0
0 −1 0 0
If the input is in a tensor product state | ϕ1 ⟩ ⊗ | ϕ2 ⟩, and you apply a tensor product
unitary U1 ⊗ U2 , then the output is also in a tensor product state, namely U1 | ϕ1 ⟩ ⊗
U2 | ϕ2 ⟩. So to get an entangled output from a tensor product input, you need to apply
a unitary that is not a tensor product. One non-tensor-product unitary that we will be
using extensively in this class is the CNOT.
We have
1 0 0 0
0 1 0 0
CN OT = 0 0 0 1
0 0 1 0
= | 0⟩⟨0 | ⊗ I + | 1⟩⟨1 | ⊗ σx
2
The last description says that if the first qubit is a | 0⟩, then we apply an identity
to the second qubit, and if the first qubit is a | 1⟩, we apply a σx (or NOT gate) to the
second qubit. This is why it’s called a controlled NOT — depending on the state of the
first qubit, we apply a NOT gate to the second one (or we don’t).
Note that we don’t measure the first qubit — we don’t get a classical record of the
state of the first qubit, and a state that was in a superposition of the first qubit being
| 0⟩ and| 1⟩ remains in a superposition. Let’s do an example. Suppose we start with the
state | +⟩ | 0⟩ = √12 (| 00⟩ + | 10⟩). When we apply the CNOT gate, the | 00⟩ remains
unchanged, because the first qubit is | 0⟩, but the | 10⟩ becomes | 11⟩. This means
1
CNOT | +⟩ | 0⟩ = √ (| 00⟩ + | 11⟩),
2
so we have used the CNOT gate to entangle two qubits.