CS代考 MULT90063 Introduction to Quantum Computing

MULT90063 Introduction to Quantum Computing
Week by week
(1) Introduction to quantum computing
(2) Single qubit representation and operations

Copyright By PowCoder代写 加微信 powcoder

(3) Two and more qubits
(4) Simple quantum algorithms
(5) Quantum search (Grover’s algorithm)
(6) Quantum factorization (Shor’s algorithm)
(7) Quantum supremacy and noise
(8) Programming real quantum computers (IBM Q)
(9) Quantum error correction (QEC)
(10) QUBO problems and Adiabatic Quantum Computation (AQC)
(11) Variational/hybrid quantum algorithms (QAOA and VQE)
(12) Solving linear equations, QC computing hardware

MULT90063 Introduction to Quantum Computing
1.1 A very brief history of computing
1.2 The quantum world and quantum computing
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

MULT90063 Introduction to Quantum Computing
Today: The Mathematics of Quantum Computing
At first the mathematics of quantum computing can look daunting, it largely comes down to two familiar areas:
Physicists have developed a slightly different notation for expressing Linear Algebra, known as Dirac notation, which is very useful for expressing quantum states and operations.
In today’s lecture we will review these areas, and put what we have learnt so far (about quantum computing) in this context.
(1) Complex Numbers
(2) Linear algebra (ie. matrices and vectors)

nm Tri-Gate Transistor
MULT90063 Introduction to Quantum Computing
Lecture 1 recap
Gates Fins
quantum superposition
|1ñ Y |0ñ Superposition
measurement/observation
state collapse ® random outcome
Bubble: Brocken commons.wikimedia.org Bursting bubble: wallpaperswide.com
on “1” off “0”
Only “0” or “1” at a time in any given physical representation (transistor)
Notation for bits: Classical ® 0 and 1 Quantum ® |0ñ and |1ñ
One electron in quantum superposition.

MULT90063 Introduction to Quantum Computing
2.1 The mathematics of quantum states

MULT90063 Introduction to Quantum Computing
Quantum bits and probabilities
A qubit in a particular quantum superposition,
say with more 0 than 1 (as many times as we like)
|0ñY and |1ñ
quantum superposition
|1ñ measurement
repeat the process…
Analyse all outcomes
“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
Quantum systems are stochastic
Bubble: Brocken commons.wikimedia.org Bursting bubble: wallpaperswide.com

MULT90063 Introduction to Quantum Computing
Qubits – how we describe them mathematically
A qubit, e.g. an electron in an atom
The qubit can be in |0ñ or |1ñ or in a superposition. The overall quantum state is denoted by |𝜓ñ
First let’s look at the case of no quantum superposition: | i = |0i or | i = |1i i.e. definitive scenarios, one state or the other (no surprises)
| i = |0i The electron is in the ground state
| i=|1i Outcome always “1” ® probability: Prob[“1”] = 1.0
Before: measurement
Collapsesto:
Outcome always “0” ® probability: Prob[“0”] = 1.0
The electron is in the excited state
Before: | i=|1i measurement
Collapsesto:

MULT90063 Introduction to Quantum Computing
Qubit maths – quantum superposition
|𝜓ñ is a quantum superposition of |0ñ and |1ñ
Maths: we describe |𝜓ñ as a linear combination of basis states over the linear space (|0ñ,|1ñ):
| i=a0|0i+a1|1i=✓ a0 ◆ a1
• a0 and a1 are the “quantum state amplitudes” (over C -> complex numbers) ® tell us how much of |0ñ and |1ñ are in the superposition |𝜓ñ
• modulussquaredoftheamplitudes,|a0|2and|a1|2®probabilitiesofmeasuring“0”or“1” • total probability must be 1, so we have the “normalization” condition: |a0|2 + |a1|2 = 1

MULT90063 Introduction to Quantum Computing
Measurement summary: Born’s Rule
The probability of measuring a quantum computer in a state |𝑖⟩ , with amplitude 𝑎! is given by 𝑎! “.

