1
NIT Delhi
Quantum Computing in machine learning
Presented By :
MOH KHALID
Roll No. 192211009
M.Tech-CSE (NIT DELHI)
MAY - 2021
Content
• Introduction
• History
• Quantum superposition and qubits
• Architecture of quantum computer
• Why quantum machine learning
• Classical computer vs quantum computer
• Quantum k-mean, quantum k-median and quantum KNN
• Future work
• Conclusion
• Reference
2
NIT Delhi
Introduction
• Quantum machine learning is the integration of quantum
algorithms within machine learning program.
• The quantum machine is a human-made device that follow the
law of quantum mechanics (Qubits, interference ,superposition
and entanglement) to information processing.
• Qubit can be one state, zero state or a combination of two states
at same time known as linear superposition.
• Mathematically to represent qubit state we use ket-notation,
qubit in state zero is |0>=transpose([1 0]) and qubit in state one
is |1>=transpose([0 1]).
• A qubit is represented as a linear superposition of both basis
state simultaneously.
3
NIT Delhi
History
• 1982- Feynman proposed the idea of creating machines based on the
law of quantum mechanics.
• 1985- David Deutsch developed the quantum turing machine,
showing that quantum circuits are universal.
• 1994- Peter Shor came up with a quantum algorithm to factor very
large numbers in polynomial time.
• 1997- Lov Grover develops a quantum search algorithm with O(√𝑛)
complexity.
• 2001- A 7 qubit machine was built and programmed to run Shor’s
algorithm.
• 2015- D-Wave System unveiled their 1152- qubit D-Wave 2x
quantum computer.
• 2019- Researchers at google that quantum computer had solved a
problem that would overwhelm the supercomputers.
Quantum superposition and Qubits
• Superposition is essentially the ability of a quantum
system to be in multiple state at same time.
• Qubits is a quantum generalization of classical bits the
two basic state of qubits are |0> and |1> which
correspondence with the state 0 and 1 respectively of
classical bits.
• If |y>=a|0>+b|1> where a and b are complex coefficient
then the probability of |0> is |a|^2 and probability of |1> is
|b|^2 hence |a|^+|b|^2 =1.
Quantum superposition and Qubits
…..
Fig: Classical vs Quantum bits [3]
Quantum entanglement
• Entanglement is the ability of a quantum system to
exhibit correlations
• In sort quantum entanglement means that multiple
particles are linked together in a way such that the
measurement of one particle’s quantum state determines
the possible state of other particles.
• When this happens, the state of the particles is said to be
entangled.
• If probability of 1 is p than probability of then for 0 it
will be 1-p.
Architecture of quantum computer
8
NIT Delhi
Fig: Architecture of Quantum computer [7]
Classical computer vs quantum computer
9
NIT Delhi
Classical computers use bits. Having two
state 0 and 1.
Quantum computers use Qbits.
Qubits is a linear combination of basis
states like |0> and |1>
Classical computers use logic gates to process
bits.
Logic gate may not be reversible.
Quantum computers use quantum gate to
process Qbits.
Quantum gate operation are reversible.
Classical computer slow in compare to quantum
computer.
According to professor Catherine a quantum
computer is faster then classical computer.
Why Quantum machine learning
• There are many problems that need exponential rise in
compute processing power and many take very long or
almost impossible to solve with classical computer. e.g.
1) finding prime factors of a very very large numbers
2) ground state energies of molecules,
3) simulating flow dynamics and so on
4) Clustering and classification problem for very larger
data point
WE NEED QUANTUM COMPUTING !
Quantum k-mean
Algorithm Quantum K-mean clustering:
1. Require: Initial K point and data point
2. Ensure: Clusters and their mean
3. Output: k cluster
4. Repeat
5. For all xi do
6. Attach to closest one
7. End for
8. For all K cluster do
9. Calculate mean for cluster using Grover’s algorithms
10 End for
11 Until cluster stabilize
11
NIT Delhi
Quantum k-median
Algorithm k-median clustering:
1. Input: k value and data point(DP)
2. Ensure: median and cluster
3. Output: k cluster
4. Repeat
5. For each data point in DP do
6. Attach it to its closest centre
7. End for
8. For each cluster do
9. Compute the median of the cluster and make it its new centre using Grover’s
algorithm
10. End for
11. Until stabilization of clusters
12 . Return cluster
12
NIT Delhi
Quantum-KNN
Algorithm k-median clustering:
1. Input: k value and data point(DP)
2. Ensure: class and distance
3. Output: k-class
4. Repeat
5. For each data point in DP do
6. select k nearest neighbor
7. End for
8. For each cluster do
9. Compute the hamming distance using Lloyd quantum algorithm
10. End for
11. Until stabilization of clusters
12 . Return cluster
Analysis of QML Algorithms
Algorithm Time in classical
version
Time in Quantum
version
why
K-mean O(𝑁2
) O(NlogN) We apply quantum
algorithm to compute
mean of different
cluster(Grover’s
algorithm)
K-median O(𝑁2
) O(𝑁3/2
) To find median we
use quantum
algorithm
KNN O(NlogN) O(√NlogN)
Future work
There are some other quantum machine algorithm
which provide speedup over classical algorithms. We
will try to analyse them. Like support vector machine
and regression algorithms.
15
NIT Delhi
Conclusion
• Quantum machine learning is not going to solve all
the problems of machine learning but some.
• Quantum version of k-means provide exponential
speedup over classical version and k- median
provide factor of √N over classical version. And
Quantum KNN is √N speedup.
• In quantum machine learning we use quantum
algorithms with machine learning.
• It is very advance technology.
• Implementation is difficult.
References
[1]. T. M. Khan and A. Robles-Kelly, "Machine Learning: Quantum vs Classical," in IEEE
Access, vol. 8, pp. 219275-219294, 2020, doi: 10.1109/ACCESS.2020.3041719.
[2] W. O'Quinn and S. Mao, "Quantum Machine Learning: Recent Advances and
Outlook," in IEEE Wireless Communications, vol. 27, no. 3, pp. 126-131, June 2020,
doi: 10.1109/MWC.001.1900341.
[3]https://in.images.search.yahoo.com/yhs/search;_ylt=Awrx5Za_1TxgwMQAKQfnHgx.;_y
8lu=Y29sbwMEcG9zAzEEdnRpZAMEc2VjA3BpdnM
[4] E. P. DeBenedictis, "A Future with Quantum Machine Learning," in Computer, vol. 51, no. 2,
pp. 68-71, February 2018, doi: 10.1109/MC.2018.1451646.
17
NIT Delhi
[5] D. Zubov, F. Volponi and M. Khosravy, "D-wave quantum computing Ising model: A case
study for the forecasting of heat waves," 2015 International Conference on Control,
Automation and Information Sciences (ICCAIS), Changshu, China, 2015, pp. 149-152, doi:
10.1109/ICCAIS.2015.7338651.
[6] P. W. Shor, "Algorithms for quantum computation: discrete logarithms and factoring,"
Proceedings 35th Annual Symposium on Foundations of Computer Science, Santa Fe, NM,
USA, 1994, pp. 124-134, doi: 10.1109/SFCS.1994.365700.
[7] A. Narayanan, "Quantum computing for beginners," Proceedings of the 1999 Congress on
Evolutionary Computation-CEC99 (Cat. No. 99TH8406), Washington, DC, USA, 1999, pp.
2231-2238 Vol. 3, doi: 10.1109/CEC.1999.785552.
[8] K. Svore, "Keynote addresses: Quantum computing: Revolutionizing computation through
quantum mechanics," 2017 IEEE/ACM International Conference on Computer-Aided Design
(ICCAD), Irvine, CA, USA, 2017, pp. 1-2, doi: 10.1109/ICCAD.2017.8203750.
THANK YOU

