CS计算机代考程序代写 algorithm MULT20015 Lecture 2 2021 v2

MULT20015 Lecture 2 2021 v2

MULT20015 Elements of Quantum Computing
Lecture 2

Subject outline

Lecture topics (by week)

1 – Introduction to quantum computing and maths basics
2 – Single qubit representations and logic operations
3 – Two qubit states and logic gates
4 – Multi-qubit states and quantum arithmetic
5 – Basic quantum algorithms
6 – Period finding, cryptography and quantum factoring
7 – Shor’s algorithm, post-quantum crypto, quantum key distribution
8 – Quantum search algorithms
9 – Grover search applications, optimisation problems
10 – Solving optimisation problems on quantum computers
11 – Applications in quantum machine learning
12 – Real quantum computer devices

Assignment schedule:
#1: Hand out in Week 2
#2: Hand out in Week 8

MULT20015 Elements of Quantum Computing
Lecture 2

Week 1

Lecture 1
1.1 A very brief history of computing
1.2 The quantum world and quantum computing

Lecture 2
2.1 The mathematics of quantum states
2.2 Complex numbers and quantum amplitudes
2.3 Basic linear algebra: ket and matrix notation
2.4 State representation in the QUI

Practice class 1
The Quantum User Interface (QUI), lecture 1 & 2 review exercises

MULT20015 Elements of Quantum Computing
Lecture 2

Lecture 1 recap

22 nm Tri-Gate Transistor

Gates

8

Fins

on “1”

off “0”

Intel.com

Only “0” or “1” at a time in any given
physical representation (transistor)

|0ñ “and” |1ñ

|0ñ

state collapse ® random outcome

quantum superposition measurement/observation

|1ñ

|0ñY
|0i

|1i

One electron in quantum
superposition.

Notation for bits:
Classical ® 0 and 1
Quantum ® |0ñ and |1ñ

Bubble: Brocken commons.wikimedia.org
Bursting bubble: wallpaperswide.com

MULT20015 Elements of Quantum Computing
Lecture 2

2.1 The mathematics of quantum states

MULT20015
Lecture 2

MULT20015 Elements of Quantum Computing
Lecture 2

Quantum bits and probabilities

|1ñ|0ñ

Y

A qubit in a particular
quantum superposition,
say with more 0 than 1

(as many times as we like)

Analyse all outcomes

|1ñ

|0ñ

“0” outcomes

Say 60 times out of 100 trials

Probability: Prob[“0”] ~ 60/100 = 0.6

“1” outcomes

Say 40 times out of 100 trials

Probability: Prob[“1”] ~ 40/100 = 0.4

repeat
the process…

measurement

? or
and

quantum
superposition

collapse

Prepare Measure Results

Quantum systems are stochasticBubble: Brocken commons.wikimedia.org
Bursting bubble: wallpaperswide.com

MULT20015 Elements of Quantum Computing
Lecture 2

Qubits – how we describe them mathematically

|0ñ

|1ñ

A qubit, e.g. an electron in an atom

First let’s look at the case of no quantum superposition: or

i.e. definitive scenarios, one state or the other (no surprises)

The qubit can be in |0ñ or |1ñ or both at the same time.

The overall quantum state is denoted by |𝜓ñ

The electron is in the ground state

| i = |0i

Outcome always “0” ® probability: Prob[“0”] = 1.0

measurement

Before:

| i = |0iCollapses to:

| i = |0i The electron is in the excited state

Outcome always “1” ® probability: Prob[“1”] = 1.0

measurement

Before:

Collapses to:

| i = |1i

| i = |1i

| i = |1i

| i = |0i | i = |1i

MULT20015 Elements of Quantum Computing
Lecture 2

Qubit maths – quantum superposition

Qubit in both |0ñ and |1ñ states

® i.e. |𝜓ñ is a quantum superposition of |0ñ and |1ñ

