Quantum Machine Learning

Siraj Raval · Beginner ·📐 ML Fundamentals ·7y ago

Key Takeaways

The video discusses the principles of quantum mechanics and its application to machine learning, introducing concepts such as superposition, entanglement, and quantum computing, and exploring their potential to accelerate machine learning and advance towards artificial general intelligence, using tools like qubits and quantum processors.

Full Transcript

sir how do we solve this unleash the quantum hello world it's Suraj in quantum machine learning it sounds like the final class in a ph.d program doesn't it in this video I'll demonstrate a few examples of how both quantum computing and machine learning can be used together to solve some really hard problems but before we go there we need to get more familiarized with the field of quantum mechanics this is the collection of scientific laws that describe the behavior of subatomic particles an endlessly fascinating subject that's been notoriously difficult to master and somewhat controversial even for physicists it all started in the 17th century when scientists were trying to figure out the properties of light and rocking crazy facial hair at first Isaac Newton thought that light only consisted of tiny particles Christian Huygens thought it was made up of waves but Newton became puzzled by the wave-like phenomena of light interference interference is when two waves superpose to form a resulting wave of greater lower or the same amplitude it turned out they were both right and this resulted in the wave theory of light which states that light is both made up of tiny particles and made up of waves vibrating up and down perpendicular to the direction that it travels Einstein later discovered that these tiny particles called photons consist of energy inspired by this Niels Bohr came up with a new model for an atom the basic unit of all matter in the universe his model stated that an atom contains a small positively charged nucleus surrounded by electrons that travel in circular orbits around each other like a solar system each orbit has its own energy level and changes to that energy like the transition of an electron from one orbit to another around the nucleus of an atom happens in discrete quanta the phrase quantum leap refers to the movement from one discrete energy level to another with no transition its abrupt Bohr realized that because the movement of an electron was not progressive it just disappeared from one orbit and appeared in the next orbit with no intermediary state the amount of energy at that level couldn't be further subdivided that's why he called it quanta a minimum quantity of energy clearly scientists were beginning to figure out that the rules of classical mechanics did not apply at the sub atomic level but it gets even more interesting simulation confirmed consider the question why doesn't an electron have an intermediate state physicist Lewis de Brawley answered that question when he explained that matter can exhibit both particle and wave-like nature just like light this wave-like nature of electrons requires them to obtain certain wavelengths which are allowed for them to fit in an orbit and within that orbit electrons can exist throughout not just in a single spot because of its wave-like nature other physicists were paying attention to this and contributed more discoveries Heisenberg not the breaking bad one for example later proposed his uncertainty principle which stated that the position and velocity of a particle cannot both be measured exactly at the same time even in theory he later helped develop the Copenhagen interpretation of quantum mechanics which stated that a quantum particle doesn't exist in one state or another instead it's in all of its possible States simultaneously it's only when we observe this state that a quantum particle is forced to choose one probability and that's the state we observe that's right it's stating that reality exists in a certain way until we measure it it's reactive to conscious observation pretty incredible stuff this state by the way of existing in all possible states simultaneously is called superposition the Copenhagen interpretation of quantum mechanics was theoretically proven by a famous thought experiment called Schrodinger's cat in this thought experiment a physicist puts a cat in a box along with some radioactive material and a device for detecting radiation the device is designed so that when it senses the decay of the material it triggers a hammer which will break a flask containing acid which will kill the cat evil AF but to eliminate any certainty about the cat's fate the experiment takes place within an hour long enough so some of the radioactive material could decay short enough so that it's also possible none could while the cat is sealed in the box it comes to exist in an unknowable State it can't be observed so it instead exists in a superimposed state of both life and death until we open the box and observe the cat it has half a probability of being dead and half a probability of being alive the state of the cat is tied to its situation and can be considered a form of quantum entanglement this is a phenomena by which the quantum states of two or more objects can be described in reference to each other you can't describe the state of one without referencing the other and that same property applies even when these particles are separated by any amount of space Einstein called this spooky action at a distance clearly quantum mechanics is awesome and there are a lot of different interpretations of it even though the Copenhagen interpretation is the most popular TLDR the laws of nature at the sub atomic level are different than at any other level so how can we leverage this to possibly solve some hard problems about 40 years ago the popular physicist Richard Fineman proposed that in order to be able to simulate physics on a machine properly that includes the laws of both classical and quantum mechanics we'd need to create a kind of quantum computer classical computers the ones we all use perform operations using classical bits which are represented as binary data either a 0 or a 1 but what if we could have a bit represent both 1 and 0 at the same time what happens then what quantum mechanics tells us that this kind of superposition of both states is indeed possible at the subatomic level the basic unit of a quantum computer is called a qubit these qubits can be physically represented by quantum particles that can occupy two states simultaneously we could use a photon or an electron and rather than having these qubits interact how classical bits do we can leverage the idea of quantum entanglement to allow these qubits to interact with each other in all new interesting ways nowadays big technology companies like IBM Google and Microsoft as well as well funded startups like we're getting computing are all racing to build these exotic machines to see how we can use the quantum concepts of superposition and entanglement to both speed up existing algorithms and create entirely new classes of algorithms this involves a lot of computer science theory across a lot of different subfields but let's specifically talk about its effect on machine learning firstly quantum devices can be used to accelerate machine learning current quantum technologies resemble special purpose hardware like Asics rather than the general purpose CPU they're hardwired to implement a limited class of quantum algorithms more advanced quantum devices can be programmed to run simple quantum circuits just like FPGAs we know that both Asics and FPGAs offer benefits in machine learning as well as GPUs CPUs and GPUs therefore a quantum processor could theoretically be added to this mix of specialized AI hardware to help us advance towards AGI by creating an entirely new field of machine learning similar to how GPUs contributed to the deep learning Renaissance that started a couple years ago interestingly it turns out that mathematical optimization is an important task in quantum mechanics just like it is in machine learning physicists are interested in finding the point of lowest energy in a high dimensional energy landscape in fact one of the first tasks for quantum computers orchestrated by the company d-wave involved optimization their quantum annealer was used to solve classification tasks more recently the hybrid quantum classical technique of variational circuits has been proposed where a quantum device is used to evaluate a hard to compute cost function while a classical device performs an optimization based on this information and what about those massively parallel i's matrix multiplication operations that neural networks require GPUs for well in quantum computing the bottleneck to doing this is data encoding in order to use them for linear algebra we have to first load the large matrix onto the quantum device which is non-trivial but a quantum gate does execute a multiplication of an exponentially large matrix with a similarly large vector we could even think of a quantum gate as a linear layer of a giant neural net an exciting insight that could lead to novel neural architectures there's also the idea of sampling we can think of quantum computers as samplers that prepare a class of distributions called quantum states and sample from them with measurements we could explore how samples from quantum devices can be used to train machine learning models sample based training for Boltzmann machines is one example another idea is kernel evaluation kernel methods use machine learning models based on a distance measure between data points called a kernel quantum devices can be used to estimate certain kernels including the ones hard to compute classically by estimating the inner products of two high dimensional quantum states so the estimates from a quantum device can be fed into a standard kernel method like a support vector machine although inference and training are done classically they can be augmented with the quantum device so we can think of the first generation of quantum computers has partially programmable special-purpose devices that can accelerate certain tasks in machine learning just like GPUs did for deep learning quantum computers can help speed up some existing machine learning models allow for the creation of never before possible models and likewise machine learning can help quantum devices learn new quantum algorithms rather than having researchers try to figure them out themselves lots of work is happening right now in this field and if you want you can try out your own quantum algorithm on both real and simulated quantum devices links will be in the video description thanks so much for watching my video hit subscribe and I'll come visit you and your dreams tonight for now I've got to get this entangled so thanks for watching

