SlideShare a Scribd company logo
Copyright © 2021 BigMother.AI CIC. All rights reserved. 1
Quantum Computing 101, Part 1 –
Hello Quantum World
Aaron Turner, March 2021
Introduction
This is the first part of a blog series on quantum computing, broadly derived from CERN’s
Practical introduction to quantum computing video series, Michael Nielson’s Quantum computing
for the determined video series, and the following (widely regarded as definitive) references:
• [Hidary] Quantum Computing: An Applied Approach
• [Nielsen & Chuang] Quantum Computing and Quantum Information [a.k.a. “Mike & Ike”]
• [Yanofsky & Mannucci] Quantum Computing for Computer Scientists
My objective is to keep the mathematics to an absolute minimum (albeit not quite zero), in order
to engender an intuitive understanding. You can think it as a quantum computing cheat sheet.
What is quantum computing?
Quantum computing may be defined as computation (in the form of circuits and algorithms) that
(unlike classical computation) specifically exploits the properties of quantum mechanics:
• quantum superposition (defined in this Part)
• quantum entanglement (defined in Part 2)
• quantum interference (defined in Part [TBD])
Copyright © 2021 BigMother.AI CIC. All rights reserved. 2
What quantum computing does not promise
Turing machines, the lambda calculus, and general recursive functions are three different
ways of describing [a subset of the class of all possible mathematical functions known as] the set
of effectively computable functions, and all three have been formally proven to be equivalent.
It is widely believed by mathematicians and computer scientists that these equivalent definitions
accurately characterise the notion of computability, i.e. what may and may not be computed in
finite time by a (classical) computer. This is known as the Church-Turing thesis. Any function
that cannot in principle be computed in finite time by a Turing machine is called uncomputable.
It is not the case that some functions that are uncomputable on a classical computer suddenly
become computable on a quantum computer. The set of functions that may be computed in finite
time on a quantum computer is exactly the same as the set of functions that may be computed in
finite time on a classical computer. There are no benefits to be gained in terms of computability.
What quantum computing may promise
Although this is not yet something that can be formally proved, there is strong evidence to suggest
that quantum computers may be much faster than classical computers for at least some tasks.
This is known as quantum supremacy.
At the time of writing, two groups have claimed to have demonstrated quantum supremacy:
• in October 2020, Google claimed to have achieved in 200 seconds a quantum computation
that would take 10,000 years on a classical supercomputer (IBM later questioned this
claim, saying that it would only take 2.5 days, but that’s still a thousand times faster…)
• in December 2020, a group at the University of Science and Technology of China claimed
to have achieved in 200 seconds a quantum computation that would take 2.5 billion years
on a classical supercomputer (for a quantum advantage, or overall speedup, of 1014
)
Physical vs logical quantum computing
Quantum algorithms execute on quantum circuits (of which more later!) In order to write, and
execute, quantum algorithms, all you need to know is how the quantum circuits work logically –
it’s not necessary to know how the implementations of these circuits work, as (logically) they
are all equivalent. The physical technologies being used to implement quantum circuits include:
• neutral atom qubits
• nitrogen-vacancy centre-in-diamond qubits
• nuclear magnetic resonance qubits
• photonic qubits
• silicon-based spin qubits
• superconducting qubits
• topological qubits
• trapped ion qubits
Copyright © 2021 BigMother.AI CIC. All rights reserved. 3
Running your own quantum algorithms
In order to execute a quantum algorithm, you need access to a either a quantum computer or
a simulation of one. The IBM Quantum Experience provides access to both – and it’s free! The
Quirk quantum circuit simulator and Qiskit open source SDK are also excellent free resources.
Later, we will be executing the Hello World of quantum computing on a real quantum computer!
Bits and qubits
Computations are initialised to a particular state, evolve through a finite sequence of states
(specified by an algorithm), and then terminate; the final state is the result of the computation.
The instantaneous state of a computation is recorded in a classical computer by a number of bits
(each being either 0 or 1), and in a quantum computer by a number of quantum bits, or qubits.
Mathematically, the state of a single qubit is represented by 2-element column vector
(
α0
α1
)
where α0 and α1 are complex numbers (called probability amplitudes, or just amplitudes for
short), and |α0|2
+ |α1|2
= 1, where |𝛼| is the modulus of complex number 𝛼.
The constraint |α0|2
+ |α1|2
= 1 is called the normalisation condition. An arbitrary pair of
complex numbers α0 and α1 that do not satisfy this constraint do not represent a valid qubit state!
Dirac notation and basis states
We will use Dirac’s ket notation |ψ⟩ to denote the state of an arbitrary qubit.
In particular, we will use |0⟩ as shorthand for
(
1
0
)
and |1⟩ as shorthand for
(
0
1
)
The states |0⟩ and |1⟩ are called basis states; they are the quantum analogues of 0 and 1.
Copyright © 2021 BigMother.AI CIC. All rights reserved. 4
Superposition
Now that we have the two basis states |0⟩ and |1⟩, we can rewrite the state of a generic qubit as
|ψ⟩ = α0|0⟩ + α1|1⟩
= α0 (
1
0
) + α1 (
0
1
)
= (
α0
0
) + (
0
α1
)
= (
α0
α1
)
The way to interpret this is that the qubit state |ψ⟩ is a simultaneous mixture of |0⟩ and |1⟩, i.e.
it is effectively in both states |0⟩ and |1⟩ at the same time – this is known as a superposition.
Intuitively, as will become clear in the next section, the 𝛂𝟎 amplitude tells us how much the qubit
|ψ⟩ = α0|0⟩ + α1|1⟩ favours |𝟎⟩, and the 𝛂𝟏 amplitude tells us how much it favours |𝟏⟩.
Measurement
The result of a quantum computation is always a classical value (i.e. 0 or 1, not |0⟩ or |1⟩). The
way we extract this result is to measure the value of a qubit. Born’s rule, a law of quantum
mechanics, implies that, when measured, a generic qubit |ψ⟩ = α0|0⟩ + α1|1⟩ will yield (classical)
0 with probability |α0|2
and (classical) 1 with probability |α1|2
. (Hence |α0|2
+ |α1|2
must = 1.)
If a measurement yields 0, then the state of the qubit immediately after being measured will
have collapsed to |0⟩ (and any subsequent measurement will yield 0 with probability 1),
otherwise it will have collapsed to |1⟩ (and any subsequent measurement will yield 1 with
probability 1). This is simply how the underlying quantum mechanics of the universe works! Note
that qubits cannot be copied in order to circumvent this effect (the no-cloning theorem).
The following quantum circuit (hint: read these from left to right) initialises the quantum state
(generally depicted as a single line) to |0⟩, which it immediately measures via the measurement
gate (depicted as a dial), which then yields a classical bit (generally depicted as a double line).
Copyright © 2021 BigMother.AI CIC. All rights reserved. 5
The Bloch sphere
The qubit state |ψ⟩ = α0|0⟩ + α1|1⟩ may be visualised as a point on the surface of a unit sphere
where:
• the basis state |0⟩ is at the north pole of the sphere
• the basis state |1⟩ is at the south pole of the sphere
• 𝜃 is the angle between the north-south axis and a line from the centre of the sphere to |ψ⟩
• 𝜑 is the angle eastwards from an arbitrary point on the equator to the longitude of |ψ⟩
• 𝜃 and 𝜑 (0 ≤ 𝜃 ≤ 𝜋, 0 ≤ 𝜑 < 2𝜋) may be calculated from α0 and α1
Note that any basis states such as |0⟩ and |1⟩ must be orthogonal, i.e. opposite each other.
Single-qubit operations (gates)
In order to manipulate the state of a qubit (in order that a quantum algorithm may evolve), we
need some way to apply operations to qubit states. Because single-qubit states are 2-element
complex vectors, we can represent a single-qubit operation (gate) U as a 2 × 2 complex matrix
U = (
𝑎 𝑏
𝑐 𝑑
)
We can then calculate the result of applying U to state α0|0⟩ + α1|1⟩ via matrix multiplication
(
𝑎 𝑏
𝑐 𝑑
) (
α0
α1
) = (
𝑎α0 + bα1
𝑐α0 + dα1
)
Copyright © 2021 BigMother.AI CIC. All rights reserved. 6
In order for the result on the RHS to be a valid state it must satisfy the normalisation condition
|𝑎α0 + bα1|2
+ |𝑐α0 + dα1|2
= 1. In order to preserve normalisation, a single-qubit operation
U = (
𝑎 𝑏
𝑐 𝑑
)
must be unitary (length preserving), meaning that U multiplied by its conjugate transpose U†
yields the identity matrix (here, the order of matrix multiplication doesn’t matter). In other words
UU†
= (
𝑎 𝑏
𝑐 𝑑
) (
𝑎
̅ 𝑐̅
𝑏
̅ 𝑑̅) = U†
U = (
𝑎
̅ 𝑐̅
𝑏
̅ 𝑑̅) (
𝑎 𝑏
𝑐 𝑑
) = I = (
1 0
0 1
)
where the complex conjugate 𝛼
̅ of complex number 𝛼 = 𝑥 + 𝑖𝑦 is defined as 𝛼
̅ = 𝑥 − 𝑖𝑦.
The I (or Identity) gate
The I gate, defined as
I = (
1 0
0 1
)
leaves its input unchanged.
If |ψ⟩ = (
α0
α1
) = α0|0⟩ + α1|1⟩ then
I |ψ⟩ = (
1 0
0 1
) (
α0
α1
) = (
α0
α1
) = |ψ⟩
I |0⟩ = (
1 0
0 1
) (
1
0
) = (
1
0
) = |0⟩
I |1⟩ = (
1 0
0 1
) (
0
1
) = (
0
1
) = |1⟩
The X (or NOT) gate (a.k.a. Pauli gate 𝝈𝑿)
The X gate, defined as
X = (
0 1
1 0
)
swaps the α0 and α1 amplitudes.
Copyright © 2021 BigMother.AI CIC. All rights reserved. 7
If |ψ⟩ = (
α0
α1
) = α0|0⟩ + α1|1⟩ then
X |ψ⟩ = (
0 1
1 0
) (
α0
α1
) = (
α1
α0
) = α1|0⟩ + α0|1⟩
X |0⟩ = (
0 1
1 0
) (
1
0
) = (
0
1
) = |1⟩
X |1⟩ = (
0 1
1 0
) (
0
1
) = (
1
0
) = |0⟩
The H (or Hadamard) gate
The H gate, defined as
H =
1
√2
(
1 1
1 −1
)
creates a superposed (i.e. mixed {|0⟩, |1⟩}) state from a non-superposed basis state.
If |ψ⟩ = α0|0⟩ + α1|1⟩ then [note the two new definitions, |+⟩ and |−⟩]
H |ψ⟩ =
1
√2
(
1 1
1 −1
) (
α0
α1
) =
1
√2
(
α0 + α1
α0 − α1
) =
1
√2
(α0 + α1) |0⟩ +
1
√2
(α0 − α1) |1⟩
H |0⟩ =
1
√2
(
1 1
1 −1
) (
1
0
) =
1
√2
(
1
1
) =
(
1
0
)+(
0
1
)
√2
=
|0⟩ + |1⟩
√2
= |+⟩
H |1⟩ =
1
√2
(
1 1
1 −1
) (
0
1
) =
1
√2
(
1
−1
) =
(
1
0
)−(
0
1
)
√2
=
|0⟩ − |1⟩
√2
= |−⟩
Note that |+⟩ and |−⟩ are orthogonal (Bloch opposites), and therefore candidate basis states.
This quantum circuit starts by initialising the state to |0⟩, as
indicated by the first Bloch sphere, after which a Hadamard
gate (denoted by the square with an H in it) is applied,
resulting in the output indicated by the second Bloch sphere
Here we use an X gate to flip the initial |0⟩ into a |1⟩, prior to
the Bloch-H-Bloch sequence as above
This quantum circuit starts by initialising the state to |0⟩, as
indicated by the first Bloch sphere, after which an X gate
(denoted by the circle with the cross in it) is applied, resulting
in the output indicated by the second Bloch sphere
Here we use an X gate to flip the initial |0⟩ into a |1⟩, prior to
the Bloch-X-Bloch sequence as above
Copyright © 2021 BigMother.AI CIC. All rights reserved. 8
Hello World
The following circuit (the “Hello World” of quantum computing)
pushes the initial |0⟩ through a Hadamard gate, thereby creating a superposition (|+⟩) of the basis
states |0⟩ and |1⟩, which it then measures. The probability of the measurement yielding 0 is |
1
√2
|
2
,
and the probability of the measurement yielding 1 is also |
1
√2
|
2
, which evaluates to 0.5. In other
words, this quantum circuit, executed repeatedly, generates a perfectly random bitstream.
In general (although not always), we don’t just execute a quantum algorithm once, as we would
on a classical computer. Instead, we execute it many times in order to obtain a probabilistic result.
Executing this algorithm N = 1024 times on a real quantum computer returned the following:
What we effectively get is a histogram depicting the probability distribution over basis states
represented by the superposed state. It’s not perfectly 50:50 between 0 and 1, for two reasons:
1. it is literally a random process, and will only tend towards the ideal result as N increases
2. actual quantum machines are not perfect – in particular, qubits are vulnerable to quantum
errors due to decoherence (interactions with their environment) and other quantum noise.
Copyright © 2021 BigMother.AI CIC. All rights reserved. 9
Phase
The concept of phase is of fundamental importance in quantum computation.
A complex number 𝛼 expressed in rectangular form (also called Cartesian form)
𝛼 = 𝑥 + 𝑖𝑦
may be re-expressed (via basic trigonometry) in polar form
𝛼 = 𝑟 cos 𝜑 + 𝑖 𝑟 sin 𝜑 = 𝑟(cos 𝜑 + 𝑖 sin 𝜑)
where
𝑟 = |𝛼| = √𝑥2 + 𝑦2
𝜑 is the positive angle from the real axis on the corresponding Argand diagram
𝜑 = Arg(𝜶), calculated as follows
tan−1
(
𝑦
𝑥
), when x > 0 [top-right and bottom-right quadrants]
𝜋
2
, when x = 0, y > 0 [degenerate case, zero denominator]
0 [by convention], when x = 0, y = 0 [degenerate case, zero denominator]
−
𝜋
2
, when x = 0, y < 0 [degenerate case, zero denominator]
tan−1
(
𝑦
𝑥
) + 𝜋, when x < 0, y ≥ 0 [top-left quadrant]
tan−1
(
𝑦
𝑥
) − 𝜋, when x < 0, y < 0 [bottom-left quadrant]
𝐴𝑟𝑔(𝛼) =
𝛼
Copyright © 2021 BigMother.AI CIC. All rights reserved. 10
Calculated as above, 𝜑 is always in the interval (−𝜋, 𝜋]. When (and only when!) 𝜑 (as calculated
above) is negative, adding 2𝜋 will move it into the equivalent interval [0, 2𝜋), if this is preferred.
Thanks to Euler’s formula (𝑒𝑖𝜑
= cos 𝜑 + 𝑖 sin 𝜑), 𝛼 may be re-expressed in exponential form
𝛼 = 𝑟𝑒𝑖𝜑
(commonly called a phasor in engineering), where
𝑒𝑖𝜑
is called the phase factor
𝜑 (always expressed in radians) is called the phase [note: 𝑑° =
𝑑𝜋
180
rad].
Properties of 𝜶
̅, |𝜶|, and 𝒆𝒊𝝅
The following properties will prove useful when thinking about phase:
(1) for a complex number 𝛼 in exponential form
𝛼 = 𝑟𝑒𝑖𝜑
its complex conjugate 𝛼
̅ is simply
𝛼
̅ = 𝑟𝑒−𝑖𝜑
(2) complex conjugation distributes over multiplication
𝛼𝛽
̅̅̅̅ = 𝛼
̅𝛽̅
(3) the modulus |𝛼| and complex conjugate 𝛼
̅ of complex number 𝛼 are related as follows
|𝛼|2
= 𝛼𝛼
̅
(4) the special case of Euler’s formula with 𝜑 = 𝜋 yields Euler’s identity
𝑒𝑖𝜋
= cos 𝜋 + 𝑖 sin 𝜋 = −1
(5) the special case of Euler’s formula with 𝜑 =
𝜋
2
yields
𝑒𝑖
𝜋
2 = cos
𝜋
2
+ 𝑖 sin
𝜋
2
= 𝑖
Copyright © 2021 BigMother.AI CIC. All rights reserved. 11
Global phase
Consider a generic quantum state
|ψ0⟩ = α0|0⟩ + α1|1⟩
If we were to measure |ψ0⟩
we would obtain 0 with probability |𝛼0|2
we would obtain 1 with probability |𝛼1|2
Now imagine a second quantum state equal to |ψ0⟩ multiplied by a global phase factor 𝑒𝑖𝜑
|ψ1⟩ = 𝑒𝑖𝜑|ψ0⟩ = 𝑒𝑖𝜑
α0|0⟩ + 𝑒𝑖𝜑
α1|1⟩
If we were to measure |ψ1⟩
we would obtain 0 with probability |𝑒𝑖𝜑
𝛼0|
2
= (𝑒𝑖𝜑
𝛼0)(𝑒𝑖𝜑𝛼0)
̅̅̅̅̅̅̅̅̅̅
= (𝑒𝑖𝜑
𝛼0)(𝑒𝑖𝜑
̅̅̅̅𝛼0
̅̅̅)
= (𝑒𝑖𝜑
𝛼0)(𝑒−𝑖𝜑
𝛼0
̅̅̅)
= 𝑒(𝑖𝜑−𝑖𝜑)
𝛼0𝛼0
̅̅̅
= 𝑒0|𝛼0|2
= |𝛼0|2
similarly, we would obtain 1 with probability |𝛼1|2
In other words, the measurement probabilities for |ψ0⟩ and |ψ1⟩ are identical. Which means that,
despite the fact that these states differ internally, they are nevertheless indistinguishable from
the perspective of an external observer. For this reason, we say that |ψ0⟩ and |ψ1⟩ are equal
up to the global phase factor 𝒆𝒊𝝋
. For all practical purposes, |ψ0⟩ and |ψ1⟩ are equivalent
|ψ0⟩ ≡ |ψ1⟩.
In short, global phase doesn’t matter!
Copyright © 2021 BigMother.AI CIC. All rights reserved. 12
Relative phase
We say that two amplitudes 𝛼 and 𝛽 differ by a relative phase factor 𝑒𝑖𝜑
if there exists some
real number 𝜑 such that 𝛼 = 𝑒𝑖𝜑
𝛽. (Note that if 𝜑 = 0 then the relative phase factor is 𝑒𝑖0
= 1.)
More generally, we say that two quantum states
|ψ0⟩ = α00|0⟩ + α01|1⟩
and
|ψ1⟩ = α10|0⟩ + α11|1⟩
differ by a relative phase if
(1) the |0⟩ amplitudes α00 and α10 differ by some relative phase factor 𝑒𝑖𝜑0
(2) the |1⟩ amplitudes α01 and α11 differ by some relative phase factor 𝑒𝑖𝜑1
(3) 𝑒𝑖𝜑0 ≠ 𝑒𝑖𝜑1
(Note that if 𝑒𝑖𝜑0 = 𝑒𝑖𝜑1 then this would be equivalent to a global phase difference!)
For example, the quantum states
H |0⟩ =
1
√2
(
1
1
) =
|0⟩ + |1⟩
√2
= |+⟩
and
H |1⟩ =
1
√2
(
1
−1
) =
|0⟩ − |1⟩
√2
= |−⟩
differ by a relative phase because (1) the |0⟩ amplitudes differ by a relative phase factor of 1 = 𝑒𝑖0
,
(2) the |1⟩ amplitudes differ by a relative phase factor of −1 = 𝑒𝑖𝜋
, (3) and 1 ≠ −1.
At first glance, it might appear that |+⟩ and |−⟩ are indistinguishable by an external observer, as
was the case with global phase. However, when the phase difference between two states is
relative, not global, it is always possible to distinguish between them simply by measuring in a
different basis (in this case, by putting a Hadamard gate before the measurement dial). As a
result, unlike global phase shifts, relative phase shifts may be used to encode information.
In short, relative phase matters!