• a0 and a1 are the “quantum state amplitudes” (over ℂ -> complex numbers)

® tell us how much of |0ñ and |1ñ are in the superposition |𝜓ñ

• modulus squared of the amplitudes, |a0|2 and |a1|2 ® probabilities of measuring “0” or “1”

• total probability must be 1, so we have the “normalization” condition: |a0|2 + |a1|2 = 1

| i = a0 |0i+ a1 |1i =

a0
a1

Maths: we describe |𝜓ñ as a linear combination of basis states over the linear space {|0ñ,|1ñ}:

Let’s recap complex numbers…

MULT20015 Elements of Quantum Computing
Lecture 2

2.2 Complex numbers and quantum amplitudes

MULT20015
Lecture 2

MULT20015 Elements of Quantum Computing
Lecture 2

Complex numbers: basics

| i = a0 |0i+ a1 |1i =

a0
a1

Complex numbers recap:

𝑧 = 𝑥 + 𝑖𝑦
“Real” part is denoted by Re[𝑧] = 𝑥

“Imaginary” part is denoted by Im[𝑧] = 𝑦

where a0 and a1 are complex numbers.

Re[z]
1 2-2 -1

2

1

-1

-2

𝑧 = 1 + 2𝑖

𝑧 = 1 − 2𝑖

𝑧 = −2 + 𝑖

𝑧 = −2 − 2𝑖

Im[z]
i = −1 , and so 𝑖! = −1

𝑧” + 𝑧! = (𝑥”+𝑖𝑦”) + (𝑥!+𝑖𝑦!) = 𝑥” + 𝑥! + 𝑖 𝑦” + 𝑦!

Multiplication: 𝑧”𝑧! = (𝑥”+𝑖𝑦”) 𝑥! + 𝑖𝑦! = 𝑥”𝑥! − 𝑦”𝑦! + 𝑖(𝑥”𝑦! + 𝑦”𝑥!)

Addition:

𝑧 = 𝑥 + 𝑖𝑦 → 𝑧∗ = 𝑥 − 𝑖𝑦Conjugate:

𝑧 𝑧∗ = 𝑥 + 𝑖𝑦 𝑥 − 𝑖𝑦 = 𝑥! − 𝑖𝑥𝑦 + 𝑖𝑦𝑥 + 𝑦! = 𝑥! + 𝑦!

i.e. 𝑧 𝑧∗ = 𝑥! + 𝑦! = |𝑧|! i.e. 𝑧 = 𝑥! + 𝑦!
Re[z]

Im[z]
𝑧 = 𝑥 + 𝑖𝑦

𝑥

𝑦

𝑧
=

𝑥!
+ 𝑦

!

|z| is referred to as the “modulus” or “magnitude”

MULT20015 Elements of Quantum Computing
Lecture 2

Complex numbers: polar notation

In the QUI, we use “polar notation”. e.g. for amplitudes in the state:

Re[z]

Im[z]
z = 𝑥 + 𝑖𝑦

𝑥

𝑦

𝜃
𝑧
=

𝑥
! +

𝑦
!

𝑧 sin 𝜃

𝑧 cos 𝜃

“phase”
angle

Re

Im

| i = a0 |0i+ a1 |1i =

a0
a1

a = Re[a] + i Im[a] = |a|ei✓ !
|a| =

p
Re[a]2 + Im[a]2

✓ = tan�1 (Im[a]/Re[a])

Ignoring subscripts, consider a complex amplitude a

Cartesian: z = x + iy in terms of x=Re[z] and y=Im[z]

Polar: z = 𝑟 (cos 𝜃 + 𝑖 sin 𝜃) = 𝑟 𝑒$%

NB: 𝑒$% = cos 𝜃 + 𝑖 sin 𝜃, 𝑟 = 𝑧 = 𝑥! + 𝑦!

| i = a0 |0i+ a1 |1i =

a0
a1


! | i = |a0|ei✓0 |0i+ |a1|ei✓1 |1i