Original Description

Quantum computers are mind bogglingly powerful machines that take a novel approach to processing data. Built on the principles of quantum mechanics, they utilize complex and fascinating laws of nature that are always there, but usually remain hidden from view like superposition and entanglement. In this video, i'll talk about the intersection of quantum computing and machine learning. Specifically, we'll discuss the examples of quantum annealing, sampling, and quantum gates as layers in a neural network. We'll first try to cover quantum mechanics though, get hype! Code for this video: https://github.com/llSourcell/quantum_machine_learning Please Subscribe! And like. And comment. That's what keeps me going. Want more education? Connect with me here: Twitter: https://twitter.com/sirajraval Facebook: https://www.facebook.com/sirajology instagram: https://www.instagram.com/sirajraval This video is apart of my Machine Learning Journey course: https://github.com/llSourcell/Machine_Learning_Journey More learning resources: https://github.com/krishnakumarsekar/awesome-quantum-machine-learning https://hackernoon.com/how-quantum-computing-machine-learning-work-together-bc61d0f1b3a https://www.kdnuggets.com/2018/01/quantum-machine-learning-overview.html https://medium.com/xanaduai/quantum-machine-learning-1-0-76a525c8cf69 https://www.rolandberger.com/en/Point-of-View/The-next-big-thing-Quantum-machine-learning.html https://www.rigetti.com/products Join us in the Wizards Slack channel: http://wizards.herokuapp.com/ Learn more about the School of AI: https://www.theschool.ai And please support me on Patreon: https://www.patreon.com/user?u=3191693 #SirajRaval #Quantum #MachineLearning Signup for my newsletter for exciting updates in the field of AI: https://goo.gl/FZzJ5w Hit the Join button above to sign up to become a member of my channel for access to exclusive content! Join my AI community: http://chatgptschool.io/ Sign up for my AI Sports betting Bot, WagerGPT! (5
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Siraj Raval · Siraj Raval · 0 of 60

