Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Introduction to Quantum

Computing
Exercise sheet 1: linear algebra primer
University of Copenhagen

Exercise 1: (Scalar product and unitary matrices) Recall that given two vectors
C
v, w ∈ d their scalar product hv|wi is defined as:
d
X
hv|wi = v̄i wi .
i=1

Also recall that the norm of the vector v, kvk, is defined as kvk2 = hv|vi. For a matrix
C
A ∈ d1 ×d2 , we define its adjoint matrix A∗ to be given by the d2 × d1 matrix with
C
entries (A∗ )i,j = Āj,i . A matrix U ∈ d×d is called unitary if U ∗ U = I. where I is the
identity matrix.

(a) Let
   
1 2 − 2i
v =  1 + i , w =  (1 − i)−1  .
π
2ei 4 −5

Compute hv|wi.

(b) Show the polarization identity:


1
ku + vk2 − ku − vk2 + iku + ivk2 − iku − ivk2 .

hu, vi =
4

(c) Let A ∈ Cd ×d . Show that for all vectors v ∈ Cd , w ∈ Cd


1 2 1 2 we have:

hv|Awi = hA∗ v|wi.

(d) Show that the matrix:

R, |a|2 + |b|2 = 1
 
a b
U= , ϕ∈
−eiϕ b̄ eiϕ ā

is unitary.

(e) Show the equivalence of the following statements:


I. U is unitary.
II. U preserves the scalar product: hU v|U wi = hv|wi for all v, w ∈ Cd.
III. U preserves the norm: kU vk2 = kvk2 for all v, w ∈ Cd.
Hint: recall that Aij = hei |Aej i for ei the canonical basis vectors. Exercise (b) may
also come in handy.

Exercise 2: (Eigenvalues and diagonalization) Recall that λ ∈ C is called an


C C
eigenvalue of a matrix A ∈ d×d if there exists v ∈ d \{0} such that:

Av = λv.

The vector v is called an eigenvector. The matrix A is called diagonalizable if there exist
a diagonal matrix D and invertible matrix X such that:

A = XDX −1 .

Moreover, the diagonal of D consists of the eigenvalues of A. Also note that if A is


normal (AA∗ = A∗ A), then we can pick X unitary.

(a) Diagonalize the matrix


 
2 1
A= ,
1 2

i.e. find X and D diagonal such that A = XDX −1 . Can you pick X unitary?
Compute A42 .

(b) A is called hermitian if A∗ = A. Show that if A is hermitian and λ one of its


eigenvalues, then λ ∈ . R
(c) Show that if a matrix A has an eigevalue λ, then so does B = XAX −1 . What is the
corresponding eigenvector for B?

(d) Show that unitary matrices are normal.

(e) Show that eigenvalues of unitary matrices are complex number of modulus 1.

Exercise 3: (Trace) Recall that the trace of a matrix A ∈ Cd×d, tr (A), is defined as
d
X
tr (A) = Aii .
i=1

One of the main properties of the trace is its ciclicity:

tr (ABC) = tr (BCA)

for all A, B, C ∈ Cd×d.

2
(a) Let A ∈ Cd×d be Hermitian. Show that
n
X
tr (A) = λi ,
i=1

where λi are the eigenvalues of A.


Hint: diagonalization.
Remark: the statement also holds for nonhermitian matrices.

(b) Show that for all vectors v, w ∈ Cd and A ∈ Cd:


hv|Awi = tr (Avw∗ ) .

(c) Show that the map

(A, B) 7→ tr (A∗ B)

for A, B ∈ Cd×d defines a scalar product on the vector space of matrices.


Exercise 4: (Positive semidefinite matrices) Recall that a hermitian matrix A ∈
Cd×d is called positive semidefinite if for all x ∈ C
d we have:

hx|Axi ≥ 0.

C
A hermitian matrix ρ ∈ d×d is called a density matrix if in addition to it being positive
semidefinite we have tr (ρ) = 1.

(a) Show that A being positive semidefinite is equivalent to A only having positive
eigenvalues.

(b) Let A, B ∈ Cd×d be positive semidefinite. Show that tr (AB) ≥ 0.


(c) Let P1 , . . . , Pm be positive semidefinite operators such that
m
X
Pi = I,
i=1

where I is the identity matrix. Given a density matrix ρ, define the function p :
R
{1, . . . , m} → by p(i) = tr (Pi ρ). Show that p is probability distribution, that is:
m
X
∀i : p(i) ≥ 0 and p(i) = 1.
i=1

You might also like