|a|

For each complex amplitude we have a magnitude and phase angle:

MULT20015 Elements of Quantum Computing
Lecture 2

Continuing: Qubit maths – quantum superposition

Qubit in both |0ñ and |1ñ states

® i.e. |𝜓ñ is a quantum superposition of |0ñ and |1ñ

• a0 and a1 are the “quantum state amplitudes” (complex numbers in general)

® tell us how much of |0ñ and |1ñ are in the superposition |𝜓ñ

| i = a0 |0i+ a1 |1i =

a0
a1


Maths: we describe |𝜓ñ as an “addition” of states over a linear space {|0ñ,|1ñ}:

• modulus squared of the amplitudes, |a0|2 and |a1|2 ® probabilities of measuring “0” or “1”

• total probability must be 1, so we have the “normalization” condition: |a0|2 + |a1|2 = 1

MULT20015 Elements of Quantum Computing
Lecture 2

Qubit superposition, amplitudes, and measurement

| i = a0 |0i+ a1 |1i =

a0
a1

Prob[“0”] = |a0|2

Prob[“1”] = |a1|2

Outcome probability

Prepared state |𝜓ñ

|𝜓ñ “collapsed” to:Outcome

“0”

“1”

? or

| i ! |0i

| i ! |1i

Measurement

Back to qubit superposition and measurement.

Amplitudes and probability:

MULT20015 Elements of Quantum Computing
Lecture 2

Examples

Y

Let’s prepare a qubit in that
particular “60:40” superposition

Measurement

|1ñ

|0ñ

The probability of getting a

“0” outcome is given by:

Prob[“0”] = (0.775)2 = 0.6

The probability of getting a

“1” outcome is given by:

Prob[“1”] = (0.633)2 = 0.4

NB. In any given prepare-measure shot, the outcome will appear random!

But, by repeating the prepare-measurement process many times

the probabilities emerge from |𝜓ñ = (0.775) |0ñ + (0.633) |1ñ

measurement

? or

|𝜓ñ = (0.775) |0ñ + (0.633) |1ñ

a0 a1

Assume for now the amplitudes are real:

Bubble: Brocken commons.wikimedia.org
Bursting bubble: wallpaperswide.com

MULT20015 Elements of Quantum Computing
Lecture 2

Examples

Quantum state (before)

Assume the amplitudes a0 and a1 are real.

Probability measuring 1Probability measuring 0 Histogram (many shots)

| i =
1
p
2
|0i+

1
p
2
|1i


1
p
2

◆2
=

1

2


1
p
2

◆2
=

1

2

1.
0

0.
5 |0ñ |1ñ state

pr
ob

ab
ili

ty

| i =
1

2
|0i+

p
3

2
|1i

1.
0

0.
5 |0ñ |1ñ state

pr
ob

ab
ili

ty

| i = a0 |0i+ a1 |1i =

a0
a1


1.
0

0.
5 |0ñ |1ñ state

pr
ob

ab
ili

ty

a02 a12
a02

a12


1

2

◆2
=

1

4

p
3

2

!2
=

3

4

a02 + a12 = 1

MULT20015 Elements of Quantum Computing
Lecture 2

Examples – cont.

Y

Measurement

|1ñ

|0ñ

The probability of getting a

“0” outcome is given by:

Prob[“0”] = (0.775)2 = 0.6

The probability of getting a

“1” outcome is given by:

Prob[“1”] = (0.633)2 = 0.4

measurement

? or

|a0|

Complex amplitudes:

Bubble: Brocken commons.wikimedia.org
Bursting bubble: wallpaperswide.com

𝜓 = 0.775𝑒”# 0 + 0.633 𝑒$”#/& 1

𝜃0 |a1| 𝜃1

|a0|2 = (0.775)2 = 0.6

|a0|2 = (0.633)2 = 0.4

MULT20015 Elements of Quantum Computing
Lecture 2