← Previous Next →
1 What is Bitcoin?
What is Bitcoin?
Siraj Raval
2 5 Ways to Use Bitcoin
5 Ways to Use Bitcoin
Siraj Raval
3 BTC Fever - Siraj [Music Video]
BTC Fever - Siraj [Music Video]
Siraj Raval
4 5 Reasons to Build Decentralized Apps
5 Reasons to Build Decentralized Apps
Siraj Raval
5 The Interplanetary File System
The Interplanetary File System
Siraj Raval
6 How to Build a Dapp in 3 min
How to Build a Dapp in 3 min
Siraj Raval
7 Life Before Smartphones
Life Before Smartphones
Siraj Raval
8 4 Ways to Use Smart Contracts
4 Ways to Use Smart Contracts
Siraj Raval
9 3 Dapps You HAVE to See
3 Dapps You HAVE to See
Siraj Raval
10 Char's Life as a BitTorrent Engineer
Char's Life as a BitTorrent Engineer
Siraj Raval
11 4 Reasons AlphaGo is a Huge Deal
4 Reasons AlphaGo is a Huge Deal
Siraj Raval
12 Build a Neural Net in 4 Minutes
Build a Neural Net in 4 Minutes
Siraj Raval
13 Sentiment Analysis in 4 Minutes
Sentiment Analysis in 4 Minutes
Siraj Raval
14 The Hackathon Life
The Hackathon Life
Siraj Raval
15 Your First ML App - Machine Learning for Hackers #1
Your First ML App - Machine Learning for Hackers #1
Siraj Raval
16 Build an AI Composer - Machine Learning for Hackers #2
Build an AI Composer - Machine Learning for Hackers #2
Siraj Raval
17 Build a Game AI - Machine Learning for Hackers #3
Build a Game AI - Machine Learning for Hackers #3
Siraj Raval
18 Build a Movie Recommender - Machine Learning for Hackers #4
Build a Movie Recommender - Machine Learning for Hackers #4
Siraj Raval
19 Build an AI Artist - Machine Learning for Hackers #5
Build an AI Artist - Machine Learning for Hackers #5
Siraj Raval
20 Build a Chatbot - ML for Hackers #6
Build a Chatbot - ML for Hackers #6
Siraj Raval
21 Build an AI Reader - Machine Learning for Hackers #7
Build an AI Reader - Machine Learning for Hackers #7
Siraj Raval
22 Build an AI Writer - Machine Learning for Hackers #8
Build an AI Writer - Machine Learning for Hackers #8
Siraj Raval
23 Build a Chatbot w/ an API - ML for Hackers #9
Build a Chatbot w/ an API - ML for Hackers #9
Siraj Raval
24 One-Shot Learning - Fresh Machine Learning #1
One-Shot Learning - Fresh Machine Learning #1
Siraj Raval
25 Generative Adversarial Nets - Fresh Machine Learning #2
Generative Adversarial Nets - Fresh Machine Learning #2
Siraj Raval
26 Tone Analysis - Fresh Machine Learning #3
Tone Analysis - Fresh Machine Learning #3
Siraj Raval
27 Generate Rap Lyrics - Fresh Machine Learning #4
Generate Rap Lyrics - Fresh Machine Learning #4
Siraj Raval
28 Build an Autoencoder in 5 Min - Fresh Machine Learning #5
Build an Autoencoder in 5 Min - Fresh Machine Learning #5
Siraj Raval
29 Build a Self Driving Car in 5 Min - Fresh Machine Learning #6
Build a Self Driving Car in 5 Min - Fresh Machine Learning #6
Siraj Raval
30 Build an Antivirus in 5 Min - Fresh Machine Learning #7
Build an Antivirus in 5 Min - Fresh Machine Learning #7
Siraj Raval
31 TensorFlow in 5 Minutes (tutorial)
TensorFlow in 5 Minutes (tutorial)
Siraj Raval
32 Build a Recurrent Neural Net in 5 Min
Build a Recurrent Neural Net in 5 Min
Siraj Raval
33 Build a Simulation in 5 Min
Build a Simulation in 5 Min
Siraj Raval
34 Build a TensorFlow Image Classifier in 5 Min
Build a TensorFlow Image Classifier in 5 Min
Siraj Raval
35 Tensorboard Explained in 5 Min
Tensorboard Explained in 5 Min
Siraj Raval
36 Generate Music in TensorFlow
Generate Music in TensorFlow
Siraj Raval
37 Build a Game Bot (LIVE)
Build a Game Bot (LIVE)
Siraj Raval
38 Deep Learning Frameworks Compared
Deep Learning Frameworks Compared
Siraj Raval
39 Introduction - Learn Python for Data Science #1
Introduction - Learn Python for Data Science #1
Siraj Raval
40 Build a Neural Network (LIVE)
Build a Neural Network (LIVE)
Siraj Raval
41 Twitter Sentiment Analysis - Learn Python for Data Science #2
Twitter Sentiment Analysis - Learn Python for Data Science #2
Siraj Raval
42 Recommendation Systems - Learn Python for Data Science #3
Recommendation Systems - Learn Python for Data Science #3
Siraj Raval
43 Predicting Stock Prices - Learn Python for Data Science #4
Predicting Stock Prices - Learn Python for Data Science #4
Siraj Raval
44 Pong Neural Network (LIVE)
Pong Neural Network (LIVE)
Siraj Raval
45 Deep Dream in TensorFlow - Learn Python for Data Science #5
Deep Dream in TensorFlow - Learn Python for Data Science #5
Siraj Raval
46 Visualizing Data with D3.js (LIVE)
Visualizing Data with D3.js (LIVE)
Siraj Raval
47 Genetic Algorithms - Learn Python for Data Science #6
Genetic Algorithms - Learn Python for Data Science #6
Siraj Raval
48 Enter Siraj [Music Video]
Enter Siraj [Music Video]
Siraj Raval
49 Build a Web Scraper (LIVE)
Build a Web Scraper (LIVE)
Siraj Raval
50 Why is P vs NP Important?
Why is P vs NP Important?
Siraj Raval
51 How to Make a Neural Network (LIVE)
How to Make a Neural Network (LIVE)
Siraj Raval
52 How to Make an Amazing Tensorflow Chatbot Easily
How to Make an Amazing Tensorflow Chatbot Easily
Siraj Raval
53 How to Make an Amazing Video Game Bot Easily
How to Make an Amazing Video Game Bot Easily
Siraj Raval
54 How to Make a Tensorflow Neural Network (LIVE)
How to Make a Tensorflow Neural Network (LIVE)
Siraj Raval
55 How to Make a Simple Tensorflow Speech Recognizer
How to Make a Simple Tensorflow Speech Recognizer
Siraj Raval
56 Joel Shor - Really Quick Questions with an Awesome Google Engineer
Joel Shor - Really Quick Questions with an Awesome Google Engineer
Siraj Raval
57 How to Make a Path Planning Algorithm Easily (LIVE)
How to Make a Path Planning Algorithm Easily (LIVE)
Siraj Raval
58 The Best Way to Prepare a Dataset Easily
The Best Way to Prepare a Dataset Easily
Siraj Raval
59 Catherine Olsson - Really Quick Questions with an OpenAI Engineer
Catherine Olsson - Really Quick Questions with an OpenAI Engineer
Siraj Raval
60 How to Make a Tic Tac Toe Neural Network Easily (LIVE)
How to Make a Tic Tac Toe Neural Network Easily (LIVE)
Siraj Raval

This video introduces the basics of quantum mechanics and its application to machine learning, covering topics such as superposition, entanglement, and quantum computing, and exploring their potential to accelerate machine learning and advance towards artificial general intelligence. The video provides a foundation for understanding quantum machine learning and its potential applications. By watching this video, viewers can gain a deeper understanding of the principles of quantum mechanics and h

Key Takeaways
  1. Learn the basics of quantum mechanics
  2. Understand the principles of superposition and entanglement
  3. Explore the applications of quantum computing in machine learning
  4. Design quantum-accelerated LLM architectures
  5. Implement quantum computing in LLMs
  6. Fine-tune LLMs with quantum computing
  7. Develop multimodal LLMs with quantum machine learning
💡 The laws of nature at the subatomic level are different than at any other level, and quantum computing can be used to accelerate machine learning and advance towards artificial general intelligence.

Related AI Lessons

Up next
Learn Deep Learning by Hand (Beginner's Guide - Part 1)
Thu Vu
Watch →