MULT90063 Introduction to Quantum Computing
Assume for now the amplitudes are real:
Let’s prepare a qubit in that particular “60:40” superposition
|𝜓ñ = (0.775) |0ñ + (0.633) |1ñ a0 a1
Measurement
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
Bubble: Brocken commons.wikimedia.org Bursting bubble: wallpaperswide.com
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ñ

MULT90063 Introduction to Quantum Computing
Assume the amplitudes a0 and a1 are real. Quantum state (before) Probability measuring 0
Probability measuring 1
Histogram (many shots)
5 |0ñ |1ñ state
| i=a0|0i+a1|1i= a1 a02
a02 + a12 = 1
11 ✓1◆21 ✓1◆21 1. | i=p2|0i+p2|1i p2 =2 p2 =2 0.
5 |0ñ |1ñ state
1 p3 ✓1◆2 1 p3!2 3 1. | i=2|0i+ 2 |1i 2 =4 = 0
|0ñ |1ñ state
probability probability probability

MULT90063 Introduction to Quantum Computing
Examples – cont.
Complex amplitudes:
𝜓 = 0.775𝑒!” 0 + 0.633 𝑒#!”/% 1 |a0| 𝜃0 |a1| 𝜃1
Bubble: Brocken commons.wikimedia.org Bursting bubble: wallpaperswide.com
Measurement
The probability of getting a
“0” outcome is given by:
|a0|2 = (0.775)2 = 0.6 Prob[“0”] = (0.775)2 = 0.6
The probability of getting a
“1” outcome is given by:
|a0|2 = (0.633)2 = 0.4 Prob[“1”] = (0.633)2 = 0.4
measurement

MULT90063 Introduction to Quantum Computing
2.2 Complex numbers and quantum amplitudes

MULT90063 Introduction to Quantum Computing
Complex numbers: basics
| i=a0|0i+a1|1i=wherea0anda1arecomplexnumbers.
a1 Complex numbers recap:
1 -2 -1 -1
𝑧 = 1 + 2𝑖
𝑧 = 1 − 2𝑖
Conjugate: 𝑧=𝑥+𝑖𝑦→𝑧∗ =𝑥−𝑖𝑦
𝑧𝑧∗ = 𝑥+𝑖𝑦 𝑥−𝑖𝑦 =𝑥” −𝑖𝑥𝑦+𝑖𝑦𝑥+𝑦” =𝑥” +𝑦” i.e.𝑧𝑧∗ =𝑥” +𝑦” =|𝑧|” i.e. 𝑧 = 𝑥” +𝑦”
𝑧 = 𝑥 + 𝑖𝑦
𝑧 = −2 + 𝑖
𝑧 = 𝑥 + 𝑖𝑦
“Real” part is denoted by Re[𝑧] = 𝑥 “Imaginary” part is denoted by Im[𝑧] = 𝑦
𝑧 = −2 − 2𝑖 -2 𝑧# +𝑧” =(𝑥#+𝑖𝑦#)+(𝑥”+𝑖𝑦”)= 𝑥# +𝑥” +𝑖 𝑦# +𝑦”
Multiplication: 𝑧#𝑧” = (𝑥#+𝑖𝑦#) 𝑥” + 𝑖𝑦” = 𝑥#𝑥” − 𝑦#𝑦” + 𝑖(𝑥#𝑦” + 𝑦#𝑥”)
|z| is referred to as the “modulus” or “magnitude”
i= −1 ,andso𝑖” =−1

MULT90063 Introduction to Quantum Computing
Complex numbers: polar notation
z = 𝑥 + 𝑖𝑦 𝑧 sin𝜃
Cartesian: z = x + iy in terms of x=Re[z] and y=Im[z] Polar: z = 𝑟 (cos 𝜃 + 𝑖 sin 𝜃) = 𝑟 𝑒!%
“phase” 𝜃 angle
NBidentity:𝑒!% =cos𝜃+𝑖sin𝜃,𝑟= 𝑧 = 𝑥” +𝑦”
In the QUI, we use “polar notation”. e.g. for amplitudes in the state: | i = a0 |0i + a1 |1i = ✓ a0
Ignoring subscripts, consider a complex amplitude a
|a| = pRe[a]2 + Im[a]2 ✓ = tan1 (Im[a]/Re[a])
a=Re[a]+iIm[a]=|a|ei✓ !
For each complex amplitude we have a magnitude and phase angle:
| i=a |0i+a |1i=✓ a0 ◆
!| i=|a0|e 0 |0i+|a1|e 1 |1i a1