2.3 Basic linear algebra: ket and matrix notation

MULT20015
Lecture 2

MULT20015 Elements of Quantum Computing
Lecture 2

Dirac’s “ket” notation

• A lot of quantum mechanics comes down to linear algebra (matrices and vectors), but uses
a slightly different notation introduced by Dirac:

| i A “ket” is a element of a linear vector spaceover ℂ which represents the state of a qubit.

We write the general state of a qubit in “ket” notation as:

Where the quantum amplitudes a0 and a1 are complex numbers.

| i = a0 |0i+ a1 |1i =

a0
a1

The wave-like attributes of quantum systems are encapsulated by
amplitudes represented as complex numbers…

Ignoring subscripts: a = x + i y where x=Re[a] and y=Im[a]

MULT20015 Elements of Quantum Computing
Lecture 2

Linear Algebra and Dirac notation

|0i =

1
0

|1i =

0
1

Computational basis states
General qubit state

a0 and a1 are “amplitudes”

For qubits we can use column vectors to represent a convenient basis for kets:

| i = a0 |0i+ a1 |1i =

a0
a1

| i = a0 |0i+ a1 |1i =

a0
a1

�| i = a0 |0i+ a1 |1i =

a0
a1

a0, a1 2 C

MULT20015 Elements of Quantum Computing
Lecture 2

Dual vectors

A “bra” is a row vector .h |

For a qubit state,

we define the corresponding dual vector
to be:

| i =

a0
a1

a0, a1 2 C

| i = a0 |0i+ a1 |1i =

a0
a1

a0, a1 2 C

h | = [ a⇤0 a

1 ]

MULT20015 Elements of Quantum Computing
Lecture 2

Inner Product

A “braket” is an inner product
(analogous to dot product for vectors in 3D)h |�i

We can define an inner product between them

For two quantum states | i =

a
b


|�i =


c
d


,

h |�i ⌘ h ||�i

=

a⇤ b⇤

⇤  c
d

= a⇤c+ b⇤d

MULT20015 Elements of Quantum Computing
Lecture 2

Orthogonality

Two states are orthogonal if their inner product is zero

h |�i = 0

h0|1i =

1 0

⇤  0
1

= 0

Computational basis
states are orthogonal

For and |+i =
|0i+ |1i

p
2

|�i =
|0i � |1i

p
2

For

h+|�i =
1

2


1 1

⇤  1
�1

= 0

These states are also orthogonal

