Mathematical Introduction: Matrices and how they can be used in quantum computing
Overview
Overview
Keywords: matrices, unitary matrix, square matrix, Dirac notation, bra-ket notation, Kronecker (tensor) product
Age group: 16-18 years
Required knowledge/skills: basic algebra
Time frame: 45 minutes
This section is part of Basic Concepts of Quantum Computing – Mathematical Basics written by Natalija Budinski (RS).
By the end of the lesson, students will be able to
- understand what matrices are and how to perform basic operations like addition and multiplication on them;
- discover how matrices are used in quantum mechanics and quantum computing;
- learn about the Kronecker (tensor) product, a special matrix operation used, for example, to describe multi-qubit systems;
- become familiar with the Dirac (bra-ket) notation, a symbolic way of representing quantum states.
Required materials
- paper and pencil
Matrices
A matrix is a powerful mathematical tool used to organise and manipulate numbers in a structured way. At its core, a matrix is a rectangular array of numbers arranged in rows and columns. This structure allows to store, process, and analyse large amounts of data efficiently, making matrices essential in mathematics, computer science, physics, engineering, and more.
A matrix is an array of numbers, being the number of rows and the number of columns. The order of a matrix is the number of rows times the number of columns, i.e. . Let's say if a matrix has 5 rows and 4 columns then the order of the matrix will be 20.
A square matrix is a matrix that has the same number of rows and columns.
An identity matrix is a square matrix with 1s in the main diagonal and 0s elsewhere.
In order to perform an addition or subtraction, matrices must have the same number of rows and the same number of columns. Matrix addition and subtraction are performed element by element. Each element of one matrix is added to or subtracted from the corresponding element of the other matrix.
Example
For two given matrices and , calculate and
and .
Solution
A matrix can be multiplied with another matrix if their dimensions align (i.e., for two matrices A and B, the number of columns in A must match the number of rows in B). The result yields a matrix that has as many rows as the first matrix and as many columns as the second matrix.
and
Example
Take the two matrices from the example in “Addition and subtraction”. The results of and are:
The bra-ket notation
The bra-ket notation, also known as Dirac notation, is a way of writing quantum states. It is equiva-lent to the vector notation, but is shorter and “cleaner”.
It uses the symbols (ket) and (bra).
A ket represents a column vector, such as or , which are the basic qubit states. A bra represents a row vector, such as or . We won’t dwell further on the bra notation since the ket notation is the only one we use in this whole teaching material.
Kronecker product
In quantum computing, we often need to describe multiple quantum bits (qubits) together. A simple way to do this is through the Kronecker product (also called tensor product). The Kronecker product combines two matrices or two vectors.
Example 1
Consider two vectors and . The Kronecker product, denoted by a , of these two vectors is:
Note that if one has two vectors and , their Kronecker product yields a larger vector. In this example, the initial vectors are 2-dimensional whereas the resulting vector is 2 × 2 = 4-dimensional.
Example 2
Consider the two vectors and . Their Kronecker product is:
.
The Kronecker product of a 3-dimensional and a 2-dimensional vector is a 6-dimensional (3 x 2) vector.
Example 3
Consider again the two matrices and . Their Kronecker product is:
.
Example 4
The Kronecker product is distributive:
a) Verify the distributivity relation for the following vectors:
and .
b) In ket-notation, these three vectors may be written as:
, and .
can therefore also be written as:
, or in an even shorter notation: .
The Kronecker product is useful because it allows the manipulation of composite systems by treating them as combinations of single components.
Example 5
Consider the two qubit states:
and .
A quantum state of a two-qubit system (composed of these two qubits) is given by the Kronecker product, for example,
Note: the Kronecker product is not commutative: .
Example 6
Quantum states cannot always be written as simple Kronecker products. Let us consider the two-qubit state:
,
which corresponds to the following sum of Kronecker products:
This is equal to:
The resulting state cannot be represented by a Kronecker product of two basic qubit states.
- B
- A
- B
- A
Share this page