What can my homemade quantum computer do?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so I made a quantum computer in my last video you don't have to watch that video because I'll try and explain what this does as I go but when I was making that video I realized that my quantum computer seems to be working kind of well enough that I could actually use it for a computation that is really surprising I didn't expect it to be this good to be honest I thought it would be so cool to show you a Quantum computation in action and I hope that by showing you that you'll get an idea of what it exactly is that quantum computers can do well and what they can't do well because one thing I'm absolutely sick of as a person who you know used to research Quantum Computing is people telling everyone in the media that Quantum computation is going to solve all the world's problems quantum computers are super super computers they're really not quantum computers are usually worse than normal computers worse in the sense that they're about the same but they're way harder to build uh but there's some situations where we have an algorithm for how to use the quantum computer that lets it do something that would be basically Impossible on a regular computer as in would take a really really long time so the classic example is factoring prime numbers on a regular computer that takes a really long time for even like you know 30 digigit numbers and that's an important problem because all of our encryption currently relies on that problem being really hard for hackers to do but on a quantum computer people discovered an algorithm that would let you do it quite quickly if you did have a working quantum computer and I think that since then there has been this idea that like we will find um lots of algorithms to do useful things on quantum computers and by and large it hasn't really panned out it's been almost 30 years since the factoring algorithm came out but somehow while I was editing this video a new polinomial time Quantum algorithm was discovered finally I'll talk about that result and how significant or not significant it is another time but let's get back to this video I want to explain why it's so so difficult to make a Quantum algorithm good so the thing with my quantum computer is that it is a one cubic quantum computer literally as useless as it gets in terms of quantum Computing so I have to think of an algorithm that will be possible on this useless machine and luckily there kind of is one it's actually kind of my favorite algorithm to teach people because it really demonstrates what quantum computers do it's called the deuts joer algorithm Richard joer is actually my PhD supervisor and he gives a great explanation of this algorithm and how it shows what quantum computers can do well um so I'm going to try and pass on that same intuition for you I've just got to try and figure out how using the equipment that I have so it's an experiment for both you and me okay let me explain the problem that the de Jer algorithm is trying to solve suppose you're approached by this Shady character who wants you to solve a riddle he has a computer in this black box doing some sort of mysterious calculation and you can send in a zero bit or a one bit into the computer as an input and then it will return one bit as an output so for example you can send in a zero and his computer will send out maybe a one in this riddle he's going to ask you to find out something about this secret function his computer is calculating if that sounds like a completely ridiculous madeup problem that's because it is the reason that the do Jer algorithm was made to solve that problem is because it's most obvious problem to solve with a quantum computer not because it's a problem you would want to solve so with that in mind let's try and do it there's four different functions that this guy might have in mind he might for example be thinking of the function that does nothing to your inputs so if you put in zero you get out zero if you put in one you get out one or who might be thinking of the one that swaps them so if you put in zero you get one if you put in one you get zero or it could be one of these two constant functions where no matter what the input is you get a zero or no matter what the input is you get a one so those are the four different functions the question he wants you to answer is not which of these four functions is his secret function that would actually be too hard a problem for the quantum computer to solve instead what he wants you to find out is whether the function is one of these balanced functions so like FS1 and FS2 it's called balance because half of the outputs are zero and half of the outputs are one or whether they're constant functions like F3 and F4 because both those outputs are the same this seems like a really easy problem if he lets you use his computer at least twice you would first send in a zero and then let's say you got the output one and then you know that you know it's one of these two and then you'd send in a one and if you got the output zero then you know it's F2 and so you know it's balanced on the other hand if you got one you would know that it's F4 and so it's constant so it seems like a really easy problem as long as he lets you use the computer Compu twice but that's the cat he's not going to he's only going to let you use it once can you still solve this problem the answer for a normal computer is no way but what about if you have a Quantum version of this same puzzle can you solve it with a quantum computer well first he has to actually make a Quantum version of this puzzle that's fair pretend with me for a moment that we are that guy so we need to come up with a way of doing our computation that is going to be kind of fair for the quantum computer um what I mean by that is that like the quantum computer isn't going to be able to act in the exact same way like its input is going to be a cubit so you know that's going to be some light the light is going to shine into the computer and then the output is also going to be some light so we need something that will like do the same kind of computation but is able to be encoded in light um so I'm going to show you one way that we could make that happen and at first it's going to seem really strange this strange computation you're about to see me make that is actually possible to make directly from the original classical computer so if this Challenger wanted to he could just give the classical computer to the quantum person and then the quantum person would have to do the work to convert it into a Quantum version and it is totally possible it's just a bit of a pain and a little bit mean so instead we're going to like Pretend We're a nice person and we'll make something that encodes that function for them so that is what we're trying to make right now Quantum version of f let's just say for example that the secret function that we want to encode is F2 so Z goes to one and one goes to zero so that is a balanced function so how are we going to go about making our secret version of F2 first I'll give you the sort of theoretical version of it and then you and I both are going going to have to figure out how to actually make it in this experiment remember that there are two different outputs that could be coming out of this laser one type of light that it can output is what we're going to call horizontally polarized light or um zero so we'll write it like that and the way to make it is to put a filter on this light like this and as long as the filter is aligned this way then all of the light that come comes out is going to be horizontal so that means light that's oscillating in the horizontal Direction and there's also light that is in the one state which is light that's oscillating in the vertical Direction so up and down what we want is both the zero and the one inputs to get converted in some way according to what function we have the most obvious thing to do in this case is have the zero light become the one light and the one light become zero in this case unfortunately though that's not going to work because if this box is going to be made of quantum Parts it actually just can't operate this way the reason is a bit technical it's because Quantum processes have to be reversible and sometimes this scheme won't be reversible it's not important though because we can overcome this inconvenience pretty easily and still encode the function that we want so this is the way we're going to do it you see here we've got zero and it goes to one whenever anything goes to one what we're going to do is take the original light and flip it so this is what I mean so here's the light coming out in the zero State and what that means is if you had an electron in the way that it would first get bumped upwards and then as the light moves along it would eventually get pushed downwards and then back up so this electron will be bouncing in this direction but crucially originally it gets pushed upwards now what if I flip this light upside down then what would happen first is that the electron would get pushed downwards so it would still oscillate up and down but it would first go downwards so that is a different type of light very subtly different but this negative version of the light is one that pushes in the opposite direction first so whenever the output is one we flip the light on the other hand the one input goes to zero and the way that we're going to encode that is nothing happens so the one just gets to go through exactly as it was so in other words if we had this light coming through it just goes through as if nothing happened so this action is what we need our secret quantum computer to do remember but we're still the guy right now so that's what we need to figure out how to do just so you see how this works if we had another function if we had F4 it would be 01 and both of those go to one what would happen is that okay well this bit is still the same the zero goes to one so zero gets flipped but now one goes to one here and so it needs to get flipped as well so one will go to 1 so if F4 was our secret function then that is what we would need our computation to do all right so that's all good in theory this is the part that I understand well but now we're going to have to figure out how to actually do this I got this stuff that I I'm really excited about um uh I don't actually know how to pronounce this one Lambda I don't know um you know how you say stuff like oh a halfwave plate or a quarter wave plate this is a full wave plate then I guess um right this is what it does it takes any light and it flips it upside down so whether you have a zero coming in or a one coming in it flips it upside down which incidentally is exactly what we need for F4 so that's cool um we figured out how to do F4 so in the case of f4 if that was this guy's secret function then he' just put this here that would be it I don't think this is right actually actually I think I'm getting confused about what these wave plates do no I was right the first time that is how you make F4 but then I spend 40 minutes confusing myself that and that you got vertical I have no idea what I was talking about here eventually I decided to just do an experiment to find out what the wave plate does easiest way to tell if it is right is to actually do this this full experiment so maybe that's kind of good just putting this um thing here because uh I want to protect this polymer it's not really rated for using lasers and I don't want to burn a hole in it it was very very painful to watch myself struggle through this experiment so I'm going to summarize this bit for your sake first I tried putting this light through the quantum computer without the wave plate in the way and I did a bunch of measurements of that light using a filter which I tried orienting in a few different ways so far so good then I put the wave plate up and I tried the same measurements and you'd expect some sort of change in the outcomes right because after all the wave plate is meant to change the light that's the point but strangely all of the results were exactly the same as if the wave plate wasn't there at all what so in other words nothing is happened here so what I'm going to guess is that this plate one that I have here is the one that just takes anything so whether that's zero or whether that's one it takes it to the negative version of itself the thing is that if um if you have something that does that it just takes absolutely any light to the negative version of itself that's very hard to detect that change in the light so the difference between light that's coming in at Zer and negative 0 is very very difficult for us to detect it won't work to just use one of these um because remember like zero light is horizontal light and negative Z Light is also horizontal light but it just starts in the other direction this this filter just filters any light in horizontal Direction so whether that's you know Zer or negative Z doesn't really make a difference um and so that's I think why we're getting these unobservable changes here so yeah that's kind of good like we figured out what this plate does it takes any light and it flips it so if I had lights traveling in any direction like let's say this direction um it would become this light instead which yes again is very very hard for us to detect so that means that we were right earlier this is F4 so F4 is the function that takes Z to one and one to one the behavior we want for the machine that represents a function is that when whenever the output is one it flips the light and because the output is always one for F4 it should flip any light coming in so okay great this is F4 I'll label it and we can stop worrying about it okay now let's figure out how to make F2 okay remember that if I wanted to send in zero light I put this little filter in in this direction whereas if I want to send vertical light then I have to put it in in this direction but as you can see that opens up the possibility of putting it in in any direction why don't we put this in at 45 degrees all right so this light is originally this 45° light which by the way I'm going to start calling PL it's the conventional notation I don't love it but that's fine so plus is equal to bit of zero and a bit of one but remember we can just think about those two components separately so we can think about the zero component and the vertical component um as kind of like separate entities and then we can think about what happens when you add them back together so both of these are coming out of the laser in equal amounts and then um what this polymer is going to do is it's going to slow down both of them but it's going to slow down the vertical component more than the horizontal component and so they go out of sync with each other the vertical component should be up to here instead now we have light that's pointing up and to this side so the combination is as if we had light pointing this way which I can show you on a little diagram so originally we had the um vertical component of Light which I'll call one and we had the horizontal component of Light which I'll call zero and when we added them together we got plus so the 45° light but then what happened when the light went through the polymer is that this light got slowed down quite a bit so when it should have been pointing upwards it was so slowed down that it was actually pointing downwards instead the negative version of the same vertical light all right so that's what's happened to those two components but what's the new sum then if you have some light that is pushing an electron this direction and downward the total is as if it's pushing like this which we call minus um again I don't really love that but that is the convention so 0 minus 1 is what we call minus that's what's coming out so you had this plus State originally where both the horizontal and vertical components are exactly in sync with each other after the polymer just the vertical component gets slowed down and so it's as if you have this minus light instead where they're a little bit out of sync with each other and the way that I can tell that that's what happened is because um if I had the plus light then what should happen is when I do the measurement aligned with the original direction of the filter then um we should get most of the light going back through and instead when I put it at like 90 Dees to that I should get most of the light get a cut on the other hand if I had minus it's the opposite CU minus is pointing this way and so 90° to plus and so if I have the filter aligned with the Plus instead I should see most of that light get cut out because that's 90° to the minus and let's see if I put it in like this you can see that pretty much all the light gets cut out when it's at the 45 de so that is exactly what you'd expect and if I put it here you can see that most of the light light goes through and so that tells us that this light that is coming through this polymer must be in the minus Direction which is great news so we've designed F2 we're almost done with our work but we have two more functions to go and they're really easy at this point just write a little label telling me that when I Orient it this way this is F2 okay but making fub1 one is going to be really really similar because um here this is F2 at least when it's oriented this way but I'm pretty sure you can make F2 really really easily now because if I just Swap this the direction I think it's going to do what we want because um remember originally we said that this thing was slowing down stuff in the vertical Direction but not as much in the horizontal direction right but if I just flip this over now this is still the slow Direction but now that's aligned with the horizontal axis and so if I put that in here the slow direction is now the horizontal part and so this goes slowly whereas the vertical part goes through Fast And so there's still a lag between them like they're still out of sync but it's going to be the horizontal that lags the vertical that goes through without any problems this is basically the same as what we had before but if we draw this on a little diagram where we had one here zero here and the zero is going to go to here instead now so this is negative 0 we originally had plus and it's going to become this thing but if you think about it this thing is very similar to that other result we got which was called minus it's exactly the same as minus but in the opposite direction flipped and so it's just minus minus so this output is basically minus it's not going to really look different to us when we try and detect it with this filter so remember if I put this filter in here at the 45° angle then it does nothing whereas if I put it after the polymer you can see it cuts out quite a lot of the light on the other hand if I put it at 90° so that it lets through most of that light so like before this piece of polymer is doing exactly what we want but we just have to orient it in a slightly different direction this is F3 sorry f 1 this is F1 Okay cool so this little thing is F2 and fub1 and this was F4 all right one last one to do and thankfully this one is really easy F3 is the one that takes 0 to Z and one to zero remember if the output is zero then you do nothing so in other words for the zero light coming in in the horizontal direction do nothing to it for the vertical light that's coming in like this is uh do nothing to it so in total do nothing in other words if our secret function is F3 then you will put this box here the super secret box and you know the person who has the quantum computer um and needs to solve the challenge will probably think that there's something in here but unbeknown to them there actually isn't it just hit me that like I am right now trying to make a real quantum computer with real Quantum gates in it like that's so crazy I I mean how nuts is it that I study Quantum Computing for so many years and I never did anything like this like I never actually tried to build anything and so I had like no appreciation for for this and how much work it is I had the idea to explain the doy show their algorithm on my YouTube channel ages ago um but it really didn't occur to me that I would actually be able to show it to you this is really cool okay so now the role of the stranger is pretty much done they're just going to come around and put down their super secret Quantum version of F and we won't know what's inside you know it could be this oriented this way or this way or it could be this one or it could be nothing at all we don't know which of those four possibilities it is and it's going to be inside of here now you and me have to try and solve this problem by making a quantum computer around this Quantum box we pretty much actually solved this problem when we were trying to figure out how to make this thing um but let me explain anyway there are these four fun functions and we don't know which one of them is going to be represented by the Box um but we just have to be able to use our quantum computer one time to figure out whether it's one of these two so these are the balanced functions or whether it's one of these two they're the constant functions so let's think about how you might do it one way is just to send in a zero State and figure out what comes out on the other end so um it could be a z or a minus 0 if it was a minus 0 then it must be that the output is one so zero goes to one so it's one of these two it's either F2 or F4 um but that's not any good to us because then we'd be over with like we'd only get that one shot and we sent in something that only narrows it down to F2 or F4 and that isn't enough to solve the problem by the way you might be wondering if I sent in a zero so horizontal light and I got negative horizontal light so ne0 would I even be able to tell that something had happened to the light the answer is you wouldn't be able to tell using a filter like a filter can't tell the difference between those two but it is actually possible to tell the difference between them I used to think it wasn't like in theory land we kind of treat these two things as if they're the same we say that they're off by a global phase and global phases aren't measurable but that's not true in theory we always just pretend that there is no way to tell the difference between these two but the way to do it is to use a beam splitter and then do constructive and destructive interference experiments on the two branches afterwards it doesn't really matter I'm just pointing that out because it was very interesting to me to realize that this is true but anyway not important because this scheme isn't very helpful just sending in a zero is going to tell us a little bit of information and not the information that we need the same thing if we send in a one if we get for example -1 out that's no good to us either because um well that means that one goes to one so it's either this one or this one so F1 or F4 but I mean again we don't know whether it's balanced or constant and we've wasted our one turn of using this secret machine so we need to do something more clever so like we were doing a little bit earlier why don't we put this in at 45° all right remember that 45 degree light is the combination of zero and one light let's pick one of these four functions to be the secret function in our example maybe let's make it F1 so F1 takes 0 to zero so zero just does nothing whereas it takes one to one which means that the one component picks up a phase so it gets flipped so instead of having 0 + 1 we have 0 minus one and that is a different state of light a very special Quantum thing has happened here if we were just sending in either zero or one we only get to find out what it does to one of the like inputs right either the zero input or the one input but if we put in the 0 + one it exactly encapsulates what the function function does to both zero and one so in other words this state does actually contain all of the information about exactly which one of these four functions it is F1 does this to that input and I just quickly write this out but depending on what this function is it will send this state to one of these four and if you can figure out exactly which one it is then you'd be done you would know exactly which function we're dealing with and so you could tell whether it's balanced or constant but if you try and figure it out the naive way which is just by measuring the state in the zero or one basis so if you put this filter down like this what are you going to get in all of these four cases the light is a equal combination of horizontal light and vertical light the difference is just how in sync or out out of syn they are but the filter will only tell you what fraction is horizontal and what fraction is vertical and so in all of those cases it's going to say that you know half of the light is horizontal and half of it is vertical so no matter what the secret function is this measurement is going to cut out 50% of the light and so seeing that is completely useless to you and this is a general thing by the way so with Quantum Computing you might think it's super powerful because um if you have some function that you want to calculate on a whole bunch of inputs you can put in a superposition of these inputs so you can do Z plus one and if there were more inputs you could do a superposition of all those inputs and you can send it into your computer and the quantum computer will genuinely do that calculation on every single one of the inputs and your state your final state will be a super position of um you know those outputs for all of the possible inputs but then if you go to measure it what's going to happen is that it's just going to collapse to one of them so instead with a quantum computer what you have to do do is you have to take all of those inputs and find a way of cleverly combining them such that when you measure now you're going to just get out the bit of information that you wanted and this is super super tricky most of the time and I mean most of the time it's not possible or at least maybe it's possible but we definitely haven't thought of it and it's very very very likely that it's not possible but this is an exception in this case it is all going to work out for us the way to do it is exactly what we saw earlier where say this is my secret function this is F1 arient it like this what this does is if the light is from fub1 or F2 then the light is going to have gone from being oriented in this 45° angle to being oriented like this or the negative version of that and so that means that if I put the filter in in this direction Direction it should all just go right through whereas if I put it in at 45° it should get cut out so let's just do the measurement in that direction so I'm going to put this in at 45° and you can see that indeed it cuts out most the light so we can be pretty sure that the light is coming in at this direction on the other hand let's say the function had been F3 well then the light was coming in at 45° originally and nothing happens to it and so if I put the filter on like this in the same same measurement it should do pretty much nothing to the light and that is what we see if we put it in at the opposite it should pretty much cut it out which it does so that is what will happen to F3 if we have F4 what it does is it turns light that was 45° into light that is the opposite which is pretty much the same it's going to go right through this filter regardless and you can see that that is what happens when I put it in at 45° whereas when I put it in at 90° to that it cuts out almost all the light the upshot is the only measurement you'll need to do is to turn this filter at 45° and that's how you solve this Quantum riddle using the doy joser algorithm first you send in plus light and then you measure the output at 45° to prove to you that you know how to do quantum comput now I'm going to be that guy and I'm going to challenge you to a game so I'm going to put down a secret function in here and I'm going to let you see what happens when I put this filter in at 45° and from that you're going to have to guess whether my secret function was a balanced or constant function so my secret function is ready now I'm going to put this filter in at 45° and that cuts out most of the light whereas if I put it in here essentially no change so is my function balanced or constant
Info
Channel: Looking Glass Universe
Views: 332,126
Rating: undefined out of 5
Keywords:
Id: tHfGucHtLqo
Channel Id: undefined
Length: 33min 16sec (1996 seconds)
Published: Fri Dec 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.