Quantum computing in machine learning

  • 1.
    1 NIT Delhi Quantum Computingin machine learning Presented By : MOH KHALID Roll No. 192211009 M.Tech-CSE (NIT DELHI) MAY - 2021
  • 2.
    Content • Introduction • History •Quantum superposition and qubits • Architecture of quantum computer • Why quantum machine learning • Classical computer vs quantum computer • Quantum k-mean, quantum k-median and quantum KNN • Future work • Conclusion • Reference 2 NIT Delhi
  • 3.
    Introduction • Quantum machinelearning is the integration of quantum algorithms within machine learning program. • The quantum machine is a human-made device that follow the law of quantum mechanics (Qubits, interference ,superposition and entanglement) to information processing. • Qubit can be one state, zero state or a combination of two states at same time known as linear superposition. • Mathematically to represent qubit state we use ket-notation, qubit in state zero is |0>=transpose([1 0]) and qubit in state one is |1>=transpose([0 1]). • A qubit is represented as a linear superposition of both basis state simultaneously. 3 NIT Delhi
  • 4.
    History • 1982- Feynmanproposed the idea of creating machines based on the law of quantum mechanics. • 1985- David Deutsch developed the quantum turing machine, showing that quantum circuits are universal. • 1994- Peter Shor came up with a quantum algorithm to factor very large numbers in polynomial time. • 1997- Lov Grover develops a quantum search algorithm with O(√𝑛) complexity. • 2001- A 7 qubit machine was built and programmed to run Shor’s algorithm. • 2015- D-Wave System unveiled their 1152- qubit D-Wave 2x quantum computer. • 2019- Researchers at google that quantum computer had solved a problem that would overwhelm the supercomputers.
  • 5.
    Quantum superposition andQubits • Superposition is essentially the ability of a quantum system to be in multiple state at same time. • Qubits is a quantum generalization of classical bits the two basic state of qubits are |0> and |1> which correspondence with the state 0 and 1 respectively of classical bits. • If |y>=a|0>+b|1> where a and b are complex coefficient then the probability of |0> is |a|^2 and probability of |1> is |b|^2 hence |a|^+|b|^2 =1.
  • 6.
    Quantum superposition andQubits ….. Fig: Classical vs Quantum bits [3]
  • 7.
    Quantum entanglement • Entanglementis the ability of a quantum system to exhibit correlations • In sort quantum entanglement means that multiple particles are linked together in a way such that the measurement of one particle’s quantum state determines the possible state of other particles. • When this happens, the state of the particles is said to be entangled. • If probability of 1 is p than probability of then for 0 it will be 1-p.
  • 8.
    Architecture of quantumcomputer 8 NIT Delhi Fig: Architecture of Quantum computer [7]
  • 9.
    Classical computer vsquantum computer 9 NIT Delhi Classical computers use bits. Having two state 0 and 1. Quantum computers use Qbits. Qubits is a linear combination of basis states like |0> and |1> Classical computers use logic gates to process bits. Logic gate may not be reversible. Quantum computers use quantum gate to process Qbits. Quantum gate operation are reversible. Classical computer slow in compare to quantum computer. According to professor Catherine a quantum computer is faster then classical computer.
  • 10.
    Why Quantum machinelearning • There are many problems that need exponential rise in compute processing power and many take very long or almost impossible to solve with classical computer. e.g. 1) finding prime factors of a very very large numbers 2) ground state energies of molecules, 3) simulating flow dynamics and so on 4) Clustering and classification problem for very larger data point WE NEED QUANTUM COMPUTING !
  • 11.
    Quantum k-mean Algorithm QuantumK-mean clustering: 1. Require: Initial K point and data point 2. Ensure: Clusters and their mean 3. Output: k cluster 4. Repeat 5. For all xi do 6. Attach to closest one 7. End for 8. For all K cluster do 9. Calculate mean for cluster using Grover’s algorithms 10 End for 11 Until cluster stabilize 11 NIT Delhi
  • 12.
    Quantum k-median Algorithm k-medianclustering: 1. Input: k value and data point(DP) 2. Ensure: median and cluster 3. Output: k cluster 4. Repeat 5. For each data point in DP do 6. Attach it to its closest centre 7. End for 8. For each cluster do 9. Compute the median of the cluster and make it its new centre using Grover’s algorithm 10. End for 11. Until stabilization of clusters 12 . Return cluster 12 NIT Delhi
  • 13.
    Quantum-KNN Algorithm k-median clustering: 1.Input: k value and data point(DP) 2. Ensure: class and distance 3. Output: k-class 4. Repeat 5. For each data point in DP do 6. select k nearest neighbor 7. End for 8. For each cluster do 9. Compute the hamming distance using Lloyd quantum algorithm 10. End for 11. Until stabilization of clusters 12 . Return cluster
  • 14.
    Analysis of QMLAlgorithms Algorithm Time in classical version Time in Quantum version why K-mean O(𝑁2 ) O(NlogN) We apply quantum algorithm to compute mean of different cluster(Grover’s algorithm) K-median O(𝑁2 ) O(𝑁3/2 ) To find median we use quantum algorithm KNN O(NlogN) O(√NlogN)
  • 15.
    Future work There aresome other quantum machine algorithm which provide speedup over classical algorithms. We will try to analyse them. Like support vector machine and regression algorithms. 15 NIT Delhi
  • 16.
    Conclusion • Quantum machinelearning is not going to solve all the problems of machine learning but some. • Quantum version of k-means provide exponential speedup over classical version and k- median provide factor of √N over classical version. And Quantum KNN is √N speedup. • In quantum machine learning we use quantum algorithms with machine learning. • It is very advance technology. • Implementation is difficult.
  • 17.
    References [1]. T. M.Khan and A. Robles-Kelly, "Machine Learning: Quantum vs Classical," in IEEE Access, vol. 8, pp. 219275-219294, 2020, doi: 10.1109/ACCESS.2020.3041719. [2] W. O'Quinn and S. Mao, "Quantum Machine Learning: Recent Advances and Outlook," in IEEE Wireless Communications, vol. 27, no. 3, pp. 126-131, June 2020, doi: 10.1109/MWC.001.1900341. [3]https://in.images.search.yahoo.com/yhs/search;_ylt=Awrx5Za_1TxgwMQAKQfnHgx.;_y 8lu=Y29sbwMEcG9zAzEEdnRpZAMEc2VjA3BpdnM [4] E. P. DeBenedictis, "A Future with Quantum Machine Learning," in Computer, vol. 51, no. 2, pp. 68-71, February 2018, doi: 10.1109/MC.2018.1451646. 17 NIT Delhi
  • 18.
    [5] D. Zubov,F. Volponi and M. Khosravy, "D-wave quantum computing Ising model: A case study for the forecasting of heat waves," 2015 International Conference on Control, Automation and Information Sciences (ICCAIS), Changshu, China, 2015, pp. 149-152, doi: 10.1109/ICCAIS.2015.7338651. [6] P. W. Shor, "Algorithms for quantum computation: discrete logarithms and factoring," Proceedings 35th Annual Symposium on Foundations of Computer Science, Santa Fe, NM, USA, 1994, pp. 124-134, doi: 10.1109/SFCS.1994.365700. [7] A. Narayanan, "Quantum computing for beginners," Proceedings of the 1999 Congress on Evolutionary Computation-CEC99 (Cat. No. 99TH8406), Washington, DC, USA, 1999, pp. 2231-2238 Vol. 3, doi: 10.1109/CEC.1999.785552. [8] K. Svore, "Keynote addresses: Quantum computing: Revolutionizing computation through quantum mechanics," 2017 IEEE/ACM International Conference on Computer-Aided Design (ICCAD), Irvine, CA, USA, 2017, pp. 1-2, doi: 10.1109/ICCAD.2017.8203750.
  • 19.