Quantum Computing — Required Linear Algebra

Shafi
Analytics Vidhya
Published in
7 min readJul 18, 2020
Qubits uses Linear Algebra Concepts for computation

For Quantum Computing High-Dimensional Vector spaces is required for Computation. In this article the most advanced topics discussed for Quantum Computing like Hilbert Spaces, Exponential Matrices, Spectral Theorem , Tensor Product,Schmidt Decomposition Theorem, etc., .

The basic Linear Algebra stuff is covered in a separate article and link will be updated very soon. It is essentially required to know and understand the advanced topics required for Quantum computing.

Vector Space: In simple terms, a Vector Space V over a Field (F) is a set of vectors (objects) satisfying addition and multiplication of scalars. i.e.,

Vector Space Definition

In other words, V is closed under addition and scalar multiplication.

Dirac Notation: Physicists often write their linear algebra in Dirac Notation. This notation is used often in quantum mechanics. In this notation row vector can be represented as a ‘Ket’ with the symbol |v>, column vector can be represented as a ‘Bra’ with the symbol <v|.

The inner product will be written as <u|v> ‘bra-kets’.

Inner product space: It is a vector space with an inner product. Inner product associates with each pair of vectors in the space with a scalar quantity known as inner product of the vectors.

Definition of Inner product space : An inner product space is a vector space V over the field F together with an inner product, i.e., with a map

and satisfies the following three properties for all vectors and all scalars.

Properties of Inner product space

Inner products allows us to measure the length of a Vector (called Norm) or the angle between two vectors.

Inner product with different spaces:

Hilbert Space :A Complete space with an inner product.

Pre-Hilbert space: An (incomplete) space with an inner product

Unitary Spaces : Inner product spaces over the field of complex numbers.

Special cases of Inner product is Scalar product or Dot product.

Inner product spaces can be applied in Real numbers, Euclidean vector space, complex coordinate space, Hilbert space, Random variables, Real matrices and vector spaces with forms.

Orthonormal basis: It is for an Inner product space V with finite dimension is a basis for V whose vectors are Orthonormal, that is , they are all unit vectors and orthogonal to each other.

Hilbert Spaces: The vector spaces over the complex numbers, and are finite dimensional, which significantly simplifies the mathematical we need. Such vector spaces are members of a class of vector spaces called Hilbert spaces.

The combination of the vector space V with the inner product is Hilbert space. Hilbert spaces for quantum computing will typically have dimension.

Hilbert space dimensions

Vector spaces consider will be over the complex numbers, and are finite dimensional.

Operators: A linear Operator on a vector space H is a linear transformation T : H -->H of the vector space to itself(i.e., it is a linear transformation which maps vectors in H to vectors in H). The best example is the outer product

Orthogonal Projector Operator:

The well known operators are

Linear Operators

Note that these operators are same in Linear Algebra , but notation is different that is why I specially mentioned you to be comfort with this notation in Quantum Computing in more advanced books,tutorial, blogs etc.,

Eigendecomposition is applied in Spectral Theorem, Exponential matrices. A short introduction of eigendecomposition is explained here.

For a Square matrix A with dimension n,n , there may be vectors which, when A is applied to them, are simply scaled by some constant. We say that a nonzero vector x is an eigenvector of A corresponding to eigenvalue

The zero vector is excluded from this definition because A0 = 0

Let x be an eigenvector of A with corresponding eigenvalue. Then

Eigendecomposition

Eigendecomposition is very important in Quantum Computing , I covered in a separate story , link will be updated soon.

Spectral Theorem: For any Hermitian or unitary matrix M, there exists a unitary U such that

for some diagonal matrix D. Diagonal entries of D will be the eigenvalues of M.

Spectral Theorem

Exponential Matrices: A matrix exponential can also be defined in exact analogy to the exponential function. The matrix exponential of a matrix A can be expressed as

Matrix Exponential

Matrix exponential is import because quantum mechanical time evolution is described by a unitary matrix of the form exp(iB) for Hermitian matrix B. For this reason, performing matrix exponential’s is a fundamental part of quantum computing.

The easiest way to understand how to compute the exponential of a matrix is through the eigendecomposition of a matrix.

Exponential Matrix

There are two ways to computing matrix exponential:

Matrix Exponential methods

if B is both unitary and Hermitian i.e.,

If you apply this rule in above Matrix Exponential expansion and grouping the Identity matrix (I) and the B terms together, it can be seen that for any real value x the identity will be

Tensor Product (Main Rule in Quantum Computing): It is also known as (Kronecker Product) of 2 matrices of size “mn”. It should not be confused with matrix multiplication operation it is totally different. This rule is the heart of Quantum Computing. Qubits interact with with Tensor Product.

This is the main rule applying in Quantum Computing among Qubits, here given the examples of tensor product for vectors, matrices and N-fold.

Tensor Product Notation

The Tensor product is a way of combining spaces, vectors or matrices, or operators together.

Tensor product can apply on spaces, vectors or matrices and operators

Axioms of Tensor Product:

Axioms of Tensor Product

For Spaces:

For Vectors or Matrices:

Tensor product on Vectors

For Operators:

Tensor product for operators

In the matrix representation, this translates as follows.

Tensor (or) Kronecker product Between matrices

Note that in this rule every element in the first matrix multiply to entire second matrix.

This matrix is sometimes written more compactly in ‘Block form’ as follows:

Block form of Tensor product

Examples of Tensor product:

Matrix representation of Qubits

Tensor product on Qubits in matrix form

Example 1:

Example 1: Tensor product example between 2-d & 3-d vectors.
Example 2: Tensor product example between 2*2 Matrices

N-Fold Example using Tensor product:

`N-Fold Examples for Vectors and Matrices using Tensor Product

Schmidt Decomposition Theorem: In this decomposition expressing a vector in the tensor product of two inner product spaces.

Schmidt Decomposition can be applied to more complicated bipartite vector space, even in cases where the two subspace have different dimensions.

Schmidt Decomposition widely used in entanglement characterization in quantum theory.

Thanks for reading this article and appreciated for your comments or mistakes ( if any).

References:

Oxford University Press — An Introduction to Quantum computing By Phillip Kaye, Raymond Laflamme, Michele Mosca

Cambridge University Press — Quantum Computation and Quantum Information By Michael A.Nielsen & Issac L.Chuang

https://en.wikipedia.org/wiki/Inner_product_space

https://en.wikipedia.org/wiki/Matrix_exponential

https://en.wikipedia.org/wiki/Schmidt_decomposition

--

--

Shafi
Analytics Vidhya

Researcher & Enthusiast in AI, Quantum Computing, Blackholes, and Astrophysics.