You are on page 1of 25

QUANTUM COMPUTING

AND

ITS APPLICATIONS IN FINANCE


 A 2048-bit RSA key would take 6.4 quadrillion years
(6,400,000,000,000,000 years) to calculate. Quantum
computers are expected to do that in few hours!

  Google AI Quantum can perform calculations more


than 3,000,000 times as fast as those of Summit,
generally considered the world's fastest computer.
Why are we
excited?
Well, another important reason is that it’s
totally mind-boggling and fun!

QUANTUM COMPUTING
What is a Quantum
Computer?
• A computer which uses quantum
phenomena of superposition and
entanglement to perform
computations.

• What does that even mean?


Let’s look at each of the
highlighted terms one by one.

Inside a quantum computer at IBM


Source : IBM Research

QUANTUM COMPUTING
• The building block of a classical computer is a
bit – it can take either one of the two values – 0
and 1.
• Quantum bits or qubits, on the other hand can
exist in a linear combination of states, say, state
0 be represented by |0> and state 1 by |1>
• Two classical bits at a time can • Then, a qubit can have a state a|0> + b|1>;
represent 1 of the following where a and b can be any complex numbers.
four values – {00, 01, 10, 11} Superposition
• Two qubits can represent all 4
states at once. Four qubits can
represent 2^4 = 16 states and
grow exponentially so on….

QUANTUM COMPUTING
Quantum Measurement
• A quantum particle can exist in a superposition of states until we “measure” it.
• At measurement, it collapses into one of its constituent eigen states probabilistically.

For example, measuring the state (1/√5)|0> + (2/√5)|1> will give the value 0, 20% of
the times and value 1, 80% of the times.

Source : https://towardsdatascience.com/understanding-basics-of-measurements-in-quantum-computation-4c885879eba0

QUANTUM COMPUTING
Spooky
ENTANGLEMENT Action at a
Distance
• Let’s walk through the famous Alice and Bob example
• Is it really that cool? Glove Analogy
• The applications of this in practical computation will probably be
covered later. For now, it’s enough to realize how counter-intuitive
and useful tool it can be for certain processes

QUANTUM COMPUTING
HOW DO WE USE ALL OF THIS FOR
COMPUTATION?

Image: Unsplash (https://www.weforum.org/agenda/2019/10/quantum-


computers-next-frontier-classical-google-ibm-nasa-supremacy/)

QUANTUM COMPUTING
Current Approaches To Building a Quantum Computer
• Quantum Annealers
• D-Wave is the leading proponent.
• Several commercial products are already available.
• Uses adiabatic quantum computation to find the minimum energy state.
• Suitable for solving most optimization tasks ranging from problems in material science to financial
modelling. Considerable effort is spent to remodel the problem to implement it on a quantum annealer.
• Multi-purpose Quantum Computers
• Like a classical computer with a set of logical gates that are used to manipulate qubits.
• These are supposed to be relevant for a wide variety of problems, like a computer you are using right
now.

o At present, most of the provide a hybrid model of the two approaches competing on the
implementation of different hardware techniques to entrap and manipulate the qubits (for
e.g., optic entrapment, ultra-cold qubits, etc).
o Out of these, most of them provide access to their hardware and simulators on Cloud
(Thanks to IBM to be the first company to provide access via cloud in 2016).
QUANTUM COMPUTING
QUANTUM FINANCE • Quantum finance is an
interdisciplinary research
field, applying theories and
methods developed
by quantum physicists and
economists in order to solve
problems in finance.
-Wikipedia

Source : https://medium.com/alpha-beta-blog/quantum-computing-and-finance-4556ca1f06e3

QUANTUM COMPUTING
FINANCE – SOME CORE PROBLEMS AND POSSIBLE APPROACHES

● Financial Markets - Trading/forecasting


○ Most of the problems in this domain can be reduced to optimization problems.
○ Dynamic Portfolio Optimisation - To construct an optimal portfolio for a given
return or a given risk and to modify it with the changing market conditions.
○ Optimal Arbitrage Opportunities- Given a set of assets and transaction costs, find
a cycle with positive return.
● Credit Risk Profiling
○ To define the pertinent features and build a model to evaluate credit scores/risk
assessment.
● Security regulations
○ Applications of quantum cryptography techniques to secure confidential data. A
major concern for financial institutions.
QUANTUM COMPUTING
Dynamic Portfolio Optimisation
● To construct an optimal portfolio for a given return or a given risk and to modify it with
the changing market conditions.
● An np-hard combinatorial optimisation problem.
● Classical approach - specific approaches/exhaustive search.
● Speedup on exhaustive search algorithms by quantum computers (recall Grover’s
algorithm)
● This problem was solved on two D-Wave chips with 512 and 1152 qubits [43].
Suggestive improvement in success rates. Large instances are expected to give
significant improvements.

I’ll walk you through an example of Grover’s Search algorithm which can
easily be extended to solve this problem.
QUANTUM COMPUTING
Credit Scores
• To define the pertinent features and build a model to evaluate credit scores/risk assessment.
• Classic textbook machine learning problem
• Two-fold advantage -
o To determine which features are relevant -
 Can be reduced to a Quadratic Unconstrained Binary Optimisation (QUBO problem).
 Hence, can be solved on a quantum annealer.
 This was implemented as a proof-of-principle on the 1QBit SDK toolkit [50].
