## Transcript

Morgan: I'm going to give a talk today on quantum computing. Who's heard of quantum computing? Everybody? Who's actually logged into quantum computer in the last couple of years? I saw one hand. Good effort. This is a new field. I just wanted to demonstrate that. So, what is quantum computing? We'll start with that. Then we'll look at using a quantum computer to do something, which is simulating chemistry. I chose that as the use case, there are other use cases. Then I'll do a walk-through. We'll see a bit of code. And, I chose the IBM frame, main framework called Qiskit. Who's heard of Qiskit? A couple, a couple more than actually logged in, so that's a good sign.

## What is Quantum Computing?

But still, it's a new field. I think we'll all agree. Everyone in this room will agree, quantum computing is a new field. Why am I even talking about it? Well, it's coming online pretty quick. There was a presentation here last year by a guy from IBM. I'm going to a quantum computing meetup tonight actually in London. It's the largest quantum computing meetup group in the world. We've got about 2,000 members. So, it's sort of happening. Two years ago, nothing. A year ago, maybe. Now, one person's logged in, two people have heard of Qiskit. It's exponential.

That was an IBM quantum computer, by the way. That's 50 qubits. It's a most amazing looking thing that we've ever seen. That's because there's nothing quite like it ever built before. The reason it looks like that is these processors, these quantum processes that use the laws of quantum physics have to be kept very cold. They're kept at about 15 millikelvin, which is 100 times colder than deep space. The IBM lab in research in Yorktown, New York State, they have the coldest place in the universe, 100 times colder than anywhere in the universe. So these things can actually work.

Quantum mechanics have been around a while. Heisenberg, Schrodinger, Max Planck, 1905, the black-body radiation problem, the ultraviolet catastrophe, things go to infinity if we use classical laws of physics, that was 1905, we're 2019. It's over 110 years ago now. But we've only just started building these things. It's hard. It's a hard problem. It's an engineering problem. We've known the physics for a little while. Let's say Schrodinger, Heisenberg about 1920. So, we've known the physics about 100 years. They're just hard to build.

It was Richard Feynman at Caltech - everyone said Richard Feynman was really great physicist, Einstein, Newton, Feynman, he's one of the top guys- suggested at Caltech in 1981, nature's quantum mechanical. He just got the Nobel Prize for figuring out the Feynman diagrams in quantum electrodynamics. He basically quantized the electric field, the electromagnetic field, rewrote Maxwell's equations in quantum form. He said, "Nature's quantum mechanical, dammit. To understand nature we need to build a quantum mechanical computer." He's the first guy who said it, 1981, it's only 40 years ago, 38. So, quite relatively new, even conceptually.

How the heck do we build a quantum computer? What is a quantum computer even? We know what a classical computer is. Presumably, they compute something, but how? What is quantum information? That's the question. What does a quantum bit even look like? How do we build these things? In 1981, no one had built anything. So, since then, 1990s, these guys, all very famous in the field of quantum computing, not just quantum physics but quantum computing itself.

Quantum computing is basically an amalgam of computer science and quantum physics, and put them together. So who knows both? It's hard. It's a tricky field. You get people who are very good at computer science, and you get people who are very good at physics, but now we need people who are good at both. And these are the early pioneers in the '90s. It's all still going, they're all famous in the field. Here's the quantum information processing conference that was just held in Boulder, Colorado in January. It's gotten bigger slightly. There's probably a few dozen in the '90s. We're up to maybe a few hundred. So, that's progress.

Let's actually ask the hard questions. What is a quantum bit? What does that even mean? So let's compare it to a classical bit. We all know what those are, 1 and 0s, on, off. Binary, two states, on, off, simple, simple. Least all sorts of amazing things. The Internet, Facebook, Google search. But that's what classical computer is, just on, off. What is quantum? What does that mean? Well, quantum mechanics is strange. Richard Feynman said, "If anyone comes up to you and tells you they understand quantum mechanics, they're lying." No one understands it, but it just works. This is how nature works.

Now, the reason we don't think like this is because everything we see, everybody in this room, all our laptops and everything, they're classical. The chairs, the microphone, everything. It's to do with the distance scale. We've designed all our senses, our hearing, our sight, our smell. All our senses are designed to pick up classical information and process information classically. Even though our neurons aren't digital, they're analog, spiking neural network, they work classically. And quantum mechanics happens at about a nanometer, angstroms, which is 10 to the minus 10 meter, nanometer is 10 to the minus 10. We can't see a nanometer. We don't know anything about what's going on at that level. How can we? Our sensors don't pick it up. Therefore, it's strange, but it's not really strange if you build measuring instruments and observe stuff.

The famous double-slit experiment where electrons behave like light waves and particles at the same time. This is the experiment done in the '30s, I believe. That experiment had verified Schrodinger's equation. All these quantum mechanics, nature actually obey them. Even though we can't see them, unless we set up our measuring apparatus in the right way, then we can measure it at the macroscopic scale. We can see the electrons interfering like light waves through two slits, for example. I mentioned the double-slit experiment because it's one of the first most famous experiments, but there are many, many others that we've since measured to make sure that nature does behave as a particle and a wave at the same time.

