Placeholder Image

Subtitles section Play video

  • what is going on?

  • Everybody.

  • And welcome to a quantum computer programming tutorial.

  • Siri's right out of the gate.

  • I just want to stress I am not a quantum physicist.

  • I know a little bit about things, but I am just not an expert on quantum stuff.

  • Okay, I would argue that it seems like nobody really, truly is.

  • But I am less so than most.

  • Okay, that might talk on this subject anyways, So, um, my, my credentials are python.

  • YouTuber says to give you a little bit of understanding of my understanding of quantum physics.

  • So with that out of the way, I do want to at least give a basic foundation of quantum att least in terms of quantum computers.

  • I might say some wrong things, So I encourage you to go out and learn that yourself.

  • I think there's really no shortage of material, even just on YouTube.

  • But just on the Internet, in general, in terms of concepts and visualizations and just the theory of quantum mechanics and quantum computers, what there's almost nothing of is the actual practical side of things.

  • That's what I want to come here and do so.

  • First of all, what's a quantum computer?

  • So a quantum computer is just made up of cubits or quantum bits as opposed to our classical computer, which is made up of bits.

  • So the next question, of course, is what's a cubit?

  • So a cubit is well, first, what's a bit so a bit is in your classical computer.

  • It's just a It's a transistor, right?

  • And that that could be either a zero or a one.

  • And it gets its value from, Is it?

  • Ah, hi signal.

  • So we send voltage through.

  • Either it's a high signal or it's a low signal.

  • If it's a high, it's a one.

  • If it's a low, it's a zero, so a bit could be a zero or a one.

  • A cubit, on the other hand, can be a 01 We're both wait.

  • That's illegal Now, I assure you, apparently it can.

  • So So it does this through two characteristics that are unique to these quantum bits, which are superposition and entanglement.

  • So the idea of superposition is it is anything it could be, right.

  • Um, and it doesn't actually pick something until you make the observation.

  • So So for example, I think the mug is actually a pretty good example.

  • Right inside this mug, there could be water, coffee, tea, I don't know, hot fudge, all kinds of things, right?

  • And we and s So if this mug was in superposition, it would be all of those things, right?

  • And it's only when we look into it and be like, Oh, what do we got, Dewey?

  • Does it collapse on one of those values?

  • That's the concept of superposition.

  • Now to me and my, you know, I don't know lizard brain.

  • It says, No, There's really only one thing in that cup, so whatever, but But I'm just saying, Hey, that's the property.

  • The next thing is entanglement in the concept of entanglement is also magical.

  • And this is kind of the if you've ever heard the Einstein's spooky action at a distance.

  • This is what it comes from.

  • So if two cubits are entangled, a change in one causes a change in another one instantaneously, and distance is irrelevant Again.

  • I agree.

  • That's not allowed.

  • Um, it seems pretty spooky to me, but you know, people much smarter than me assure us that it's not actually spooky action at a distance.

  • We're not violating certain laws, like transferring information faster than the speed of light.

  • I mean, that's what it seems like to me, but we are assured that is not it.

  • So anyway, um, I'll leave the theorizing to other people.

  • All I can say is we have these two properties, how we have them, I don't know.

  • But we have them so cool, so that that's the difference between a cubit and a regular bit.

  • Now what happens when we have these two characteristics is in a classical computer the amount of like states that you can represent right, so each bit has two states that it could plausibly be.

  • It could be a zero, and it could be a one right in a quantum computer.

  • It could be 01 or anything in between.

  • So what?

  • I hate to say anything that is incorrect, I would say 01 or both States.

  • Let's just stick with that.

  • It's like a multitude.

  • It's not like it wouldn't be a scaler to my understanding.

  • Anyway, I see the comment section is probably blowing up with some experts.

  • Anyways, what this means to us is programs on the practical side of things is a classical computer can represent n bits times two states.

  • That's it.

  • A quantum computer can represent two to the power of n bits states.

  • So this is exponential.

  • This is massive.

  • It's a huge difference.

  • Rain.

  • So how many states both we can represent, but also like, consider?

  • So So, uh, quantum computers are unlikely to just, like replace classical computers one.

  • Because we kind of need classical computers toe work with quantum computers.

  • But also it's not that quantum computers will solve all the things that regular computers do or classical computers do faster, right?

  • It's not that it's quantum computers will solve problems that classical computers can't solve.

  • They just can't.

  • It would just be intractable, impossible to solve, right?

  • Or it would take a really long time, such as factoring numbers when it comes to, um, factoring for prime numbers.

  • So, for example, breaking encryptions, one of those things gets thrown around all the time that quantum computers could do.

  • That's true.

  • So if you're somebody that owns, um, like a database that today, if somebody was siphoning from it right now in 20 years with that, if that data would still be highly valuable, I'd be careful if I was you, because probably in 20 years R s a encryption could is dungeons.

  • So So these are things we have to think about.

  • I don't really think we're there now.

  • And also, as you'll see when we actually do the practical side of things, quantum computers have noise and error, and we don't quite yet know how to remedy that.

  • For some problems, it really doesn't matter.

  • For other problems, like breaking encryption, for example, it makes a huge difference.

  • So, um yes.

  • Oh, so the problems that quantum computers are going to be and currently are and going to be useful for our problems where, like the state space is just just massive.

  • Right?

  • So these exponential things, So ah, good example to think about is like any time you have many combinations.

  • So one example that I see gets thrown around by, you know, people that are trying to kind of sell The idea of quantum peters is like logistics.

  • So if you're delivering packages and you've got a route that you need to take, you know each kind of intersection that you pass is in theory, a branch that you could have taken and before long, each each turn that you pass or take branches out and creates this just again intractable number of other possibilities that you could have taken a classical computer kind of checks each, each one kind of in a brute force manner.

  • Sometimes we can use things like radiant descent or something like that to you, too.

  • Sort of optimized this task, but a quantum computer just simply can analyze all of them all at once, given the correct number of bits.

  • But it doesn't take long to have that correct number of cubits.

  • It doesn't take that long to have enough cubits, because there it's exponential.

  • So like a logistics is one another.

  • One is like modeling for like, molecules, things in like chemistry.

  • Right now, classical computers can sort of model things.

  • But classical computers, the best thing that classical computer Dio can do is like get close to T statistics, weaken sort of simulate probabilities.

  • But it's not real probability, right, Whereas a quantum appear as best I can tell, dare I say is probability like it just it's just it's true.

  • So that's the difference, right?

  • So another kind of really simple example that I think is easy to fit in one's brain is like, let's say you're organizing a charity event and you you're gonna see people at a table and ideally, you'd want those people to get along.

  • So they're in a nice donating mood.

  • Well, if you have five people, then that would be You know, you've got, like, five seats at a table, the combination of people that you could like, you know, what combination do you want to see?

  • People.

  • You only have five people, but the combinations Air five factorial, right?

  • So this means it's five times four times, three times, two times one right, So that's 120 combinations.

  • But if you just add one more person, it's because you went from 5 to 6.

  • It's 120 times six now, right?

  • So six factorial 7 20 right?

  • And then let's just jump all the way to like 10 people.

  • It's like 3.6 million.

  • So as you keep just adding just one more one more option, um, things get crazy.

  • So these are the types of things that, like, you know, a classical computer could obviously solve for the 120.

  • And the classical computer can do a pretty good job when you start getting to six million, Um, or 3.6 million, let's say.

  • But as you continue to go further and further the classical computer, at some point, it's just not even possible because at some point you end up having Maur more possibilities than there are like, you know, Adam's in the entire universe.

  • So you just It's just impossible, right?

  • And so we can prove that already we can definitely have quantum peters that will eventually exceed anything a classical computer could do in terms of large state spaces.

  • Okay, so I think that's really all I really want to talk about in terms of the fundamentals.

  • If you've got questions, feel free to ask them.

  • If I said something silly, feel free to correct me below.

  • Like I said, I'll put some other resource is in the description.

  • But let's say you're interested in this stuff.

  • You know you want a quantum computer.

  • What do you d'oh?

  • Well, it turns out, as you might expect building a quantum computer.

  • I mean, I don't know exactly how much would go into it, but I'm gonna imagine that if you wanted to start from scratch, it's probably like a least a $100 million enterprise.

  • Um, you can buy.

  • Like I've seen, that D Wave has sold at least one quantum computer for 15 million D waves.

  • Quantum computers are different from what appears to me to be.

  • Everyone else is, uh and I'm not intelligent enough to explain exactly why.

  • But something tells me that there, questionable compared to the differences, are questionable, at least So So let's I'm just going to throw out that they're probably about $100 million device, right?

  • Like so if you Googles, you know, 50 cubits, quantum meter R B ends or whatever.

  • So so they're expensive, whatever the heck they are.

  • So what these companies do with them?

  • Well, it turns out they just connect them to the cloud.

  • And anybody can connect and run these quantum circuits on them for free.

  • That's incredible.

  • To me.

  • This seems like it's like the equivalent of like if NASA was like, Hey, you can drive the Mars Rover, just connect to it and drive it around Mars.

  • That's what it seems like to me.

  • It's this incredible, but I think the thing is, right now, we're in a time where nobody totally knows what exactly are we going to use Quantum?

  • What all can we use quantum computer computers for?

  • And so it's just like a big kind of experiment right now.

  • So anyway, what a cool time to be alive that we can even play with these machines.

  • So, yes, we will play with actual quantum computers, uh, as well a simulator.

  • So, um, I think we've got the time.

  • Uh, let's go ahead and and set the set.

  • The mood.

  • So first of all, I'm gonna be working in the following.

  • I'm just gonna have this quantum computing tutorial.

  • Uh, and then we're going to, um we're gonna install something, So let me get out of the way, too.

  • I'm assuming everybody following this tutorial, please know the basics of python and installing packages.

  • If you don't, um, I will try my best to put a link to the basics tutorial in the description, but otherwise go to python programming dot net, go to the fundamentals and learn python the basics of python.

  • You honestly could learn the basics of python.

  • I feel like in a day.

  • Maybe that's unfair.

  • But day za Okay, So, um yeah, so cool.

  • So moving on.