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

What's hot (20)

PDF
On Uq(sl2)-actions on the quantum plane
Steven Duplij (Stepan Douplii)
 
PDF
2d beam element with combined loading bending axial and torsion
rro7560
 
PDF
11.0003www.iiste.org call for paper.common fixed point theorem for compatible...
Alexander Decker
 
PDF
3.common fixed point theorem for compatible mapping of type a -21-24
Alexander Decker
 
PDF
Grovers Algorithm
CaseyHaaland
 
PDF
Derivational Error of Albert Einstein
IOSR Journals
 
PPTX
Ph.D. Defense
Muhammad Ahsan
 
PDF
vibration of machines and structures
Aniruddhsinh Barad
 
PPTX
Shor’s algorithm the ppt
Mrinal Mondal
 
PDF
Numerical Methods: Solution of system of equations
Nikolai Priezjev
 
PDF
Stability Analysis and Controller Synthesis for a Class of Piecewise Smooth S...
Behzad Samadi
 
PDF
Chapter2 - Linear Time-Invariant System
Attaporn Ninsuwan
 
PDF
Periodic Solutions for Nonlinear Systems of Integro-Differential Equations of...
International Journal of Engineering Inventions www.ijeijournal.com
 
PPT
Ch2 2011 s
Dr Robert Craig PhD
 
DOCX
Ecuaciones doc
AlvaroGurumendiQuija
 
PDF
Convolution
muzuf
 
PPTX
Inner product spaces
gidc engineering college
 
PDF
Circuit Network Analysis - [Chapter4] Laplace Transform
Simen Li
 
PPT
Stabilization of linear time invariant systems, Factorization Approach
Solo Hermelin
 
PDF
Servo systems
cairo university
 
On Uq(sl2)-actions on the quantum plane
Steven Duplij (Stepan Douplii)
 
2d beam element with combined loading bending axial and torsion
rro7560
 
11.0003www.iiste.org call for paper.common fixed point theorem for compatible...
Alexander Decker
 
3.common fixed point theorem for compatible mapping of type a -21-24
Alexander Decker
 
Grovers Algorithm
CaseyHaaland
 
Derivational Error of Albert Einstein
IOSR Journals
 
Ph.D. Defense
Muhammad Ahsan
 
vibration of machines and structures
Aniruddhsinh Barad
 
Shor’s algorithm the ppt
Mrinal Mondal
 
Numerical Methods: Solution of system of equations
Nikolai Priezjev
 
Stability Analysis and Controller Synthesis for a Class of Piecewise Smooth S...
Behzad Samadi
 
Chapter2 - Linear Time-Invariant System
Attaporn Ninsuwan
 
Periodic Solutions for Nonlinear Systems of Integro-Differential Equations of...
International Journal of Engineering Inventions www.ijeijournal.com
 
Ecuaciones doc
AlvaroGurumendiQuija
 
Convolution
muzuf
 
Inner product spaces
gidc engineering college
 
Circuit Network Analysis - [Chapter4] Laplace Transform
Simen Li
 
Stabilization of linear time invariant systems, Factorization Approach
Solo Hermelin
 
Servo systems
cairo university
 

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

PDF
Quantum computing journey from origin to future Technologies
RihabHoceini
 
PPTX
Quantum Computation simplified.pptx
SundarappanKathiresa
 
PPTX
Quantum computing - A Compilation of Concepts
Gokul Alex
 
PPT
2007 001-motivation-to-quantum-computing
Vipul Kumar
 
PPT
Paul_presentationMcGuirk_quantumcomputation.ppt
nezhadnoralahnavid
 
PPTX
Introduction to Quantum Computing
GDSC PJATK
 
PDF
Quantum computing meghaditya
Meghaditya Roy Chaudhury
 
PPTX
Quantum Computation For AI
Prasenjit Mukherjee
 
PPT
full description on quantum computing.ppt
libokes622
 
PPTX
Quantum Computation.pptx
KHATWANGADHARREDDY
 
PPTX
A short introduction to Quantum Computing and Quantum Cryptography
Facultad de Informática UCM
 
PPTX
What is Quantum Computing and Why it is Important
Sasha Lazarevic
 
PDF
slides chap2
ravi ranjan
 
PPTX
quantum computing Fundamentals and Applicaiton
lalithasrini
 
PPTX
Quantum computing
Ritwik MG
 
PDF
The Extraordinary World of Quantum Computing
Tim Ellison
 
PPT
Quantum computing
Davide Nardone
 
PPTX
Quantum Computing Fundamentals via OO
Carl Belle
 
PDF
Quantum operations and completely positive linear maps
wtyru1989
 
PDF
Quantum technologies for Communications & Computing - Principles
Washington Velásquez
 
Quantum computing journey from origin to future Technologies
RihabHoceini
 
Quantum Computation simplified.pptx
SundarappanKathiresa
 
Quantum computing - A Compilation of Concepts
Gokul Alex
 
2007 001-motivation-to-quantum-computing
Vipul Kumar
 
