Lecture 1 v1
Lecture 1 v1
2
Lecture 1
A brief history of QC and needs.
Types of quantum computers.
Basic concepts: qubit, tensors,
multiqubit, quantum gates,
measurement, amplitudes
My first quantum program.
Quantum Circuits. Width, Depth,
Quantum Volume.
Welcome to a Dream!
Yuri Manin (1980) and Richard Feynman (1981) proposed
independently the concept of Quantum Computer
Source: IBM
https://en.wikipedia.org/wiki/Timeline_of_quantum_computing
4
Welcome to a Dream!
Google
Rigetti
D-Wave
Intel
5
Welcome to (my) Nightmare!(*)
±
𝟏
|𝜱 > = ( 𝟎𝟎 > ± 𝟏𝟏 >)
𝟐
𝟏
|𝜳± > = ( 𝟎𝟏 > ± 𝟏𝟎 >)
𝟐
Bell States
(*) When I was a student long time ago!
6
Quantum Technologies
NV-Defect
Ion Trap Diamond
Transmon
Photons
Quantum
Dots
Majorama
7
Quantum Technologies
Quantum Computer
Quantum simulator [1]. Simulate a quantum system using another one,
maybe simpler, that can be controlled by the experimenter.
[1] Reviewed in Georgescu, I. M., Ashhab, S., & Nori, F. (2014). Quantum simulation. Reviews of Modern Physics, 86(1), 153–185.
http://doi.org/10.1103/RevModPhys.86.153 arXiv:1308.6253
[2] Reviewed in Albash, T., & Lidar, D. A. (2016). Adiabatic Quantum Computing. arxiv:1611.04471
[3] Proposed in Deutsch, D. (1985). http://doi.org/10.1098/rspa.1985.0070 and
Deutsch, D. (1989). http://doi.org/10.1098/rspa.1989.0099
[4] Lahtinen V., Pachos J.K.. SciPost Phys. 3, 021 (2017) arXiv:1705.04103
[5] Lloyd S. & Braunstein, A.L. Phys.Rev.Lett. 82 (1999) 1784-1787. arXiv:quant-ph/9810082
11
Adiabatic Quantum Computer
HB = Initial Hamiltonian, which ground state is easy to find
Li, R. Y., Felice, R. Di, Rohs, R., & Lidar, D. A. (2018). Quantum annealing versus classical machine learning applied to a simplified
computational biology problem. Npj Quantum Information 2018 4:1, 4(1), 14. http://doi.org/10.1038/s41534-018-0060-8
12
A real example: Traffic Flow Optimisation
Classical Computer
Preprocess Map&GPS
QPU
Solve model
Redistribute cars
Unoptimised Optimised
D-Wave Adiabatic Computer
Optimisation
Classical Computer + QPU
Neukart, F., Dollen, D. Von, Compostella, G., Seidel, C., Yarkoni, S., & Parney, B. (2017). Traffic flow optimization
using a quantum annealer. arXiv:1708.01625v2
13
Xanadu. Continuous
Variable
Language:
Strawberry
Fields
https://www.xanadu.ai/
14
European Quantum Flagship
http://qt.eu
15
Quantum Networks
http://english.cas.cn/newsroom/news/201709/t20170928_183577.shtml
16
Google Quantum “Supremacy”
Arute F, Arya K, Babbush R, Bacon D, Bardin JC, Barends R, et al. Quantum supremacy using a
programmable superconducting processor. Nature. 2019;574:505.
Google Quantum “Supremacy”
Lecture 1
A brief history of QC and needs.
Types of quantum computers.
Basic concepts: qubit,
tensors, multiqubit, quantum
gates, measurement,
amplitudes
My first quantum program.
Quantum Circuits. Width, Depth,
Quantum Volume.
DiVincenzo’s Criteria
20
What do you need (today)?
Complex numbers
Matrix multiplication
Imagination
21
BIT, QUBIT AND SUPERPOSITION
0 OR 1
What 0 or 1 means is a convention
Information is codified as a list of BITs
BIT can be transformed from 0 to 1 and vice versa
BITs can be operated with logical gates (OR,XOR,AND…)
One BIT can be cloned
BITs can be stored
BITs can have a long life
BITs move through logical gates
22
BIT, QUBIT AND SUPERPOSITION
Quantum Computer Business Card
QuBIT: A “Quantum” physical system which yields
one of TWO states when is measured
0 OR 1
What 0 or 1 means is a convention*
Information is codified in several ways
QuBIT can be transformed from 0 to 1 and vice versa
QuBITs can be operated with UNITARY gates
QuBITs cannot be cloned (no-clone theorem)
QuBITs cannot be stored (yet)
QuBITs cannot have a long life (yet)
Usually, QuBITs are quiet
23
Quantum Technologies
NOISE
Noisy Intermediate-Scale Quantum” (NISQ)
https://medium.com/@pchojecki/quantum-advantage-b3458646bd9
Parametric Quantum Circuit
Learning
Send Circuit
Return Shots
“QPU” CPU
Parametric Quantum Circuit
Learning
Parametric Quantum Circuit
Learning
Parametric Quantum Circuit
Learning
SIMULATING
WITH NOISE
FEW SHOTS
Parametric Quantum Circuit
Learning
IBMQ_VIGO
Nov. 17th, 2019
N=3, D=3
Parametric Quantum Circuit
Learning
Algorithms with shallow
circuits
• QVE: Quantum Variational Eigensolver:
https://arxiv.org/abs/1304.3061
QPU CPU
Figure source: Wang, D., Higgott, O., & Brierley, S. (n.d.). A Generalised
Variational Quantum Eigensolver.
Quantum Machine
Learning?
“Despite a number of promising results, the theoretical evidence presented in
the current literature does not yet allow us to conclude that quantum techniques
can obtain an exponential advantage in a realistic learning setting”
So:
34
www.inl.int
Complex Numbers
c=𝑎 + 𝑏 ∗ 𝑖, with 𝑎, 𝑏 ∈ ℝ, 𝑐 ∈ ℂ
Complex conjugate: 𝑐 = 𝑎 − 𝑏 ∗ 𝑖
2
Modulus: 𝑐 = 𝑐𝑐 = (𝑎 + 𝑏 ∗ 𝑖)(𝑎 − 𝑏 ∗ 𝑖) = 𝑎2 + 𝑏 2
35
www.inl.int
QUBIT
Complex numbers
1 Superposition
|0 > =
0
|𝜙 > = 𝛼 0 > + 𝛽 1 >
0
|1 > = 2 2
1 𝛼 + 𝛽 =1
2
𝛼 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑑𝑒𝑛𝑠𝑖𝑡𝑦
𝐴𝑚𝑝𝑙𝑖𝑡𝑢𝑑𝑒 𝛼 = 𝛼 𝑒 𝑖𝜑
𝜑 Phase
36
QUBIT
𝛼 𝛾
|𝜙 > = 𝛼 0 > + 𝛽 1 >= 𝛽 |𝜓 > = 𝛾 0 > + 𝛿 1 >=
𝛿
37
Bloch’s Sphere
𝜃 𝜃 𝑖𝜑
|𝜓 > = cos( )|0 > + sin( ) 𝑒 |1 >
2 2
z
|𝟎 >
𝜋 |0 > + |1 >
𝜃= , 𝜑 = 0, | +> =
2 2
′ 𝑎11 𝑎12 𝛼
Transform vector space in itself |𝜙 > = U |𝜙 > = 𝑎 𝑎22 𝛽
21
Unit lengh vectors must go to unit lenght vectors: < 𝜓 𝑈 † 𝑈 𝜙 > =< 𝜓|𝜙 >⇒ 𝑈 † 𝑈=I
Reversible
Geometrically, they are rotations of the complex vector space associated to |𝜙 >
𝑁𝑜𝑡𝑒: 𝑈 † = 𝑈 𝑇
39
One-Qubit Transformations
Phase shift 𝐾(𝛿) = 𝑒 𝑖𝛿 𝐼
cos(𝛽) sin(𝛽)
Rotation, 𝑅(𝛽) =
−sin(𝛽) 𝑐𝑜𝑠(𝛽)
𝑖𝛼
Phase rotation, 𝑇(𝛼) = 𝑒 0
0 𝑒 −𝑖𝛼
40
One-Qubit Transformations
𝜃 𝜃
cos −𝑖 sin 𝜃 𝜃
2 2
Rotation around 𝑥, 𝑅𝑥 𝜃 ≡ 𝑒 −𝑖𝜃𝑋 = 𝜃 𝜃
= cos 𝐼 − 𝑖 𝑠𝑖𝑛 𝑋
2 2
−𝑖 sin cos
2 2
𝜃 𝜃
cos(2 ) −sin(2 )
Rotation around 𝑦, 𝑅𝑦 𝜃 ≡ 𝑒 −𝑖𝜃𝑌 = 𝜃 𝜃
sin(2) 𝑐𝑜𝑠(2)
−𝑖𝜃/2
Phase rotation, Rotation around 𝑧, 𝑅𝑧 𝜃 ≡ 𝑒 −𝑖𝜃𝑍 = 𝑒 0
0 𝑒 𝑖𝜃/2
𝑈 = 𝐾(𝛿)𝑅𝑧 𝛾 𝑅𝑦 𝛽 𝑅𝑧 𝛼
42
One-Qubit Transformations
Pauli Gates
0 1
𝑋= , bit-flip or NOT.
1 0
0 −𝑖
Y=
𝑖 0
1 0
Z=
0 −1
IBM group
Cliffort group
1 0
1 1 1 𝑈1 𝜆 =
𝐻𝑎𝑑𝑎𝑚𝑎𝑟𝑑, 𝐻 = 0 𝑒 𝑖𝜆
2 1 −1
1 0 1 −𝑒 𝑖𝜆
𝑃ℎ𝑎𝑠𝑒, 𝑆 = 𝑈2 𝜙, 𝜆 = 1
0 𝑖
2 𝑒 𝑖𝜙 𝑒 𝑖(𝜙+𝜆)
𝜋 1 0
,𝑇 = 𝜋
𝑖4
8 0 𝑒 𝜃 𝜃
cos(2 ) −sin(2 )𝑒 𝑖𝜆
† 𝑈3 (𝜃, 𝜙, 𝜆) =
Hint:𝑈 = 𝑈 𝑇 𝜃
sin(2 )𝑒 𝑖𝜙
𝜃
cos(2 )𝑒 𝑖(𝜙+𝜆)
44
Expectation Value of U
Example:
1 0 1
< 0 𝑍 0 >= 1 0 =1
0 −1 0
1 0 0
< 1 𝑍 1 >= 0 1 = −1
0 −1 1
2 2
< 𝜑 𝑍 𝜑 > = 𝑎 < 0 +𝑏 < 1 𝑍 𝑎 0 > +𝑏 1 > = 𝑎 <0𝑍0>+𝑏 <1𝑍1>
Exercise with 1 QuBit
OPEN QUIRK.HTML
Multi-Qubits
TENSOR PRODUCT
𝑎1
|𝑎 > = 𝑎 𝑏1 𝑎1 𝑏1
2 𝑎1 𝑏1 𝑎1
𝑏2 𝑎 𝑏
𝑎2 ⨂ = = 1 2
𝑏1 𝑏2 𝑏 𝑎2 𝑏1
𝑎2 1
|𝑏 > = 𝑏2 𝑎2 𝑏2
𝑏2
47
Multi-Qubits
TENSOR PRODUCT
1
|0 > ⨂|0 >= |00> = 0 = |0>
0
0
1 0
|0 > =
0 |1 > ⨂|0 >= |10> = 0 = |2>
1
0
0
0 |0 > ⨂|1 >= |01> = 1 = |1>
|1 > =
1 0
0
0
|1 > ⨂|1 >= |11> = 0 = |3>
0
1
48
Superposition Multi-Qubits
For 2 QuBits:
|𝝍 > = 𝜶 𝟎𝟎 > +𝜷 𝟎𝟏 > +𝜸 𝟏𝟎 > +𝜹 𝟏𝟏 >
For N QuBits:
𝟐𝑵 −𝟏
|𝝍 > = 𝝀𝒊 |𝒊 >
𝒊=𝟎
49
Entanglement Multi-Qubits
𝟏
|𝜱± > = 𝟐
𝟎𝟎 > ± 𝟏𝟏 > ≠ (𝜶 |𝟎 > +𝜷|𝟏 >) ⨂ (𝜸 𝟎 > + 𝜹 𝟏 > )
13/09/2017 50
Multi-Qubit Transformations
𝑈11 𝑈12 𝑉11 𝑉12
𝐿𝑒𝑡 𝑈1 = on qubit 1 𝐿𝑒𝑡 𝑉2 = on qubit 2
𝑈21 𝑈21 𝑉21 𝑉21
51
Multi-Qubit Transformations
0 1 0 1
1 0
1 0 1 0
𝐼⊗𝑋 =
0 1 0 1
0 1
1 0 1 0
0 1 0 0
𝐼⊗𝑋 = 1 0 0 0
0 0 0 1
0 0 1 0
13/09/2017 52
Controled Gates
Apply one gate on one qubit, depending on the values of other qubits
1 0 0 0
𝐶𝑁𝑂𝑇|00 > = |00 >
𝐶𝑁𝑂𝑇 = 0 1 0 0
0 0 0 1
𝐶𝑁𝑂𝑇|01 > = |01 >
0 0 1 0
𝐶𝑁𝑂𝑇|10 > = |11 >
53
Measurement
Classical Bit
QuBit
54
Quantum Circuit
Depth
Width
13/09/2017 55
MY FIRST QUANTUM PROGRAM:
Superdense Coding
OPEN QUIRK.HTML
My First Quantum Program
Using Quirk. Launch quirk.html. QUIRK does not
need measurement. Remember to add it in
your real circuit.
13/09/2017 57
Superdense Coding
Transmit two classical bits with a single qubit
58
Superdense Coding
|00> |01>
|10> |11>
59
Caution!!!
60
Exercise 2: IBM Quantum Experience
CONNECT TO: HTTPS://QUANTUM-COMPUTING.IBM.COM/
Quantum Volume
Width: The number of physical qubits;
Depth: The number of gates that can be applied before errors make
the device behave essentially classically;
62
TOPOLOGY
https://medium.com/rigetti/the-rigetti-128-qubit-chip-
and-what-it-means-for-quantum-df757d1b71ea
https://github.com/Qiskit/ibmq-device-
information/blob/master/backends/melbourne
Quantum Volume
Effective error rate εeff: specifying how
well a device can implement arbitrary
pairwise interactions between qubits
Quantum Volume
2 Source: IBM, 2019
′ 1
𝑉𝑄 = max 𝑚𝑖𝑛 𝑛 , 𝑛′ 𝜀 ′)
′
𝑛 <𝑛 𝑒𝑓𝑓 (𝑛
64
Classical Resources
1 qubit 2 qubits 3 qubits N qubits
|0> |00> = |0> |000> = |0> |0….0> = |0>
|1> |01> = |1> |001> = |1> |0….1> = |1>
|10> = |2> |010> = |2>
|11> = |3> |011> = |3>
|100> = |4>
|101> = |5>
|110> = |6>
|111> = |7>
|1…..1> = |2N-1>
2 4 8 𝟐𝑵
𝜶 |𝟎 > + 𝜷 |𝟏 > 𝟑 𝟕 𝟐𝑵−𝟏