1
Vectors and Matrices
In this chapter, we present basic definitions and results of complex vectors and
matrices needed in the study of quantum information science and quantum
computing using the linear algebra (Hilbert space) approach. Linear algebra
and matrix theory are useful in many applied and research areas; one may see
[2, 5, 6] for general background. We shall emphasize the roles of vectors and
matrices in quantum mechanics.
1.1 Complex vectors, linearly independent sets, and
bases
Let Cn be the set of column vectors with n complex entries x1 , . . . , xn . Occa-
sionally, we will focus on the set of real vectors Rn in Cn .∗ Using the Dirac
notation, we denote a vector in Cn by
x1
|x⟩ = ... , x1 , . . . , xn ∈ C (1.1)
xn
It is often written as a transpose of a row vector, as |x⟩ = (x1 , x2 , . . . , xn )t , to
save space. Recall that the complex conjugate √ of a complex
√ number z = a + ib
is z ∗ = a−ib, and the modulus of z is |z| = z ∗ z = a2 + b2 . In mathematics
books, z ∗ is often written in the form z̄. We will follow the physicist’s notation.
An element |x⟩ is also called a ket vector or simply a ket. The bra vector,
or simple the bra, ⟨x| associated with |x⟩ is the row vector
|x⟩ 7→ ⟨x| = (x∗1 , . . . , x∗n ). (1.2)
For example, if |x⟩ = (1, i, 1 − i)t , then ⟨x| = (1, −i, 1 + i). Note that each
component is complex-conjugated under this correspondence. The bra and
ket vectors are the basic entities needed to model quantum systems.
∗ Readersmay be more familiar with real vectors, but one needs to use complex vectors to
model quantum systems as we will see.
1
2 QUANTUM COMPUTING
For |x⟩ = (x1 , . . . , xn )t , |y⟩ = (y1 , . . . , yn )t ∈ Cn and a ∈ C, define the
addition of |x⟩ and |y⟩, and the scalar multiplication of a and |x⟩ as
x1 + y1 ax1
x2 + y2 ax2
|x⟩ + |y⟩ = and a|x⟩ = .. , (1.3)
..
. .
xn + yn axn
respectively. All the components of the zero-vector |0⟩ are zero. The zero-
vector is also written as 0 in a less strict manner. Under the addition and
scalar multiplication defined above, Cn forms a vector space with the zero
element |0⟩. Readers can consult linear algebra books for general background.
A linear combination of |v1 ⟩, . . . , |vk ⟩ ∈ Cn is a vector of the form
|v⟩ = c1 |v1 ⟩ + · · · + ck |vk ⟩ with c1 , . . . , ck ∈ C.
The set of all linear combinations of vectors in a set S in Cn is denoted by
Span S, which is a linear subspace of Cn .
A subset S = {|v1 ⟩, . . . , |vk ⟩} of Cn is linearly dependent if there is
(c1 , . . . , ck ) ̸= (0, . . . , 0) such that
c1 |v1 ⟩ + · · · + ck |vk ⟩ = |0⟩. (1.4)
If (c1 , . . . , ck ) = (0, . . . , 0) is the only solution of Eq. (1.4), the set is said to
be linearly independent. Construct the n × k matrix A = (|v1 ⟩ · · · |vk ⟩).
Then the set S is linearly dependent if and only if there is a nonzero vector
|c⟩ = (c1 , . . . , ck )t such that A|c⟩ = |0⟩ ∈ Cn . Using the basic theory of linear
equations, one readily deduces the following.
If S is linearly independent, then k ≤ n. Equivalently, the set S is
linearly dependent if k > n.
The set S is linearly dependent if one of the vectors is expressed as a
linear combination of the other vectors.
If |0⟩ ∈ S, then S is linearly dependent.
A subset S of Cn is a generating set of Cn if every vector in Cn is a
linear combination of vectors in S, i.e., Span S = Cn . A linearly independent
generating set is a basis for Cn . The vectors are called basis vectors. Again,
one may use the basic theory of linear equations to deduce the following.
If S ⊆ Cn has fewer than n elements, then S is not a generating set.
A set S ⊆ Cn with n elements is a basis if any one of the following
conditions holds:
(a) S is a linearly independent set. (b) S is a generating set.
Vectors and Matrices 3
Every basis of Cn has n elements. We say that Cn has dimension n.
If {|v1 ⟩, . . . , |vn ⟩} is aP
basis for Cn , then every |x⟩ ∈ Cn admits a unique
representation |x⟩ = j=1 cj |vj ⟩. The n complex numbers c1 , . . . , cn are
called the components of |x⟩ with respect to the basis {|v1 ⟩, . . . , |vn ⟩}.
1.2 Inner product, Gram-Schmidt orthonormalization
The inner product of |x⟩ = (x1 , . . . , xn )t , |y⟩ = (y1 , . . . , yn )t in Cn is defined
by
n
X
⟨x|y⟩ = x∗j yj (1.5)
j=1
This product is nothing but an ordinary matrix multiplication of a 1 × n
matrix and an n × 1 matrix once the matrix multiplication is defined. In the
mathematical literature, complex conjugation is taken rather with respect to
the yj . In the present book, we use the physics convention (1.5). Note the
following sesquilinearity:∗
⟨x|c1 y1 + c2 y2 ⟩ = c1 ⟨x|y1 ⟩ + c2 ⟨x|y2 ⟩ (1.6)
⟨c1 x1 + c2 x2 |y⟩ = c∗1 ⟨x1 |y⟩ + c∗2 ⟨x2 |y⟩, (1.7)
where |c1 y1 + c2 y2 ⟩ ≡ c1 |y1 ⟩ + c2 |y2 ⟩.
The (inner) norm of a vector |x⟩ = (x1 , . . . , xn )t ∈ Cn is defined by
1/2
p Xn
∥|x⟩∥ = ⟨x|x⟩ = |xj |2 ≥ 0. (1.8)
j=1
If |x⟩ has norm one, we say that |x⟩ is a unit vector. Each nonzero vector
|y⟩ ∈ Cn can be normalized to a unit vector as |y⟩/∥|y⟩∥.
A subset S = {|v1 ⟩, . . . , |vk ⟩} of Cn is orthogonal if ⟨vr |vs ⟩ = 0 whenever
r ̸= s. If in addition that ⟨vr |vr ⟩ = 1 for all r = 1, . . . , k, then S is an
orthonormal set.
An orthonormal set {|v1 ⟩, . . . , |vk ⟩} is always independent. To see this,
Pk Pk
suppose j=1 cj |vj ⟩ = |0⟩. Then 0 = ⟨vℓ |0⟩ = ⟨vℓ | j=1 cj |vj ⟩ = cℓ for
ℓ = 1, . . . , k. As a result, an orthnormal set {|e1 ⟩, . . . , |en ⟩} in Cn with n
∗ sesqui = 1.5.
4 QUANTUM COMPUTING
elements must be a basis, which is called an orthonormal basis. Clearly,
{|e1 ⟩, . . . , |en ⟩} ⊆ Cn is an orthonormal basis if and only if
⟨ei |ej ⟩ = δij , (1.9)
where
1 i=j
δij =
0 otherwise
is the Kronecker delta. Every vector can be written uniquely as a linear com-
Porthonormal basis {|e1 ⟩, . . . , |en ⟩},
bination of the vectors in a basis. For an
it is easy to express |x⟩ ∈ Cn as |x⟩ = j=1 cj |ej ⟩, namely, cj = ⟨ej |x⟩ for
j = 1, . . . , n.
There are many orthonormal bases for Cn , and it may be important to use
a special one in a specific application. For instance, the orthonormal bases
1 0 1 1 1 1
, and √ ,√
0 1 2 1 2 −1
can be used to represent the vertical and horizontal polarizations of a photon,
and the polarizations of a photon passing through polarization plate making
a ±45◦ with the vertical axis, respectively.
One can always apply the following Gram-Schmidt process to construct
an orthonormal set {|e1 ⟩, . . . , |ek ⟩} from a given linearly independent set
{|v1 ⟩, . . . , |vk ⟩} in Cn such that Span{|v1 ⟩, . . . , |vℓ ⟩} = Span{|e1 ⟩, . . . , |eℓ ⟩}
for ℓ = 1, . . . , k. In case k = n, we get an orthonormal basis for Cn .
The Gram-Schmidt orthonormalization Process.
Let |e1 ⟩ = |v1 ⟩/∥|v1 ⟩∥. For j = 2, . . . , k, let |ej ⟩ = |fj ⟩/∥|fj ⟩∥, where
j−1
X
|fj ⟩ = |vj ⟩ − ⟨eℓ |vj ⟩|eℓ ⟩.
ℓ=1
Note that |fj ⟩ ̸= |0⟩; otherwise, {|v1 ⟩, . . . , |vj ⟩} is linearly dependent, and so
is {|v1 ⟩, . . . , |vk ⟩}. So, |fj ⟩/∥|fj ⟩∥ is a well-defined unit vector.
By construction, one sees that ⟨er |es ⟩ = 0 for all 1 ≤ r < s ≤ k, and
Span{|v1 ⟩, . . . , |vℓ ⟩} = Span{|e1 ⟩, . . . , |eℓ ⟩} for ℓ = 1, . . . , k.
Denote by Mr,s the set of r × s complex matrices, and Mr = Mr,r . If
A ∈ Mn,k has linearly independent columns |v1 ⟩, . . . , |vk ⟩, then the Gram-
Schmidt procedure yields a matrix U ∈ Mn,k with columns |e1 ⟩, . . . , |ek ⟩ such
that U † U = Ik and A = U R for an upper triangular matrix R. This is known
as the QR decomposition of A in mathematics books.
Vectors and Matrices 5
1 2i
EXAMPLE 1.2.1. Let A = . Applying Gram-Schmidt process to the
i 0
columns of A, we obtain
1 1 2i 1 1 2i i 1 i
|e1 ⟩ = √ , |f2 ⟩ = − (1, −i) = , |e2 ⟩ = √ .
2 i 0 2 i 0 1 2 1
√ 1i
1 1i
Then A = QR with Q = (|e1 ⟩, |e2 ⟩) = 2 √ and R = 2 .
i1 01
1.3 Matrices, linear transformations, and dual space
General quantum states, quantum operations, measurement operations, etc.
are modeled by matrices. Here we describe some basic properties of matrices
needed in the subsequent discussion. Again, we will focus on the results
relevant to quantum mechanics.
For A = (ars ), B = (brs ) ∈ Mm,n and c ∈ C, define the addition and scalar
multiplication by
C = A + B = (ars + brs ), and cA = (cars ),
respectively. Then Mm,n is a linear space under these operations. If A ∈
Mm,n has rows ⟨u1 |, . . . , ⟨um | and B = Mn,ℓ has columns |v1 ⟩, . . . , |vℓ ⟩, then
the product of A and B is
C = AB = (crs ) ∈ Mm,ℓ with crs = ⟨ur |vs ⟩ for 1 ≤ r ≤ m, 1 ≤ s ≤ ℓ.
The following observations about matrix products are useful.
The matrix C has columns A|v1 ⟩, . . . , A|vℓ ⟩, and rows ⟨u1 |B, . . . , ⟨um |B.
(Block multiplication) If A = (Apq ), B = (Brs ) are block matrices
with 1 ≤ p ≤ m̂, 1 ≤ q, r ≤ n̂, 1 ≤ s ≤ ℓ̂ so that the block matrices
Apq Brs is defined, i.e., the number of columns Apq and the number of
the rows of Brs are the same, whenever q = r, then AB = (Cuv ) with
Pn̂
Cuv = ℓ=1 Auℓ Bℓv for 1 ≤ u ≤ m̂, 1 ≤ v ≤ n̂.
In particular, if A has columns |x1 ⟩, . . . , |xn ⟩ and B has rows
⟨y1 |, . . . , ⟨yn |, then
AB = |x1 ⟩⟨y1 | + · · · + |xn ⟩⟨yn |,
where |xj ⟩⟨yj | has rank at most one for j = 1, . . . , n.
6 QUANTUM COMPUTING
If m = ℓ and A is a diagonal matrix with diagonal entries a1 , . . . , am ,
then AB has rows a1 ⟨y1 |, . . . , am ⟨ym |, i.e.,
a1 ⟨y1 | a1 ⟨y1 |
.. ..
AB = . . . . = . .
am ⟨ym | am ⟨ym |
If ℓ = n and B is a diagonal matrix with diagonal entries b1 , . . . , bn ,
then AB has columns b1 |x1 ⟩, . . . , bn |xn ⟩, i.e.,
b1
AB = (|x1 ⟩ · · · |xn ⟩) . . . = b1 |x1 ⟩ · · · bn |xn ⟩ .
bn
The product of A, B ∈ Mn is a matrix in Mn . The set Mn is an algebra un-
der the addition, scalar multiplication, and the matrix multiplication defined
above.
12 1i 2 20
EXAMPLE 1.3.1. Let A = ,B= , and D = . Then
34 0 1 −i 03
1 2 1 2 + i 2 − 2i
AB = (1, i, 2) + (0, 1, −i) = ,
3 4 3 4 + 3i 6 − 4i
and
1 2 8 8i 16
ADB = 2 (1, i, 2) + 3 (0, 1, −i) = .
3 4 18 18i 36
The conjugate of A = (ars ) ∈ Mm,n is A∗ = (a∗rs ) ∈ Mm,n . The Hermi-
tian conjugate of A is A† = (A∗ )t .† It is clear that the (r, s) entry of A† is
the complex conjugate of the (s, r) entry of A. This definition also applies to
a ket vector |x⟩. We have
|x⟩† = (x∗1 , . . . , x∗n ) = ⟨x|.
Namely, the procedure to produce a bra vector from a ket vector is regarded
as a Hermitian conjugation of the ket vector.
The following properties of the Hermitian conjugate are clear for A ∈ Mm,n
and B ∈ Mn,ℓ :
(A† )† = A and (AB)† = B † A† . (1.10)
Using the Hermitian conjugate, we can define the following special types of
matrices, which are useful in the study of quantum science.
† Mathematicians use A∗ to denote the Hermitian conjugate of A. We will follow the physics
convention.
Vectors and Matrices 7
A matrix A ∈ Mn is Hermitian if A† = A.
Equivalently, the (r, s) entry of A equals the conjugate of the (s, r) entry
of A, i.e., ars = a∗sr for all 1 ≤ r, s ≤ n if A = (ars ). In particular, the
diagonal entries of A are real.
A matrix A ∈ Mn is skew-Hermitian if A† = −A.
Equivalently, the (r, s) entry of A equals the negative conjugate of the
(s, r) entry of A, i.e., ars = −a∗sr for all 1 ≤ r, s ≤ n if A = (ars ).
In particular, the diagonal entries of A are pure imaginary. It is also
equivalent to the condition that iA is Hermitian.
A matrix A ∈ Mn is unitary if A† A = In , i.e., A† = A−1 .
If A is real, then A is Hermitian means that A is symmetric; A is skew-
Hermitian means that A is skew-symmetric with vanishing (zero) diagonal
entries. Unlike Hermitian and Skew-Hermitian matrices, it is not easy to
detect a unitary matrix by looking at its entries. Nevertheless, one easily
verifies the following.
PROPOSITION 1.3.2. A matrix U ∈ Mn is unitary if and only if the
columns |u1 ⟩, . . . , |un ⟩ form an orthonormal basis for Cn .
Note also that U is unitary if and only if U −1 = U † . Consequently, In =
U U † and we obtain the completeness relation
n
X
†
In = U U = |uj ⟩⟨uj |. (1.11)
j=1
The completeness relation is actually a property for any orthonormal basis
{|e1 ⟩, . . . , |en ⟩} of Cn and is quite useful. The matrix
Pk ≡ |ek ⟩⟨ek | (1.12)
introduced above is the projection operator in the direction defined by
|ek ⟩. This projects a vector |v⟩ to a vector parallel to |ek ⟩ in such a way that
|v⟩ − Pk |v⟩ is orthogonal to |ek ⟩ (see Fig. 1.1). The set {P1 , . . . , Pn } satisfies
the conditions
(i) Pk2 = Pk , (1.13)
(ii) Pk Pj = 0 (k ̸= j), (1.14)
X
(iii) Pk = In (completeness relation). (1.15)
k
The conditions (i) and (ii) are obvious from the orthonormality ⟨ej |ek ⟩ = δjk .
8 QUANTUM COMPUTING
FIGURE 1.1
A vector |v⟩ is projected to the direction defined by a unit vector |ek ⟩ by the
action of Pk = |ek ⟩⟨ek |. The difference |v⟩ − Pk |v⟩ is orthogonal to |ek ⟩.
EXAMPLE 1.3.3. Let θ ∈ R,
cos θ − sin θ
|e1 ⟩ = iϕ and |e2 ⟩ = .
e sin θ eiϕ cos θ
Then one readily checks that {|e1 ⟩, |e2 ⟩} is an orthonormal basis. The corre-
sponding projection operators P1 = |e1 ⟩⟨e1 | and P2 = |e2 ⟩⟨e2 | are
cos2 θ e−iϕ cos θ sin θ sin2 θ −e−iϕ cos θ sin θ
P1 = iϕ , P2 = .
e cos θ sin θ sin2 θ −eiϕ cos θ sin θ cos2 θ
They satisfy the completeness relation
X 10
Pk = = I2
01
k
and the orthogonality condition
00
P1 P 2 = .
00
One readily verifies that Pk2 = Pk .
Unitary matrices are important tools for transforming quantum states rep-
resented as vectors. In general, we consider a linear transformation (also
known as linear operator, linear function, or linear map), T : Cn → Cm , i.e.,
a function satisfying
T (|x⟩ + |y⟩) = T (|x⟩) + T (|y⟩) and T (c|x⟩) = cT (|x⟩) (1.16)
for arbitrary |x⟩, |y⟩ ∈ Cn and c ∈ C. Note that every linear operator T :
Cn → Cm has the form
T (|v⟩) = A|v⟩ for all |v⟩ ∈ Cn , (1.17)
Vectors and Matrices 9
for a matrix A ∈ Mm,n . It is not hard to check that a function of the form
(1.17) is linear. Conversely, suppose T : Cn → Cm is a linear operator. Let
{|e1 ⟩, . . . , |en ⟩} be the standard basis for Cn , i.e., |ej ⟩ equals the jth column
of the identity matrix In for j = 1, . . . , n. Similarly, let {|f1 ⟩, . . . , |fm ⟩} be
m
the standard basis for PnC . Set A ∈ Mm,n with columns T (|e1 ⟩), . . . , T (|en ⟩).
Then for any |x⟩ = j=1 xj |ej ⟩, we have
X
T (|x⟩) = xj T (|ej ⟩) = A|x⟩.
j=1
EXAMPLE 1.3.4. Let T : C3 → C2 be a linear map, and {|e1 ⟩, |e2 ⟩, |e3 ⟩}
be the standard bases for C3 . If
1 3 −i
T (|e1 ⟩) = , T (|e2 ⟩) = , and T (|e3 ⟩) = ,
2 −i 1
then
1 3 −i
T (|x⟩) = |x⟩ for all |x⟩ ∈ C3 .
2 −i 1
As we shall see, quantum operations T : Cn → Cn transforming quantum
states represented as vectors in Cn must be of the form
T (|x⟩) = U |x⟩ for all |x⟩ ∈ Cn
for a unitary matrix U .
For readers with group theory background, it is interesting to note the
following. The set of unitary matrices form a group called the unitary group,
which is denoted by U(n). Note that for a unitary U ∈ Mn ,
1 = det(In ) = det(U † U ) = | det(U † ) det(U )| = | det(U )|2 .
Hence, det(U ) = eiα for some α ∈ R. A special unitary matrix is a unitary
matrix with determinant 1. The set of special unitary matrices is a group
called the special unitary group, which is denoted by SU(n). A real uni-
tary matrix A is called an orthogonal matrix, which satisfies det(A) = ±1. If
det A = 1, it is called a special orthogonal matrix. The set of orthogonal (spe-
cial orthogonal) matrices is a group called the orthogonal group (special
orthogonal group) and denoted by O(n) (SO(n)).
As mentioned before, there are different orthonormal bases of Cn , which
may be useful for specific problems. For instance, suppose T : Cn → Cm is a
linear operator such that T (|x⟩) = A|x⟩ for all |x⟩ ∈ Cn with A ∈ Mm,n . Let
B1 = {|v1 ⟩, . . . , |vn ⟩} ⊆ Cn and B2 = {|u1 ⟩, . . . , |um ⟩} ⊆ Cm be orthonormal
bases so that V = (|v1 ⟩ · · · |vn ⟩) ∈ Mn and U = (|u1 ⟩ · · · |um ⟩) ∈ Mm are
unitary. Suppose B = (brs ) ∈ Mm,n with columns |b1 ⟩, . . . , |bn ⟩ satisfies
m
X
T (|vj ⟩) = bℓj |uℓ ⟩ = U |bj ⟩, j = 1, . . . , n.
ℓ=1
10 QUANTUM COMPUTING
Then
AV = A(|v1 ⟩ . . . |vn ⟩) = (U |b1 ⟩ · · · U |bn ⟩) = U B,
and hence B = U † AV. We will show in Section 1.6 that orthonormal bases B1
and B2 can be chosen such that B only has nonzero entries in the (j, j) position
for j = 1, . . . , k with k ≤ min{m, n}. To do this, we will need the concept of
eigenvalues and eigenvectors for A ∈ Mn treated in the next section.
We conclude this section by considering the set of linear functions f : Cn →
C, which is often called a linear functional. By the previous discussion, there
is an 1 × n matrix (a row vector) (α1 , . . . , αn ), which can be regarded as the
bra vector ⟨y| of |y⟩ = (α1∗ , . . . , αn∗ )t ∈ Cn , such that
f (|x⟩) = (α1 , . . . , αn )|x⟩ = ⟨y|x⟩ for all |x⟩ ∈ Cn .
In general, the set of linear functional on a vector space V (Cn in the present
case) is called the dual vector space, or simply the dual space, of V and
denoted by V∗ .‡ So, we may identify Cn∗ with the set of bra vectors, viz.,
Cn∗ = {(α1 , . . . , αn ) : α1 , . . . , αn ∈ C} = {⟨y| : |y⟩ ∈ Cn }. (1.18)
1.4 Eigenvalues, eigenvectors, and Schur Triangulariza-
tion
Let A ∈ Mn , and |v⟩ be a nonzero vector in Cn . It is usually not true that
A|v⟩ = µ|v⟩, i.e., A|v⟩ is not proportional to |v⟩ in general. If, however, |v⟩ is
properly chosen, we may end up with A|v⟩, which is a scalar multiple of |v⟩;
A|v⟩ = λ|v⟩, λ ∈ C. (1.19)
Then λ is called an eigenvalue of A, while |v⟩ is called the corresponding
eigenvector. The above equation being a linear equation, the norm of the
eigenvector cannot be fixed. Of course, it is always possible to normalize
|v⟩ such that ∥|v⟩∥ = 1. We often use the symbol |λ⟩ for an eigenvector
corresponding to an eigenvalue λ to save symbols.
Rewrite the equation (1.19) as (A − λIn )|v⟩ = 0. By the theory of linear
equations, there is a nonzero vector |v⟩ for some λ ∈ C if and only if A − λIn
is singular, equivalently,
D(λ) = det(A − λIn ) = 0. (1.20)
‡ The symbol ∗ here denotes the dual and should not be confused with complex conjugation.
Vectors and Matrices 11
This equation (1.20) is called the characteristic equation or the eigen
equation of A. Note that D(λ) can be written as the product of n linear
factors, say,
n
Y n
X
D(λ) = (λj − λ) = (−λ)n + (−λ)n−k Ek (λ1 , . . . , λn ),
j=1 j=1
P
where Ek (λ1 , . . . , λn ) = 1≤j1 <···<jk ≤n λj1 · · · λjk is known as the kth ele-
mentary symmetric function of λ1 , . . . , λn for 1 ≤ k ≤ n. The characteristic
equation always has n solutions λ1 , λ2 , . . . , λn , counting the multiplicity.
One may expand Qn det(A − λI), say, by Laplace expansion, and compare
coefficients with j=1 (λj − λ) and conclude that Ek (λ1 , . . . , λn ) equals the
sum of the determinants of the k × k submatrices of A lying in rows and
columns indexed by 1 ≤ j1 < · · · < jk ≤ n. In particular, if A = (aij ), then
n
Y
det(A) = En (λ1 , . . . , λn ) = λj ,
j=1
and
n
X n
X
E1 (λ1 , . . . , λn ) = λj = ajj ,
j=1 j=1
which is called the trace of A, and denoted as Tr A.
If A ∈ Mn has n linearly independent eigenvectors |v1 ⟩, . . . , |vn ⟩, which
will form a basis for Cn , corresponding
Pn to the eigenvalues λ1P
, . . . , λn , then
n
every |x⟩ in Cn can be written as j=1 cj |vj ⟩ so that A|x⟩ = j=1 λj cj |vj ⟩.
A ∈ Mn has n linearly independent eigenvaectors. For
However, not every
01 1
example, let A = . Then eigenvectors of A must be a multiple of .
00 0
In general, we have the following Schur Triangularization Theorem.
THEOREM 1.4.1. Let A ∈ Mn . There is a unitary U such that U † AU
is in upper triangular form, i.e., the (r, s) entry of U † AU is zero whenever
r > s.
Proof. By induction on n. When n = 1, the result trivially holds. Suppose
the result holds for matrices of size at most n − 1. For A ∈ Mn , one can
solve det(A − λI) = 0 and get a unit vector |x⟩ such that A|x⟩ = λ|x⟩ for
an
eigenvalue
λ. Let U1 ∈ Mn with |x⟩ as the first column. Then U1† AU1 =
λ ⋆
. By induction assumption, there is unitary U2 ∈ Mn−1 such that
0 A1
† 1 † λ ⋆
U2 A1 U2 = T is in triangular form. If U = U1 , then U AU =
U2 0T
is in triangular form.
12 QUANTUM COMPUTING
2 2
EXAMPLE 1.4.2. Let A = . Then det(A − λI) = λ2 − λ so that
−1 −1
√
A has eigenvalues {0, 1}. If we let |u1 ⟩ = (1, −1)t /√ 2 be a unit eigenvector
t
0, then |u1 ⟩ and |u2 ⟩ = (1,
for the eigenvalue 1) / 2 form an orthonormal
1 1 03
basis, and U = √12 satisfies U † AU = .
−1 1 01
1.5 Normal matrices and spectral decomposition
If A ∈ Mn has an orthonormal set of eigenvectors {|λ1 ⟩, . . . , |λn ⟩} correspond-
ing to the eigenvalues λ1 , . . . , λn , and U ∈ Mn has columns |λ1 ⟩, . . . , |λn ⟩, then
U † AU = D is a diagonal matrix with diagonal entries λ1 , . . . , λn . That is,
the triangular matrix in Theorem 1.4.1 become a diagonal matrix. However,
even if A ∈ Mn has n linearly independent eigenvectors, they may not form
an orthnormal set in general.
11
EXAMPLE 1.5.1. Let A = . The unit eigenvectors have the form
00
1 γ2 1
|v1 ⟩ = γ1 and |v2 ⟩ = √
0 2 −1
with |γ1 | = |γ2 | = 1. So, |⟨v1 |v2 ⟩| = √1 ̸= 0.
2
A matrix A ∈ Mn is normal if AA† = A† A. It is immediate from the
definitions that Hermitian, skew-Hermitian, and unitary matrices are normal.
It turns out that normal matrices are precisely the matrices with an orthonor-
mal basis of eigenvectors as shown in the next theorem. It is interesting that
a generic matrix in Mn is non-normal, but most matrices which are useful in
quantum information science are normal matrices.
THEOREM 1.5.2. A matrix A ∈ Mn is normal if and only if there are
λ1 , . . . , λn ∈ C and a unitary U ∈ Mn such that U † AU is a diagonal matrix
with diagonal entries λ1 , . . . , λn . Equivalently,
λ1
A = U . . . U † = λ1 |λ1 ⟩⟨λ1 | + · · · + λn |λn ⟩⟨λn |, (1.21)
λn
where |λ1 ⟩, . . . , |λn ⟩ are the columns of U .
Proof. Suppose A = U DU † for a diagonal matrix D. Then
AA† = U DD† U † = U D† DU † = A† A.
Vectors and Matrices 13
Thus, A is normal. Conversely, suppose AA† = A† A, and suppose U ∈ Mn is
unitary such that U AU † = T is in upper triangular form. Then
T T † = U AA† U † = U A† AU † = T † T.
For j = 1, . . . , n, the (1, 1) entry of T T † is
(t11 , . . . , t1n )(t∗11 , . . . , t∗1n )t = |t11 |2 + · · · + |t1n |2 ,
and the (1, 1) entry of T † T is
(t∗11 , 0, . . . , 0)(t11 , 0, . . . , 0)t = |t11 |2 .
So, T T † = T † T implies that t12 = · · · = t1n = 0. Now, compare the (2, 2)
entries of T T † and T † T , we see that t23 = · · · = t2n = 0. Repeating this
argument, we see that T is a diagonal matrix.
As mentioned before, physicists use |λj ⟩ to represent a unit vector of A
corresponding to the eigenvalue λj . Then the representation of a normal
matrix A ∈ Mn in (1.21) becomes
n
X
A= λj |λj ⟩⟨λj |,
j=1
which is called the spectral decomposition of A.
We have the following corollary concering Hermitian, skew-Hermitian, and
unitary matrices are normal matrices. The proof is left as an exercise.
COROLLARY 1.5.3. Let A ∈ Mn be a normal matrix.
1. The matrix A is Hermitian if and only if all its eigenvalues are real.
2. The matrix A is skew-Hermitian if and only if all its eigenvalues are
pure imaginary.
3. The matrix A is unitary if and only if all its eigenvalues are unimodular,
i.e., having modulus one.
The Pauli matrices, also known as the spin matrices, are:
01 0 −i 1 0
σx = , σy = , σz = .
10 i 0 0 −1
They are also denoted by σ1 , σ2 and σ3 , respectively. They are Hermitian
and unitary matrices in M2 , and are useful in quantum information science.
We will use them to illustrate properties of normal matrices. Their additional
properties are given in Subsection 1.8.3.
14 QUANTUM COMPUTING
EXAMPLE 1.5.4. The Pauli matrix
0 −i
σy =
i 0
is Hermitian. Let us find its eigenvalues and corresponding eigenvectors.
From
det(σy − λI) = λ2 − 1 = 0,
we find the eigenvalues λ1 = 1 and λ2 = −1. For the eigenvalue λ1 we solve
−1 −i x 0
(σy − I)|v1 ⟩ = =
i −1 y 0
and get |v1 ⟩ = (x, y)t = (1, i)t . After normalization, we may let |λ1 ⟩ =
√1 (1, i)t . Similarly, for the eigenvalue λ2 we solve (σy + I)|v2 ⟩ = |0⟩ and get
2
|v2 ⟩ = (i, 1)t . After normalization, we may let |λ2 ⟩ = √12 (i, 1)t . We have
1 i
⟨λ1 |λ2 ⟩ = (1, −i) = 0.
2 1
so that {|λ1 ⟩, |λ2 ⟩} is an orthonormal set. If
1 1 −i 1 1 i
P1 = |λ1 ⟩⟨λ1 | = , and P2 = |λ2 ⟩⟨λ2 | = ,
2 i 1 2 −i 1
P
k λk |λk ⟩⟨λk | = P1 − P2 and I = P1 + P2 . If U = (|λ1 ⟩, |λ2 ⟩) =
then σy =
√1
i1
, then U is unitary and
2 1i
1 0
U † σy U = .
0 −1
EXAMPLE 1.5.5. (1) The eigenvalues and the corresponding eigenvectors
of σx are found in a similar way as the above example as λ1 = 1, λ2 = −1 and
1 1 1 1
|λ1 ⟩ = √ , |λ2 ⟩ = √ .
2 1 2 −1
(2) Let us consider the eigenvalue problem of a matrix
1000
0 1 0 0 I2
A= = = I2 ⊕ σx .
0 0 0 1 σx
0010
Note that this matrix is block diagonal with diagonal blocks I2 and σx . Thus,
the eigenvalues are those from I2 and σx , i.e., 1, 1, 1 and −1. The corre-
sponding eigenvectors can be extended from those of I2 and σx , which has
Vectors and Matrices 15
been obtained in (1), to get
1 0 0 0
, , √1 0 , √1 0 .
0 1
0 0 2 1 2 1
0 0 1 −1
(3) Let us consider the eigenvalue problem of a matrix
0001
0 1 0 0
B= 0 0 1 0.
1000
So, I2 acts on Span {|e2 ⟩, |e3 ⟩} and σx acts on Span {|e1 ⟩, |e4 ⟩}. Although
this matrix is not block diagonal, change of the order of basis vectors from
|e1 ⟩, |e2 ⟩, |e3 ⟩, |e4 ⟩ to |e3 ⟩, |e2 ⟩, |e1 ⟩, |e4 ⟩ maps the matrix B to A in (2). There-
fore the eivenvalues of B are the same as those of A. (Note that the charac-
teristic equation is left unchanged under a permutation of basis vectors.) By
putting back the order of the basis vectors, the eigenvectors of A are mapped
to those of B as
0 0 1 1
, , √1 0 , √1 0 .
0 1
1 0 2 0 2 0
0 0 1 −1
By the spectral decomposition, we have the following spectral theorem
for normal matrices.
THEOREM 1.5.6. Suppose A ∈ Mn is normal satisfying (1.21). For any
positive integer m,
m
λ1
Am = U
.. † m m
U = λ1 |λ1 ⟩⟨λ1 | + · · · + λn |λn ⟩⟨λn |. (1.22)
.
λm
n
(1) If A is invertible, then (1.22) holds for negative integers m as well.
(2) If A has nonnegative eigenvalues, then (1.22) holds for all positive real
numbers m.
(3) If A has positive eigenvalues, then (1.22) holds for real numbers m.
(4) We may replace the power function f (z) = z m in (1.22) by a polynomial
function f (z) = a0 + a1 z + · · · + aN z N , or analytic functions f (t), which
admits a power series expansion, so that
n
X
f (A) = f (λj )|λj ⟩⟨λj |.
j=1
16 QUANTUM COMPUTING
Proof. Since A = U DU † , where D is the diagonal matrix with diagonal
entries λ1 , . . . , λn ,
n
X
Am = (U DU † )m = (U DU † ) · · · (U DU † ) = U Dm U † = λm
j |λj ⟩⟨λj |.
j=1
One can apply a similar argument to prove (1) – (4).
EXAMPLE 1.5.7. Consider σy again. By Example 1.5.4, σy = P1 − P2 .
Hence, for α ∈ R,
∞
(iασy )k
X
iα −iα cos α sin α
exp(iασy ) ≡ = e P1 + e P2 = .
k! − sin α cos α
k=0
Even when f (x) does not admit a series
√ expansion, we may still formally
define f (A) by Eq. (1.25). Let f (x) = x and A = σy , for example. Then we
obtain from Example 1.5.4 that
√
σy = (±1)P1 + (±i)P2 .
It is easy to show that the RHS squares to σy . However, there are four possible
√
σy depending on the choice of ± for each eigenvalue. Therefore the spectral
decomposition is not unique in this case. Of course
√ this ambiguity originates
in the choice of the branch in the definition of x.
We prove a formula, which will be useful in our future discussion, extending
Example 1.5.4 and Example 1.5.7.
PROPOSITION 1.5.8. Let n̂ = (nx , ny , nz ) ∈ R3 be a unit vector, σ =
(σx , σy , σz ), and
nz nx − iny
A = n̂ · σ = .
nx + iny −nz
Then det(A − λI2 ) = 1 − λ2 so that A has eigenvalues (λ1 , λ2 ) = (1, −1), and
spectral decomposition
A = |λ1 ⟩⟨λ1 | − |λ2 ⟩⟨λ2 |
with |λ1 ⟩⟨λ1 | = (A + I)/2 and |λ2 ⟩⟨λ2 | = (I − A)/2. If α ∈ R, then
exp (iαn̂ · σ) = cos αI + i sin α(n̂ · σ). (1.23)
Proof. Note that det(A − λI2 ) = λ2 − 1. Hence A has eigenvalues λ1 = +1
and λ2 = −1. A has spectral decomposition A = |λ1 ⟩⟨λ1 | − |λ2 ⟩⟨λ2 | = P1 − P2
such that I = P1 + P2 . It follows that
A + I = 2P1 and I − A = 2P2 ;
Vectors and Matrices 17
hence
(A + I) 1 1 + nz nx − iny
P1 = = ,
2 2 nx + iny 1 − nz
(A − I) 1 1 − nz −nx + iny
P2 = = .
−2 2 −nx − iny 1 + nz
As a result,
eiα e−iα
iαA 1 + nz nx − iny 1 − nz −nx + iny
e = +
2 nx + iny 1 − nz 2 −nx − iny 1 + nz
= cos αI + i sin α(n̂ · σ).
If n̂ = (0, 1, 0), we see that the spectral projections of σy are P1 = (σy +I)/2
and P2 = (I − σy )/2 as shown in Example 1.5.4, and exp(iασy ) = cos αI +
i sin ασy as shown in Example 1.5.7.
If A ∈ Mn is normal having the form (1.21), then Pj = |λj ⟩⟨λj | is an eigen-
projection of A corresponding to the eigenvalue λj . Suppose A has k distinct
eigenvalues µ1 , . . . , µk . If we add the eigenprojections Pj corresponding to the
same eigenvalues µℓ to get Qℓ for ℓ = 1, . . . , k. Then
k
X
Q2ℓ = Qℓ , Qr Qs = 0 whenever r ̸= s, and A= µℓ Qℓ .
ℓ=1
Theorem 1.5.6 can be stated as:
k
X
Am = µm
ℓ Qℓ . (1.24)
ℓ=1
(1) If A is invertible then (1.24) holds for any integer m.
(2) If A has nonnegative eigenvalues, then (1.24) holds for any positive real
number m.
(3) if A has positive eigenvalues, then (1.24) holds for any real number m.
(4) For any analytic functions f (z) we have
k
X
f (A) = f (µℓ )Qℓ . (1.25)
ℓ=1
1.6 Singular Value Decomposition (SVD)
Let T : Cn → C m be a linear operator of the form T (|x⟩) = A|x⟩ for all
|x⟩ ∈ Cn . In the following, we will show that there are orthonormal bases of
18 QUANTUM COMPUTING
Cn and Cm such that the matrix of the linear operator T has simple form.
Equivalently, there are unitary matrices U ∈ Mm and V ∈ Mn such that
B = U † AV has simple form. It can be viewed as a generalization of the
eigenvalue problem to arbitrary matrices. The result is useful in studying
quantum states in a bipartite quantum system, i.e., a system composed of
two subsystems.
THEOREM 1.6.1. Let A ∈ Mm,n . Then there exist U ∈ U(m) with
columns |u1 ⟩, . . . , |um ⟩, V ∈ U(n) with columns |v1 ⟩, . . . , |vn ⟩, and a matrix
Σ ∈ Mm,n with (j, j) entry equal to sj for j ≤ k ≤ min{m, n} and all other
entries equal to zero, such that s1 ≥ · · · ≥ sk > 0 and
k
D 0k,n−k X
A = U ΣV † = U V† = sj |uj ⟩⟨vj |, (1.26)
0m−k,k 0m−k,n−k
j=1
where D ∈ Mk is the diagonal matrix with diagonal entries s1 , . . . , sk .
Proof. Assume that n = min{m, n}. By (1.10), if T = A† A, then T † =
(A† A)† = (A† )(A† )† = A† A = T . So, T is Hermitian. Moreover, if λ is an
eigenvalue of T , then λ ∈ R by Corollary 1.5.3. In fact, we have
λ = ⟨λ|T |λ⟩ = ⟨λ|A† A|λ⟩ = ∥A|λ⟩∥2 ≥ 0.
† †
By Theorem 1.5.2, there is a unitary V ∈ Mp n such that V A AV = D with
diagonal entries λ1 ≥ · · · ≥ λn ≥ 0. Let sj = λj for j = 1, . . . , n. If AV has
columns |y1 ⟩, . . . , |yn ⟩ ∈ Cm , then V † A† AV = D implies that ∥|yj ⟩∥2 = λj
and ⟨yr |ys ⟩ = 0 for r ̸= s. Suppose dk > 0 = dk+1 . It is possible that
k = n. Let |uj ⟩ = |yj ⟩/sj for j = 1, . . . , k, and extend {|u1 ⟩, . . . , |uk ⟩} to
an orthonormal basis.§ One can use s1 , . . . , sk to construct Σ stated in the
theorem. Then the matrices U, V, Σ will satisfy AV = U Σ, and the desired
form will follow.
If m = min{m, n}, apply the argument to A† to get the conclusion.
The decomposition (1.26) is called the singular value decomposition and
is often abbreviated as SVD. The numbers s1 , · · · , sk are the nonzero singular
values of A, and the matrix Σ is called the singular value matrix. Clearly,
k is the rank of the matrix A.
Note that the proof of Theorem 1.6.1 actually provides the steps of com-
puting U, V and Σ.
EXAMPLE 1.6.2. Let
11
22
A = 0 0 so that A† A = .
22
i i
§ Thiscan be done by first extending {|u1 ⟩, . . . , |uk ⟩} to a basis, i.e., a linearly independent
set with n vectors, and apply the Gram-Schmidt process.
Vectors and Matrices 19
The eigenvalues of A† A are λ1 = 4 and λ2 = 0 with the corresponding eigen-
vectors
1 1 1 −1
|λ1 ⟩ = √ , |λ2 ⟩ = √ .
2 1 2 1
From these, we can construct unitary matrix V and the singular value matrix
Σ as
20
1 1 −1
V =√ and Σ = 0 0 .
2 1 1 00
To construct U , we need
1 1 t
|µ1 ⟩ = A|λ1 ⟩ = √ (1, 0, i)
2 2
and two other vectors orthogonal to |µ1 ⟩. By inspection, we find
1
|µ2 ⟩ = (0, 1, 0)t and |µ3 ⟩ = √ (i, 0, 1)t ,
2
for example. From these vectors we construct U as
1 0 i
1 √
U=√ 0 2 0.
2 i 0 1
One can verify that U ΣV † really reproduces A.
1.7 Tensor Product (Kronecker Product)
In this section, we present the definition and some results on the tensor
product (Kronecker product) of two matrices of any sizes. These are
extremely important in the study of quantum systems.
Let A be an m × n matrix and let B be a p × q matrix. Then
a11 B, a12 B, . . . , a1n B
a21 B, a22 B, . . . , a2n B
A⊗B = (1.27)
...
am1 B, am2 B, . . . , amn B
is an (mp) × (nq) matrix called the tensor product (Kronecker product)
of A and B.
20 QUANTUM COMPUTING
It should be noted that not all (mp) × (nq) matrices are tensor products of
an m × n matrix and a p × q matrix. It is easy to see that for
T11 · · · T1n
T = ... . . . ... with Trs ∈ Mp,q , (1.28)
Tm1 · · · Tmn
T = A ⊗ B with A ∈ Mm,n , B ∈ Mp,q if and only if Trs are multiple of each
others for all r, s.
In general, an (mp)×(np) matrix has mnpq degrees of freedom, while m×n
and p × q matrices have mn + pq in total. Observe that mnpq ≫ mn + pq
for large enough m, n, p and q. This fact is ultimately related to the power of
quantum computing compared to its classical counterpart.
EXAMPLE 1.7.1.
0 0 1 0
0 σz 0 0 0 −1
σx ⊗ σz = = .
σz 0 1 0 0 0
0 −1 0 0
EXAMPLE 1.7.2. We can also apply the tensor product to vectors as a
special case. Let
a c
|u⟩ = , |v⟩ = .
b d
Then we obtain
ac
a|v⟩ ad
|u⟩ ⊗ |v⟩ = bc .
=
b|v⟩
bd
The tensor product |u⟩ ⊗ |v⟩ is often abbreviated as |u⟩|v⟩ or |uv⟩ when it
does not cause confusion.
From the definition, one readily checks that
(1) A ⊗ (B + C) = A ⊗ B + A ⊗ C if B and C have the same size, and
(2) (A ⊗ B)† = A† ⊗ B † .
One can also show that
(3) For matrices A, B, C, D such that AC and BD are defined,
(A ⊗ B)(C ⊗ D) = (AC) ⊗ (BD).
To see this, assume that A = (apq ), C = (crs ) and AC = (tuv ) ∈ Mmn . By
block multiplication,
(A ⊗ B)(C ⊗ D) = (apq B)(crs D) = (tuv BD) = (AC) ⊗ (BD).
Vectors and Matrices 21
Similarly, we have
(A1 ⊗ B1 )(A2 ⊗ B2 )(A3 ⊗ B3 ) = (A1 A2 A3 ) ⊗ (B1 B2 B3 ),
and its generalizations whenever the dimensions of the matrices match so that
the products make sense.
By (1), (2), (3), we can deduce the following.
(4) Suppose A ∈ Mm and B ∈ Mn .
(4.a) If A|u⟩ = λ|u⟩ and B|v⟩ = µ|v⟩ for nonzero vectors |u⟩, |v⟩, then
(A ⊗ B)|uv⟩ = (λµ)|uv⟩. That is, λµ is an eigenvalue of A ⊗ B with
eigenvector |uv⟩ = |u⟩ ⊗ |v⟩.
(4.b) If A and B are invertible, then (A ⊗ B)−1 = A−1 ⊗ B −1 .
The assertion (4.a) can be verified readily.
For (4.b), note that (A ⊗ B)(A−1 ⊗ B −1 ) = Im ⊗ In = Imn .
By the above properties one can check that the tensor product of two uni-
tary matrices is also unitary, and the tensor product of two Hermitian matrices
is also Hermitian.¶ Also, we have the following.
(5) For any matrices A, B, if R1 AS1 = T1 , R2 BS2 = T2 , then
(R1 ⊗ R2 )(A ⊗ B)(S1 ⊗ S2 ) = T1 ⊗ T2 .
(5.a) Suppose A ∈ Mm and B ∈ Mn , and R1 , S1 , R2 , S2 are unitary such
that R1 = S1† and R2 = S2† . If T1 , T2 are in triangular (diagonal) form,
then U = S1 ⊗ S2 is unitary such that
U † (A ⊗ B)U = T1 ⊗ T2
is in triangular (diagonal) form.
A ∈ Mm and B ∈ Mn are
As a result, ifP Pnnormal with spectral decom-
m
position A = r=1 λr |λr ⟩⟨λr | and B = s=1 µ
Ps |µs ⟩⟨µs |, then A ⊗ B is
normal with spectral decomposition A ⊗ B = r,s λr µs |λr µs ⟩⟨λr µs |.
(5.b) If A, B are rectangular matrices with singular decomposition
r
X s
X
A= ai |ui ⟩⟨vi | and B= bj |xj ⟩⟨yj |,
i=1 j=1
then X
A⊗B = ai bj |ui xj ⟩⟨vi yj |
r,s
is the singular value decomposition of A ⊗ B.
¶ Note that the usual product of two Hermitian matrices may not be Hermitian.
22 QUANTUM COMPUTING
01
EXAMPLE 1.7.3. Let U † AU = V † BV = , where U, V ∈ M2 are
00
unitary matrices with columns |u1 ⟩, |u2 ⟩ and |v1 ⟩, |v2 ⟩, respectively. Then
0001
0 0 0 0
(U ⊗ V )† (A ⊗ B)(U ⊗ V ) = 0 0 0 0 .
0000
Thus, |u1 ⟩⊗|v1 ⟩, |u1 ⟩⊗|v2 ⟩, |v2 ⟩⊗|v1 ⟩ are eigegenvectors of A⊗B correspond-
ing to the eigenvalue 0. Note that one can only get the eigenvector |u1 ⟩ ⊗ |v1 ⟩
for the eigenvalue 0 using 4(a).
1.8 Additional topics
1.8.1 Factorization and Norm Properties of matrices
As mentioned before, by the Gram-Schmidt process, we have the following
QR factorization of matrices.
PROPOSITION 1.8.1. Let A ∈ Mm,n have linearly independent columns.
Then A = QR, where Q ∈ Mm is unitary, and R ∈ Mm,n with zero (r, s)
entry whenever s > r.
Proof. Since A has linearly independent columns, we have m ≥ n. Applying
the Gram-Schmidt process to the columns of A, we get orthonormal vectors
|u1 ⟩, . . . , |un ⟩. Extend these vector to an orthonormal basis and use them as
the columns of Q, and let R = Q† Q. Then A = QR as asserted.
Using the singular value decomposition, we have the polar decomposition
of square matrices.
PROPOSITION 1.8.2. Let A ∈ Mn . Then there are unitary U ∈ Mn and
positive semi-definite matrices P, Q ∈ Mn such that A = U P = QU .
Proof. Suppose A has a singular value decomposition A = XΣY . Let
U = XY, P = Y † ΣY, Q = XΣX † . The conclusion holds.
The definitions of inner product can be extended to Mm,n defined by
(A, B) = Tr (A∗ B)∥ One readily verifies that for any A, B, C ∈ Mm,n .
(1) (A + B, C) = (A, C) + (B, C), (A, µB) = µ(A, B), (A, B) = (B, A)∗ ,
∥ Inmathematics literature, it is defined by (A, B) = Tr (AB ∗ ) so that the function is linear
in the first component.
Vectors and Matrices 23
(2) (A, A) ≥ 0, where the equality holds if and only if A = 0m,n .
One can define the corresponding inner product norm by
∥A∥ = (A, A)1/2 for any A ∈ Mm,n ,
which satisfies the following norm properties for any A, B ∈ Mm,n and c ∈ C.
(a) ∥A∥ ≥ 0, where the equality holds if and only if A = 0m,n .
(b) ∥A + B∥ ≤ ∥A∥ + ∥B∥.
(c) ∥cA∥ = |c|∥A∥.
To verify (b), we need the following. Cauchy-Schwartz inequality.
PROPOSITION 1.8.3. Let A, B ∈ Mm,n . Then |(A, B)|2 ≤ (A, A)(B, B),
where the equality holds if and only if {A, B} is linearly dependent.
Proof. Let a = (A, A), b = (B, B), and c = |(A, B)| = eiα (A, B), with
α ∈ [0, 2π). Then for any t ∈ R,
0 ≤ (tA + eiα B, tA + eiα B) = at2 + 2ct + b.
By the theory of quadratic equation, 4|(A, B)|2 = 4c2 ≤ 4ab = 4(A, A)(B, B),
where the equality holds if and only if ∥tA − eiα B∥ = 0 with t ∈ R. The
conclusion follows.
Clearly, the above proof works for Cn = Mn,1 . In fact, the same proof
works for a general inner product space with an inner product (·, ·) satisfying
(1) and (2).
Besides the inner product norm, one can define other norms on Cn and
Mm,n . For instance, for 1 ≤ p, one can define the ℓp -norm on Cn by
Xn
ℓp (|x⟩) = ( |xj |p )1/p for |x⟩ = (x1 , . . . , xn )t
j=1
and the Schatten p-norm of A ∈ Mm,n by
Xp
Sp (A) = ( sj (A)p )1/p for A ∈ Mm,n ,
j=1
where s1 (A) ≥ s2 (A) ≥ · · · are the singular values of A. Taking limit p → ∞,
we have ℓ∞ (x) = max{|xj | : 1 ≤ j ≤ n} and S∞ (A) = s1 (A).
24 QUANTUM COMPUTING
1.8.2 Construction of eigenprojections without eigenvectors
Let us recall that Pi = |λi ⟩⟨λi | is a projection operator onto the direction of
the eigenvector |λi ⟩ of a normal matrix A. Then the spectral decomposition
claims that the operation of A in the one-dimensional subspace spanned by
|λi ⟩ is equivalent with a multiplication by a scalar λi . This observation reveals
a neat way to obtain the spectral decomposition of a normal matrix. Let A
be a normal matrix and let {λα } and {|λα,p ⟩ (1 ≤ p ≤ gα )} be the sets of
eigenvalues and eigenvectors, respectively. Here we use subscripts α, β, . . . to
denote distinct eigenvalues, while gα denotes the degeneracy (multiplicity) of
the eigenvalue λα , namely λα has gα linearly independent eigenvectors, which
are indexed by p. Therefore we have
X X X
1 ≤ n, gα = 1 = n.
α α i
Now consider the following expression:
Q
β̸=α (A − λβ I)
Pα = Q . (1.29)
γ̸=α (λα − λγ )
This is a projection operator onto the gα -dimensional space corresponding to
the eigenvalue λα . In fact, it is straightforward to verify that
Q
β̸=α (λα − λβ )
Pα |λα,p ⟩ = Q |λα,p ⟩ = |λα,p ⟩ (1 ≤ p ≤ gα )
γ̸=α (λα − λγ )
and Q
β̸=α (λδ − λβ )
Pα |λδ,q ⟩ = Q |λδ,q ⟩ = 0 (δ ̸= α, 1 ≤ q ≤ gδ )
γ̸=α (λα − λγ )
since one of β(̸= α) is equal to δ(̸= α) in the numerator. Therefore, we
conclude that Pα is a projection operator
gα
X
Pα = |λα,p ⟩⟨λα,p | (1.30)
p=1
onto the gα -dimensional subspace corresponding to the eigenvalue λα . It
follows from Eq. (1.30) that rank Pα = gα . Note also that
APα = λα Pα . (1.31)
The above method is particularly suitable when the eigenvalues are degener-
ate. It is also useful when eigenvectors are difficult to obtain or unnecessary.
Using this method, one can again deduce that the projection operators of
σy are P1 = (I + σy )/2 and P2 = (I − σy )/2 as shown in Example 1.5.4.
Vectors and Matrices 25
1.8.3 Pauli Matrices
Let us consider spin 1/2 particles, such as an electron or a proton. These parti-
cles have an internal degree of freedom: the spin-up and spin-down states. (To
be more precise, these are expressions that are relevant when the z-component
of an angular momentum Sz is diagonalized. If Sx is diagonalized, for example,
these two quantum states can be either “spin-right” or “spin-left.”) Since the
spin-up and spin-down states are orthogonal, we can take their components
to be
1 0
| ↑⟩ = , | ↓⟩ = . (1.32)
0 1
Then they are eigenvectors of σz satisfying σz | ↑⟩ = | ↑⟩ and σz | ↓⟩ = −| ↓⟩.
In quantum information, we often use the notations |0⟩ = | ↑⟩ and |1⟩ = | ↓⟩.
Moreover, the states |0⟩ and |1⟩ are not necessarily associated with spins.
They may represent any two mutually orthogonal states, such as horizontally
and vertically polarized photons. Thus we are free from any physical system,
even though the terminology of spin algebra may be employed.
For electrons and protons, the spin angular momentum operator is conve-
niently expressed in terms of the Pauli matrices σk as Sk = (ℏ/2)σk . We
often employ natural units in which ℏ = 1. Note the tracelessness property
Tr σk = 0 and the Hermiticity σk† = σk .∗∗ In addition to the Pauli matrices,
we introduce the unit matrix I2 in the algebra, which amounts to expanding
the Lie algebra su(2) to u(2).
Let A, B ∈ Mn . Their anticommutator, or anticommutation relation,
is {A, B} ≡ AB + BA; their commutator, or commutation relation, is
[A, B] ≡ AB − BA.
The Pauli matrices satisfy the anticommutation relations
{σj , σk } = σj σk + σk σj = 2δjk I. (1.33)
For ℓ = 1, 2, 3, the eigenvalues of σℓ are ±1.
The commutation relations between the Pauli matrices are
X
[σj , σk ] = σj σk − σk σj = 2i εjkℓ σℓ , (1.34)
ℓ
where εjkℓ is the totally antisymmetric tensor of rank 3, also known as the
Levi-Civita symbol,
1, (j, k, ℓ) = (1, 2, 3), (2, 3, 1), (3, 1, 2)
εjkℓ = −1 (j, k, ℓ) = (2, 1, 3), (1, 3, 2), (3, 2, 1)
0 otherwise.
∗∗ Mathematically speaking, these two properties imply that iσk are generators of the su(2)
Lie algebra associated with the Lie group SU(2).
26 QUANTUM COMPUTING
The commutation relations, together with the anticommutation relations,
yield
3
X
σj σk = i εjkℓ σℓ + δjk I . (1.35)
ℓ=1
The spin-flip (“ladder”) operators are defined by
1 01 1 00
σ+ = (σx + iσy ) = , σ− = (σx − iσy ) = . (1.36)
2 00 2 10
Verify that σ+ | ↑⟩ = σ− | ↓⟩ = 0, σ+ | ↓⟩ = | ↑⟩, σ− | ↑⟩ = | ↓⟩. The projection
operators to the eigenspaces of σz with the eigenvalues ±1 are
1 10
P+ = | ↑ ⟩⟨ ↑ | = 2 (I + σz ) = ,
00
(1.37)
1 00
P− = | ↓ ⟩⟨ ↓ | = 2 (I − σz ) = .
01
In fact, it is straightforward to show
P+ | ↑⟩ = | ↑⟩, P+ | ↓⟩ = 0, P− | ↑⟩ = 0, P− | ↓⟩ = | ↓⟩ .
Finally, we note the following identities:
2
σ± = 0, P±2 = P± , P+ P− = 0. (1.38)
1.9 Notes and Open problems
In this chapter, we presented a short review of linear algebra needed for our
discussion. A common question for beginners is: Why do we need to use
complex vectors and matrices? The short answer is: Only complex vectors
and matrices can model quantum systems satisfactorily. In fact, “Matrix
Mechanics” was a formulation of quantum mechanics introduced by Werner
Heisenberg, Max Born, and Pascual Jordan (1925). John von Neumann for-
malized the mathematical framework, and used the Hilbert space approach
to understand some basic quantum phenomena; see [7].
Even before going deep into the applications of linear algebra in quantum
information science, we can list some open problems in matrix theory related
to quantum information science that one may attempt.
1. Mutually unbiased bases (MUB). Determine the maximum number
r for the existence of unitary matrices U0√= In , U1 , . . . , Ur ∈ Mn such
that every entry of Uj∗ Uk has modulus 1/ n.
Vectors and Matrices 27
It is known that r ≤ n + 1, and the equality holds if n is a prime power.
The problem is open for n = 6.
One may see [1] and its references for more background and results.
2. Orthonormal basis for symmetric matrices. Construct or show
the existence of symmetric unitary matrices U1 , . . . , UN ∈ Mn with N =
n(n + 1)/2 such that Tr (Uj† Uk ) = 0 for all j ̸= k.
The construction of the cases when n is even or n = 3 is known. There
are numerical evidence that the existence of A1 , . . . , AN if n = 5, 7.
There is no general proof for the construction.
One can ask a similar question for the space of skew-symmetric matrices
A ∈ Mn , i.e., A = −At . In such a case, one would like find unitary
V1 , . . . , VN with N = n(n − 1)/2 such that Tr (Uj† Uk ) = 0 for all j ̸= k.
Such a construction is known if n is even, and it is known that the
construction is impossible if n is odd.
This question is related to the operator sum representation of the
Werner-Holevo channel. One may see [3] for more background.
Exercises for Chapter 1
EXERCISE 1.1. Find the condition under which two vectors
x 2i
|v1 ⟩ = y , |v2 ⟩ = x − y ∈ C3
3 1
are linearly independent.
EXERCISE 1.2. Show that a set of vectors
1 1 1
|v1 ⟩ = 1 , |v2 ⟩ = 0 , |v3 ⟩ = −1
1 i −1 + i
is a basis of C3 .
EXERCISE 1.3. Let
1 2−i
|x⟩ = i , |y⟩ = 1 .
2+i 2+i
Find ∥|x⟩∥, ⟨x|y⟩ and ⟨y|x⟩.
28 QUANTUM COMPUTING
EXERCISE 1.4. Prove that
⟨x|y⟩ = ⟨y|x⟩∗ . (1.39)
EXERCISE 1.5. Let {|ek ⟩} be as in Example 1.3.3 and let
X
3
|v⟩ = = ck |ek ⟩.
2
Find the coefficients c1 and c2 .
EXERCISE 1.6. (1) Use the Gram-Schmidt process to find an orthonormal
basis {|ek ⟩} from a linearly independent set of vectors
|v1 ⟩ = (−1, 2, 2)t , |v2 ⟩ = (2, −1, 2)t , |v3 ⟩ = (3, 0, −3)t .
(2) Let X
|u⟩ = (1, −2, 7)t = ck |ek ⟩.
k
Find the coefficients ck .
EXERCISE 1.7. Let
|v1 ⟩ = (1, i, 1)t , |v2 ⟩ = (3, 1, i)t .
Find an orthonormal basis for Span{|v1 ⟩, |v2 ⟩}.
EXERCISE 1.8. Show that the Gram-Schmidt process on a linearly inde-
pendent set {|v1 ⟩, . . . , |vk ⟩} using the projection operators as follows.
Let |e1 ⟩ = |v1 ⟩/∥|v1 ⟩∥. For j = 2, . . . , k, |ej ⟩ = |fj ⟩/∥|fj ⟩∥, where
|fj ⟩ = |vj ⟩ − P1 |vj ⟩ − · · · − Pj−1 |vj ⟩,
where Pℓ = |eℓ ⟩⟨eℓ | for ℓ = 1, . . . , j − 1.
EXERCISE 1.9. Let A and B be n × n matrices and c ∈ C. Show that
(cA)† = c∗ A† , (A + B)† = A† + B † , (AB)† = B † A† . (1.40)
EXERCISE 1.10. Let
1 0 1+i
A= √ .
2 1−i 0
Find the eigenvalues and the corresponding normalized eigenvectors. Show
that the eigenvectors are mutually orthogonal and that they satisfy the com-
pleteness relation. Find a unitary matrix which diagonalizes A.
EXERCISE 1.11. Prove Corollary 1.5.3.
Vectors and Matrices 29
EXERCISE 1.12. A matrix A ∈ Mn is called positive-semidefinite if
⟨ψ|A|ψ⟩ ≥ 0 for any |ψ⟩ in the relevant Hilbert space H. Show that A ∈ Mn
is positive semi-definite if and only if it is Hermian with non-negative eigen-
values.
EXERCISE 1.13. Show that
00i
U = 0 i 0.
i00
is unitary, and find the eigenvalues (without calculation if possible) and the
corresponding eigenvectors.
EXERCISE 1.14. Let H ∈ Mn be a Hermitian matrix. Show that
U = (I + iH)(I − iH)−1
is unitary. (This transformation is called the Cayley transformation.)
Show that if H has eigenvalues λj for j = 1, . . . , n, then U has eigenvalues
1+iλj
1−iλj for j = 1, . . . , n.
EXERCISE 1.15. In Example 1.4.2, show that there is a unitary matrix V
such that V † AV is in upper triangular form with (1, 1) entry equal to 1.
EXERCISE 1.16. Suppose A ∈ M2 has eigenvalues −1, 3 and the corre-
sponding eigenvectors
1 −1 1 1
|e1 ⟩ = √ , |e2 ⟩ = √ ,
2 i 2 i
respectively. Find A.
EXERCISE 1.17. Let
21
A= .
12
(1) Find the eigenvalues and the corresponding normalized eigenvectors of A.
(2) Write down the spectral decomposition of A.
(3) Find exp(iαA).
EXERCISE 1.18. Let
1 i −1
A = −i 1 −i .
−1 i 1
(1) Find the eigenvalues and the corresponding eigenvectors of A.
(2) Find the spectral decomposition of A.
(3) Find the inverse of A by making use of the spectral decomposition.
30 QUANTUM COMPUTING
EXERCISE 1.19. Let f : C → C be an analytic function. Let n̂ be a real
three-dimensional unit vector and α be a real number. Show that
f (α) + f (−α) f (α) − f (−α)
f (αn̂ · σ) = I+ n̂ · σ. (1.41)
2 2
(c.f., Proposition 1.5.8.)
EXERCISE 1.20. Find the SVD of
10i
A= .
i01
EXERCISE 1.21. Let A and B be an m × m matrix and a p × p matrix,
respectively. Show that
tr(A ⊗ B) = (trA)(trB) and det(A ⊗ B) = (det A)p (det B)m .
EXERCISE 1.22. Let A ∈ Mm and B ∈ Mp with eigenvectors |u1 ⟩, . . . , |un ⟩
and |v1 ⟩, . . . , |vp ⟩ corresponding to eigenvalues λ1 , . . . , λm and µ1 , . . . , µp .
Show that A ⊗ Ip + Im ⊗ B has the eigenvalues {λj + µk } with the corre-
sponding eigenvectors {|uj vk ⟩}, where Ip is the p × p unit matrix.
References
[1] I. Bengtsson, Three Ways to Look at Mutually Unbiased Bases, AIP
Conference Proceedings 889, 40–51 (2007).
[2] R. Bhatia, Matrix Analysis, Springer (1997).
[3] M. Girard, D. Leung, J. Levick, C.K. Li, V. Paulsen, Y.T. Poon,
and John Watrous1, On the mixed-unitary rank of quantum channels,
https://arxiv.org/pdf/2003.14405.pdf
[4] Otfried Gühne, Geza Toth, Entanglement detection, Physics Reports
474, 1 (2009).
[5] R.A. Horn and R.C. Johnson, Matrix Analysis (2nd ed.), Cambridge
University Press (2012).
[6] Peter D. Lax, Linear Algebra and Its Applications, Wiley-Interscience
(2007).
[7] J. von Neumann, Mathematical Foundations of Quantum Mechanics,
Princeton University Press, Princeton, 1996.