# Freakin’ Qubits: How Do They Work?

In this episode, Frank explains Qubits and the math behind them.

This episode is rated 2 Schrodingers.

Watch the live stream: https://www.linkedin.com/posts/frank-lavigne_impact-quantum-whats-a-qubit-activity-6707702289219493890-Obaj

Transcript

Voiceover

Hello and welcome to this episode of impact quantum. This episode is titled freaking qubits how do they work?

Voiceover

Only Frank could Lincoln Insane Clown Posse mean to quantum computing so you are clearly in the right place to learn. This episode is rated to shredding’s for some heavy maths content don’t worry, it’s not too scary.

Frank

Alright, so that.

Frank

Dubstep intro music means that this is impact quantum. The podcast for engineers who are curious about the coming revolution in quantum computing. I’m your host Frank Lavigna and my cohost will not be able to join us today. So as we promised in kind of the original show.

Frank

We’re not going to kind of do that. We’re gonna try to get to a more regular cadence. In these shows so this is show number Q. Although technically third in the series.

Frank

This show was rated 2 Schrodinger’s ’cause. We will get into a little bit of technical detail but don’t let that scare you off I’m going to talk about.

Uh.

Frank

Cubits and Anne, how they work? My name is Frank Levin. Yeah, i’ma data in AI architect who got quantum fever not that long ago. In November 2019, when I saw kind of the The Amazing stuff that’s just around the corner.

Frank

Um so today is about qubits and there’s a whole meme about this. The original song referred to magnets. But I think if they were writing this song. Today, they would be writing this about.

Frank

Um.

Frank

They would write about.

Frank

Cubits hang on spotlight and performance hang on. Hey cool, it does that now Alright. They took my feedback let me start this over if you’re watching this live I really appreciate it. I will be monitoring chat hey modern day tech. How’s it going?

Frank

Uh, if you’re watching this live, I appreciate you turning in live your listing later on the podcast. I will try to be very descriptive in the time that I have between now and.

Frank

My next meeting.

Frank

Alright so if if Insane Clown Posse were writing a new song. Today, they would probably talk about freaking cubits or how do they work?

Frank

So there was a whole Internet meme about it already on. To paraphrase something from one of the Guardians of the Galaxy movies, they didn’t say fricking. You have been warned.

Frank

So this is a?

Frank

Part of my big quantum presentation called Quantum Physics in 30 minutes or less.

Frank

Um?

Frank

Bye for people who have mixed feelings about it, hence mathematics.

Frank

Um this is the big barrier. I think for a lot of folks when they want to get into quantum computing. There’s a lot of math. There’s a lot of weird, kind of quantum physics and you hear a lot of things, said about quantum if you do a search on the Internet on quantum. There’s all sorts of interesting kind of metaphysical stuff, not going to touch into that, but what makes quantum weird.

Frank

Is how we normally interact with the world. We normally interact. You know whether it’s a baseball, whether it’s the moon, we interact, which known as Newtonian or classical mechanics, right? If I held a this smart phone.

Frank

Right and I Drop it. It’s going to fall fall, the floor. Maybe the glass will break. Maybe it won’t.

Frank

But it’s not going to fire. Let it go. It’s not going to go up and blast off and hit the ceiling. It’s not going to stay there in place. If I were to able to throw this fast enough, I would be able to get this to the moon. If I get through this a little bit less faster than that, I could get this into orbit, right? So that’s kind of how things work, right? If I.

Frank

Fight smacking against my other hand it’s going to make a noise and possibly hurt, but we can all measure based on the mass of this and the acceleration. How hard of that force is going to hit across the hand. I guess if you’re really clever you can figure out loud that smack would be.

Frank

Um, so quantum mechanics deals with stuff that’s really, really small, basically smaller than.

Frank

A smaller than an Atom or at the atomic level, right? So at this point in our normal world you know, here is kind of the scale of a a human hair, or the.

Frank

100 micrometres

Frank

Then we get down into kind of the genes and the virus is somewhere between 10 to 100 nanometers. Nano being a billionth.

Frank

Um?

Frank

And viruses are obviously very much on people’s minds these these days, but smaller than that smaller than proteins. You get molecules, small molecules, an atomic structures, so inside.

Frank

That Tomic structure is where things kind of start.

Frank

Getting different an I actually did listen to you and while I was on vacation, I read a book on quantum computing, an applied approach. Interesting book.

Frank

But there was even more fascinating book called Sinchronicity.

Frank