More Related Content

PDF
Quantum Computing 101, Part 2 - Hello Entangled World
PDF
No Cloning Theorem with essential Mathematics and Physics
PDF
Contraction mapping
PDF
Passivity-based control of rigid-body manipulator
PDF
PDF
Simple Comparison of Convergence of GeneralIterations and Effect of Variation...
PPTX
Inner Product Space
PDF
Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...
Quantum Computing 101, Part 2 - Hello Entangled World
No Cloning Theorem with essential Mathematics and Physics
Contraction mapping
Passivity-based control of rigid-body manipulator
Simple Comparison of Convergence of GeneralIterations and Effect of Variation...
Inner Product Space
Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...

What's hot (20)

PDF
On Uq(sl2)-actions on the quantum plane
PDF
2d beam element with combined loading bending axial and torsion
PDF
11.0003www.iiste.org call for paper.common fixed point theorem for compatible...
PDF
3.common fixed point theorem for compatible mapping of type a -21-24
PDF
Grovers Algorithm
PDF
Derivational Error of Albert Einstein
PPTX
Ph.D. Defense
PDF
vibration of machines and structures
PPTX
Shor’s algorithm the ppt
PDF
Numerical Methods: Solution of system of equations
PDF
Stability Analysis and Controller Synthesis for a Class of Piecewise Smooth S...
PDF
Chapter2 - Linear Time-Invariant System
PDF
Periodic Solutions for Nonlinear Systems of Integro-Differential Equations of...
PPT
DOCX
Ecuaciones doc
PDF
Convolution
PPTX
Inner product spaces
PDF
Circuit Network Analysis - [Chapter4] Laplace Transform
PPT
Stabilization of linear time invariant systems, Factorization Approach
PDF
Servo systems
On Uq(sl2)-actions on the quantum plane
2d beam element with combined loading bending axial and torsion
11.0003www.iiste.org call for paper.common fixed point theorem for compatible...
3.common fixed point theorem for compatible mapping of type a -21-24
Grovers Algorithm
Derivational Error of Albert Einstein
Ph.D. Defense
vibration of machines and structures
Shor’s algorithm the ppt
Numerical Methods: Solution of system of equations
Stability Analysis and Controller Synthesis for a Class of Piecewise Smooth S...
Chapter2 - Linear Time-Invariant System
Periodic Solutions for Nonlinear Systems of Integro-Differential Equations of...
Ecuaciones doc
Convolution
Inner product spaces
Circuit Network Analysis - [Chapter4] Laplace Transform
Stabilization of linear time invariant systems, Factorization Approach
Servo systems
Ad