|0i
AAACAXicbVBNS8NAEJ3Ur1q/qh69LBbBU0lEsMeCF48VbCu0oWy2k3bpZhN2N0IJPfkLvOov8CZe/SX+AP+HmzYH2/pg4PHeDDPzgkRwbVz32yltbG5t75R3K3v7B4dH1eOTjo5TxbDNYhGrx4BqFFxi23Aj8DFRSKNAYDeY3OZ+9wmV5rF8MNME/YiOJA85o8ZK3f4ETebOBtWaW3fnIOvEK0gNCrQG1Z/+MGZphNIwQbXueW5i/Iwqw5nAWaWfakwom9AR9iyVNELtZ/NzZ+TCKkMSxsqWNGSu/p3IaKT1NApsZ0TNWK96ufif10tN2PAzLpPUoGSLRWEqiIlJ/jsZcoXMiKkllClubyVsTBVlxia0tCVQ1CaT5+KtprBOOld1z61799e1ZqNIqAxncA6X4MENNOEOWtAGBhN4gVd4c56dd+fD+Vy0lpxi5hSW4Hz9AgLOl9Y=AAACAXicbVBNS8NAEJ3Ur1q/qh69LBbBU0lEsMeCF48VbCu0oWy2k3bpZhN2N0IJPfkLvOov8CZe/SX+AP+HmzYH2/pg4PH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KtprBOOld1z61799e1ZqNIqAxncA6X4MENNOEOWtAGBhN4gVd4c56dd+fD+Vy0lpxi5hSW4Hz9AgRml9c=AAACAXicbVBNS8NAEJ3Ur1q/qh69LBbBU0lEsMeCF48VbCu0oWy2k3bpZhN2N0IJPfkLvOov8CZe/SX+AP+HmzYH2/pg4PHeDDPzgkRwbVz32yltbG5t75R3K3v7B4dH1eOTjo5TxbDNYhGrx4BqFFxi23Aj8DFRSKNAYDeY3OZ+9wmV5rF8MNME/YiOJA85o8ZK3f4ETebNBtWaW3fnIOvEK0gNCrQG1Z/+MGZphNIwQbXueW5i/Iwqw5nAWaWfakwom9AR9iyVNELtZ/NzZ+TCKkMSxsqWNGSu/p3IaKT1NApsZ0TNWK96ufif10tN2PAzLpPUoGSLRWEqiIlJ/jsZcoXMiKkllClubyVsTBVlxia0tCVQ1CaT5+KtprBOOld1z61799e1ZqNIqAxncA6X4MENNOEOWtAGBhN4gVd4c56dd+fD+Vy0lpxi5hSW4Hz9AgRml9c=AAACAXicbVBNS8NAEJ3Ur1q/qh69LBbBU0lEsMeCF48VbCu0oWy2k3bpZhN2N0IJPfkLvOov8CZe/SX+AP+HmzYH2/pg4PHeDDPzgkRwbVz32yltbG5t75R3K3v7B4dH1eOTjo5TxbDNYhGrx4BqFFxi23Aj8DFRSKNAYDeY3OZ+9wmV5rF8MNME/YiOJA85o8ZK3f4ETebNBtWaW3fnIOvEK0gNCrQG1Z/+MGZphNIwQbXueW5i/Iwqw5nAWaWfakwom9AR9iyVNELtZ/NzZ+TCKkMSxsqWNGSu/p3IaKT1NApsZ0TNWK96ufif10tN2PAzLpPUoGSLRWEqiIlJ/jsZcoXMiKkllClubyVsTBVlxia0tCVQ1CaT5+KtprBOOld1z61799e1ZqNIqAxncA6X4MENNOEOWtAGBhN4gVd4c56dd+fD+Vy0lpxi5hSW4Hz9AgRml9c=

“Z-basis” (computational basis) “X-basis” (+/- states)

MULT20015 Elements of Quantum Computing
Lecture 2

Outer Product

is an outer product

We can define an outer (tensor) product between them:

For two quantum states | i =

a
b


|�i =


c
d


,