We have hundreds of experiments now, lots of verification. The most accurate measurement in the world today is 10 decimal places. It's the magnetic moment of the electron, which is a quantum mechanical effect. You do not get this value if you use classical physics to model the electrons going around a hydrogen atom. You need quantum physics. You need the Bohr model. You need lamps, you need all sorts of quantum physics. So, it's tested, it's verified at 10 decimal places. Nature is quantum mechanical whether we like it or not.

That means their bits, their information, their fundamental units of information, behave differently too. They're not just on and off, up and down. They can take an infinite number of states until we measure them, and then they go into one state. So, not even 3 states, 10 states, a million states, infinite, they're just anywhere. These spins on the electron, for example, until we measure it, decide to measure them, maybe probe them with the light, a photon, something, some sort of measurement, put a photographic plate and measure them, the electrons going through the double-slit, and then they decide to become classical at that point once we measure them, and that's called the measurement kind of, I don't know, theory or something, philosophy, dilemma.

But once you measure a quantum state, it collapses into a classical one. It becomes definite. That's about the best I can do to explain quantum mechanics. It's just the way nature behaves. Why? No one knows. We can't ask "why" questions anyway in physics. The universe is how the universe is. But there's this whole parallel universe out there, at very small distances that may enable an industry in quantum computing, which is even bigger than the classical computing industry today, which is worth how many hundreds of billions or trillions?

We've got this whole nascent industry waiting, just starting. We're on the very cusp if we can make these things. I showed you the IBM quantum computer that's 50-qubits at the moment. We need to make them, and we need to make them with high fidelity, the qubits, that means low noise. They stay in their quantum state long enough to do meaningful stuff to form quantum gates, just like classical gates but quantum gates. That's of the order of milliseconds.

It's an engineering problem. But there's nothing in the laws of physics that say we can't build these things. So, get ready, I guess. There's another diagram. I spent a little bit of time here on my talk. I'll just go through these next few slides a little quicker. But that's another representation, if you like, of a classical bit 1, 0 binary in a quantum qubit. Some people draw something called a Bloch sphere, after a German physicist, who came up with this concept. Might have even been a mathematician before quantum mechanics, but we call that a Bloch sphere and the state can be anywhere on that sphere. Clearly, infinite number of points on a sphere if you're mathematically inclined. That's the way you can look at it.

That's how we write them down. So, the up state, the down state, or the superposition of up and down, which is anywhere on that Bloch sphere, can be written here. That's the kind of general equation where theta is one of the angles. You probably need two angles, theta and phi to represent it on the sphere. But all I'm saying is that, you can write, we can represent these states mathematically. We can put them into Schrodinger's equation for non-relativistic and Dirac's equation for relativistic quantum mechanics. We can calculate things, but we have to set it up. And this isn't a mathematics or a physics or talk, it's a quantum computing talk. But just to show you, that's kind of what that looks like.

Quantum does weird stuff. It does three things weird that classical physics doesn't do. It does superposition. That means the particle can be in two states at the same time. Schrodinger's cat alive and dead in the box until we look at it. The particle can be spin anywhere on that Bloch sphere until we look at it, then it decides I'm here. That's called quantum superposition. Not just 0, 1 in any state. Entanglement means we can get two electrons and put them on the opposite side of the universe, and we measure one at that side of the universe, and the electron on the other side instantaneously knows, it takes the opposite state than the one on the opposite end of the universe. So, clearly violating the speed of light. Einstein said, "Nothing can travel faster than the speed of light." Forget that.

In quantum mechanics, things can happen instantaneously. That's called entanglement. Now, I've probably just deflated you and, "Oh, my God. I've spent all my life telling everybody that nothing travels faster than the speed of light." You've just been wrong. It's weird. Quantum mechanics is weird. The last thing it does is it can be tunnel. These particles tunnel. You put a barrier up there, a classical particle hits the barrier, goes ping, goes back. Angle of incidence equals angle of reflection. Quantum particle goes straight through. It doesn't care about barriers. “I'll just tunnel straight through this guy. I don't care. I'm a quantum particle. I don't care about the laws of classical physics. I'm going through here, boom. I'm on the other side. Hey, see you, Mr. Classical Particle."

There are three. And what we do is we harness these three things to build quantum computers. So that's kind of like the crux. Of course, we can write down big complicated equations to explain all that. But that's kind of the crux of it.

## Hardware

What are the types of hardware? Well, we have superconducting circuits. We have trapped ions, we have photonic, we have topological photonics, light. Trapped ion is when you trap an electron or an ion, which is an atom with one electron stripped off it, in a magnetic field, tight magnetic field, that's a trapped ion. Photonic is we use light, lasers, essentially, tabletop, room temperature. And superconducting is where these things experience no resistance whatsoever. If you cool these quantum particles down, they form Cooper pairs. They are resistance-free. So that phenomenon has been around a while, it's been built, but how do we capture that property of superconductivity to use it to compute?