Similar to Quantum Computing 101, Part 1 - Hello Quantum World (20)

PDF
Quantum computing journey from origin to future Technologies
PPTX
Quantum Computation simplified.pptx
PPTX
Quantum computing - A Compilation of Concepts
PPT
2007 001-motivation-to-quantum-computing
PPT
Paul_presentationMcGuirk_quantumcomputation.ppt
PPTX
Introduction to Quantum Computing
PDF
Quantum computing meghaditya
PPTX
Quantum Computation For AI
PPT
full description on quantum computing.ppt
PPTX
Quantum Computation.pptx
PPTX
A short introduction to Quantum Computing and Quantum Cryptography
PPTX
What is Quantum Computing and Why it is Important
PDF
slides chap2
PPTX
quantum computing Fundamentals and Applicaiton
PPTX
Quantum computing
PDF
The Extraordinary World of Quantum Computing
PPT
Quantum computing
PPTX
Quantum Computing Fundamentals via OO
PDF
Quantum operations and completely positive linear maps
PDF
Quantum technologies for Communications & Computing - Principles
Quantum computing journey from origin to future Technologies
Quantum Computation simplified.pptx
Quantum computing - A Compilation of Concepts
2007 001-motivation-to-quantum-computing
Paul_presentationMcGuirk_quantumcomputation.ppt
Introduction to Quantum Computing
Quantum computing meghaditya
Quantum Computation For AI
full description on quantum computing.ppt
Quantum Computation.pptx
A short introduction to Quantum Computing and Quantum Cryptography
What is Quantum Computing and Why it is Important
slides chap2
quantum computing Fundamentals and Applicaiton
Quantum computing
The Extraordinary World of Quantum Computing
Quantum computing
Quantum Computing Fundamentals via OO
Quantum operations and completely positive linear maps
Quantum technologies for Communications & Computing - Principles
Ad

