Basic Linear Algebra Required by Quantum Alg

Ran Liu
4 min readApr 17, 2021

1: Below is mainly taken from book of Nielsen and Chuang P60 — p79.

2. I mainly follow the lecture of Quantum Computing of University of Cambridge.

We requires complex number to define quantum phenomena:

The complex number is defined as:∀z ∈ℂ, z = a + ib, ョa,b∈R and i = /sqr(-1).

ℂ is the vector space of n-tuples of complex numbers [z1,..zn]^T, with addition and scalar multiplication.

A matrix is an array of ( in general) complex numbers with addition and scalar multiplication:

Matrix multiplication can be given by:

,where A is n * m and B is m * l and C is n * l.

Matrix multiplication follows the rules:

  1. associative: (A*B)*C = A* (B*C) = ABC
  2. distributive: A(B+C) = AB + AC, (A+B)C = AC + BC
  3. not commutative: AB ≠BA

Tensor multiplication: Let A and B be matrices of any dimension:

,where Ⓧ denotes tensor multiplication. In general if A is n × m and B is n’× m’ then A ⊗ B is nn’ × mm’.

As a (column) vector is just a n × 1 matrix, we can equally well apply tensor products to vectors. This reveals an important property of tensor products when combined with matrix products. Let A and B be n × m and n’× m’ matrices respectively, and x and y be m and m0 dimension column vectors respectively:

A complex number z = a + bi has a conjugate, defined as z ∗ = a − bi. Letting A be the n × m matrix:

A “Ket” is a column vector:

Each “Ket” has a corresponding “Bra”, which is its conjugate transpose, the row vector:

When tensor multiplying vectors expressed as kets, the following are all equivalent:

Tensor multiplication is associative, so:

Inner Product is defined as:

If each of |u> and |v> have at least one non-zero element:

Outer Product is defined as:

Then the ourter product is defined as the n × m complex matrix:

If |u> is a unit vector, then |u> <u| is known as a projector, as |u> <u| is an operators that ‘projects’ an arbitrary vector (of appropriate dimension) |v> onto the subspace |u>. That is:

which can be seen to be the projection of |v> onto |u> in the following diagram:

--

--