The last one I mentioned was topological which Microsoft is working on, which is if we can build that one, the particles use entanglement and they call them braids, they're kind of connected in a quantum mechanical way through entanglement. If we can build that, they're kind of error-free, because to make a measurement on one part of that system, entangled system, to disturb any particle in that entangled system, you have to disturb the whole system. That's much harder than just perturbing one single trapped ion or one single photon, or one single particle in a superconducting computer.

If we build that, if Microsoft is successful - I like to think when Microsoft is successful - we will have essentially error-free quantum computing. And that's a big deal, that's a very big deal. Because essentially it's the error, it's the noise in the superconducting and photonic and trapped ion, that basically spoil the quantum mechanical-ness of the system. So we need a lot of qubits for error-correction. So say we have 100-qubits, we need a million qubits to error-correct those 100. And that's a lot of qubits. We're only up to 50.

Topological computing, if you have 100 topological qubits then they're error-free. You don't need all these error-correcting qubits. That's a whistle-stop tour of everything, error correction and hardware. So, that was a lot to take in. But that's kind of essentially where we are. Suffice to say, there are a lot of groups working on this. Microsoft, Google, IBM, the three big guys in classical computing space. And there are some academic groups, and there are some startups, it's becoming an industry.

We saw the IBM, it's real, but you can log into it today, so these things exist. Even though the IBM one is 20-qubits, it's still real. It exists, it's not just a drawing on a PowerPoint, it's in a lab and we can log in. But we have some work to do to A, increase the number of qubits, and B, to make them of a certain quality, or fidelity is the technical term, so that they don't decohere, which means they don't lose their quantum-ness in a nanosecond, but they stick around for say, a millisecond, which is a million times longer than a nanosecond.

If we can get to sort of millisecond quantum-ness, we're good. We can do meaningful calculations. We can set up quite a few quantum gates, maybe 1,000, 10,000 quantum operations. So we can do some meaningful calculations at that point. If they're only there for a nanosecond, we can only have say, 10 gates. You can't do much with 10 gates in classical computing. It's the same in quantum. So the number of gates is the important part we're trying to get to. To get there you need A, enough qubits, and, B, they've got to be the right quality. You don't want them decohering is the technical term, very quick.

Milliseconds is good. Seconds are even better. Minutes and hours, but that's a dream. Topological will give us that, but anyway, we're on the curve. Everything Moore's Law, we're on our own quantum exponential curve, so in 20 years, it wouldn't surprise me if we had qubits that lasted a minute. That'd be great. We can solve a lot of things at that point. But even in 10 years, if we had milliseconds. That's a really good place to be as well. I think we'll get there.

Here are some companies. Quantum computing companies making hardware. Google. Who's heard of Bristlecone, the Google? One or two people. 72-qubits, state of the art, maximum number, right now is 72. If anybody asked you, 72 is the maximum number of qubits, made by Google. Number two, IBM coming in, I think they have 49 or 50, something like that. I think it's 49. IonQ, so they used superconducting. IonQ uses trapped ions. They announced they had, I think, 60 or so qubits at a conference in December last year in Palo Alto. They came out of the lab and made an announcement, which was a big announcement for the quantum computing industry. This is the first trapped ion device in the world ever.

Then, Intel are making it, which is a good sign because Intel have lots of experience with making processors, and they have lots of beautiful big fabs and lots of experience, so that's encouraging. They've made a processor. I think they're 40 or so qubits. They're doing both superconducting, that's the 40 qubit but also trapped ion, so they're trying both, very encouraging. Xanadu based in Toronto use light, so they're doing photonic quantum computing.

Rigetti use superconducting. They're based in Palo Alto. They have a fab, they make their own processes in Los Angeles. Where is it? Fremont, they're a startup. They have $120 million investment. They went through Y Combinator a few years ago. Who's heard of Y Combinator startups. Quantum computer's even becoming a thing in the startup world. They went through and they've secured $120 million, so they're actually building. It's good to see startups there as well as the big giants, right? An ecosystem and new ideas and stuff. Rigetti [is an] important player in the field right now.

Then finally, there's D-Wave who use quantum annealing, which isn't universal quantum computing. It's very specific. It's a certain type of quantum computing called quantum annealing. Uses slightly different physics, but it's still quantum. They just announced 5,000 qubits, but it's quantum annealing. It's more like an ASIC and they're good at solving optimization problems. They're not good at chemistry or anything else, to be honest, but they are good at optimization. And there's some controversy over whether they will ever be able to out-compute a classical computer.

Theoretically, no has ever proven it. They're in Vancouver, and they started about 1998, when a physicist in Japan wrote down the theory for quantum annealing. Off the back of that, this guy called Geordie Rose and a few other guys, started this company called D-Wave and got some funding. They've had $200 million of funding so far over the last 20 years. But no one knows whether that will ever take us beyond anything a classical computer can do.