Recently uploaded (20)

PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PDF
Sciences of Europe No 170 (2025)
PDF
AlphaEarth Foundations and the Satellite Embedding dataset
PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PDF
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
PPTX
INTRODUCTION TO EVS | Concept of sustainability
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
PPTX
ECG_Course_Presentation د.محمد صقران ppt
PDF
HPLC-PPT.docx high performance liquid chromatography
PPTX
2. Earth - The Living Planet Module 2ELS
PDF
Placing the Near-Earth Object Impact Probability in Context
PPTX
Microbiology with diagram medical studies .pptx
PPTX
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
PPTX
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
PPTX
Taita Taveta Laboratory Technician Workshop Presentation.pptx
PPTX
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
PPTX
Comparative Structure of Integument in Vertebrates.pptx
TOTAL hIP ARTHROPLASTY Presentation.pptx
Sciences of Europe No 170 (2025)
AlphaEarth Foundations and the Satellite Embedding dataset
The KM-GBF monitoring framework – status & key messages.pptx
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
INTRODUCTION TO EVS | Concept of sustainability
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
ECG_Course_Presentation د.محمد صقران ppt
HPLC-PPT.docx high performance liquid chromatography
2. Earth - The Living Planet Module 2ELS
Placing the Near-Earth Object Impact Probability in Context
Microbiology with diagram medical studies .pptx
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
7. General Toxicologyfor clinical phrmacy.pptx
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
Taita Taveta Laboratory Technician Workshop Presentation.pptx
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
Comparative Structure of Integument in Vertebrates.pptx

