The qubit
- I. Introduction
- II. Elements of quantum mechanics
- III. The electromagnetic field
- IV. The qubit
- V. Quantum gates
- VI. States and operators
- VII. Shor’s algorithm
- VIII. Quantum teleportation
- IX. The Deutsch algorithm
- X. The no-cloning theorem
- XI. About anyons
- XII. About SU(2)
- XIII. Teleportation topology
- XIV. The Simon algorithm
- XV. Superdense coding
- XVI. Chern-Simons theory
- XVII. The toric code
- REF. Some pointers
Recap
What you learned so far about Quantum Computing:
- a state
is a complex vector representing probabilities with . The state is a superposition and is the probability of getting as an answer if asked/measured. - if you measure/ask what the state really is the state will collapse to the corresponding pure state
- a classic random process is described with a stochastic matrix (Markov chain), a quantum process is described by a unitary matrix
- there is entanglement; you cannot see the dynamics of the whole system as the sum of the dynamics of the parts. Technically, you have matrices which cannot be factorized as direct vector products.
All of this is valid for any quantum system.
The qubit
Let’s focus on two-state systems, e.g. an atom which can be in two different energy states. This is called a qubit. An element is a superposition of
and usually one thinks of
Representations
The ket-vector
and you can multiply both values with an arbitrary phase
with real values
and if you decompose it into a 3-dimensional vector you get
$|=$.
This little exercise is more than just smart change of variables. This is to show you that an object like a ket-vector can be represented in different ways in different dimensions. The default representation is in a 2-dimensional complex space and the second one is in a 3-dimensional real space. These are called representations of the abstract object
The change above which ends up into a sphere in 3-dimensional real space is called the Bloch sphere and you should checkthe representation using Pauli spin matrices for an additional representation.
Representation theory is related to group theory and how symmetry is implemented in physics. It’s key in pretty much any physical theory.
Quantum entropy and density operator
By now you probably wonder what all this has to do with quantum machine learning, right? The shift from classic ML to quantum ML really is an extension of things you have done before but in different dimensions and spaces. It stretches your mind in the beginning but you get used to it.
The concept of entropy is a good example of this ‘stretching’.
In a classic machine learning context you end up with probability vectors
representing the probability or prediction for a given vector. The value
It indicates how mixed the whole things is. If there is absolute certainty for a particular value you get zero entropy, meaning you have a pure unmixed situation.
Now, imagine you put the probabilities on the diagonal of a matrix rather than in a vector:
the entropy is now
with the trace of the matrix corresponding to the previous sum. This formula is however valid for any operator
Using QuTip you can compute the von Neumann entropy like so
sqrt = np.sqrt
ket = (basis(4,0)+ basis(4,1) + basis(4,3))/sqrt(3)
dm = ket2dm(ket)
entropy_vn(dm)
This matrix can also be written as
which is a special case of what is known as the density operator
The density operator replaces the wave function of the system. For example, instead of computing the expactation value of an observable
The entangled state
has then the density matrix
or in matrix form
Using QuTiP you would do something like this
from qutip import *
import numpy as np
sqrt = np.sqrt
epr = (basis(4,0) + basis(4,3))/sqrt(2)
ket2dm(epr)
and this returns the matrix shown above.