Quantum computing, Computing, Quantum mechanics, Quantum algorithm Using a Quantum Computer to Find Good Luck
I want good luck for eight years, so i built a computer that will find the v for me. How so my computer had to use a um, a search function which, on on every item that is searches through until we hit the b, that we’re looking for? And once we hit the? In the worst case scenario, we’ll need to repeat our search box eight times in order to find the b if the b happens to be at the end, but we can do better than that with a quantum computer, we only need to repeat the search box twice To find the b and i actually built a circuit that does just that, how using waves waves are really cool because they can be at multiple locations at once. When you throw a rock into the ocean to let out your anger, you can see the ripples like propagating through space through multiple locations at once, and quantum objects are waves. So we can put a quantum object into a wave where it’s kind of at the quote. Unquote, location of each of these h, emojis and then um, so this will be the first step of our quantum circuit and secondly, so basically the key is that once we apply the search function once to our wave, it gets applied simultaneously to each of our components. So each of the emojis and look there’s our answer. We can find where the v is, with only one application of the search function right.
But actually we can’t, because we can’t actually see this one where the one is and that’s, because waves are like my little sister, they love to say, hide and seek, and when we’re not looking at the wave, they are expressing their full beautiful form being at every Single location, but as soon as we look at it, the wave suddenly changes into being at only one location and we call this the collapse of the wave function. So, therefore, if we were to poke our heads into our search function at this time, then all the calculations, we’ve done so far would just be gone and the only thing left would be one of the emojis, a random one out of the eight possibilities and there’s Only a one in eight chance we actually find the b that we’re looking for. So therefore, this is not a very good algorithm, but it might seem that all hope is lost. Since we can’t look at this point but there’s something else, we can do let’s. Look at the wave more closely and when we look at the wave we see that each of the locations or the eight emojis have the same height, so it’s just a flat line of a wave. And what this means is that the height of the wave is equal to the probability of us, finding that emoji there and right now, because the heights are equal, there’s, a random chance of being at the equal chance of being at any of the h emojis.
But what if we can increase the height of only the b and then there will be a much higher probability of us finding the wave at that location and that’s. What we’re going to do, but there’s a small catch which is any function applied to the wave? Has to get equally applied to each of the components. So, for example, if i take this water wave and i move it over a little bit – i have to move each of the components over by the same amount. And similarly, if i apply a function to my whole emoji wave, the same function gets applied to all of this com, its components it’s the it’s kind of like a distributive property of waves, and therefore i cannot directly only amplify the amplitude of the v because um, I have to amplify each of the the waves equally if i were to do that, but so you can still kind of amplify the b in a sneakier way which goes like this. So if what happens when we add up two waves at some locations, the trough and the peak, which is a low point and a high point of two waves, they meet and they cancel out to make a zero amplitude and, at other points two peaks add up To reinforce each other and the peak gets taller in the resulting wave, so this is what we’re gon na do. In the second step of our circuit, we will use the search box to multiply the these amplitude by negative one which essentially flips it over and then in the third step, we use a sequence of quantum gates called the diffuser which essentially flips the these waves back Over but this time it cancels out and quotes the turtle amplitudes and it quote unquote: um reinforces the amplitude of the b and each time we repeat, steps two and step three.
The amplitude of the b gets reinforced a little bit more and it gets a little bit higher. So we have to repeat steps two and three around the square root of eight times. After doing some trigonometry to find that out and the square root of eight is around two, so after we repeat steps um, two and three twice: we um we have the wave almost like the wave at the b will be so much higher than the waves at All the turtles that is almost certain that we will find the wave there when we do measure it so step. Four is just to measure the wave, and these are the results from my actual quantum circuit um. So there was a 94 time. 94 percent of the time we do get the b and now i’m able to find my b. I can send this to my friend and i’ll have good luck for eight years. However, you may ask: why do we care, even if we had to repeat our search function, eight times, so what that’s not a lot right? But what? If we had to search through more than eight objects and um, because quantum computers use the square root of the amount of time to search through the items as a classical computer, the the advantage of quantum computers grows exponentially.