o Quantum machine learning methods to train the model.
 Quantum versions of classical machine learning algorithms.
 Quantum Support Vector Machine - classification.
 Some other examples include Principal Component Analysis, Quantum Amplitude
Estimation, etc.

Refer Appendix for a detailed explanation of VQC.

QUANTUM COMPUTING
● Application of Grover’s algorithm - Lights Out Puzzle

QUANTUM COMPUTING
In principle, all problems that can be solved by quantum computers can be solved by classical computers with
enough memory and enough time.

Finally, I’d just like to demystify the fact that quantum computers will replace classical computers in the future.

So, we’ll still be using classical computers for tasks like sending emails or developing Rosetta!

But the areas that it does affect, especially concerning dealing with huge amounts of data, is going
to be revolutionized very soon and we should already be aligning ourselves with the change!

QUANTUM COMPUTING
References
1. Román Orús, Samuel Mugel, Enrique Lizaso, Quantum computing for finance: Overview and prospects, Reviews in
Physics, Volume 4, 2019, 100028, ISSN 2405-4283, https://doi.org/10.1016/j.revip.2019.100028
2. Havlíček, V., Córcoles, A., Temme, K., Harrow, A., Kandala, A., Chow, J., & Gambetta, J. (2019). Supervised learning with
quantum-enhanced feature spacesNature, 567(7747), 209–212.
3. https://medium.com/datadriveninvestor/quantum-computing-the-future-of-the-financial-industry-7b9c26442602
4. https://docs.dwavesys.com/docs/latest/c_gs_2.html
5. https://arstechnica.com/science/2019/10/what-problems-can-you-solve-on-a-quantum-annealer/
6. G. Rosenberg, P. Haghnegahdar, P. Goddard, P. Carr, K. Wu, M.L. de PradoSolving the optimal trading trajectory problem
using a quantum annealer IEEE J. Sel. Top. Signal Process., 10 (6) (2016), pp. 1053-1060, 10.1109/JSTSP.2016.2574703

7. B. Baesens, T. Van Gestel, S. Viaene, M. Stepanova, J. Suykens, J. Vanthienen, Benchmarking state-of-the-art


classification algorithms for credit scoring J. Oper. Res. Soc., 54 (6) (2003), pp. 627-635, 10.1057/palgrave.jors.2601545
8. Frank Phillipson, Harshil Singh Bhatia,  Portfolio Optimisation Using the D-Wave Quantum Annealer,
arXiv:2012.01121v1 [q-fin.PM]
9. https://github.com/qiskit-community/IBMQuantumChallenge2020

QUANTUM COMPUTING
Thank You!

QUANTUM COMPUTING
• Imagine I am using a brute-force method to find a Understandin
solution to the famous sudoku puzzle –
• I have 9*9=81 cells, each of which can have a g
value between 0 and 9
• So, that requires 4^81 classical bits.
Superpositio
• 5,846,006,500,000,000,000,000,000,000,000,000, n further-
How does it
000,000,000,000,000 (yup, that’s 41 zeroes)

Now let’s think in terms of qubits, helple suus?


dokus i
s
• Each qubit can be represented to be in a r o f s olvab , 960
u m b e 2 ,9 36
superposition of The n ,0 21,07
7 0, 90 3, 7 52
n t h e above
,6 t ha
• |1>, |2>, |3>, |4>, |5>, |6>, |7>, |8>, |9> and one 6 hich is far less
w
qubit for each cell equals 81 qubits! number

QUANTUM COMPUTING
Quantum Logic Gates

QUANTUM COMPUTING
Support Vector Machines
● Construct a hyperplane to divide the two sets of data.
● Non linearly-separable data - kernels
1. 2.

1. By Larhmam - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=73710028


2. By Alisneaky, svg version by User:Zirguezi - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=47868867
QUANTUM COMPUTING
Support Vector Machines (continued)
3.

3. By Shiyu Ji - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=60458994

QUANTUM COMPUTING
Quantum Variational Classifier
Quantum version of Classical SVM.

Source : Qiskit IBM Quantum Challenge 2020 (Notebook week2a_ex1)


QUANTUM COMPUTING
QVC - A classification (binary) example

Dataset -

● There are a total of 60,000 datapoints (rows in train_data) corresponding


to digits ranging from 0 to 9
● The first column has the label of the datapoint ranging from 0 to 9
● The next 784 columns/features are each a 28 28 grayscale image collapsed
into a row. Therefore, the dimension of the data is 784. Each of these
values range from 0 to 275 where 0 corresponds to white and 255
corresponds to black

Images Source : Qiskit IBM Quantum Challenge 2020 (Notebook week2a_ex1)


QUANTUM COMPUTING
Classical Results (Source : Wikipedia)

QUANTUM COMPUTING
Results of the challenge -
Max. accuracy - 0.832
Error rate = (1-0.832)
= .168
=1.68%

(Find the link to the GitHub Repo containing the problems and solutions for the challenge in the
references)
Grover’s Search Algorithm
• Let’s say I have an unordered list of say, n items. To find a particular item which satisfies some property, f we need to go
through all the items one by one. (An exhaustive search)

• This is an O(N) computation in classical computing.

• Grover’s algorithm can solve it in O(√N)! (There are more advanced versions which can reduce it further to O(3√N)

Viamontes, George & Markov, Igor & Hayes, John. (2005). Is Quantum Search Practical?. Computing in Science & Engineering. 7. 62 - 70. 10.1109/MCSE.2005.53.

You might also like