Paul_presentationMcGuirk_quantumcomputation.ppt
nezhadnoralahnavid
 
Introduction to Quantum Computing
GDSC PJATK
 
Quantum computing meghaditya
Meghaditya Roy Chaudhury
 
Quantum Computation For AI
Prasenjit Mukherjee
 
full description on quantum computing.ppt
libokes622
 
Quantum Computation.pptx
KHATWANGADHARREDDY
 
A short introduction to Quantum Computing and Quantum Cryptography
Facultad de Informática UCM
 
What is Quantum Computing and Why it is Important
Sasha Lazarevic
 
slides chap2
ravi ranjan
 
quantum computing Fundamentals and Applicaiton
lalithasrini
 
Quantum computing
Ritwik MG
 
The Extraordinary World of Quantum Computing
Tim Ellison
 
Quantum computing
Davide Nardone
 
Quantum Computing Fundamentals via OO
Carl Belle
 
Quantum operations and completely positive linear maps
wtyru1989
 
Quantum technologies for Communications & Computing - Principles
Washington Velásquez
 
Ad

Recently uploaded (20)

PPTX
Diagnostic Features of Common Oral Ulcerative Lesions.pptx
Dr Palak borade
 
PDF
Unit-3 ppt.pdf organic chemistry - 3 unit 3
visionshukla007
 
PPTX
Systamatic Acquired Resistence (SAR).pptx
giriprasanthmuthuraj
 
PPTX
Anatomy and physiology of digestive system.pptx
Ashwini I Chuncha
 
PPTX
Q1 - W1 - D2 - Models of matter for science.pptx
RyanCudal3
 
PPT
Introduction of animal physiology in vertebrates
S.B.P.G. COLLEGE BARAGAON VARANASI
 
PDF
WUCHERIA BANCROFTI-converted-compressed.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
PPTX
Akshay tunneling .pptx_20250331_165945_0000.pptx
akshaythaker18
 
PDF
Adding Geochemistry To Understand Recharge Areas - Kinney County, Texas - Jim...
Texas Alliance of Groundwater Districts
 
PPT
Restriction digestion of DNA for students of undergraduate and post graduate ...
DrMukeshRameshPimpli
 
PDF
RODENT PEST MANAGEMENT-converted-compressed.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
PDF
High-speedBouldersandtheDebrisFieldinDARTEjecta
Sérgio Sacani
 
PDF
Primordial Black Holes and the First Stars
Sérgio Sacani
 
PPTX
Ghent University Global Campus: Overview
Ghent University Global Campus
 
PPTX
Different formulation of fungicides.pptx
MrRABIRANJAN
 
PPTX
Class12_Physics_Chapter2 electric potential and capacitance.pptx
mgmahati1234
 
PPT
Cell cycle,cell cycle checkpoint and control
DrMukeshRameshPimpli
 
PPTX
PEDIA IDS IN A GIST_6488b6b5-3152-4a4a-a943-20a56efddd43 (2).pptx
tdas83504
 
PPTX
CNS.pptx Central nervous system meninges ventricles of brain it's structure a...
Ashwini I Chuncha
 
PPTX
Envenomation AND ANIMAL BITES DETAILS.pptx
HARISH543351
 
Diagnostic Features of Common Oral Ulcerative Lesions.pptx
Dr Palak borade
 
Unit-3 ppt.pdf organic chemistry - 3 unit 3
visionshukla007
 
Systamatic Acquired Resistence (SAR).pptx
giriprasanthmuthuraj
 
Anatomy and physiology of digestive system.pptx
Ashwini I Chuncha
 
Q1 - W1 - D2 - Models of matter for science.pptx
RyanCudal3
 
Introduction of animal physiology in vertebrates
S.B.P.G. COLLEGE BARAGAON VARANASI
 
WUCHERIA BANCROFTI-converted-compressed.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
Akshay tunneling .pptx_20250331_165945_0000.pptx
akshaythaker18
 
Adding Geochemistry To Understand Recharge Areas - Kinney County, Texas - Jim...
Texas Alliance of Groundwater Districts
 
Restriction digestion of DNA for students of undergraduate and post graduate ...
DrMukeshRameshPimpli
 
RODENT PEST MANAGEMENT-converted-compressed.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
High-speedBouldersandtheDebrisFieldinDARTEjecta
Sérgio Sacani
 
Primordial Black Holes and the First Stars
Sérgio Sacani
 
Ghent University Global Campus: Overview
Ghent University Global Campus
 
Different formulation of fungicides.pptx
MrRABIRANJAN
 
Class12_Physics_Chapter2 electric potential and capacitance.pptx
mgmahati1234
 
Cell cycle,cell cycle checkpoint and control
DrMukeshRameshPimpli
 
PEDIA IDS IN A GIST_6488b6b5-3152-4a4a-a943-20a56efddd43 (2).pptx
tdas83504
 
CNS.pptx Central nervous system meninges ventricles of brain it's structure a...
Ashwini I Chuncha
 
Envenomation AND ANIMAL BITES DETAILS.pptx
HARISH543351
 
Ad

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!