Hello. World is Siraj in quantum computers
How do they work and how do they benefit AI let's talk a little bit about the theory and then we'll build a very simple
Quantum Algorithm by the way the machine that you're using to watch this video whether it's a
Laptop or a phone is an example of a classical computer, it's a general-purpose machine
we can code up an algorithm give it some quality data and
Theoretically it can accomplish pretty much any task. We'd like streaming live video
creating immersive
three-dimensional environments
eliminating existential dread
Actually, it doesn't do that yet
But at their core all classical computers do something really basic under the hood
behind every software
Application is a series of simple math operations any task we want to perform on a computer like
booking applies or playing a game is
Translate it into a string of
Ones and zeros which act as input that is processed by an algorithm
Which then outputs a new string of 1 to 0?
Algorithms in all their complexity in the end just manipulate strings of bits
Where each bit is either a 1 or a 0?
We use ones and zeroes because they're a way of representing information
Such that it can only be in one of two different states
Computers run on electricity duh when a computer wants to send information from one place to another
It sends pulses of electricity over a wire
computers use transistors that can either be closed so that a current flows or
Open which means there isn't a current both states are represented
Using either a 1 or 0 they're like light switches either on or off
So when these ones and zeros are strength together they can represent any
number or letter using binary code computer youth circuits called logic gates that are composed of
Transistors
Connected together and they compare patterns of bits to turn them into new patterns of bits
using simple arithmetic hard drives store one zeros by
changing the magnetic poles of small parts of a metal disk
Positive and negative charges are represented by ones and zeros
respectively
so
Computers do these two things really well they store numbers in memory
And can process these numbers with simple Math operations
I'm just like you those four Terrhagen. Let's make binary grade again in
1965 the Founder of Intel Gordon Moore predicted that the number of transistors
Per Square inch on integrated circuits would continue to double every 18 months so far
It's proven to be true, but there is a calming plateau in transistor. Density. We can only make them so small
Before the laws of physics stop us the idea of quantum computing is a potential solution
And that's why interest in it has increased in recent years the word
Quantum in physics means the minimum amount of any physical entity involved in
Interaction so a photon is a single quantum of light
for example
That's it's real scientific definition
but it's also used colloquially sometimes to mean the opposite like quantum leap or
by anything Deepak chopra says the
Aficionados in the world of quantum physics have somehow hijacked the word for their own use
Quantum physics deals with the world of atoms and the subatomic particles inside of them
It's really badass because on the atomic scale the laws of classical physics. No longer apply
Richard Fineman put it best when he said
things on a very small scale behave like nothing you have any direct experience about or
Like anything that you have ever seen
tiny particles like electrons and photons can take on several states at the same time that a
larger scale would be mutually exclusive they can be in several places at once or exhibit two kinds of
Polarization at the same time we're not able to see this
Superposition of different states because it disappears once someone tries to measure it
Nobody really knows how that happens
But it does we can use this concept of superposition to free computers from Having binary constraints?
Quantum computers use particles magnetically suspended in near absolute zero
temperatures to represent not bits but Q bits instead of representing either 1 or 0
They can also represent both simultaneously
Ok so you might be thinking big deal could you just achieve superposition on a classical computer by just using two
ordinary bits at the same time no need for a qubit and
Because there's more to quantum physics than just superposition. There's also the idea of
Entanglement if we have a system of more than one qubit these particles are not
Independent of each other
they're
Entangled so in a system of two qubits the outcome of one qubit tells you what you will see when you measure the other qubit
particles can be entangled even if they are separated in space by huge distances
Einstein called entanglement
spooky action at a distance
that's my Einstein voice what that means is that you can't just describe a system of several qubits using descriptions of
individual qubits you have to describe the correlations between
Qubits and as you increase the number of them the number of correlations grows
Exponentially so for a system of just three hundred qubits you need more numbers than there are atoms in
visible universe to describe
Think about that for a second
So because we can't just write down the info
contained in a system of a few hundred qubits using classical bits
Maybe a computer running on these qubits can perform tasks that classical computers couldn't achieve
That's why people think quantum computing holds a lot of promise
So let's build a simple quantum
Algorithm in python using Ibm's quantum api to learn more you can sign up for access to their api
Easily on their website then download the sdk to use it in python after we import it
We're going to build a voyage yoga algorithm one of the first quantum. Hall goes to be proposed
We are given a quantum computer known as an oracle that implements some function s it takes n
Digit binary values as input and produces either a 0 or 1 as output for each value the function is constant
0 on all inputs or
1 on all inputs it could also be balanced
So it returns 1 for half of the input domain and 0 for the other half the task is to decide if f is
Constant or balanced by using the oracle first we'll initialize a quantum program object with a quantum and classical
Register holding three bits the program lets us manipulate quantum circuits and each circuit has a set of data
Registers well apply was called a hadamard gate to every two-bit
So now all the possible states are including likely to be observed
For every possible state will apply the oracle in our case the oracle is a balanced function
Then we'll apply the h gate to all the qubits once more and that's it for our algorithm for a constant function
We can expect a 100% chance of observing all zeros and for a balanced function
We can expect anything else this shows that a Blackbox problem can be solved efficiently
By a quantum computer with no error whereas a classical computer would need way more
Queries to the Black box to solve the problem I've sacrificed
relationships for greatness
The ten have yet to create their masterpiece
intelligence in England, right
So there are three takeaways here quantum. Physics is a study of physical phenomena that happen at the atomic or subatomic
level quantum computing takes advantage of quantum physics to allow for more efficient algorithms and
Cubed not this are the fundamental unit of quantum computing capable of simultaneously
Representing both a 1 and a 0 the wizard of the week is no one look down
The challenge was to build a q-learning bot and knowing you care offs that train a DQ learner in the carpool
Environment until it was able to successfully balance itself love the animation at the end great work and run around is a Jawa
You tensorflow to build with Dq end of the game break out with no high-level
Rappers nicely done the coding challenge for this week is to try your hand at building a simple quantum algorithm using ibm's api
Details are in the readme poster github link in the comments, and I'll announce the winner next week
I hope you like this video, please subscribe for more like it if you did and for now. I've got a quantum teleport
So thanks for watching