And it’s about kind of.

Frank

The understanding the try the reach to understanding.

Frank

How the universe works from Plato. I’m talking about, you know, the forms in The Cave and all that kind of Philosophy. 101 stuff which you know obviously.

Frank

Uh.

Frank

At that time.

Frank

At the time was cutting edge all the way to kind of where we are now and how we understand stars and Fusion and quantum physics and particles and stuff like that.

Frank

So those are all the things that we

Frank

Have at multiple levels of understanding so overtime.

Frank

We’ve really gotten down to. We’ve always pursued the the forward March of science, if you will. So quantum physics.

Frank

Works a little differently an that book synchronocity really covers the weirdness of quantum mechanics and the struggles that 20th century physicists came when they came through and went through to understand it. In fact, this is a something that Einstein.

Frank

Himself was very sceptical of you’ll. You’ll see the probability plays a big role here and in Einstein was famously quoted as saying.

Frank

Um, that.

Frank

God doesn’t play dice and.

Frank

So there’s definitely a lot of interesting kind of ether personality conflicts to one of the gates is called a Hadamard Gate, and they talk about him. There’s also three types of Pauli Gates at Poly X Poly. Why an Polly Z, and I wonder who is this guy Paulie that you know has so many quantum?

Frank

Logic, quantum computing, logic gates, and after him. And this book actually covers. He was kind of a big deal, not a household world, but word, but still kind of a big deal. So what quantum computers do is they take advantage of some of the quirks if you will, of quantum mechanics and the properties thereof.

Frank

I did warn you that this episode was going to be too schrodinger’s.

Frank

We will talk about the stuff I don’t fully understand it, so but I do understand a good bit of it and um.

Frank

Uh, we can kind of go through some of the particular properties that that this matter, so ultimately.

Frank

Quantum computers take advantage of all of the strangeness, if you will, for lack of a better term.

Frank

Of.

Frank

Quantum mechanics and in the same way that classical computers, whether it’s your smartphone, the laptop I’m recording this on, take advantage of the.

Frank

Properties of electricity, right? They are called electronics.

Frank

After all, and

Frank

There’s little electrons bouncing around inside those things and we take advantage of how that works and how semiconductors work.

Frank

So there’s four or three kind of properties that really matter, um, and then all of these operators are kind of built on that, um. And then when I say operators, I mean.

Frank

Logic gate operators like you would have with and not.

Frank

Type of gates. Stuff for you really would only learn in either electrical engineering or kind of Comp sci kind of intro. Just kind of show you how things ultimately happen on the actual metal.

Frank

Of the chip.

Frank

Alright, so the first is the first element of this is really called a cubit.

Frank

An what you’re seeing here is a bunch of math focused on.

Frank

Kind of basically discussing the state of the wave when you see that character, that means the state of the wave. This is basically the probability of it being or the state of it being.

Frank

Zero and one.

Frank

An ultimately.

Frank

How does that work?

Frank

Right so in a classical bit.

Frank

And this is everything every computer, you’ve ever used uses classical bits. You know basically a circuit is complete or it’s not right. The The Gate is on or the gate is off now.

Frank

What makes qubits special is they have the ability.

Frank

To also be.

Frank

One and zero right based on the electron spin.

Frank

But

Frank

There’s another state 1/3 state if you will, where it can be both zero and one at the same time.

Frank

This is called Super position.

Frank

And there there’s a famous thought experiment called Schrodinger’s cat, and basically it kind of breaks down into.

Frank

Until you examine, there’s a cat in the box. The cat, or may not cat may or may not be dead, but until you open the box and observe it.

Frank

It the cat exists in both states, the cat, the cat is both alive and dead simultaneously.

Frank

This is kind of a combo state and this is zero and one right cat is a dead or the cat is alive and there’s kind of this combo state.

Frank

The of in certainty basically where it is both can effectively be both zero and one.

Frank

And there’s a great scene from the movie No.

Frank

Country for old men.

Frank

And basically it is.

Frank

This guy is making is a very threatening kind of bad guy, and, uh, he flips a coin. Why is my animated GIF not?

Frank

Playing, that’s disappointing.

Frank

I guess if you’re listening along.

Frank

Uh, this character here, basically.

Frank

Threatens this guy and he forces him to call the coin and and ultimately what happens is, um, he calls it and he gets it right, but the cinematography, the lighting that own the music, all really paint the thing that this guy could die.

Frank

Any second and it turns out that he.

Frank