However, people are using them, banks are using them, oil companies are using them. When I say using them, trying them out. Do they give us better results, faster, more accurate results than our classical supercomputer in the cloud that we've been using for years? So, the jury is out on quantum annealing. I don't want to over sell. Because they’ve got a high number of qubits, it doesn't mean to say that they will outperform a classical computer. Whereas it's provable that these gate based computers where we have 50 or 72 qubits, they can and will outperform classical computing. So, there's been a little bit of maybe a red herring there for 20 years with D-Wave, and they're very early 1998, but they haven't been building these very universal gate-based computers. I don't want to overhype or under hype, it's just you have to be a little bit careful when we talk about quantum annealing.

So, that's what one looks like. IBM announced that - who saw the announcement at CES in Las Vegas in January? IBM announced their quantum computer called the System One, IBM Q. So it's real. We can log in and there it is. That's what it looks like. They made it look super sexy on the outside, as on the inside. You hire a PR company - what can they make a quantum computer look like? How much money will I have to give you to make it look like the sexiest thing in the universe ever? And that's what they came up with.

Inside, it looks like that because it's cold. Remember, it starts off at room temperature at the top and slowly it gets colder and colder to the coldest place in the universe at the bottom of that, where you have a 50 qubit processor. Put a nice shoulder on it for marketing, nice display. So it exists, it's real. That's what it looks like. It starts off 50K, room temperature 50K, down, down, temperature down, down. The noise is 15 millikelvin. Coldest place in the universe. No vibration, no noise, no photons, no shakes, super shielded from vibration, physical vibration, light, electromagnetic field particles, cosmic rays, any type of noise you can think of. Use your imagination. There are probably hundreds of different types of noise. Shielded, shielded, cold, cold, no noise. We want these things to not decohere. We want them not to be bumped into even by a photon. That will throw it out, turn it back into a classical particle, coldest place in the universe.

There's a qubit timeline. We started off about 20 years ago in 1998 to IBM, Oxford, 2-qubits. We're up to, well, Rigetti are going for it. They're one of the startups I mentioned, raised $120 million. They want 128-qubits sometime this year. Ambitious, but you know, you've got to be ambitious in this world if you want to get anywhere. Put the target just out of reach, maybe we'll get there, or just a little bit. Google have 72-qubits. They exist today, they're testing them our in their lab in Santa Barbara, I believe. It's exponential sort of 20 years. It's not linear, it seems to be trending up. If Rigetti get 128, that will be nice and that will maybe prove that we could be on an exponential doubling the number of qubits.

However, there's that other factor. This isn't a one-dimensional matrix, just the number of qubits. Remember I mentioned noise and fidelity. They have to be the same amount of noise as 50, as 128. If you build 128 and it's 10 times as noisy, forget it. You're just better off with a 50 qubit with less noise. You just are, because these 128 will decohere in a nanosecond, they will act as like a brick, they're useless. So, huge engineering problems. To start a quantum computing startup, it's probably the most expensive startup you can ever try to undertake. You need $100 million or $200 million. These aren't like, “Here's a few million, go away and come back in a couple of years with a quantum processor.” These are big, tough engineering problems, which big guy, you're up against Google and IBM. That's what the quantum computing timeline looks. I already covered this pretty much.

Feynman, there's been a little bit of theoretical work, Shor's algorithm, Grover's algorithm. Shor's algorithm is factorization. He wrote down at Bell Labs, now he's at MIT, the quantum algorithm for factorizing two numbers. We've all heard of classical encryption, RSA encryption, some of us might be in security in this room here. So quantum algorithms running on a quantum computer can break these encryptions, these huge, long numbers, maybe 40 decimal places or 100 decimal places long in milliseconds, not the age of the universe or the heat death of the universe, which RSA encryption depends on.

If and when we build these quantum computers, and we can run these quantum computing algorithms like Shor's factorization algorithm on, goodbye encryption. We need new encryption. People have been working on this for 10 years, because they realize this. They come up with quantum encryption algorithms to defend it. So, it might not be quite as scary as we think. We think we've got that under control. But that's what Shor's algorithm is. That caused a few scary moments for a little while. To say, "Oh, nothing safe anymore ever, as soon as we build a quantum computer," but there's been theoretical work, so, you can look that up as well.

Grover's algorithm is a search algorithm. It searches data, it's actually a database search algorithm. We can use quantum computers for search. Another nice algorithm, so that's factorization and search. These are the very well-known famous ones. A lot of theoretical work's been done in the last 20, 25 years, I would say, on algorithms. Those are two, search and factorization, are the two very important ones. There's the adiabatic. That's the D-Wave when they started. The guy, the blurry guy on the left there, is the guy in Tokyo. He's the physicist who came up with the idea. And the guy on the right is the CEO of D-Wave. So, he just grabbed hold of this paper and said, "Right, we're going to build quantum computers in Canada."