| i h�|
AAACEXicbZDLSsNAFIYn9VbrLSqu3AwWwVVJRLDLghuXFewFmlAm00k7dDIJMydCCXkKn8CtPoE7cesT+AC+h5M2C9v6w4Gf/5zDOXxBIrgGx/m2KhubW9s71d3a3v7B4ZF9fNLVcaoo69BYxKofEM0El6wDHATrJ4qRKBCsF0zvin7viSnNY/kIs4T5ERlLHnJKwERD+8ybMsi8RPMce4Eixk54PrTrTsOZC68btzR1VKo9tH+8UUzTiEmggmg9cJ0E/Iwo4FSwvOalmiWETsmYDYyVJGLaz+bv5/jSJCMcxsqUBDxP/25kJNJ6FgVmMiIw0au9IvyvN0ghbPoZl0kKTNLFoTAVGGJcsMAjrhgFMTOGUMXNr5hOiCIUDLGlK4aM4VRwcVcprJvudcN1Gu7DTb3VLAlV0Tm6QFfIRbeohe5RG3UQRRl6Qa/ozXq23q0P63MxWrHKnVO0JOvrF/JhnlE=AAACEXicbZDLSsNAFIYn9VbrLSqu3AwWwVVJRLDLghuXFewFmlAm00k7dDIJMydCCXkKn8CtPoE7cesT+AC+h5M2C9v6w4Gf/5zDOXxBIrgGx/m2KhubW9s71d3a3v7B4ZF9fNLVcaoo69BYxKofEM0El6wDHATrJ4qRKBCsF0zvin7viSnNY/kIs4T5ERlLHnJKwERD+8ybMsi8RPMce4Eixk54PrTrTsOZC68btzR1VKo9tH+8UUzTiEmggmg9cJ0E/Iwo4FSwvOalmiWETsmYDYyVJGLaz+bv5/jSJCMcxsqUBDxP/25kJNJ6FgVmMiIw0au9IvyvN0ghbPoZl0kKTNLFoTAVGGJcsMAjrhgFMTOGUMXNr5hOiCIUDLGlK4aM4VRwcVcprJvudcN1Gu7DTb3VLAlV0Tm6QFfIRbeohe5RG3UQRRl6Qa/ozXq23q0P63MxWrHKnVO0JOvrF/JhnlE=AAACEXicbZDLSsNAFIYn9VbrLSqu3AwWwVVJRLDLghuXFewFmlAm00k7dDIJMydCCXkKn8CtPoE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KkkLOrM61kkjUtP9bLAAbUXndcpE6SXBO8Jifc2EgxwmxMNO2kc7JZduolksheMoF2KwjuXB6NseEixJ1AX6PkqTq23sqndF+r1z0jve1XfXdqOVaTk/YHNM91ab9QTSM1sHvgrgDA9bF1bT/V2SlqguwqIz0fhJHFSZUFbUy0PZE7aGSaiFnMCFoJf00adYOtPwdMRnPS0fLIl+z/ysaWXi/LFK6WUic+93cirwvN6kxP0sabasawapNo7w2HEu+spNn2oFCsyQgldP0Vq7m0kmFZPpWFzKXrG5pLvHuFO6C8ekwjobxlw+Di7NuQgfsDXvLTljMPrIL9pldsRFTwacgC4rAhuPwe/gj/Lm5Ggad5jXbivDXP3Gr4YU=AAAC1HicdVFNbxMxEPUuXyXlI5QjF4uIquIQ7VZI9FJUqReORSJppXiJvN7ZxIrXu7JnK0XLnhBXfh/8AP4Hk2QPJG1GsvX8xm/GnpdWRnuMoj9B+ODho8dPDp72Dp89f/Gy/+po7MvaKRip0pTuJpUejLYwQo0GbioHskgNXKeLy1X++hac16X9issKkkLOrM61kkjUtP9bLAAbUXndcpE6SXBO8Jifc2EgxwmxMNO2kc7JZduolksheMoF2KwjuXB6NseEixJ1AX6PkqTq23sqndF+r1z0jve1XfXdqOVaTk/YHNM91ab9QTSM1sHvgrgDA9bF1bT/V2SlqguwqIz0fhJHFSZUFbUy0PZE7aGSaiFnMCFoJf00adYOtPwdMRnPS0fLIl+z/ysaWXi/LFK6WUic+93cirwvN6kxP0sabasawapNo7w2HEu+spNn2oFCsyQgldP0Vq7m0kmFZPpWFzKXrG5pLvHuFO6C8ekwjobxlw+Di7NuQgfsDXvLTljMPrIL9pldsRFTwacgC4rAhuPwe/gj/Lm5Ggad5jXbivDXP3Gr4YU=

…in case we need it later…

MULT20015 Elements of Quantum Computing
Lecture 2

2.4 State representation in the Quantum User Interface (QUI)

MULT20015
Lecture 2

MULT20015 Elements of Quantum Computing
Lecture 2

QUI: registration

The QUI is accessed through a web-based interface.

Step 1: Open a web browser (preferably Google Chrome or
Firefox), and go to QUIspace.org.

Step 2: Click on

Step 3: Sign up. You will need to create an account to
access QUI for the first time.

Follow the steps to create your account (email address and
answering a few simple questions).