He made the right call on the thing and the guy just walked away. It was a very bizarre moment in the film in a very kind of strange movie.

Frank

But at that point when.

Frank

We didn’t know.

Frank

We weren’t certain of the outcome of the state so that’s kind of another example of of kind of that uncertainty of of state there.

Frank

Alright, so I did warn you that there is some math ahead an I am so the first time we’re going to do something kind of highly technical, both as a live feed on LinkedIn, YouTube and Twitch, of course LinkedIn.

Frank

Um but we do have?

Frank

Um, I do, I will explain it in my humble way. If you think I’m doing this wrong. I very Mel very may well be doing it wrong, but.

Frank

I would encourage you to come on the show and explain it, the right way I am not a quantum physicist. I am not a particle physicist an I know.

Frank

I know math of AI and that’s that’s where I I Land Alright.

Frank

So superposition.

Frank

Is the idea of how does that happen? Well mathematically, ultimately, superposition is the state of both zero and one.

Frank

So in other words, superposition is 0 + 1 now.

Frank

I learned in kindergarten that 0 + 1.

Frank

Is 1 right or 0 plus any number is the same number, right? So how does that work? That doesn’t make any sense and this for me this is the ah ha moment I had ’cause I attended a talk where he explained it very well.

Frank

So you’re right.

Frank

If you’re adding integers, absolutely 0 + 1 is just one, right? There is no third state, however.

Frank

What if you’re adding vectors?

Frank

Now, if you are watching this or you’re listening to this rather than watching it, think of a 0 as a horizontal line, right? And if you would describe that in Cartesian coordinates.

Frank

That would be.

Frank

One, zero right so that flat line represent is is is noted in Cartesian coordinates.

Frank

Is 1, 0.

Frank

Now a vertical line.

Frank

That is going up and down.

Frank

A would be described in Cartesian coordinates.

Frank

As zero, one.

Frank

So.

Frank

0, one.

Frank

For a vertical line.

Frank

And a one, 0 for a flat line.

Frank

Just think back to middle school math when you were drawing plots and charts and stuff like that and you all thought it was useless, right? Alright?

Frank

Adding those two states together.

Frank

You get.

Frank

Superposition, right? So think now are the 45 degree line that goes from.

Frank

That has can be described as one, one.

Frank

Here’s the rub. You are not adding integers, you’re adding vectors.

Frank

And once you start adding vectors.

Frank

You get to some interesting points of math.

Frank

And this is basically called linear algebra.

Frank

Some people call it matrix math, but essentially it’s the same thing.

Frank

And what you’re defining here. This is called bracket notation, which if you’re wondering why Amazon called their new quantum service bracket, This is why this is known as bracket notation, where you have the pipe.

Frank

A letter denoting a variable and then it’s not quite a greater than sign, but it kind of looks like one.

Frank

Alright, hopefully that makes sense. So vector math. Our matrix algebra has some very different has some very well defined rules. There are a little bit different than the math you learned. You know in kindergarten, elementary school matrices or not matrices.

Frank

Well, yeah it is a matrix. So so so these vectors, these matrices these vectors can be represented as matrices which have their own rules in terms of how they’re multiplied.

Frank

Right, So what you’re seeing on screen is that if I have a line that’s defined by 1, negative 2 an I double that. I now have two.

Frank

And -4.

Frank

Yeah, this is really difficult to explain in a way that folks on the podcast will get value out of, but ultimately.

Frank

It boils down to. Turns out that you can get quantum problems can also be represented in this matrix math or linear algebra.

Frank

Right, so if you expressed the problem in that and what you’re seeing on the screen, if you were watching on the screen is the math behind adding up these vectors.

Frank

So ultimately

Frank

At the end of the day.

Frank

Quantum computing

Frank

Indeed, quantum physics in general boils down to matrix math or linear algebra.

Frank

So if you already have experience with this, you are in good shape for the future.

Frank

If not, it’s a good time to learn.

Frank

All right so.

Frank

This is the second part of Q Bits and this kind of gets into kind of the nomenclature in common.

Frank

Descriptions of it.

Frank

Basically, mathematicians just love Greek letters. I don’t know why.

Frank

The short of it is that the Greek letter psi is used to represent the state of a qubit.

Frank

Greek letters Alpha and beta, or used to represent the numbers, or at least the their placeholders for for that.

Frank

For the matrix for the matrix, yeah. For the for the vectors.

Frank