Now, it's, again, annealing, buyer beware. It's not fully universal quantum computing. No one knows if it'll ever beat a classical computer. But kudos for doing it, and starting off the industry really, if you like, in a practical sense. Not just theoretical papers, but let's build some real machines. They exist on the cloud today. You can log into them, you can pay the D-Wave money. They'll allow you to log into their quantum computers. Tight up-to-date, now we have a few processors and cloud-based IBM CES announcement, 20-qubits we can log in today.

That's the quantum computing timeline, shorter than the classical computing, because they've only been going 40 years. That's an exponential graph if ever I saw one. That's a million x in 20 years, and that is the coherence time. So we've done well, we've come a long way. We've come from a nanosecond, we're at a millisecond today, which is good enough gate time for us to do a few thousand gate operations. It'd be nice if were at a second, but that line, if we continue on it, that kind of Moore's law for quantum computing, decoherence line, will get us to around a second in maybe another 10 years. That's hundreds of thousands of gate operations, providing we can keep the noise level at the level it is, at 50-qubits. That's a hard problem. But people are working on error correction as well. All from a theoretical point of view, from a practical build point of view.

The community's working on all these problems. But that's a very, very steep exponential line right there. A million times, a million x in 20 years. That's encouraging actually, that's a very encouraging line.

## Quantum Computer Architecture

That's what a quantum computer architecture looks like. We have the processor down there at 10 millikelvin. We have to control these qubits somehow. Usually, that's with microwave pulses if they're superconducting qubits, and electromagnetic fields if they're trapped ion, and photonics is a completely different system. They're light, they're lasers. We need to amplify the signal so we have input. You give it input. What do you want to calculate through the interface electronics, and then we do the quantum computation in a millisecond, because that's all we've got, before they decohere. So, that’s state of the art quantum computers today.

IBM 20 qubit, bump the signal back up using an AMP out through the electronics back into the classical world again with a number. We've measured it. We've put it, we've collapsed that wave function and made a measurement on that quantum circuit. And we've got a number, whether we factorized something, a big number, used it to database search, or doing some chemistry which we'll look at pretty soon.

That's a high level architecture. That's what a quantum circuit looks like. If you do login from home tonight, login to the IBM Q System, which you can do, set up an account, you will get presented with a GUI that looks like that. And you add your own gates. There are all the gate options on the thing here. So, you've got x, y, z. H is a Hadamard. You've got rotation gates, that little pink thing with an arrow, that's a measurement. That puts it into a state where we want to measure it.

The Cs, those are CNOT gates. It's like a NOT gate on the classical. So, we have sort of quantum equivalents to classical gates. They've all got their own names, they all obey the laws of quantum mechanics, so they don't behave anything like classical gates, but they have kind of similar names, but they use it. This is a quantum mechanical system. And the point is, you can log into this and it will do a calculation for you, and it will give you back an answer. You've actually done a real quantum computation at the coldest place in the universe tonight. If you want, you can go home and do it. Beautiful thing.

We have three back ends. We have IBM 4, which has 5-qubits, the IBM 5 which is 16-qubits. You have to pay for that. They give you the lower number of qubits for free, and the IBM 2. The IBM 2 is in maintenance, or was in maintenance when that photo, that screenshot was taken. Usually they'll have one in maintenance and a couple up, but these are all sitting in Yorktown, coldest place in the universe. You have to pay for the 16-qubits, that's how they monetize this. So 16-qubits, hopefully, they'll put the 50-qubit online soon as will Google Bristlecone's 72-qubits.

Things start to get a little bit exciting at that point because they could do meaningful calculations. And they will actually outperform the fastest supercomputer on the planet at that point. So we're sort of on that cusp, it's kind of a tantalizing cusp if you like. Hopefully, by the end of this year, there's something called quantum supremacy or quantum advantage, which means that no classical computation on the planet will outperform this quantum computer on that particular computation, whether that's a chemical simulation, or a factorization, or a database search. We don't know which one it will be, but we're expecting it to happen this year. It hasn't happened yet. So that will be a landmark. It may sort of raise the profile of quantum computing a little bit.

Here are some quantum algorithms, - a bit technical. The Variational Quantum Eigensolver is the one we're going to use for our quantum chemistry example. So this is the theoretical side of things, quantum algorithms. We won't dwell too long. You've got all the papers here referenced, if you're particularly mathematical or theoretical physics, you can go and look this stuff up, or quantum science, computer science. All good stuff, all part of the ecosystem. Anyway, frameworks. We've got Qiskit IBM, we've got Cirq, Google, we've got Microsoft. As well as the hardware, these companies have been building out their software stacks. We got the Microsoft QDK, Quantum Development Kit. Xanadu, it's the photonic company I mentioned in Toronto, they have something called Strawberry Fields. We have Rigetti, they call theirs Forest, and we have OpenFermion, which is an open community mostly led by Google. These are all quantum frameworks, like TensorFlow for quantum computing kind of a thing.

