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
3.1 The Bloch Sphere representation for qubits
3.2 Quantum operations on qubits
3.3 Qubit gates in matrix form and the Pauli matrices
4.1 The Pauli gates X, Y and Z and the QUI
4.2 Qubit operations around non-cartesian axes – H and R gates 4.3 Matrix exponential and arbitrary rotations
Practice class 2
Bloch sphere and single qubit logic operations on the QUI
MULT90063 Introduction to Quantum Computing
Lecture 3 recap
Qubits on the Bloch sphere:
!B=0, “B=0
|i |0i |1i
p !B=#/2,”B=#
00 1 1 a1 2
|0i i|1i
a0✓B || ii=a ||0i+a |a1ii=! cos
|0i + i|1i
p2 !B=#/2,”B=#/2
|0i + sin U |𝜓!⟩
!B=#/2,”B=3#/2 p2
Operations on qubit states:
!B =#/2, “B=0
Ket notation: e.g. X-gate
a0 |0i + a1 |1i ! a1 |0i + a0 |1i
|1i !B=#,”B=0 X
|1i Operations: matrix notation
|&#⟩ = * |&⟩
!”# =2×2 !” !$# matrix !$
“ h Y X” i a x i s
“ h Y X” i a x i s
X-gate: rotate around X-axis by !
Y-gate: rotate around Y-axis by !
“ h Y X” i a x i s Z-gate: rotate around Z-axis by !
MULT90063 Introduction to Quantum Computing
Recap: Linear Algebra and Dirac notation
✓a0◆ i✓ i✓
| i=a0|0i+a1|1i=!| i=|a0|e 0 |0i+|a1|e 1 |1i
|0i= | i=a0|0i+a1|1i= a
| 1 i = 01 Computational basis states
| i=a0|0i+a1|1i= a0 a1
| i=a |0i+a |1i= a 0 , a 1 2 C
General qubit state
a0 and a1 are “amplitudes”
Prob[measure “0”] = |a0|2 Prob[measure “1”] = |a1|2
a0 0 0 11a1
MULT90063 Introduction to Quantum Computing
The Pauli gates X, Y and Z and the QUI
MULT90063 Introduction to Quantum Computing
Recap: the “Cartesian” quantum operations: X, Y, Z
We can specify the state moving across the Bloch sphere in many ways, but the “Cartesian” operations are very simple – a rotation of 𝜋 (180o) about any of X, Y, or Z axes:
“X” axis |#$⟩
NB. Perspectives not 100% accurate!
| i!| 0i hYi
hY i “hYX”iaxis
hXi “Y” axis
Y-gate: rotate around Y-axis by !
X-gate: rotate around X-axis by !
|1i “hYX”iaxis
Z-gate: rotate around Z-axis by ! |1i
The Cartesian rotations are usually referred to as the “Pauli” operators X, Y, Z
MULT90063 Introduction to Quantum Computing
Recap: the X gate in matrix form
Action of X-gate in “ket” form: a0 |0i + a1 |1i ! a1 |0i + a0 |1i
What is the X-gate in “matrix” form?
Recall“matrix” 1 0 a0 | i=a0
notation: |0i= 0 |1i= |1i=a0|0i+a1|1i= a1 a1
Operations in matrix representation: Action of X-gate in matrix form:
|𝜓!⟩ = 𝑈 |𝜓⟩ 𝑎!# =2×2 𝑎!
𝑎 0⟩+𝑎 1⟩= 𝑎” ⟶𝑎 0⟩+𝑎 1⟩= 𝑎# ” # 𝑎# # ” 𝑎”
𝑎! X 𝑎” i.e. 𝑎”⟶𝑎!
In matrix notation, in general:
X𝑎”=0 1 𝑎”=𝑎# 𝑎# 10𝑎# 𝑎”
MULT90063 Introduction to Quantum Computing
X Gate (the X operator): 𝜋 around X-axis
Circuit symbol:
Matrix representation: X = 0 1 x
10 X(a0|0i+a1|1i)= 0 1 a0 = a1
10a1 a0 i.e. X(a0|0i+a1|1i)=a1|0i+a0|1i
Actiononketstates: a0|0i+a1|1i!a1|0i+a0|1i i Im
QUI example:
p3 |0i+ i |1i 2 2
complex amplitudes
3 |1i ↵↵|0|0ii++ |1|i1i!!↵↵|1|i1+i + | 0
↵|0|0ii+ |1|1ii!↵↵|1|i1i++ |0|i0i
MULT90063 Introduction to Quantum Computing
↵|0i + |1i ! ↵|1i + |0i
MULT90063 Introduction to Quantum Computing
Y Gate (the Y operator ): 𝜋 around Y-axis
Circuit symbol:
Matrix representation:
Y=0 i x i0
0 i a0 ia1 Y (a0 |0i + a1 |1i) = 0 i a0 = ia1
Y (a0 |0i + a1 |1i) = i 0 a1 = ia0 i0a1 ia0
i.e. Y (a0|0i+a1|1i)= ia1|0i+ia0|1i i.e. Y (a0|0i+a1|1i)= ia1|0i+ia0|1i
Action on ket states: a0 |0i + a1 |1i ! ia1 |0i + ia0 |1i a0 |0i + a1 |1i ! ia1 |0i + ia0 |1i
i Im QUI example: -1 +1
3 |0i + i |1i 22
complex amplitudes
1|0i+i 3|1i 22
↵|0|0ii+ |1|1ii!↵↵|1|i1i++ |0|i0i
↵↵|0|0ii++ |1|i1i!!↵↵|1|i1+i + | 0
MULT90063 Introduction to Quantum Computing
↵|0i + |1i ! i↵|1i i |0i hYi
Y=0 i i0
MULT90063 Introduction to Quantum Computing
Z Gate (the Z operator): 𝜋 around Z-axis
Circuit symbol:
Matrix representation: Z = 1 0
Z(a0|0i+a1|1i)= 1 10 0 a0a0= a0a0
Z(a0|0i+a1|1i)=0 1 a1
= a1 i.e. Z(a0|0i+a1|1i)=a0|0i a1|1i
i.e. Z(a0|0i+a1|1i)=a0|0i a1|1i Actiononketstates: a0|0i+a1|1i!a0|0i a1|1i
a0 |0i + a1 |1i ! a0 |0i a1 |1i i Im
QUI example:p
complex amplitudes
3 |0i + i |1i 2 2
3 |0i + i |1i
↵|0|0ii+ |1|1ii!↵↵|1|i1i++ |0|i0i
↵↵|0|0ii++ |1|i1i!!↵↵|1|i1+i + | 0
MULT90063 Introduction to Quantum Computing
↵|0i + |1i ! ↵|0i |1i Z=10
MULT90063 Introduction to Quantum Computing
S Gate (the S operator ): Z-axs, 𝜋/2 rotation
Circuit symbol:
Matrix representation: S = 1 0
✓ ◆✓◆✓1◆0 a0 a0
S(a |0i+a |1i)= = 100a01 a00ia ia
a |1i)= = =a |0i+ia |1i
1 0ia1 ia1 0111
i.e. S(a0|0i+a1|1i)=a0|0i+ia1|1i Actiononketstates: a0|0i+a1|1i!a0|0i+ia1|1i
a0 |0i + a1 |1i ! a0 |0i + ia1 |1i i Im
QUI example:p3 |0i + i |1i 22
complex amplitudes
↵ ↵ | 0 | 0 i i + + | 1 | i 1 i ! ! ↵ ↵| 1 | i 1 +i + | 0
↵ ↵| 0| 0i i+ + | 1| 1i i! !↵↵| 1| i1 i++ | 0|i0 i
MULT90063 Introduction to Quantum Computing
Non-π rotations: S Gate
↵|0i + |1i ! ↵|0i + i |1i S=10
MULT90063 Introduction to Quantum Computing
T Gate (the T operator ): Z-axis, 𝜋/4 rotation
Circuit symbol:
Matrix representation:
T=10 x 0 ei⇡/4
Action on ket states:
a0 |0i + a1 |1i ! a0 |0i + ei⇡/4a1 |1i a0 |0i + a1 |1i ! a0 |0i + ei⇡/4a1 |1i
T(a0|0i+a1|1i)= 1 1 0 0 a0a0= a0a0 T (a0 |0i+a1 |1i) =0 ei⇡/4 a1 =ei⇡/4a1
QUI example:p
p3 iei⇡/4
2 |0i+ 2 |1i
0 ei⇡/4 a1 ei⇡/4a1 i.e. T(a0|0i+a1|1i)=a0|0i+ei⇡/4a1|1i
i.e. T(a0|0i+a1|1i)=a0|0i+ei⇡/4a1|1i
3 |0i + i |1i
complex amplitudes
↵|0|0ii+ |1|1ii!↵↵|1|i1i++ |0|i0i
↵↵|0|0ii++ |1|i1i!!↵↵|1|i1+i + | 0
MULT90063 Introduction to Quantum Computing
↵|0i+ |1i!↵|0i+e 4 |1i T=10
The first “non-Clifford” gate we’ve encountered – more difficult to perform under some error correction codes.
MULT90063 Introduction to Quantum Computing
The Hadamard gate
MULT90063 Introduction to Quantum Computing
The Hadamard gate H
The Hadamard gate H is one of the most important – it generates superposition states. Unlike the X, Y and Z gates which rotate about one of the cartesian axes, the H-gate
rotates about the X+Z axis (or unit vector) by an angle 𝜋. |0i
Rotation about “X+Z” axis, givenby𝒏=(1,0,1)/ 2
|0i + |1i hY i p2
|0i |1i p2
MULT90063 Introduction to Quantum Computing
The Hadamard gate H
H-gate on the computational states:
|0i |1i p2
|0⟩ ⟶ 0⟩+1⟩ 22
|1⟩ ⟶ 0⟩−1⟩
|0i + |1i p2
H-gate on a general superposition state:
𝑎! 0⟩+1⟩ 0⟩−1⟩ 𝑎 ! 0 ⟩ + 𝑎 ” 1 ⟩ = 𝑎 ” ⟶ 𝑎 ! 2 + 𝑎 ” 2
=𝑎!+𝑎”|0⟩+𝑎!−𝑎”|1⟩⟶ 1 𝑎!+𝑎” 2 2 2𝑎!−𝑎”
|𝜓!⟩ = 𝐻 |𝜓⟩ 𝑎!# =2×2 𝑎!
𝑎 “# m a t r i x 𝑎 ” 1 1 1
(Ex. check it)
MULT90063 Introduction to Quantum Computing
H Gate (the H operator ): 𝜋 around X+Z-axis
Circuit symbol:
Matrix representation: H = p2 1 1
111 |0i + |1i
|0i |1i p
|0i ! Action on ket states: |0i !
p |1i ! |0i + |1i
|0i |1i p2
p2 |1i ! 22
a0 + a1 a0 a1 a0 |0i + a1 |1i ! p |0i + p
|1i a0|0i+a1|1i! 0p2 1 |0i+ 0p2 1 |1i
QUI example:
a+a a a 2 i Im 2
-1 ✓ +1 p3 i p3+i complex Re p |0i + p |1i
3 |0i + i |1i
2 2 amplitudes
↵|0|0ii+ |1|1ii!↵↵|1|i1i++ |0|i0i
↵↵|0|0ii++ |1|i1i!!↵↵|1|i1+i + | 0
MULT90063 Introduction to Quantum Computing
Zoo of one-qubit gates
X=01 10
Y = 0 i i 0
111 H=p2 1 1
T = 1 0 𝜋/4rotationaboutthez-axis. 0 ei⇡/4
𝜋 rotation about the x-, y- and z- axes.
“Hadamard” gate
𝜋/2 rotation about the z- axis.
MULT90063 Introduction to Quantum Computing
General rotations
MULT90063 Introduction to Quantum Computing
Operations transform states and are equivalent to moving around on the Bloch sphere. For qubits, important matrices are the Pauli matrices:
Z=10 0 1
X=0 1 Y=0 i 10 i0
All square to identity (check):
X2 = X X = I Y 2 = Y Y = I Odd and even powers:
Z2 = Z Z = I X3 =XXX =IX =X X4 =XXXX =II =I etc
Why is this important? – quantum logic gates are ultimately written as exponentials of Pauli operators…let’s see how this works…
MULT90063 Introduction to Quantum Computing
Exponential of a Matrix
We can define the exponential of a matrix using the power series for the exponential:
A2 A3 A4 exp(A)=I+A+ 2! + 3! + 4! +…
The exponential of a (eg. X) including an angle parameter:
✓2 2 i✓3 3 ✓4 4 exp(i✓X) = I+i✓X 2!X 3! X + 4!X +…
= I+i✓X 2!I 3! X+ 4!I+…
✓ ✓2 ✓4 ◆ ✓ ✓3 ✓5 ◆ = 1 2!+4!+… I+i ✓ 3!+5!+… X
= cos✓I+isin✓X
(used power series for cos and sin)
MULT90063 Introduction to Quantum Computing
General exponentiation of =0 1 Y=0 i 10 i0
Z=10 0 1
exp(i ✓ X) = I cos ✓ + i X sin ✓ to generalise we form a 2×2 matrix 𝛴 from the Pauli matrices as:
where nˆ is a unit spatial 3-vector and σ is a vector of Paulis, a similar proof follows, so
We just proved:
nˆ = n |n|
nˆ · = n x X + n y Y + n z Z
exp(i✓nˆ· )=Icos✓+inˆ· sin✓
e.g. nˆ=(1,0,0)!nˆ· =(1,0,0)· =X Recover previous result: exp(i ✓ X) = I cos ✓ + i X sin ✓
MULT90063 Introduction to Quantum Computing
Rotation as an exponential
MULT90063 Introduction to Quantum Computing
Global Phase
MULT90063 Introduction to Quantum Computing
Arbitrary axis rotation – coding in QUI
Coding an arbitrary rotation gate in QUI – R-gate
The “parameters” menu allows you to specify axis and angle:
Cartesian cords for axis of rotation n
Angle of rotation 𝜃R about n
Global phase 𝜃g : generally
set this to zero unless otherwise directed!
NB. QUI normalises axis for you:
e.g. X axis, i.e. 𝒏 = (1,0,0) -> enter (1,0,0)
e.g.X+Zaxis,i.e.𝒏=(1,0,1)/ 2->enter(1,0,1) (entries can be decimals)
Rotation “Z” axis axis n |0i
MULT90063 Introduction to Quantum Computing
Useful facts about one qubit operations
MULT90063 Introduction to Quantum Computing
Operations are unitary
In quantum mechanics, unitary operators acting on quantum states produce new quantum states. These operators can be described by unitary matrices.
Thenewstateisgivenby: | 0i=U| i
Unitary operations are ones for which: U†U = I
Where the dagger represents taking the transpose (t) and complex conjugate (*).
In quantum mechanics, all unitary operations are reversible.
It’s possible to efficiently express every classical computation using equivalent reversible logic gates, but there can be a cost in terms of additional bits and operations.
MULT90063 Introduction to Quantum Computing
Operations Don’t Commute!
For operators (e.g. matrices), remember
AB 6= BA Order matters!
MULT90063 Introduction to Quantum Computing
Note angles in context – abundant use of 𝜃
Phase angle of complex amplitudes in polar coordinates:
✓◆ |a| a0 i✓ i✓ ✓a
| i=a0|0i+a1|1i=!| i=|a0|e 0 |0i+|a1|e 1 |1i a1
Angle specifying position on the Bloch sphere:
| i=a0|0i+a1|a1i!cos✓B |0i+sin✓Bei B |1i 22
Angle of rotation of a qubit state on the Bloch sphere about a specified axis (unit vector), n:
| 0i=Rnˆ(✓R)| i
MULT90063 Introduction to Quantum Computing
A zoo of one-qubit gates
X=01 10
Y = 0 i i 0
111 H=p2 1 1
T = 1 0 𝜋/4rotationaboutthez-axis. 0 ei⇡/4
𝜋 rotation about the x-, y- and z- axes.
“Hadamard” gate
𝜋/2 rotation about the z- axis.
MULT90063 Introduction to Quantum Computing
3.1 The Bloch Sphere representation for qubits
3.2 Quantum operations on qubits
3.3 Qubit gates in matrix form and the Pauli matrices
4.1 The Pauli gates X, Y and Z and the QUI
4.2 Qubit operations around non-cartesian axes – H and R gates
4.3 Programming sequences over the qubit logic gate library 4.4 Note on the context and use of angles
Practice class 2
Bloch sphere and single qubit logic operations on the QUI
MULT90063 Introduction to Quantum Computing
Week by week
(1) Introduction to quantum computing
(2) Single qubit representation and operations
(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
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com