Every time I get stressed out and confused about this, I kind of take a deep breath and think desk even bothered Einstein. So I feel good. I’m in good company.

Frank

Alright.

Frank

So this is what superposition would be defined mathematically. So the idea here is that.

Frank

You have the state of a qubit is equal to.

Frank

The likelihood of it being in state 0.

Frank

Or state one the addition of the two.

Frank

Um, that is basically kind of.

Frank

What it is and then?

Frank

In this example, this one does make sense to me, even though there’s all sorts of Weird Square Square roots or whatever. But ultimately there’s a 5050 chance.

Frank

Of the state here, PSI being zero and one right. I guess that that’s pure superposition.

Frank

And I should probably.

Frank

Find a more eloquent way to describe this verbally. For those on the podcast, um, but short of it is, is that all of this can be worked out mathematically, and what’s interesting about this is that long before computers that we have today were worked out too. How did you know how to use binary? How do you? How do you?

Frank

How do you build a logic gate or whatever it was worked out mathematically? I want to see like a century before.

Frank

Transistors actually came about.

Frank

So the fact that we can kind of see how the math works out and and kind of work through these, how a quantum computer would.

Frank

Be architected to solve these problems is is you know very much a call back to where we were a century ago with computers.

Frank

Alright, so Speaking of that I’m going to talk about operators, so if you go back to kind of the original.

Frank

World.

Frank

Of not that.

Frank

Not that screen.

Frank

I mean old school stuff.

Frank

Like this?

Right?

Frank

So if you had to read or write schematics, this is basically the classical logic gates.

Frank

And so this is a not gate, right? So it would be inverted, right? So if I sent in, you know, a one out of zero, like 0 would come out and and then these are the other gates. This ultimately is what powers this type of logic is ultimately what powers everything that you’ve ever seen done electronically, whether that’s.

Frank

You know you’re streaming the new season of the boys on Amazon Prime.

Frank

Arguing with people on Facebook and Twitter or listening to this podcast right here, everything boils down to a lot of these fundamental gates and this is not all of them, but ultimately.

Frank

Um, this is a big chunk of them.

Frank

Alright So what does this mean so because you have that that added superposition state?

Frank

Um there’s all sorts of new possibilities that are opened up and these new possibilities can in turn create new algorithms that have not yet been invented.

Frank

So here I mentioned before Poly X Poly why Polly Z and Hadamard Gate?

Frank

I’m not quite sure exactly what Poly XY and Z do. I’m still studying, but I do know that I Hadamard Gate.

Frank

We’ll take a Cub. It that’s in state one or state zero, and basically launch it in the Super position.

Frank

Now here’s the weird thing, and I’m not ready to talk about this in any length.

Frank

If you chain Hadamard Gates together, right? So if I take a Cub, it run through Hadamard Gate.

Frank

That that qubit is now in superposition.

Frank

What happens if I put it through a Hadamard gate again?

Frank

If it’s already in superposition, does it have no effect? Does not have an effect? Turns out does have an effect I don’t fully understand it, so I’m not going to explain it. I have to re watched the video again, but ultimately that’s kind of it, so just no two things. If you take away.

Frank

If you take.

Frank

Away nothing from other than my awkward explanation of vector math or linear algebra.

Frank

Take away that there’s due to be cause we’re dealing with a new kind of fundamental element here. I don’t want to. I don’t like the word element, but classical computers used electrons and their properties.

Frank

Quantum computers will use quantum mechanics or the quantum level particles or at least particles that are not ruled by.

Frank

Our world of classical mechanics.

Frank

Right again, think of the phone right? I can if I throw the phone against the wall it will hit the wall.

Frank

If I throw the phone hard enough, it will break through the wall. If I throw it fast and hard enough at the right angle, the phone will go into orbit, and if I really feeling aggressive I can hit. I can throw the phone Holder hard enough.

Frank

To reach the moon.

Frank

That’s classical mechanics.

Frank

This is quantum mechanics, so things are going to be a little different.

Frank

And be cause it’s different.

Frank

We have all new options in terms of gates.

Frank

That are available to us.

Frank

Alright, so with that quick explanation of qubits and how do they work, I am going to sign off. If you have any questions please let me know in the comments or reach out to us. And once again my name is Frank Lavinia.

Frank

And you have been listening.

Frank

To impact quantum.

Frank

Podcast for engineers were curious about quantum computing.

Frank

Thanks and have a great day.

Voiceover

Thanks for listening to the impact quantum podcast. You can now visit us on the web at impactquantum.com.