Quantum ComputingQuantum Computing
Lecture on Linear Algebra
Sources:Sources: Angela Antoniu, Bulitko, Rezania, Chuang, Nielsen
Goals:Goals:
• Review circuit fundamentals• Learn more formalisms and different notations.• Cover necessary math more systematically• Show all formal rules and equations
Introduction to Quantum MechanicsIntroduction to Quantum Mechanics• This can be found in This can be found in MarinescuMarinescu and in and in Chuang and Chuang and
NielsenNielsen• Objective
– To introduce all of the fundamental principles of Quantum mechanics
• Quantum mechanics – The most realistic known description of the world– The basis for quantum computing and quantum information
• Why Linear Algebra?– LA is the prerequisite for understanding Quantum Mechanics
• What is Linear Algebra?– … is the study of vector spaces… and of– linear operations on those vector spaces
Linear algebra -Linear algebra -Lecture objectivesLecture objectives
• Review basic concepts from Linear Algebra:– Complex numbers– Vector Spaces and Vector Subspaces– Linear Independence and Bases Vectors– Linear Operators– Pauli matrices – Inner (dot) product, outer product, tensor product– Eigenvalues, eigenvectors, Singular Value Decomposition (SVD)
• Describe the standard notations (the Dirac notations) adopted for these concepts in the study of Quantum mechanics
• … which, in the next lecture, will allow us to study the main topic of the Chapter: the postulates of quantum mechanics
Review: Complex numbersReview: Complex numbers• A complex number is of the form
where and i2=-1• Polar representation
• With the modulus or magnitude
• And the phase
• Complex conjugateconjugate
nnn ibaz R ,ba
nnCzn
where, R,θueuz nn
i
nnn
22
nnn bau
n
nn a
barctan
nnnn iuz sincos nnnnn ibaibaz
Review: The Complex Number SystemReview: The Complex Number System• Another definitions and Notations: • It is the extension of the real number system via closure under
exponentiation.
• (Complex) conjugate:c* = (a + bi)* (a bi)
• Magnitude or absolute value:|c|2 = c*c = a2+b2
1-i )( RC a,b,c
bcac
bac
][][
ImRe
i
“Real” axis+
+i
i “Imaginary”axis
The “imaginary”unit
a
b c
22* ))(( bababaccc ii
Review: Complex Review: Complex ExponentiationExponentiation
• Powers of i are complex units:
• Note:ei/2 = iei = 1e3 i /2 = ie2 i = e0 = 1
sincos iθi e
+1
+i
1
i
ei
Z1=2 e Z1=2 e i
Z1Z12 2 = (2 e = (2 e i)2 = 2 2 (ee i)2 = 4 = 4 (e e i )2 = = 4 e4 e 2 2i
4422
Recall:Recall: What is a qubit? What is a qubit?• A bit has two possible states
• Unlike bits, a qubit can be in a state other than
• We can form linear combinations of states
• A qubit state is a unit vector in a two-dimensional complex vector space
0 or 1
0 or 1
0 1
Properties of QubitsProperties of Qubits• Qubits are computational basis states - orthonormal basis
- we cannot examine a qubit to determine its quantum state- A measurement yields
0 for
1 for
ij ij
i ji j
i j
20 with probability 21 with probability
2 2where 1
(Abstract) Vector Spaces(Abstract) Vector Spaces• A concept from linear algebra.• A vector space, in the abstract, is any set of objects that can be
combined like vectors, i.e.:– you can add them
• addition is associative & commutative• identity law holds for addition to zero vector 0
– you can multiply them by scalars (incl. 1)• associative, commutative, and distributive laws hold
• Note: There is no inherent basis (set of axes)– the vectors themselves are the fundamental objects– rather than being just lists of coordinates
VectorsVectors• Characteristics:
– Modulus (or magnitude)– Orientation
• Matrix representation of a vector
vector)(row ,,
dual its and column), (a
1
1
n
n
zzz
z
vv
v
This is adjoint, transpose and This is adjoint, transpose and next conjugatenext conjugate
Operations on vectors
Vector Space, definition:Vector Space, definition:• A vector space (of dimension n) is a set of n vectors
satisfying the following axioms (rules):– Addition: add any two vectors and pertaining to a
vector space, say Cn, obtain a vector,
the sum, with the properties :
• Commutative: • Associative:• Any has a zero vector (called the origin): • To every in Cn corresponds a unique vector - v such as
– Scalar multiplication: next slide
v 'v
'
'11
'nn zz
zzvv
vvvv '' '''''' vvvvvv
v0v vv
0vv Operations on vectors
Vector Space (cont)Vector Space (cont)Scalar Scalar multiplication:multiplication: for any scalar for any scalar
Multiplication by scalars is Associative:Multiplication by scalars is Associative: distributive with respect to vector addition: distributive with respect to vector addition:
Multiplication by vectors isMultiplication by vectors is distributive with respect to scalar addition:distributive with respect to scalar addition:
A Vector subspace A Vector subspace in an in an n-dimensional n-dimensional vectorvector space space is a non-empty subset of vectors is a non-empty subset of vectors satisfying the same axioms satisfying the same axioms
hat such way tin product,scalar the,
vectora is therev vector and 1
n
n
zz
zzz
CCz
v
vv '' zzzz
vv 1
'' vvvv zzz
vvv '' zzzz
in such way thatin such way that
Operations on vectors
Linear AlgebraLinear Algebra
Vector SpacesVector SpacesComplex numberComplex number
fieldfield
CCnn
Spanning Set and Basis vectors Spanning Set and Basis vectors Or Or SPANNING SET for CSPANNING SET for Cnn: any set of : any set of nn vectors vectors such that such that any vector in the vector space in the vector space CCnn can be can be written using thewritten using the n n base vectors base vectors
Example for C2 (n=2):
which is a linear combination of the 2-dimensional basis vectors and 0 1
Spanning set Spanning set is a set of all is a set of all such vectors such vectors for any alpha for any alpha and betaand beta
Bases and Linear Bases and Linear IndependenceIndependence
Always exists!Always exists!
in the spacein the space
Red and blue Red and blue vectors add to 0, vectors add to 0, are not linearly are not linearly independentindependent
Linearly Linearly independent independent vectorsvectors
BasisBasis
Bases for CBases for Cnn
So far we talked only about vectors and operations on So far we talked only about vectors and operations on them. Now we introduce matricesthem. Now we introduce matrices
Linear OperatorsLinear Operators
A is linear A is linear
operatoroperator
Hilbert spacesHilbert spaces• A Hilbert space is a vector space in which the
scalars are complex numbers, with an inner product (dot product) operation : H×H C
– Definition of inner product:xy = (yx)* (* = complex conjugate)xx 0xx = 0 if and only if x = 0xy is linear, under scalar multiplication and vector addition within both x and y
x
y
xy/|x|yxyx
Another notation often used:
“Component”picture:
“bracket”
Black dot is an Black dot is an
inner productinner product
Vector Representation of StatesVector Representation of States• Let S={s0, s1, …} be a maximal set of distinguishable states,
indexed by i.• The basis vector vi identified with the ith such state can be
represented as a list of numbers: s0 s1 s2 si-1 si si+1
vi = (0, 0, 0, …, 0, 1, 0, … )• Arbitrary vectors v in the Hilbert space can then be defined
by linear combinations of the vi:
• And the inner product is given by: ),,( 10 ccc
iii vv
i
iyxi
*yx
Dirac’s Ket NotationDirac’s Ket Notation• Note: The inner product
definition is the same as thematrix product of x, as aconjugated row vector, timesy, as a normal column vector.
• This leads to the definition, for state s, of:– The “bra” s| means the row matrix [c0* c1* …]– The “ket” |s means the column matrix
• The adjoint operator † takes any matrix Mto its conjugate transpose M† MT*, sos| can be defined as |s†, and xy = x†y.
i
iyxi
*yx
2
1*
2*
1 yy
xx
“Bracket”
2
1
cc
You have to be familiar You have to be familiar
with these three notationswith these three notations
Linear Linear OperatorsOperators
New spaceNew space
Properties: Unitary and Hermitian
kkk ,Iσσ
kk σσ
Pauli Matrices = Pauli Matrices = examplesexamples
X is like inverterX is like inverter
This is adjointThis is adjoint
Pay attention to this notation
Matrices to transform between Matrices to transform between basesbases
Examples of operatorsExamples of operators
Similar to HadamardSimilar to Hadamard
This is new, we did not use inner products yet
Inner Products of vectorsInner Products of vectors
We already talked about this when we defined Hilbert space space
Be able to prove these properties from definitions
Complex numbersComplex numbers
Slightly other formalism for Inner Slightly other formalism for Inner ProductsProducts
Be familiar withBe familiar with
various formalismsvarious formalisms
Example: Inner Example: Inner Product on CProduct on Cnn
NormsNorms
Outer Products of Outer Products of vectorsvectors
This is Kronecker This is Kronecker
operationoperation
We will illustrate how this can be used formally to create unitary and other matrices
Outer Products of vectorsOuter Products of vectors|u> <v| |u> <v| is an outer is an outer productproduct of |u> and of |u> and |v>|v>
|u> is from U, ||u> is from U, |v> is from V.v> is from V.
|u><v| |u><v| is a mapis a map VV U U
Eigenvalues of matrices are used in analysis and synthesis
Eigenvectors of linear operators Eigenvectors of linear operators and and their Eigenvaluestheir Eigenvalues
Eigenvalues and Eigenvalues and Eigenvectors Eigenvectors versus diagonalizable matricesversus diagonalizable matrices
Eigenvector of Eigenvector of Operator AOperator A
Diagonal Representations of matricesDiagonal Representations of matrices
Diagonal matrixDiagonal matrix
From last slideFrom last slide
Adjoint OperatorsAdjoint Operators
This is very This is very
important, we important, we
have used it many have used it many
times alreadytimes already
Normal and Normal and Hermitian Operators Hermitian Operators
But not necessarily equal identity
Unitary Operators Unitary Operators
Unitary and Positive Operators: Unitary and Positive Operators: some properties some properties and a new notationand a new notation
Other notation for adjoint Other notation for adjoint (Dagger is also used(Dagger is also used
Positive operatorPositive operator
Positive definite Positive definite operatoroperator
Hermitian Operators: some Hermitian Operators: some properties properties in different notationin different notation
These are important and useful properties of our matrices of circuits
Tensor Products Tensor Products of Vectorof Vector SpacesSpaces
Note variousNote various
notationsnotations
Notation for vectors in Notation for vectors in
space Vspace V
Tensor Product of two Tensor Product of two Matrices Matrices
Tensor Products of vectors and Tensor Products of vectors and Tensor Products of Operators Tensor Products of Operators
Properties of tensor products for vectors
Tensor product Tensor product for operatorsfor operators
Properties of Tensor Products Properties of Tensor Products of vectors of vectors and operatorsand operators
We repeat them in We repeat them in different notation different notation herehere
These can be vectors of any sizeThese can be vectors of any size
Functions of Functions of OperatorsOperators
I is the identity matrix
X is the Pauli X matrix
Matrix of Pauli rotation X sincos iθi e
Remember also this:
For Normal Operators For Normal Operators there is also Spectral there is also Spectral
DecompositionDecomposition
If A is represented like this Then f(A) can be represented like this
Trace of a matrix and Trace of a matrix and a a Commutator of matricesCommutator of matrices
Quantum NotationQuantum Notation(Sometimes denoted by bold fonts)(Sometimes denoted by bold fonts)
(Sometimes called Kronecker (Sometimes called Kronecker multiplication)multiplication)
Review to rememberReview to remember
Exam ProblemsExam ProblemsReview systematically from basic Review systematically from basic
Dirac elementsDirac elements
.|a|a|a|a|a|a|a|a xx
|a|aa| a| xx
vectorvector
numbernumber
matrixmatrix
numbernumber
|a|a a|a|xx
The most important new idea that we introduced in The most important new idea that we introduced in this lecture is inner products, outer products, this lecture is inner products, outer products, eigenvectors and eigenvalues.eigenvectors and eigenvalues.
Exam ProblemsExam Problems• Diagonalization of unitary matrices• Inner and outer products• Use of complex numbers in quantum theory• Visualization of complex numbers and Bloch Sphere.• Definition and Properties of Hilbert Space.• Tensor Products of vectors and operators – properties and proofs.• Dirac Notation – all operations and formalisms• Functions of operators• Trace of a matrix• Commutator of a matrix• Postulates of Quantum Mechanics.• Diagonalization• Adjoint, hermitian and normal operators• Eigenvalues and Eigenvectors
Bibliography & acknowledgementsBibliography & acknowledgements
• Michael Nielsen and Isaac Chuang, Quantum Computation and Quantum Information, Cambridge University Press, Cambridge, UK, 2002
• R. Mann,M.Mosca, Introduction to Quantum Computation, Lecture series, Univ. Waterloo, 2000 http://cacr.math.uwaterloo.ca/~mmosca/quantumcoursef00.htm
• Paul Halmos, Finite-Dimensional Vector Spaces, Springer Verlag, New York, 1974
• Covered in 2003, 2004, 2005, 2007• All this material is illustrated with examples in
next lectures.