Quantum Computing 101, Part 1 - Hello Quantum World

  • 1. Copyright © 2021 BigMother.AI CIC. All rights reserved. 1 Quantum Computing 101, Part 1 – Hello Quantum World Aaron Turner, March 2021 Introduction This is the first part of a blog series on quantum computing, broadly derived from CERN’s Practical introduction to quantum computing video series, Michael Nielson’s Quantum computing for the determined video series, and the following (widely regarded as definitive) references: • [Hidary] Quantum Computing: An Applied Approach • [Nielsen & Chuang] Quantum Computing and Quantum Information [a.k.a. “Mike & Ike”] • [Yanofsky & Mannucci] Quantum Computing for Computer Scientists My objective is to keep the mathematics to an absolute minimum (albeit not quite zero), in order to engender an intuitive understanding. You can think it as a quantum computing cheat sheet. What is quantum computing? Quantum computing may be defined as computation (in the form of circuits and algorithms) that (unlike classical computation) specifically exploits the properties of quantum mechanics: • quantum superposition (defined in this Part) • quantum entanglement (defined in Part 2) • quantum interference (defined in Part [TBD])
  • 2. Copyright © 2021 BigMother.AI CIC. All rights reserved. 2 What quantum computing does not promise Turing machines, the lambda calculus, and general recursive functions are three different ways of describing [a subset of the class of all possible mathematical functions known as] the set of effectively computable functions, and all three have been formally proven to be equivalent. It is widely believed by mathematicians and computer scientists that these equivalent definitions accurately characterise the notion of computability, i.e. what may and may not be computed in finite time by a (classical) computer. This is known as the Church-Turing thesis. Any function that cannot in principle be computed in finite time by a Turing machine is called uncomputable. It is not the case that some functions that are uncomputable on a classical computer suddenly become computable on a quantum computer. The set of functions that may be computed in finite time on a quantum computer is exactly the same as the set of functions that may be computed in finite time on a classical computer. There are no benefits to be gained in terms of computability. What quantum computing may promise Although this is not yet something that can be formally proved, there is strong evidence to suggest that quantum computers may be much faster than classical computers for at least some tasks. This is known as quantum supremacy. At the time of writing, two groups have claimed to have demonstrated quantum supremacy: • in October 2020, Google claimed to have achieved in 200 seconds a quantum computation that would take 10,000 years on a classical supercomputer (IBM later questioned this claim, saying that it would only take 2.5 days, but that’s still a thousand times faster…) • in December 2020, a group at the University of Science and Technology of China claimed to have achieved in 200 seconds a quantum computation that would take 2.5 billion years on a classical supercomputer (for a quantum advantage, or overall speedup, of 1014 ) Physical vs logical quantum computing Quantum algorithms execute on quantum circuits (of which more later!) In order to write, and execute, quantum algorithms, all you need to know is how the quantum circuits work logically – it’s not necessary to know how the implementations of these circuits work, as (logically) they are all equivalent. The physical technologies being used to implement quantum circuits include: • neutral atom qubits • nitrogen-vacancy centre-in-diamond qubits • nuclear magnetic resonance qubits • photonic qubits • silicon-based spin qubits • superconducting qubits • topological qubits • trapped ion qubits
  • 3. Copyright © 2021 BigMother.AI CIC. All rights reserved. 3 Running your own quantum algorithms In order to execute a quantum algorithm, you need access to a either a quantum computer or a simulation of one. The IBM Quantum Experience provides access to both – and it’s free! The Quirk quantum circuit simulator and Qiskit open source SDK are also excellent free resources. Later, we will be executing the Hello World of quantum computing on a real quantum computer! Bits and qubits Computations are initialised to a particular state, evolve through a finite sequence of states (specified by an algorithm), and then terminate; the final state is the result of the computation. The instantaneous state of a computation is recorded in a classical computer by a number of bits (each being either 0 or 1), and in a quantum computer by a number of quantum bits, or qubits. Mathematically, the state of a single qubit is represented by 2-element column vector ( α0 α1 ) where α0 and α1 are complex numbers (called probability amplitudes, or just amplitudes for short), and |α0|2 + |α1|2 = 1, where |𝛼| is the modulus of complex number 𝛼. The constraint |α0|2 + |α1|2 = 1 is called the normalisation condition. An arbitrary pair of complex numbers α0 and α1 that do not satisfy this constraint do not represent a valid qubit state! Dirac notation and basis states We will use Dirac’s ket notation |ψ⟩ to denote the state of an arbitrary qubit. In particular, we will use |0⟩ as shorthand for ( 1 0 ) and |1⟩ as shorthand for ( 0 1 ) The states |0⟩ and |1⟩ are called basis states; they are the quantum analogues of 0 and 1.
  • 4. Copyright © 2021 BigMother.AI CIC. All rights reserved. 4 Superposition Now that we have the two basis states |0⟩ and |1⟩, we can rewrite the state of a generic qubit as |ψ⟩ = α0|0⟩ + α1|1⟩ = α0 ( 1 0 ) + α1 ( 0 1 ) = ( α0 0 ) + ( 0 α1 ) = ( α0 α1 ) The way to interpret this is that the qubit state |ψ⟩ is a simultaneous mixture of |0⟩ and |1⟩, i.e. it is effectively in both states |0⟩ and |1⟩ at the same time – this is known as a superposition. Intuitively, as will become clear in the next section, the 𝛂𝟎 amplitude tells us how much the qubit |ψ⟩ = α0|0⟩ + α1|1⟩ favours |𝟎⟩, and the 𝛂𝟏 amplitude tells us how much it favours |𝟏⟩. Measurement The result of a quantum computation is always a classical value (i.e. 0 or 1, not |0⟩ or |1⟩). The way we extract this result is to measure the value of a qubit. Born’s rule, a law of quantum mechanics, implies that, when measured, a generic qubit |ψ⟩ = α0|0⟩ + α1|1⟩ will yield (classical) 0 with probability |α0|2 and (classical) 1 with probability |α1|2 . (Hence |α0|2 + |α1|2 must = 1.) If a measurement yields 0, then the state of the qubit immediately after being measured will have collapsed to |0⟩ (and any subsequent measurement will yield 0 with probability 1), otherwise it will have collapsed to |1⟩ (and any subsequent measurement will yield 1 with probability 1). This is simply how the underlying quantum mechanics of the universe works! Note that qubits cannot be copied in order to circumvent this effect (the no-cloning theorem). The following quantum circuit (hint: read these from left to right) initialises the quantum state (generally depicted as a single line) to |0⟩, which it immediately measures via the measurement gate (depicted as a dial), which then yields a classical bit (generally depicted as a double line).
  • 5. Copyright © 2021 BigMother.AI CIC. All rights reserved. 5 The Bloch sphere The qubit state |ψ⟩ = α0|0⟩ + α1|1⟩ may be visualised as a point on the surface of a unit sphere where: • the basis state |0⟩ is at the north pole of the sphere • the basis state |1⟩ is at the south pole of the sphere • 𝜃 is the angle between the north-south axis and a line from the centre of the sphere to |ψ⟩ • 𝜑 is the angle eastwards from an arbitrary point on the equator to the longitude of |ψ⟩ • 𝜃 and 𝜑 (0 ≤ 𝜃 ≤ 𝜋, 0 ≤ 𝜑 < 2𝜋) may be calculated from α0 and α1 Note that any basis states such as |0⟩ and |1⟩ must be orthogonal, i.e. opposite each other. Single-qubit operations (gates) In order to manipulate the state of a qubit (in order that a quantum algorithm may evolve), we need some way to apply operations to qubit states. Because single-qubit states are 2-element complex vectors, we can represent a single-qubit operation (gate) U as a 2 × 2 complex matrix U = ( 𝑎 𝑏 𝑐 𝑑 ) We can then calculate the result of applying U to state α0|0⟩ + α1|1⟩ via matrix multiplication ( 𝑎 𝑏 𝑐 𝑑 ) ( α0 α1 ) = ( 𝑎α0 + bα1 𝑐α0 + dα1 )
  • 6. Copyright © 2021 BigMother.AI CIC. All rights reserved. 6 In order for the result on the RHS to be a valid state it must satisfy the normalisation condition |𝑎α0 + bα1|2 + |𝑐α0 + dα1|2 = 1. In order to preserve normalisation, a single-qubit operation U = ( 𝑎 𝑏 𝑐 𝑑 ) must be unitary (length preserving), meaning that U multiplied by its conjugate transpose U† yields the identity matrix (here, the order of matrix multiplication doesn’t matter). In other words UU† = ( 𝑎 𝑏 𝑐 𝑑 ) ( 𝑎 ̅ 𝑐̅ 𝑏 ̅ 𝑑̅) = U† U = ( 𝑎 ̅ 𝑐̅ 𝑏 ̅ 𝑑̅) ( 𝑎 𝑏 𝑐 𝑑 ) = I = ( 1 0 0 1 ) where the complex conjugate 𝛼 ̅ of complex number 𝛼 = 𝑥 + 𝑖𝑦 is defined as 𝛼 ̅ = 𝑥 − 𝑖𝑦. The I (or Identity) gate The I gate, defined as I = ( 1 0 0 1 ) leaves its input unchanged. If |ψ⟩ = ( α0 α1 ) = α0|0⟩ + α1|1⟩ then I |ψ⟩ = ( 1 0 0 1 ) ( α0 α1 ) = ( α0 α1 ) = |ψ⟩ I |0⟩ = ( 1 0 0 1 ) ( 1 0 ) = ( 1 0 ) = |0⟩ I |1⟩ = ( 1 0 0 1 ) ( 0 1 ) = ( 0 1 ) = |1⟩ The X (or NOT) gate (a.k.a. Pauli gate 𝝈𝑿) The X gate, defined as X = ( 0 1 1 0 ) swaps the α0 and α1 amplitudes.
  • 7. Copyright © 2021 BigMother.AI CIC. All rights reserved. 7 If |ψ⟩ = ( α0 α1 ) = α0|0⟩ + α1|1⟩ then X |ψ⟩ = ( 0 1 1 0 ) ( α0 α1 ) = ( α1 α0 ) = α1|0⟩ + α0|1⟩ X |0⟩ = ( 0 1 1 0 ) ( 1 0 ) = ( 0 1 ) = |1⟩ X |1⟩ = ( 0 1 1 0 ) ( 0 1 ) = ( 1 0 ) = |0⟩ The H (or Hadamard) gate The H gate, defined as H = 1 √2 ( 1 1 1 −1 ) creates a superposed (i.e. mixed {|0⟩, |1⟩}) state from a non-superposed basis state. If |ψ⟩ = α0|0⟩ + α1|1⟩ then [note the two new definitions, |+⟩ and |−⟩] H |ψ⟩ = 1 √2 ( 1 1 1 −1 ) ( α0 α1 ) = 1 √2 ( α0 + α1 α0 − α1 ) = 1 √2 (α0 + α1) |0⟩ + 1 √2 (α0 − α1) |1⟩ H |0⟩ = 1 √2 ( 1 1 1 −1 ) ( 1 0 ) = 1 √2 ( 1 1 ) = ( 1 0 )+( 0 1 ) √2 = |0⟩ + |1⟩ √2 = |+⟩ H |1⟩ = 1 √2 ( 1 1 1 −1 ) ( 0 1 ) = 1 √2 ( 1 −1 ) = ( 1 0 )−( 0 1 ) √2 = |0⟩ − |1⟩ √2 = |−⟩ Note that |+⟩ and |−⟩ are orthogonal (Bloch opposites), and therefore candidate basis states. This quantum circuit starts by initialising the state to |0⟩, as indicated by the first Bloch sphere, after which a Hadamard gate (denoted by the square with an H in it) is applied, resulting in the output indicated by the second Bloch sphere Here we use an X gate to flip the initial |0⟩ into a |1⟩, prior to the Bloch-H-Bloch sequence as above This quantum circuit starts by initialising the state to |0⟩, as indicated by the first Bloch sphere, after which an X gate (denoted by the circle with the cross in it) is applied, resulting in the output indicated by the second Bloch sphere Here we use an X gate to flip the initial |0⟩ into a |1⟩, prior to the Bloch-X-Bloch sequence as above
  • 8. Copyright © 2021 BigMother.AI CIC. All rights reserved. 8 Hello World The following circuit (the “Hello World” of quantum computing) pushes the initial |0⟩ through a Hadamard gate, thereby creating a superposition (|+⟩) of the basis states |0⟩ and |1⟩, which it then measures. The probability of the measurement yielding 0 is | 1 √2 | 2 , and the probability of the measurement yielding 1 is also | 1 √2 | 2 , which evaluates to 0.5. In other words, this quantum circuit, executed repeatedly, generates a perfectly random bitstream. In general (although not always), we don’t just execute a quantum algorithm once, as we would on a classical computer. Instead, we execute it many times in order to obtain a probabilistic result. Executing this algorithm N = 1024 times on a real quantum computer returned the following: What we effectively get is a histogram depicting the probability distribution over basis states represented by the superposed state. It’s not perfectly 50:50 between 0 and 1, for two reasons: 1. it is literally a random process, and will only tend towards the ideal result as N increases 2. actual quantum machines are not perfect – in particular, qubits are vulnerable to quantum errors due to decoherence (interactions with their environment) and other quantum noise.
  • 9. Copyright © 2021 BigMother.AI CIC. All rights reserved. 9 Phase The concept of phase is of fundamental importance in quantum computation. A complex number 𝛼 expressed in rectangular form (also called Cartesian form) 𝛼 = 𝑥 + 𝑖𝑦 may be re-expressed (via basic trigonometry) in polar form 𝛼 = 𝑟 cos 𝜑 + 𝑖 𝑟 sin 𝜑 = 𝑟(cos 𝜑 + 𝑖 sin 𝜑) where 𝑟 = |𝛼| = √𝑥2 + 𝑦2 𝜑 is the positive angle from the real axis on the corresponding Argand diagram 𝜑 = Arg(𝜶), calculated as follows tan−1 ( 𝑦 𝑥 ), when x > 0 [top-right and bottom-right quadrants] 𝜋 2 , when x = 0, y > 0 [degenerate case, zero denominator] 0 [by convention], when x = 0, y = 0 [degenerate case, zero denominator] − 𝜋 2 , when x = 0, y < 0 [degenerate case, zero denominator] tan−1 ( 𝑦 𝑥 ) + 𝜋, when x < 0, y ≥ 0 [top-left quadrant] tan−1 ( 𝑦 𝑥 ) − 𝜋, when x < 0, y < 0 [bottom-left quadrant] 𝐴𝑟𝑔(𝛼) = 𝛼
  • 10. Copyright © 2021 BigMother.AI CIC. All rights reserved. 10 Calculated as above, 𝜑 is always in the interval (−𝜋, 𝜋]. When (and only when!) 𝜑 (as calculated above) is negative, adding 2𝜋 will move it into the equivalent interval [0, 2𝜋), if this is preferred. Thanks to Euler’s formula (𝑒𝑖𝜑 = cos 𝜑 + 𝑖 sin 𝜑), 𝛼 may be re-expressed in exponential form 𝛼 = 𝑟𝑒𝑖𝜑 (commonly called a phasor in engineering), where 𝑒𝑖𝜑 is called the phase factor 𝜑 (always expressed in radians) is called the phase [note: 𝑑° = 𝑑𝜋 180 rad]. Properties of 𝜶 ̅, |𝜶|, and 𝒆𝒊𝝅 The following properties will prove useful when thinking about phase: (1) for a complex number 𝛼 in exponential form 𝛼 = 𝑟𝑒𝑖𝜑 its complex conjugate 𝛼 ̅ is simply 𝛼 ̅ = 𝑟𝑒−𝑖𝜑 (2) complex conjugation distributes over multiplication 𝛼𝛽 ̅̅̅̅ = 𝛼 ̅𝛽̅ (3) the modulus |𝛼| and complex conjugate 𝛼 ̅ of complex number 𝛼 are related as follows |𝛼|2 = 𝛼𝛼 ̅ (4) the special case of Euler’s formula with 𝜑 = 𝜋 yields Euler’s identity 𝑒𝑖𝜋 = cos 𝜋 + 𝑖 sin 𝜋 = −1 (5) the special case of Euler’s formula with 𝜑 = 𝜋 2 yields 𝑒𝑖 𝜋 2 = cos 𝜋 2 + 𝑖 sin 𝜋 2 = 𝑖
  • 11. Copyright © 2021 BigMother.AI CIC. All rights reserved. 11 Global phase Consider a generic quantum state |ψ0⟩ = α0|0⟩ + α1|1⟩ If we were to measure |ψ0⟩ we would obtain 0 with probability |𝛼0|2 we would obtain 1 with probability |𝛼1|2 Now imagine a second quantum state equal to |ψ0⟩ multiplied by a global phase factor 𝑒𝑖𝜑 |ψ1⟩ = 𝑒𝑖𝜑|ψ0⟩ = 𝑒𝑖𝜑 α0|0⟩ + 𝑒𝑖𝜑 α1|1⟩ If we were to measure |ψ1⟩ we would obtain 0 with probability |𝑒𝑖𝜑 𝛼0| 2 = (𝑒𝑖𝜑 𝛼0)(𝑒𝑖𝜑𝛼0) ̅̅̅̅̅̅̅̅̅̅ = (𝑒𝑖𝜑 𝛼0)(𝑒𝑖𝜑 ̅̅̅̅𝛼0 ̅̅̅) = (𝑒𝑖𝜑 𝛼0)(𝑒−𝑖𝜑 𝛼0 ̅̅̅) = 𝑒(𝑖𝜑−𝑖𝜑) 𝛼0𝛼0 ̅̅̅ = 𝑒0|𝛼0|2 = |𝛼0|2 similarly, we would obtain 1 with probability |𝛼1|2 In other words, the measurement probabilities for |ψ0⟩ and |ψ1⟩ are identical. Which means that, despite the fact that these states differ internally, they are nevertheless indistinguishable from the perspective of an external observer. For this reason, we say that |ψ0⟩ and |ψ1⟩ are equal up to the global phase factor 𝒆𝒊𝝋 . For all practical purposes, |ψ0⟩ and |ψ1⟩ are equivalent |ψ0⟩ ≡ |ψ1⟩. In short, global phase doesn’t matter!
  • 12. Copyright © 2021 BigMother.AI CIC. All rights reserved. 12 Relative phase We say that two amplitudes 𝛼 and 𝛽 differ by a relative phase factor 𝑒𝑖𝜑 if there exists some real number 𝜑 such that 𝛼 = 𝑒𝑖𝜑 𝛽. (Note that if 𝜑 = 0 then the relative phase factor is 𝑒𝑖0 = 1.) More generally, we say that two quantum states |ψ0⟩ = α00|0⟩ + α01|1⟩ and |ψ1⟩ = α10|0⟩ + α11|1⟩ differ by a relative phase if (1) the |0⟩ amplitudes α00 and α10 differ by some relative phase factor 𝑒𝑖𝜑0 (2) the |1⟩ amplitudes α01 and α11 differ by some relative phase factor 𝑒𝑖𝜑1 (3) 𝑒𝑖𝜑0 ≠ 𝑒𝑖𝜑1 (Note that if 𝑒𝑖𝜑0 = 𝑒𝑖𝜑1 then this would be equivalent to a global phase difference!) For example, the quantum states H |0⟩ = 1 √2 ( 1 1 ) = |0⟩ + |1⟩ √2 = |+⟩ and H |1⟩ = 1 √2 ( 1 −1 ) = |0⟩ − |1⟩ √2 = |−⟩ differ by a relative phase because (1) the |0⟩ amplitudes differ by a relative phase factor of 1 = 𝑒𝑖0 , (2) the |1⟩ amplitudes differ by a relative phase factor of −1 = 𝑒𝑖𝜋 , (3) and 1 ≠ −1. At first glance, it might appear that |+⟩ and |−⟩ are indistinguishable by an external observer, as was the case with global phase. However, when the phase difference between two states is relative, not global, it is always possible to distinguish between them simply by measuring in a different basis (in this case, by putting a Hadamard gate before the measurement dial). As a result, unlike global phase shifts, relative phase shifts may be used to encode information. In short, relative phase matters!