MULT90063 Introduction to Quantum Computing
2.3 Basic linear algebra: ket and matrix notation

MULT90063 Introduction to Quantum Computing
Operations and states as matrices and vectors
As we will see:
• Quantum states are represented as (complex) vectors.
• Quantum operations are represented as (complex) matrices.
To perform an operation on a quantum state, multiply a matrix by a vector. More on this next lecture.

MULT90063 Introduction to Quantum Computing
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:
A “ket” is an element of a linear vector space over C which represents the state of a qubit.
We write the general state of a qubit in “ket” notation as:  a0 | i=a0|0i+a1|1i= a1
Where the quantum amplitudes a0 and a1 are complex numbers.
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]

MULT90063 Introduction to Quantum Computing
Linear Algebra and Dirac notation
| i=a0|0i+a1|1i=✓ a0 ◆ a1
For qubits we can use column vectors to represent a convenient basis for kets:
|0i= | i=a0|0i+a1|1i= a
| 1 i =  01 Computational basis states
| i=a |0i+a |1i= a 0 , a 1 2 C
General qubit state
a0 and a1 are “amplitudes”
a0 0 0 11a1

MULT90063 Introduction to Quantum Computing
Dual vectors
A “bra” is a row vector .
| i=a0|0i+a1|1i= a0 For a qubit state, a1
| i =  a0 a1
a0,a1 2C we define the corresponding dual vector
a0,a1 2C h|=[a⇤0 a⇤1]

MULT90063 Introduction to Quantum Computing
Inner Product
A “braket” is an inner product
(analogous to dot product for vectors in 3D)
For two quantum states
We can define an inner product between them
h |i⌘h ||i  = ⇥ a ⇤ b ⇤ ⇤ dc
= a⇤c + b⇤d
|i=ab, |i=dc

MULT90063 Introduction to Quantum Computing
Orthogonality
Two states are orthogonal if their inner product is zero h |i=0
“Z-basis” (computational basis) For |0iand |1i 
“X-basis” (+/- states)
|0i + |1i For |+i= p2
|0i|1i |i= p2
h+|i=1⇥1 1⇤ 1 2 1
These states are also orthogonal
h0|1i= 1 0 01 =0
Computational basis states are orthogonal

MULT90063 Introduction to Quantum Computing
Outer Product
is an outer product
|i=ab, |i=dc |ih|=ab⌦⇥c⇤ d⇤⇤
For two quantum states
We can define an outer (tensor) product between them:
=ac⇤ ad⇤ bc⇤ bd⇤
…in case we need it later…

MULT90063 Introduction to Quantum Computing
Matrix transpose
To find the transpose of a matrix, exchange the rows and the columns. In terms of matrix elements:
𝐴’ =𝐴 !& &!
For example:
12T 13 34=24
First row has become the first column, second row the second column.

MULT90063 Introduction to Quantum Computing
Matrix Adjoint
To find the “Hermitian adjoint” of a matrix (also known as the conjugate transpose), exchange the rows and the columns and also take the complex conjugate. In terms of matrix elements:
*∗ A() = 𝐴&!
For example:
 1 2i†= 1 3i 3+i4 2i4
First row has become the first column, second row the second column, and we’ve taken the complex conjugate.

MULT90063 Introduction to Quantum Computing
Unitary Matrices
A matrix, U, is called a “unitary” matrix if 𝑈*𝑈 = 𝑈𝑈* = 𝐼.
Knowing a matrix is unitary is makes finding the inverse matrix very easy.
All of the operations on a quantum computer (except for measurement) will
turn out to be unitary.
1  1 i 1  1 i † p2i1·p2i1
1 1 i 1 1 i =p2 i 1 ·p2 i 1