The software is kind of a little bit of ahead of the hardware if you like. It's a funny time in the industry really. In anticipation of the hardware finally catching up one day, Google, and IBM, and Microsoft, and Rigetti presenting there's 100-qubit quantum computer with low noise and high fidelity. We've got all the frameworks ready to go. All the algorithms, pop on it, run, bush, we're finished.

It's a little bit cart and horse, a little bit different from the classical computing industry. Back in the '30s, '40s, '50s where probably the mainframes and the hardware and the software developed hand-in-hand. People have already had all the 70 years of experience and they know that once we get the hardware, that we know how to write software. We've had all those years of experience so we're ahead. We're sort of waiting over here for the hardware to happen, and then we'll just throw all the software on it. It's a little different from the classical computing industry, but that's okay, we can deal.

## Applications

Applications, simulation, chemistry, machine learning, cryptography, and I could've put optimization there as well. Those are the four or five main applications that quantum computing will just pretty much blow away classical computing completely. If and when we get the hardware, a lot of problems will be solved very quickly, which is super exciting. So, drug discovery, catalysts, fertilizers, some 2% of the world's energy is used on the Haber-Bosch process to make fertilizer, 2%, which is probably more than a data center's.

So, if we solve that, if we use a quantum computer to develop a more efficient process to make fertilizer - boring - but super important. It'll solve a lot of problems that we have in chemistry and biology. Drug discovery super exciting, cancer, understanding how molecules, coming up with cures because we understand how molecules bond to each other. Like Feynman said, "To understand that, you have to build a system that operates in the same way." - so, super important.

Can't over emphasize enough how important this stuff is really, to be honest. In 100 years this planet is going to look completely different, but I'm hoping it's going to happen, 5, 10 years, we don't know but we'll see. A lot of stuff will change very quickly, which is great, very exciting. Instead of doubling the size of our supercomputers every couple of years, we'll just be doing calculations in milliseconds that would take these supercomputers the age of the universe to do. So clearly, this isn't even a step change. It's just something completely different. It's the laws of quantum mechanics. It's not what we're used to at all. There's not a double or a 10x, that Peter Thiel 10x, zero to one. This is something completely different. This is a parallel universe. If we understand it and build it, we're in a different world.

Startups - tons and tons, which is very healthy, I guess. But again, a little bit ahead of the curve. They're having to use quantum simulators a lot of the time because we haven't really got these 50-qubit systems really on the cloud with sufficient quality. Nonetheless, we can simulate up to about 50-qubits. So this is what these guys are doing. Most of them are doing hybrid classical-quantum. So, a little bit of classical, a little bit of quantum. But they're not fully quantum systems really, but they're ready for it. They understand the theory, and they understand the algorithms. I've talked to a lot of these people and they're doing good stuff.

ProteinQure is trying to solve chemistry and drug discovery. A lot of them are actually doing drug discovery, of these companies here. Riverlane is writing software. There's 1Qbit, they're writing error-correction software. There are some software companies. Remember the four or five different use cases, there's encryption, machine learning, chemistry, and optimization as well. So, all of those startups are tackling one of those application areas or error correction or just building frameworks ready for when they happen, so they already exist. They all have funding, millions of dollars. Now we’ve got Microsoft on the side because over Christmas they announced, “We're pulling all these guys under our wing here,” presumably before IBM and Google do, but it's the usual battle.

## Simulating Chemistry

Onto the simulating chemistry. Our friend, Richard Feynman, "Nature isn't classical, dammit. And if you want to make a simulation of nature, you'd better make it quantum mechanical." You can click on that link and look up his paper. He wrote simulating physics with computers in 1981. He said, if we build quantum computers, we can solve all of these problems that we will never be able to solve. Not just if we wait 100 years, our life, you will never, ever be able to solve with classical. Very easily with quantum, it's just a different world.

Applications, enabling the design of new material - we're talking about quantum chemistry. So, what are the applications of quantum chemistry? Well, there they are. New materials, medicine, catalysts, like I mentioned, Haber-Bosch process fertilizers, high temperature superconductors, raising the temperature of superconductors higher. If you can get them to run at room temperature, that's a big deal. No resistance circuit. Huge, huge deals, all of these, trillions and trillions of dollar industries. That's just in chemistry.

Then we've got optimization, machine learning, all sorts of stuff, encryption, finance, you name it. So, what is chemistry? Does everybody remember the periodic table? That's what? That's chemistry, right? So chemistry has to do with the interaction of atoms and ions with each other. Remember that from our school days? Nostalgic, but it's probably come back into prominence with these quantum computations. These are things we can do with quantum computers, we can calculate energy levels of two atoms bonding. That's what the curve looks like. We have a nice theory with the VQE algorithm I mentioned earlier, the Variational Quantum Eigensolver. Don't worry about the kind of jargon, but well-understood quantum algorithm. Very important one for basically analyzing or computing the energy levels of two atoms, of molecules essentially. You may even remember this curve from high school, maybe university as well.

