Lecture 4: Other
HHL
QVE
QAOA
QML
Other important algorithms
3
HHL: To solve a linear system of equations. Opened the usage of amplitudes to place information (arXiv:0811.3171)
Variational Quantum Eigensolver: Semi-Classical Algorithm(arXiv:1304.3061 )
Quantum Approximate Optimization Algorithm (QAOA): approximate solutions for combinatorial optimization problems (arXiv:1411.4028)
Quantum Learning Algorithms. Quantum Suport Vector Machine Quantum Principal Component Quantum Neural Networks Etc.
https://www.nature.com/articles/s41598-018-33125-3
Quantum A. Life
HHL Algorithm
HHL
6
HHL algorithm “solves” a linear system of equations A𝒙=𝒃
Figure from: arXiv:1802.08227v1
𝑏 =
𝑗=1
𝑀
𝛽𝑗|𝑢𝑗 >
|𝑥 > ∝ 𝐶
𝑗=1
𝑀𝛽𝑗
𝜆𝑗|𝑢𝑗 >
HHL
7
O P E N P R O J E C T Q / H H L _ A L G O R I T H M - C O L E S N O T E B O O K
Exercise: Solving a system of 2x2
Variational Quantum Eigensolver (VQE)
Other important algorithms
10
Variational Quantum Eigensolver: Semi-Classical Algorithm(arXiv:1304.3061 )
Figure:arXiv:1804.03719v1
A real example: BeH2
11
Kandala, A., Mezzacapo, A., Temme, K., Takita, M., Brink, M., Chow, J. M., & Gambetta, J. M. (2017). Hardware-
efficient variational quantum eigensolver for small molecules and quantum magnets. Nature, 549(7671), 242–246.
http://doi.org/10.1038/nature23879
Only 6 QuBits Universal Quantum Computer from IBMVariational Quantum Eigenvalue (VQE) solver
+ Stochastic Optimisation
More cases: https://github.com/Qiskit/qiskit-tutorials/tree/master/community/aqua/chemistry
The problem of the
measurement
12
Universal Quantum Computers can only measure on Z
VQE commonly uses hamiltonians that are combinations of X,Y and Z as
𝑯 = 𝒊=𝟏𝑵 𝒉𝒊𝝈𝒊
{𝒙,𝒚,𝒛}+ 𝒊=𝟏𝑵 𝒋=𝟏
𝒊 𝒌𝒊𝒋𝝈𝒊{𝒙,𝒚,𝒛}𝝈𝒋{𝒙,𝒚,𝒛}
Trick: Rotate the axes when 𝜎{𝑥,𝑦}
to Z
Xi or 𝝈𝒊𝒙 , rotate this qubit i around y by −𝝅/𝟐
Yi or 𝝈𝒊𝒚 , rotate this qubit i around x by 𝝅/𝟐
The problem of the
measurement (II)
13
Because
Then, for
Measuring on Z:
For example, for 2 qubits:
A future
14
Reiher, M., Wiebe, N., Svore, K. M., Wecker, D., & Troyer, M. (2016).
Elucidating Reaction Mechanisms on Quantum Computers.
http://doi.org/10.1073/pnas.1619152114
“Quantum computer can be
employed to elucidate reaction
mechanisms in complex chemical
systems”
“The detailed understanding and
prediction of complex reaction
mechanisms such as transition-
metal catalyzed chemical
transformations therefore requires
highly accurate electronic structure
methods.”
Nitrogen fixation:
Industry: High T and P
Bio: Room T and P
Can we solve the problem in a
Quantum Computer?
O P E N P R O J E C T Q / V Q E N O T E B O O K
Exercise: Calculating energies for H2
Quantum Approximation Optimization
Algorithm (QAOA)
QAOA
17
Inspired on Adiabatic Quantum Computation
Useful for combinatorial problems which are hard to solve classically
Being a Hamiltonian, Ho, the idea is to minimize using VQE
< 𝚿 𝑯𝒐 𝚿 >
Where 𝚿 >= 𝑼 𝚯 𝟎 >
Adiabatic Quantum Computer
18
H(s) = A(s)HB + B(s)HP
HB = Initial Hamiltonian, which ground state is easy to find
HP = Problem Hamiltonian, whose ground state encodes the
solution to the problem
H(s) = Combined Hamiltonial to evolve slowly:
A(s) decrease smoothly and monotonically
B(s) increase smothly and monotonically
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
QAOA
19
𝐻 = 𝐻𝑏 + 𝐻𝑜
Schrödinger equation for time-independent Hamiltonian
𝒊ℏ𝝏|𝚿 >
𝝏𝒕= 𝑯|𝚿 >
Taking ℏ = 𝟏 (Only a change in the units for Energy):
𝚿 >= 𝒆−𝒊𝑯𝒕 𝟎 >
(Lie-)Trotter-Suzuky
Descomposition
20
𝐻 = 𝐻𝑏 + 𝐻𝑜
“trotterized” time evolution
𝒆−𝒊𝑯𝒕 = 𝒆−𝒊𝒕(𝑯𝒃+𝑯𝒐) = lim𝒏→∞𝒆−𝒊𝒕𝑯𝒃/𝒏𝒆−𝒊𝒕𝑯𝒐/𝒏
𝒏
This is true even if 𝐻𝑏𝑎𝑛𝑑 𝐻𝑜 do not conmmute
𝒆−𝒊𝑯𝒕 ≈ 𝑰 − 𝒊𝑯𝒕 + O(t2), sometimes is a good approximation
QAOA
21
Map your combinatorial optimization algorithm to one Hamiltonian Ho
Usually,
𝑯 =
𝒊=𝟏
𝑵
𝒉𝒊𝝈𝒊{𝒙,𝒚,𝒛}
+ 𝒊=𝟏
𝑵
𝒋=𝟏
𝒊
𝒌𝒊𝒋𝝈𝒊{𝒙,𝒚,𝒛}𝝈𝒋{𝒙,𝒚,𝒛}
Initialize to Walsh-Hadamard state
Apply r times the time evolution for θ of Hb+Ho (θ are ourparameters to optimize)
Measure <Ho>. Repeat until convergence
O P E N P R O J E C T Q / Q A O A N O T E B O O K
Exercise: QAOA
Quantum Machine Learning
Quatum Machine Learning
24
Many Quantum Learning Algorithms. Quantum Suport Vector Machine Quantum Principal Component Quantum Neural Networks Quantum Autoencoders, Etc.
Based on selecting the best parameters of unitary transformationsstarting from an state |b>, being b our features.
Quatum Machine Learning
25
Many Quantum Learning Algorithms. Quantum Suport Vector Machine Quantum Principal Component Quantum Neural Networks Quantum Autoencoders, Etc.
Based on selecting the best parameters of unitary transformationsstarting from an state |b>, being b our features.
arXiv:1804.00633v1
Quatum Machine Learning
26
arXiv:1803.00745v2
Exercise: Quantum Machine LearningO P E N P R O J E C T Q / Q U A N T U M _ R E G R E S S O R _ C G
N O T E B O O K
Quatum High Level Software
28
Pennylane, for QML. Include grad and optimizators. Backend: ProjectQ
OpenFermion. Backend: ProjectQ+Others. For Fermionic calculations
Fermi. From ProjectQ team
Grover. For PyQuil (Rigetti).
Qiskit_aqua. Includes chemistry, optimization, QML, etc.
Etc.
arXiv:1804.00633v1