Basics of Quantum Computing
Basics of Quantum Computing
Ema Puljak
EVOLUTION OF COMPUTERS
2016:
Reprogrammable
quantum computer 2023:
5-qubit IBM
1121-qubit
1966:
Apollo 1971:
Guidance Intel 4004 2001:
1955:
Computer Shor's algorithm
1945: IBM 608
on 7-qubit QC
ENIAC
2
“If you think you understand quantum mechanics,
you don’t understand quantum mechanics.”
Richard Feynman
SUPERPOSITION
ENTANGLEMENT
INTERFERENCE
]
7
quantamagazine.org
SUPERPOSITION
8
SUPERPOSITION
0 1
ON
0 1
OFF
0 1
CLASSIC
BIT
9 5
SUPERPOSITION
|qubit⟩ = C0 | 0 ⟩ + C1 | 1 ⟩
0 1
ON
0 1
OFF
0 1
CLASSIC
BIT
10 6
SUPERPOSITION
|qubit⟩ = C0 | 0 ⟩ + C1 | 1 ⟩
0 1
Measurement
ON
0 1
OFF
0 1 1
CLASSIC QUANTUM
BIT BIT
11 7
SUPERPOSITION
|qubit⟩ = C0 | 0 ⟩ + C1 | 1 ⟩
0 1
Bloch sphere Measurement
ON
0 1
OFF
0 1 1
CLASSIC QUANTUM
BIT BIT
12 8
SUPERPOSITION
|qubit⟩ = C0 | 0 ⟩ + C1 | 1 ⟩
0
70%
0 1
Measurement
ON
0 1
30%
OFF
0 1 1
CLASSIC QUANTUM
1
BIT BIT
quantamagazine.org
13 9
SUPERPOSITION
|qubit⟩ = Chead | ⟩ + Ctail | ⟩
70%
stop spinning
flip
HEAD TAIL
30%
flip
HEAD TAIL
spinning
CLASSIC QUANTUM
BIT BIT
14 10
PROBABILITY DISTRIBUTION
100%
70%
stop spinning
30%
spinning
Probabilistic BIT
15 11
ENTANGLEMENT
Information encoded
in joint state
2 entangled qubits
16 12
CORRELATION
Information encoded
in joint state
2 entangled qubits
17 13
exponential power of The power of quantum computing rests on two cornerstones of quantum mechanics: interference
quantum computing and entanglement. The principle of interference allows a quantum computer to cancel unwanted
ENTANGLEMENT
solutions and enhance correct solutions. Entanglement means the combined state of the qubits
contains more information than the qubits do independently. Together, these two principles
have no classical analogy and modeling them on a classical computer would require exponential
resources. For example, as the table below describes, representing the complexity of a 100-qubit
quantum computer would require more classical bits than there are atoms on the planet Earth.
quantamagazine.org
ibm.com
Exponential power of18 quantum computers 14
INTERFERENCE
19
wave function = ψ
Bra-Ket | ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩
20 15
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩
[ C1 ]
C0
C0 = a + bi C1 = c + di C=
21 16
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩
[ C1 ]
C0
C0 = a + bi C1 = c + di C= 4 parameters
22 17
BORN RULE
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩ P0 | 0
⟩ = |C0|
2
P1| 1 ⟩ = |C1| 2
[ C1 ]
C0
C0 = a + bi C1 = c + di C= 4 parameters
23 18
BORN RULE
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩ P0 | 0
⟩ = |C0|
2
P1| 1 ⟩ = |C1| 2
+
2
=1
2
Normalization constraint |C0| |C1|
Complex vector representation
[ C1 ]
C0
C0 = a + bi C1 = c + di C= 4 parameters
24 19
BORN RULE
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩ P0 | 0
⟩ = |C0|
2
P1| 1 ⟩ = |C1| 2
+
2
=1
2
Normalization constraint |C0| |C1|
Complex vector representation
[ C1 ]
C0
C0 = a + bi C1 = c + di C= 4 parameters
a2 + b2 + c2 + d2 = 1
25 20
BORN RULE
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩ P0 | 0
⟩ = |C0|
2
P1| 1 ⟩ = |C1| 2
+
2
=1
2
Normalization constraint |C0| |C1|
Complex vector representation
[ C1 ]
C0
C0 = a + bi C1 = c + di C= 4 dof
a2 + b2 + c2 + d2 = 1 d= 1 − a2 − b2 − c2 3 dof
26 21
BORN RULE
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩ P0 | 0
⟩ = |C0|
2
P1| 1 ⟩ = |C1| 2
+
2
=1
2
Normalization constraint |C0| |C1|
Polar representation of Ci
iϕC0 iϕC1
C0 = | C0 | e C1 = | C1 | e
magnitude
27 21
BORN RULE
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩ P0 | 0
⟩ = |C0|
2
P1| 1 ⟩ = |C1| 2
+
2
=1
2
Normalization constraint |C0| |C1|
Polar representation of Ci
iϕC0 iϕC1
C0 = | C0 | e C1 = | C1 | e
phase
magnitude
28 22
BORN RULE
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩ P0 | 0
⟩ = |C0|
2
P1| 1 ⟩ = |C1| 2
+
2
=1
2
Normalization constraint |C0| |C1|
Polar representation of Ci
iϕC0 iϕC1
C0 = | C0 | e C1 = | C1 | e
phase
magnitude
iϕC0
| ψ⟩ = | C0 | e | 0⟩ + | C1 | e iϕC1 | 1⟩
29 23
BORN RULE
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩ P0 | 0
⟩ = |C0|
2
P1| 1 ⟩ = |C1| 2
+
2
=1
2
Normalization constraint |C0| |C1|
Polar representation of Ci
iϕC0 iϕC1
C0 = | C0 | e C1 = | C1 | e
phase
magnitude
30 24
BORN RULE
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩ P0 | 0
⟩ = |C0|
2
P1| 1 ⟩ = |C1| 2
+
2
=1
2
Normalization constraint |C0| |C1|
Polar representation of Ci
iϕC0 iϕC1
C0 = | C0 | e C1 = | C1 | e
phase
magnitude
+
2
=1
2
Normalization constraint |C0| |C1|
Polar representation of Ci
iϕC0 iϕC1
C0 = | C0 | e C1 = | C1 | e
phase
magnitude
+
2
=1
2
Normalization constraint |C0| |C1|
Polar representation of Ci
iϕC0 iϕC1
C0 = | C0 | e C1 = | C1 | e
phase
magnitude
X
θ
Angle representation
ϕ x
C0 = cos ( 2 ) C1 = e sin ( 2 )
θ iϕ θ
|1⟩
34 28
Bloch sphere
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩
|0⟩
z
| ψ⟩
X
θ
Angle representation
ϕ x
C0 = cos ( 2 ) C1 = e sin ( 2 )
θ iϕ θ
y
θ relative magnitudes
|1⟩
ϕ relative phase difference
35 29
Bloch sphere
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩
|0⟩
z
| ψ⟩
X
θ
Angle representation
ϕ x
C0 = cos ( 2 ) C1 = e sin ( 2 )
θ iϕ θ
y
θ relative magnitudes [0 − π]
|1⟩
ϕ relative phase difference [0 − 2π]
36 30
Bloch sphere
| ψ ⟩=C 0| 0 ⟩ + C1 | 1 ⟩
|0⟩
z
| ψ⟩
X
θ
Angle representation
ϕ x
C0 = cos ( 2 ) C1 = e sin ( 2 )
θ iϕ θ
y
θ latitude
|1⟩
ϕ longitude
37 31
P
P0 | 0
⟩ = 50% P1 | 1 ⟩ = 50% 50% 50%
38 32
P
P0 | 0
⟩ = 50% P1 | 1 ⟩ = 50% 50% 50%
1 1
C0 = C1 =
2 2
39 33
P
P0 | 0
⟩ = 50% P1 | 1 ⟩ = 50% 50% 50%
1 1
C0 = C1 =
2 2
π
C0 = cos ( 2 ) C1 = e sin ( 2 )
θ θ
iϕ
→ θ = ,ϕ = 0
2
40 34
P
P0 | 0
⟩ = 50% P1 | 1 ⟩ = 50% 50% 50%
1 1
C0 = C1 =
2 2
C0 = cos ( 4 ) C1 = e sin ( 4 )
π i⋅0 π
41 35
|0⟩
P0 | 0
⟩ = 50% P1 | 1 ⟩ = 50% z
1 1
C0 = C1 =
2 2 π/2 x
y
C0 = cos ( 4 ) C1 = e sin ( 4 )
π π
i⋅0
| ψ⟩
X
| ψ ⟩= 1
2
| 0 ⟩+
1
2
| 1 ⟩
|1⟩
42 36
Building blocks of quantum computer
Quantum bits
(QUBITS)
37
Building blocks of quantum computer
Quantum bits Superconducting qubits
(QUBITS) Built on a chip
44 37
Building blocks of quantum computer
Quantum bits Superconducting qubits Quantum Computer
(QUBITS) Built on a chip
45 37
ubit technology
Superconducting Silicon Majorana
Trapped ions Photonic Diamond
qubits quantum dots defect topological
| 0⟩ | 1⟩ E1 | 0⟩ | 1⟩
Charge + - Quasiparticles
Path
| 0⟩ | 1⟩
photon
or
Energy E0 E1
photon
| 0⟩ | 1⟩ or
#photons Qubit:
E0 0 N path of particle
Spin Spin
~ 0 K temperature
| 0⟩ | 1⟩ E1 | 0⟩ | 1⟩
Charge + - Quasiparticles
Path
| 0⟩ | 1⟩
photon
or
Energy E0 E1
photon
| 0⟩ | 1⟩ or
#photons Qubit:
E0 0 N path of particle
Spin Spin
~ 0 K temperature
| 0⟩ | 1⟩ E1 | 0⟩ | 1⟩
Charge + - Quasiparticles
Path
| 0⟩ | 1⟩
photon
or
Energy E0 E1
photon
| 0⟩ | 1⟩ or
#photons Qubit:
E0 0 N path of particle
Spin Spin
~ 0 K temperature
| 0⟩ | 1⟩ E1 | 0⟩ | 1⟩
Charge + - Quasiparticles
Path
| 0⟩ | 1⟩
photon
or
Energy E0 E1
photon
| 0⟩ | 1⟩ or
Polarization Qubit:
E0 path of particle
Spin Spin
~ 0 K temperature
| 0⟩ | 1⟩ E1 | 0⟩ | 1⟩
Charge + - Quasiparticles
Path
| 0⟩ | 1⟩
photon
or
Energy E0 E1
photon
| 0⟩ | 1⟩ or
Polarization Qubit:
E0 path of particle
Spin Spin
~ 0 K temperature
| 0⟩ | 1⟩ E1 | 0⟩ | 1⟩
Charge + - Quasiparticles
Path
| 0⟩ | 1⟩
photon
or
Energy E0 E1
photon
| 0⟩ | 1⟩ or
Polarization Qubit:
E0 path of particle
Spin Spin
~ 0 K temperature
42
ubit technology
Superconducting Silicon Diamond Majorana
Trapped ions Photonic
qubits quantum dots defect topological
| 0⟩ | 1⟩ E1 | 0⟩ | 1⟩
Charge + - Quasiparticles
Path
| 0⟩ | 1⟩
photon
or
Energy E0 E1
photon
| 0⟩ | 1⟩ or
Polarization Qubit:
E0 path of particle
Spin Spin
~ 0 K temperature
55
Quantum Motion's silicon chip
IBM 7-qubit chip IonQ's trapped ions chip
42
IBM system one
56
IBM system one
~ 2m
57
space size = 2N
[IBM]
Gate-based model
Universal gate quantum computing
43
Quantum Gates
1 0 |0> |1>
10
Pauli-X NOT gate
|1>
0 1 0 1|0> |0> |1> |1> |0>
10 10
|1> |0> |0>
|1>
44
Quantum Gates
Pauli-X
01 |0> |1> |1> |0>
10 |0> i |1>
0 -i
Pauli-Y
-i |0> i |1>i 0
0 i |1> -i |0>
i 00 -i |0> |1>
i 0 |1> -i |0>
|1> -i |0>
45
Quantum Gates
Pauli-X
01 |0> |1> |1> |0>
10
Pauli-Y
0 -i |0> i |1> |1> -i |0>
i 0 |0> |0>
|0> |0>
1 0
Pauli-Z 1 0 |0> |0>0 -1 |1> -|1>
0 -1 1 |1>0 -|1>
0 -1 |1> -|1>
46
Quantum Gates
Pauli-X
01 |0> |1> |1> |0>
10
x
Pauli-Y
0 -i |0> i |1> |1> -i |0>
i 0
y
|0>
Pauli-Z 1 0 |0> |0> -1 |1> -|1>
z 0 -1
|+>
-1
1 1 |0>
Hadamard 1 1 |0> |+>
1 -1
|+>
1 -11 1|1> |0> |1> |->
H |->
1 -1 |1> |->
47
Quantum Gates
Pauli-X
01 |0> |1> |1> |0>
10
x
Pauli-Y
0 -i |0> i |1> |1> -i |0>
i 0
y
|0>
Pauli-Z 1 0 |0> |0> -1 |1> -|1>
z 0 -1
|+>
-1 |+>
1 1 |0>
Hadamard 1 1 |0>
|0>1 + -1
1|+>
1 1 -1
1 |1>
|0> |1> 1 |0> -
H |1> |-> 2
|->
2
|1>
1 -1 |1> |-> 48
Single-Qubit Gates
1 0 |0> |1>
Pauli-X
10
|1>
0 1 0 1|0> |0> |1> |1> |0>
10 10 0 -i |0> i |1>
x
Pauli-Y |1> |1> |0> i|0> 0
0 -i -i |0> |0> i |1>
0 i |1> |1> -i |0>
i 0
y i 0 |1> -i |0> 1 0 |0> |0>
|0> |0>|1> -i |0>
Pauli-Z 1 0 |0> |0>0 -1 |1> -|1>
z 0 -1 1 |1>0 -|1>
1 1 |0> |+>
Hadamard 1 1
-1
0|0> |1>
|+> -|1>
1 -1
|+>
1 -11 1|1> |0> |1> |->
H |->
1 -1 |1> |->
49
Quantum Gates as rotations
50
Quantum Gates as rotations
51
Quantum Gates as rotations
52
Quantum Gates as rotations
53
Unitary conditon
.
U U I
=
= (*) T
H
54
Two-Qubit Gate
|0> |1>
1 00 0
0 1 0 0
0 00 1
|1> |1> 0 0 1 0
|1> |0>
55
Two-Qubit Gate
|0> |1>
1 00 0
0 1 0 0
0 00 1
|1> |1> 0 0 1 0
|1> |0>
55
Quantum Circuit
|0> H
|0>
56
Quantum Circuit
|0> H
|0>|0> |0> H H
|0> |0>
1
0
0
0
57
Quantum Circuit
|0> H
1
|0>|0> |0> H |+>H 1 0
1
2
1
|0> |0> |+> |0> 1 0 0
1 1 2 1
0
0
0
1
2
|0>
0
1
0 0
58
Quantum Circuit
|0> H
1
|0>|0> |0> H |+>H 1 0
1
2
1
|0> |0> |+> |0> 1 0 0
1 1
1 2
|0> + |1>
0
0
0
1
2
|0>
0
1 2
0 0
59
Quantum Circuit
|0> H
1
|0>|0> |0> H |+>
H 1 0
1
2
1
|0> |0> |+> |0> 1 0 0
1
1 1 1 + | 11 >
2 |00> 1 0
0
0
0
1
2
|0> 0
1
2 2 0
0 0 1
60
Bell State
|0> H
1
|0>|0> |0> H |+>
H 1 0
1
2
1
|0> |0> |+> |0> 1 0 0
1
1 1 1 + | 11 >
2 |00> 1 0
0
0
0
1
2
|0> 0
1
2 2 0
0 0 1
61
Bell State
|0> H
|0>
1
| >= 2
|00> + |11>
62
Bell State
entanglement
|0> H
|0>
1
| >= 2
|00> + |11>
63
Shor's algorithm
integer factorization
64
Grover's algorithm
unstructured seach problem
𝒪( N) < 𝒪(N)
65
Yao.jl
57
Learning material
57
QUESTIONS?
ema.puljak@cern.ch
84
Interacting with environment makes qubits prone to
Quantum errors
HEAT, COSMIC RAYS, SYSTEM ERRORS
VS VS