The blue is some other algorithm, but the VQE is the latest, the greatest quantum algorithm. It fits a very closely the theoretical line as well. As soon as we build a quantum computer we'll be able to quickly simulate these molecules to very, very good accuracy. That's one thing we did. And then, so what? If we do that, then we can understand how they bond and we can use that to build and make our own molecules in the lab, because we can understand them, computationally understand them. It's important, and it's important because we can build drugs for medicine that will help us to cure diseases, Alzheimer's, everything.

That's why it's important. Molecular dynamics, this is how maybe a DNA moves, unfolds, maybe how a cancer cell would evolve in time. Molecular dynamics is the other kind of computation that we're doing that's separate than the molecular energy levels. Molecular dynamics is how the actual molecule moves and evolves through time. So that's a different one. That has applications like I just mentioned, and understanding how complex molecules evolve which can have understanding in genetics, in cancer, in any type of complex molecule evolution. So we're talking about biological, but even chemical as well.

Again, you can see how important it is if we can understand and actually model this accurately with quantum computers. You could never model, these are far too complex systems to do even on a classical computer. It's an easy job for a quantum computer. So the application's a bit similar than the other ones.

That's what the algorithm looks like for molecular dynamics. Basically, it's an equation of motion. We're solving the equation of motion of a super complex system, and then we end up with that state down at the bottom, omega. Equations of motions have two things, their position, their velocity - well, three, and time. That's position and vectors, velocity of vectors and time is a scalar. So that's seven quantities that it will calculate of a DNA molecule. That's a complex molecule.

The equations of motions of super complex molecules, that's a very easy and natural - that's what Feynman was talking about, a very natural calculation for a quantum computer and an impossible calculation, even if we wait the end of the universe for a classical one. So that's what they're designed for. It's kind of why I chose chemistry because I think it's the best fit use case, rather than machine learning or optimization but they're good at those as well.

There are classical frameworks for chemical computation. But here's a quantum one. IBM have something called Qiskit Aqua, Google have OpenFermion Microsoft have the QDK Chemical Library, chemistry library, and ETH in Switzerland. Their group Project Q have something called FermLib. These are all libraries with quantum mechanical algorithms, and we'll speed up to the get to the code now.

## Qiskit

These are the frameworks we would go to use. We don't have to start coding in C++ ourselves. They've already been done for us. We have libraries to use, to draw on. We can even run it on a quantum computer if we use the IBM in the cloud. There is a Qiskit ecosystem. There are four parts: there's the earth, fire, air, and water, the four elements. And Aer is a simulator. Aqua is a chemical library, if you like. That's one we're interested in, and the other two do other stuff.

There's the four use cases: chemistry, optimization, finance, and AIs. It doesn't just do chemistry, Aqua. Then we just do pip install qiskit-aqua and it's on, it's running on our laptop, so, boom, it's there, installed. We go to GitHub and we can do the same in Cirq, and can we can do the same in the Microsoft QDK as well. But I've chosen the IBM library for no particular reason. But they do have something in the cloud. So that would be one reason.

Then, it also uses libraries from something called Qiskit Chemistry. We install that like doing a pip install qiskit-chemistry. That's a little bit what the code looks like. So, those are the two frameworks we use to do run our quantum simulations on a quantum computer or a quantum simulator. IBM have a simulator. Google, Microsoft, they all have simulators too. We don't necessarily have to run on real hardware, we can run on quantum simulators. That's a choice we actually have.

There's the energy calculations, the ground state and the dipole moment. We're probably more interested in ground state here, but let's have a look at doing that with code. So that's inter-atomic distance between two molecules, and the energy as you bring them closer together or pull them apart. You've probably have to remember back to your school chemistry or physics, whatever. So energy is measured in units of Harktrees. There it is, minus 7.32 to minus 7.9, inter-atomic distance in Angstroms. Temember an Angstrom is 10 to the minus 10 meters. That's why it's quantum mechanical. Or, that's 10. Multiply these numbers by 10, you're in nanometers. That's the kind of distance scales we're looking at.

## Code Demos

Here's what we want to do. We want to actually go to these things here. Can I share this screen behind it? What I've done, I've clicked through to the code, now I just want to show the code, so that's gone to the browser. Here's some code. Basically, I cheated, I clicked on that link. There are two links here. We've probably only got time for one. One was this Hello Quantum World, the other was the VQE the Variational Quantum Eigensolver algorithm, which does a real chemical simulation, which you'll have to do probably for homework tonight, if you're interested in it, but that's okay. I very much encourage you to do that.

But everything's in Jupiter notebooks these days, or on GitHub. Here basically, Hello Quantum World, what does that even look like? It looks like code we're pretty much familiar with. If you've ever used Python libraries, NumPy and things like that, many different tiers. We've got these other quantum libraries, Aqua, Qiskit Aqua, and Qiskit-chemistry. We do normal Python sort of commands from Qiskit. We import the quantum mechanical parts. We import our classical register, our quantum register, and our quantum circuit.