MULT90063 Introduction to Quantum Computing
Hermitian Matrices
A matrix, A, is called a “Hermitian” matrix if 𝐴* = 𝐴.
An interesting fact about Hermitian matrices is that their eigenvalues are real.
Measurements on quantum computers are closely related to Hermitian matrices (as we will see in coming lectures).
X=0 1 Y=0 i Z=1 0 1 0 i 0 0 1
Three examples of Hermitian matrices:

MULT90063 Introduction to Quantum Computing
Bra-ket Notation
ket, | i =  ab | 0 i =  10
| 1 i =  01 h | = [ a ⇤0
Operator, U
Column|veicto=r,  ab | 0 i =  10
| 1 i =  01
R o w v e c t o r , ⇥ a ⇤ b ⇤ ⇤
Unitary matrix,

MULT90063 Introduction to Quantum Computing
2.4 State representation in the Quantum User Interface (QUI)

MULT90063 Introduction to Quantum Computing
QUI: registration
The QUI is a quantum computer programming and simulation tool developed at the University of Melbourne, used in research and teaching.
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!
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,…)

MULT90063 Introduction to Quantum Computing
The QUI structure
• youcreateaquantumprogram(“circuit”)
• execute(“compute”)ontheUoMquantumcomputersimulator • theresultsaresentbacktoyourQUIsessiontodisplay
qubits, initialised in the state |0ñ, with time lines left to right
State information card (SIC) showing more detail from the plot
More details: QUIspace.org
quantum state visualization at slider
Program editor – place logic operations on the qubits to create a “circuit”
Library of logical operations
Compute – runs program
Plotting controls
quantum computer simulator at UoM

MULT90063 Introduction to Quantum Computing
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)
| i=a0|0i+a1|1i=✓ a0 ◆ a1
! | i = |a0|ei✓0 |0i + |a1|ei✓1 |1i

MULT90063 Introduction to Quantum Computing
“Ket” and “Matrix” representations of quantum states
Consider the following state in the QUI environment:
! | i = |a0|ei✓0 |0i + |a1|ei✓1 |1i 𝑎+ = 0.816 × 𝑒!(+../+ 0)
𝑎# = 0.577 × 𝑒!(2+./++ 0)
“matrix” notation (amplitudes in QUI polar form)
0.816 × 𝑒!(+../+ 0) 0.577 × 𝑒!(2+./++ 0)
“ket” notation (amplitudes in QUI polar form)
| i=a0|0i+a1|1i=✓ a0 ◆ a1
𝑎+|0⟩ + 𝑎#|1⟩ →
𝑎+|0⟩ + 𝑎#|1⟩ →

MULT90063 Introduction to Quantum Computing
Amplitudes in the QUI
Quantum systems actually have wave-like properties. The complex state amplitudes a0 and a1 represent the magnitude and phase of this wave.
Recall: a = Re[a] + i Im[a] = |a|ei✓ ! |a| = Re[a]2 + Im[a]2
✓a0◆ i✓p i✓
| i=a0|0i+a1|1i=!| i=|a0|e 0 |0i+|a1|e 1 |1i ✓
ei✓ =cos✓+isin✓ In the QUI, phase is represented using an angular colour map, and probability by histogram,
e.g. two different single-qubit states:
✓ = tan1 (Im[a]/Re[a])
Probability i✓0 i✓1 i✓0 i✓1 !| i=|a0|e |0i+|a1|e |1i !| i=|a0|e |0i+|a1|e |1i
!| i=|a |ei✓0 |0i+|a |ei✓1 |1i
!| i=|a0|ei✓0 |0i+|a1|ei✓1 |1i |a1|2
|a0|2 0 1 ✓0 =0

MULT90063 Introduction to Quantum Computing
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:
| i=a0|0i+a1|1i=✓ a0 ◆ a1
In some circuit diagrams notation is:
Prob = |a0|2
Prob = |a1|2 (but we like QUI’s spinning lottery symbol)

MULT90063 Introduction to Quantum Computing
Practice labs (aka “tutorials”)
Review and practice lecture concepts/content through QUI exercises.
Lab sheets -> download from LMS and bring hard copy, and/or access in tutorial Work through the exercises individually and/or groups
Ask them lots of questions!

MULT90063 Introduction to Quantum Computing
1.1 A very brief history of computing
1.2 The quantum world and quantum computing
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

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com