Step 4: Once you have signed-up, start the QUI!

The QUI is a quantum computer programming and simulation tool developed at the University
of Melbourne, used in research and teaching.

Prior to practice class 1: register for the QUI as per above (you must use your UoM email)

In class 1: switch on expanded capabilities (number of qubits,…)

MULT20015 Elements of Quantum Computing
Lecture 2

The QUI structure

• you create a quantum program (“circuit”)
• execute (“compute”) on the UoM quantum computer simulator
• the results are sent back to your QUI session to display

Library of logical
operations

Plotting
controls

Compute – runs program

quantum state visualization at slider

qubits, initialised
in the state |0ñ,
with time lines

left to right

Program editor – place logic
operations on the qubits to

create a “circuit”

State information
card (SIC)

showing more detail
from the plot

quantum computer
simulator at UoM

More details: QUIspace.org

MULT20015 Elements of Quantum Computing
Lecture 2

Complex numbers in the QUI

Quantum User Interface (QUI) – UoM programming and simulation environment.

Quantum program in upper panel

Lower panel gives the mathematical representation
of the quantum state – i.e. the complex amplitudes
(at the time-step corresponding to the vertical slider)

a0 a1

𝑎
𝜃

𝑎

0o

90o

180o

270o -90o

-180o

! | i = |a0|ei✓0 |0i+ |a1|ei✓1 |1i

| i = a0 |0i+ a1 |1i =

a0
a1

MULT20015 Elements of Quantum Computing
Lecture 2

“Ket” and “Matrix” representations of quantum states

Consider the following state in the QUI environment:

a0 a1

! | i = |a0|ei✓0 |0i+ |a1|ei✓1 |1i

| i = a0 |0i+ a1 |1i =

a0
a1

𝑎’ = 0.816 × 𝑒$(‘.*+’ ,)

𝑎” = 0.577 × 𝑒$(.’.+” ,)

“ket” notation (amplitudes in QUI polar form)

“matrix” notation (amplitudes in QUI polar form)

𝑎’| ⟩0 + 𝑎”| ⟩1 →
0.816 × 𝑒$(‘.*+’ ,)
0.577 × 𝑒$(.’.+” ,)

𝑎’| ⟩0 + 𝑎”| ⟩1 →
𝑎’
𝑎”

MULT20015 Elements of Quantum Computing
Lecture 2

Amplitudes in the QUI

In the QUI, phase is represented using an angular colour map, and probability by histogram,
e.g. consider two different single-qubit states:

Quantum systems actually have wave-like properties. The complex state
amplitudes a0 and a1 represent the magnitude and phase of this wave.

ei✓ = cos ✓ + i sin ✓
AAACJnicbVDLSgNBEJyNrxhfUY9eBoMgCmFXBHMRAl48RjAPSGKYnXSSIbOzy0yvEJb8g5/hF3jVL/Am4s2L/+Ek2YNJLBioruqme8qPpDDoul9OZmV1bX0ju5nb2t7Z3cvvH9RMGGsOVR7KUDd8ZkAKBVUUKKERaWCBL6HuD28mfv0RtBGhusdRBO2A9ZXoCc7QSp38GTwkgrZwAMjG9Jq2eGjSkp5T6xih0rqTL7hFdwq6TLyUFEiKSif/0+qGPA5AIZfMmKbnRthOmEbBJYxzrdhAxPiQ9aFpqWIBmHYy/dOYnlilS3uhtk8hnap/JxIWGDMKfNsZMByYRW8i/uc1Y+yV2olQUYyg+GxRL5YUQzoJiHaFBo5yZAnjWthbKR8wzTjaGOe2+JoNAcc2F28xhWVSuyh6btG7uyyUS2lCWXJEjskp8cgVKZNbUiFVwskTeSGv5M15dt6dD+dz1ppx0plDMgfn+xd4BaUvAAACJnicbVDLSgNBEJyNrxhfUY9eBoMgCmFXBHMRAl48RjAPSGKYnXSSIbOzy0yvEJb8g5/hF3jVL/Am4s2L/+Ek2YNJLBioruqme8qPpDDoul9OZmV1bX0ju5nb2t7Z3cvvH9RMGGsOVR7KUDd8ZkAKBVUUKKERaWCBL6HuD28mfv0RtBGhusdRBO2A9ZXoCc7QSp38GTwkgrZwAMjG9Jq2eGjSkp5T6xih0rqTL7hFdwq6TLyUFEiKSif/0+qGPA5AIZfMmKbnRthOmEbBJYxzrdhAxPiQ9aFpqWIBmHYy/dOYnlilS3uhtk8hnap/JxIWGDMKfNsZMByYRW8i/uc1Y+yV2olQUYyg+GxRL5YUQzoJiHaFBo5yZAnjWthbKR8wzTjaGOe2+JoNAcc2F28xhWVSuyh6btG7uyyUS2lCWXJEjskp8cgVKZNbUiFVwskTeSG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! | i = |a0|ei✓0 |0i+ |a1|ei✓1 |1i

