Quantum Computing is probaby the "next big thing" in computer science, and it will certainly bring AI and Machine Learning to entirely new levels of efficiency and capability. You could even argue that quantum computing (or, at the very least, a new form of fundamentally more powerful computation than the electronic switch) is a prerequisite to achieve the goal of Artificial General Intelligence. With IBM offering access to their quantum cloud computing, I got curious and started looking into this technology more "seriously". I stumbled upon a great website that essentially simulates a vector of QuBits (the quantum world equivalent of a traditional bit) and quantum gate operations on them. It lets you play with them and get an intuitive understanding of how quantum computing works. That being said, the explanations on the website are quite minimalist, and it's not entirely easy to understand what is going on, or what you are looking at. I will explain here what I figured out from spending about 10 minutes playing with the simulator, and it revolves around the Hadamard gate. Disclaimer: I have very little knowledge of the world of quantum computing, and what follows are essentially my baby steps into this world, trying to figure basic things out from scratch. When you open the Hadamard Gate tutorial, you start with a 3D view that looks like this: The first thing to understand is what this 3D image represents. It's a visual representation of the state of the array of QuBits in the simulated quantum register. If we have 8 QuBits (which we do in this example), this means we have a total of 2^8 possible QuBit states, i.e. 256. This can be represented visually in a 16 by 16 matrix, which is what we see. The areas that are elevated indicate a possible state. To understand what I mean by "possible state", we have to understand how a QuBit works. A single QuBit, rather than being 0 or 1, can be both at the same time. That is, it's possible to apply an operation on a QuBit (as it turns out, this operation is the Hadamard Gate, but we'll come back to that) in order to put it into 2 possible simultaneous states. In quantum lingo: a measurement of the superimposed QuBit will have equal probabilities to become 1 or 0. (for more theoretical background, look into the notion of quantum measurement and quantum wave function collapse). In effect, the Hadamard Gate is the Schrodinger's Cat applied to bits: it makes the bits both dead and alive... So, if we come back to the 3D model above, there is only one elevated state: the bottom left corner, which represents the initial state of 0. But now, we're going to "Step into" the Hadamard Gate tutorial code, and run the first gate operation, on bit 0. Suddenly, the first bit has two simultaneous possible values: 0 and 1. We see that the 3D model now looks like this: Which is essentially 2 bars on the bottom left corner, each representing the states 0 and 1, respectively. If we keep stepping further into the code, the second QuBit is "Schrodingered" and now we see that the 3D model displays an elevation on all of the values from 0 to 4, inclusively. When we Hadamard the 3rd QuBit, then it's all values from 0 to 8 (because 2^3 = 8, in case that wasn't obvious). The "for loop" proceeds to Hadamard all 8 bits, and soon enough the entire 3D model gets elevated, forming a cube (this indicates that all 256 values are possible, or simultaneously true). As we step through the next loop (the one that will reapply Hadamard on each QuBit, in the same order as before)  we'll discover another property of the Hadamard gate. So let's step into the next loop, and reHadamard the first bit. Now, the 3D models seems to be sliced up: The reason for this is simple, though possibly not too intuitive at first: reapplying the Hadamard gate on a QuBit will reset it to its original value. So what this means is that we reset the first QuBit to 0, thus removing all odd numbered values from the possible quantum states. This is the reason for the sliced up 3D model. But, why does it reset the bit? One helpful way to think about the Hadamard gate is as a rotation within a spherical model of the QuBit called a Bloch Sphere: Witness my amazing MS Paint skills. In this sphere, you have axes x and y around the "equator", and the z axis that goes vertically. The z axis value is essentially what decides the state of the QuBit. If the state is at the top of the sphere (z value = 1, x and y values = 0), then the QuBit's value is 1. If the state is at the bottom of the sphere, the value is 0. What can happen, however, is that the state can be somewhere along the equator of the bloch sphere, which represents the state of superposition (both 0 and 1) that the Hadamard gate can put it in. Visually, if we start from a QuBit value of 1 (top of sphere) and we apply the Hadamard Gate operator, what we are doing is a rotation of 180 degrees around the axis formed by x and z. Or, an equivalent operation: first rotate by 90 degrees about the Y axis, then rotate by 180 degrees about the X axis. Visually, we get the following: The state is now at the equator, which means that the value is simultaneously 0 and 1. If we apply the Hadamard gate again, we get back to the original state. Similarly, if we started at value 0, and applied the Hadamard gate twice, we would be back at 0.
Hopefully this will save some time for someone curious about Quantum Computing. If you're interested in the other quantum gates, stay tuned, who knows..
0 Comments
This is probably the least technical blog post I will ever make in my life, but it's something that needs to be said (but mostly to people who don't read this blog, i.e. nontechnical people)...
Artificial Intelligence does not equal Artificial Humanity. Most people's notion of artificial intelligence, mostly derived from cinema and other works of fiction, is of a robot or piece of software that exhibits emotions, such as humor, sadness, anger, lust for power, etc. This is not artificial intelligence. This is artificial humanity. To be clear, there is a market for digitizing human likeness along with all of its irrationality and reptilian/mammalian brain incentives  especially in video games and the entertainment business in general. However, artificial intelligence is about producing intelligence: the ability to solve complex problems. Pure AI does NOT seem human. The Turing test is a joke. The Turing test tests for artificial humanity, not artificial intelligence. Intelligence doesn't desire things, it has no motivation by itself. Intelligence is a capacity to understand, nothing more. Bottom line: just because some of us humans do exhibit a tiny bit of intelligence every once in a while doesn't mean that the gold standard for intelligence is "anything that behaves just like us"... 
AuthorSimon Ouellette Categories
All
Archives
March 2018