That's essentially setting up the quantum circuit from scratch. This is how we program our quantum computer or quantum simulator. We run these lines of code on the quantum processor, so that's fine. And then, import IBM Q, that's the IBM Q system because we run it using IBM Qiskit framework. We're using Jupiter. We want to visualize what it looks like. So we import some sort of visualization tool. And then, we attach it to a back end. We load the back end, and there are the ones available, the QX4. Remember that was 5-qubits, the 16 Melbourne, which is 16-qubits, you have to pay for that. And a simulator - that's one, the QASM simulator. We've got two real back ends, 5 minutes, with hardware and we've got a simulator.

We make a choice, saying do we want to use a simulator, or do we want to run on a real quantum hardware? If it's real hardware, do we want to pay IBM money to run on 16? Maybe if we had a business case or if we're just at home trying it out, we probably want to choose the QX4 back end or the QASM simulator. So, if you write that it will choose the back end, whatever back end is free that we've put. They've put simulator false. I'm assuming they've actually made it, forced it to select the IBM QX4, which was the 5-qubit hardware simulator, or hardware processor.

Then the least busy back end. Yes, it’s come up and said, that's it, the IBM QX4 is the least busy, so it will select the least busy. Then we ask it to print out this. We give it these variables, the quantum register, classical register, circuit and there are the gates. This is a very "Hello, World!" So a very simple quantum circuit. We have an H gate which is a Hadamard gate and a controlled X which I didn't go into, and I don't really want to go into because it's not really a theoretical talk. Essentially, we're setting up the "Hello, World!" circuit for quantum computing. So, there are only two gates. This is a two-gate system.

We plot and what we see, we plot, and it plots a circuit for us, and we should be able to see those M gates or measurement. So there are our two gates. The Hadamard gate, which is a single qubit. And then the CX or controlled X, which is a 2-qubit gate, 1-qubit gate, 2-qubit gate because it has a line, the X has the line connecting to the line above it. That means it's a 2-qubit gate. If it was connected across three, that would be a 4-qubit gate, two to the power of two is four. Then, if it was connected cross four, it would be an 8-qubit gate, so it's very exponential.

We'll stop there because this is the "Hello, World!" This is the simplest circuit we can maybe construct. It's a Hadamard gate and a controlled NOT. Anyway, and then the Ms were the measurements. Then we make a measurement on both of those gates, if you like, and that will give us an output. It will measure the state of that circuit. Whatever that circuit is doing, that "Hello, World!" circuit. We cannot run it, can we? But that's probably enough. That's showing a circuit. That's good enough.

I wanted to show you the VQE, and it would get a nice graph that we saw, but I wanted to see us actually plot it running code, but it will give us that bonding, that energy level curve with the dip and coming back up. That's the VQE, but if you click on that other link, it will show you the code to do that, and a little bit of theory as well. There's a little bit of math in there as well.

## Conclusion

In conclusion, we've seen the history the last 40 years, 1980 right up to 2019. We've seen where we are with the hardware, we've seen it's the big players, the Googles, the IBMs, the Microsofts, and also some startups like Rigetti building this hardware and Xanadu. We've seen there's a lot of new startup ecosystem happening with money, real money, millions of dollars of investment, starting to look at applications and use cases and frameworks and error-correction code. There' are lot of startups with real venture capital money building code right now for when these processes make that little extra step to 50-qubits in high fidelity or 72-qubits in the case of Google 128. Rigetti, I think they have a 16-qubit right now in the cloud as well. So, we're waiting on the hardware a little bit.

Hopefully next year, I can come back and give you some news, and we'll run a real simulation on a real hardware process for a 50-qubit. Maybe, we don't know. We're working on the software stack. We're in this so-called Noisy Intermediate State Quantum world or era. John Preskill at Caltech came up with that acronym, NISQ, and that's going to be going for the next 5 or 10 years, and that's where we don't really have error correction, those millions of qubits I talked about to error-correct the 100-qubits.

We're going to have to get by with noisy qubits but we can still do some very important work with noisy qubits. We actually can do very important work with that. Ultimately our dream, our goal, the Holy Grail is to have totally error corrected qubits, like either the Microsoft topological or all these other qubits which will error-correct the core qubits. So, we use qubits to error-correct other qubits. They're called logical, but we use physical qubits to error-correct what we call logical qubits. So we need a million physical qubits per 100 logical qubits.

Finally, so after we have error-corrected, that will come after the 5 or 10 years. This is all hand-waving at this point. It may happen sooner, it may happen a little later. We don't know. Quantum computers will revolutionize everything. I hope I've got that across, including chemistry, which is super existing, optimization, machine learning, everything. And nature is quantum mechanical, dammit. Thank you. That's it.

**See more presentations with transcripts**