a = Re[a] + i Im[a] = |a|ei✓ !
|a| =

p
Re[a]2 + Im[a]2

✓ = tan�1 (Im[a]/Re[a])

! | i = |a0|ei✓0 |0i+ |a1|ei✓1 |1i

! | i = |a0|ei✓0 |0i+ |a1|ei✓1 |1i

|a0|2

|a1|2
! | i = |a0|ei✓0 |0i+ |a1|ei✓1 |1i

! | i = |a0|ei✓0 |0i+ |a1|ei✓1 |1i
|a0|2

|a1|2

✓0 = 0 ✓0 = ⇡/2✓1 = ⇡/4 ✓1 = 3⇡/4

state-1 state-2

MULT20015 Elements of Quantum Computing
Lecture 2

QUI: measurement operation

In the QUI the measurement operation looks like this:

By default, measurements are made in the “computational basis” (i.e. 0 or 1).

When you run the circuit, the QUI will randomly select a measurement outcome
based on the amplitudes of the state at that point:

In some circuit diagrams notation is:

Prob =

Prob =

(but we like QUI’s spinning lottery symbol)

| i = a0 |0i+ a1 |1i =

a0
a1

◆ |a0|
2

|a1|2

MULT20015 Elements of Quantum Computing
Lecture 2

Practice classes (aka “tutorials”)

Review and practice lecture concepts/content through QUI exercises.

Practice class sheets -> download from LMS and bring hard copy, and/or access in tutorial

Work through the exercises individually and/or groups

Demonstrator in prac-class there to help -> ask lots of questions!

MULT20015 Elements of Quantum Computing
Lecture 2

Week 1

Lecture 1
1.1 A very brief history of computing
1.2 The quantum world and quantum computing

Lecture 2
2.1 The mathematics of quantum states
2.2 Complex numbers and quantum amplitudes
2.3 Basic linear algebra: ket and matrix notation
2.4 State representation in the QUI

Practice class 1
The Quantum User Interface (QUI), lecture 1 & 2 review exercises

MULT20015 Elements of Quantum Computing
Lecture 2

Subject outline

Lecture topics (by week)

1 – Introduction to quantum computing and maths basics
2 – Single qubit representations and logic operations
3 – Two qubit states and logic gates
4 – Multi-qubit states and quantum arithmetic
5 – Basic quantum algorithms
6 – Period finding, cryptography and quantum factoring
7 – Shor’s algorithm, post-quantum crypto, quantum key distribution
8 – Quantum search algorithms
9 – Grover search applications, optimisation problems
10 – Solving optimisation problems on quantum computers
11 – Applications in quantum machine learning
12 – Real quantum computer devices

Assignment schedule:
#1: Hand out in Week 2
#2: Hand out in Week 8