Quantum Computing: Review of Linear Algebra

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

1

Quantum Computing
Lecture 2

Anuj Dawar

Review of Linear Algebra


2

Vectors

Formally, the state of a qubit is a unit vector in C2 —the


2-dimensional complex vector space.
 
α
The vector   can be written as
β

α|0i + β|1i
   
1 0
where, |0i =   and |1i =  .
0 1

|φi— a ket, Dirac notation for vectors.


3

Linear Algebra

The state space of a quantum system is described in terms of a


vector space.

Vector spaces are the object of study in Linear Algebra.

In this lecture we review definitions from linear algebra that we


need in the rest of the course.

We are mainly interested in vector spaces over the complex number


field – C.

We use the Dirac notation—|vi, |φi (read as ket) for vectors.


4

Vector Spaces

A vector space over C is a set V with


• a commutative, associative addition operation + that has
– an identity 0: |vi + 0 = |vi
– inverses: |vi + (−|vi) = 0
• an operation of multiplication by a scalar α ∈ C such that:
– α(β|vi) = (αβ)|vi
– (α + β)|vi = α|vi + β|vi and α(|ui + |vi) = α|ui + α|vi
– 1|vi = |vi.
5

Cn
 
α1
n
 . 
C is the vector space of n-tuples of complex numbers:  .. .
 
αn
     
α1 β1 α1 + β1
 .   ..   . 
with addition  .   ..
 . + . =
  

αn βn αn + βn
   
α1 zα1
 .   . 
and scalar multiplication z  .   . 
 . = . 
αn zαn
6

Basis

A basis of a vector space V is a minimal collection of vectors


|v1 i, . . . , |vn i such that every vector |vi ∈ V can be expressed as a
linear combination of these:

|vi = α1 |v1 i + · · · + αn |vn i.

n—the size of the basis—is uniquely determined by V and is called


the dimension of V.

Given a basis, every vector |vi can be represented as an n-tuple of


scalars.
7

Bases for Cn
     
1 0 0
     
 0   1   0 
The standard basis for Cn is  , ,...,
     
.. .. .. 

 .  
  . 


 . 

0 0 1
(written |0i, . . . , |n − 1i).
" # " #
3 4
But other bases are possible: , is a basis for C2 .
2 −i

We’ll be interested in orthonormal bases. That is bases of vectors


of unit length that are mutually orthogonal. Examples are |0i, |1i
and √12 (|0i + |1i), √12 (|0i − |1i).
8

Linear Operators

A linear operator A from one vector space V to another W is a


function such that:

A(α|ui + β|vi) = α(A|ui) + β(A|vi)

If V is of dimension n and W is of dimension m, then the operator


A can be represented as an m × n-matrix.

The matrix representation depends on the choice of bases for V


and W.
9

Matrices

Given a choice of bases |v1 i, . . . , |vn i and |w1 i, . . . , |wm i, let


m
X
A|vj i = αij |wi i
i=1

Then, the matrix representation of A is given by the entries αij .

Multiplying this matrix by the representation of a vector |vi in the


basis |v1 i, . . . , |vn i gives the representation of A|vi in the basis
|w1 i, . . . , |wm i.
10

Examples
" # " #
1

1 √
A 45 rotation of the real plane that takes to 1
2
and
0 √
2
" # " #
0 − √12
to 1
is represented, in the standard basis by the
1 √
2
matrix  
√1 − √12
 2 
√1 √1
2 2
 
0 −i
The operator   does not correspond to a transformation
i 0
of the real plane.
11

Inner Products

An inner product on V is an operation that associates to each pair


|ui, |vi of vectors a complex number

hu|vi.

The operation satisfies


• hu|αv + βwi = αhu|vi + βhu|wi
• hu|vi = hv|ui∗ where the ∗
denotes the complex conjugate.
• hv|vi ≥ 0 (note: hv|vi is a real number) and hv|vi = 0 iff
|vi = 0.
12

Inner Product on Cn

The standard inner product on Cn is obtained by taking, for


X X
|ui = ui |ii and |vi = vi |ii
i i

X
hu|vi = u∗i vi
i

Note: hu| is a bra, which together with |vi forms the bra-ket hu|vi.
13

Norms

The norm of a vector |vi (written || |vi||) is the non-negative, real


number:
p
|| |vi|| = hv|vi.

A unit vector is a vector with norm 1.

Two vectors |ui and |vi are orthogonal if hu|vi = 0.

An orthonormal basis for an inner product space V is a basis made


up of pairwise orthogonal, unit vectors.

the term Hilbert space is also used for an inner product space
14

Outer Product

With a pair of vectors |ui ∈ U, |vi ∈ V we associate a linear


operator |uihv| : V → U, known as the outer product of |ui and |vi.

(|uihv|)|v ′ i = hv|v ′ i|ui

|vihv| is the projection on the one-dimensional space generated by


|vi.

Any linear operator can be expressed as a linear combination of


outer products:

X
A= Aij |iihj|.
ij
15

Eigenvalues

An eigenvector of a linear operator A : V → V is a non-zero vector


|vi such that
A|vi = λ|vi
for some complex number λ
λ is the eigenvalue corresponding to the eigenvector v.

The eigenvalues of A are obtained as solutions of the characteristic


equation:
det(A − λI) = 0

Each operator has at least one eigenvalue.


16

Diagonal Representation

A linear operator (over an inner product space) A is said to be


diagonalisable if
X
A= λi |vi ihvi |
i

where the |vi i are an orthonormal set of eigenvectors of A with


corresponding eigenvalues λi .

Equivalently, A can be written as a matrix


 
λ
 1
..

.
 
 
 
λn

in the basis |v1 i, . . . , |vn i of its eigenvectors.


17

Adjoints

Associated with any linear operator A is its adjoint A† which


satisfies
hv|Awi = hA† v|wi

In terms of matrices, A† = (A∗ )T


where ∗ denotes complex conjugation and T denotes transposition.

 †  
1+i 1−i 1 − i −1
  = 
−1 1 1+i 1
18

Normal and Hermitian Operators

An operator A is said to be normal if

AA† = A† A

Fact: An operator is diagonalisable if, and only if, it is normal.

A is said to be Hermitian if A = A†

A normal operator is Hermitian if, and only if, it has real


eigenvalues.
19

Unitary Operators

A linear operator A is unitary if

AA† = A† A = I

Unitary operators are normal and therefore diagonalisable.

Unitary operators are norm-preserving and invertible.

hAu|Avi = hu|vi

All eigenvalues of a unitary operator have modulus 1.


20

Tensor Products

If U is a vector space of dimension m and V one of dimension n


then U ⊗ V is a space of dimension mn.
Writing |uvi for the vectors in U ⊗ V:
• |(u + u′ )vi = |uvi + |u′ vi
• |u(v + v ′ )i = |uvi + |uv ′ i
• z|uvi = |(zu)vi = |u(zv)i
Given linear operators A : U → U and B : V → V, we can define
an operator A ⊗ B on U ⊗ V by

(A ⊗ B)|uvi = |(Au), (Bv)i


21

Tensor Products

In matrix terms,

 
A B A12 B ··· A1m B
 11 
 A21 B A22 B · · · A2m B 
 
A⊗B =
 .. .. ..



 . . . 

Am1 B Am2 B · · · Amm B

You might also like