Based in Sydney, Australia, Foundry is a blog by Rebecca Thao. Her posts explore modern architecture through photos and quotes by influential architects, engineers, and artists.

Episode 274 - Quantum Computing with Ian MacCormack

Episode 274 - Quantum Computing with Ian MacCormack

Today's discussion is all about Quantum Physics and Quantum Computing as Max talks to Ian who has a PhD in Physics and is actually a practitioner when it comes to quantum computing.

Ian MacCormack

 
 



Ian MacCormack: LinkedIn | Facebook

Links

Menten AI: Website | LinkedIn | Instagram | Twitter
Qiskit: Open-Source Quantum Development
IBM Quantum: Tutorials

Cambridge.org: Quantum Computation and Quantum Information

Related Episode

Episode 146 - Math, Language, and Intelligence with Tai-Danae Bradley

Transcript

Max Sklar:   You're listening to the Local Maximum episode 274.

Narration: Time to expand your perspective. Welcome to the Local Maximum. Now here's your host, Max Sklar.

Max: Welcome everyone, welcome. You have reached another Local Maximum. My next interview I recorded back in New Hampshire. That is a good old New Hampshire interview. I like being reminded of New Hampshire and I had such a great time listening to it.

Sometimes you learn more from the re-listen than you do as the actual interviewer. I'm always surprised by how many of you out there like our coverage of scientific topics, of mathematical topics. I get usually the most feedback from those, aside from some of the more political ones, and today's episode really is the real deal, TM. The real deal, trademark. this is you're gonna get the real stuff today.

My update is that now I have my workplace set in Stamford. So I look forward to doing some video interviews again soon. And I spoke to Aaron last night excited to have him back on the show maybe next week, or the week after. I know it was the Boston Marathon today. So there must have been a lot of activity in his area.

Anyway, let's learn about quantum physics and quantum computing. My next guest is the perfect person to do just that. He has a Ph.D in physics and actually works in quantum computing. Ian McCormack, you've reached the Local Maximum, welcome to the show.

Ian MacCormack: Thank you, Max. It’s good to be here. Usually I seek out local minima. But it's a nice, nice change of pace.

Max: Yeah, that's one of the things that I really was annoyed with, in machine learning, because they're always, you know, you can easily set up the problems to find a local maximum because I was thinking like, we're maximizing probability you're maximizing rewards, but then they always flip the problem around on you. And it's like, oh, we're minimizing loss. It's almost like a double negative. I don't know if that. Come to think of it that bothers me. 

Ian: It could just be caveman physics intuition of wanting the ball to roll to the bottom of the hill or something. 

Max: Maybe, but isn't that, that's not a high energy state or low energy state. Well, yeah, I guess, I guess so. Okay, says a physicist, okay, I get it. I get, okay. All right. So we're here to talk about quantum computing today. And also, you know, I want to hear a little bit about your background, first of all, because this is the first time we talked about quantum computing on the program with any depth, so how does one fall into quantum computing?

You know, it's not exactly something every company is doing right now. But a lot of people have been talking about people, have been asking me about quantum computing for many years. So you studied physics, is that correct?

Ian: Yeah, I did my undergrad and PhD in physics. I didn't specifically study quantum computing. And I should say that I studied theoretical condensed matter physics. So I'm a theory guy, a lot of pencil and paper and calculations and computer simulations. I wasn't working in a lab on hardware. But although I did a PhD, I never really had any intention of going into academia and sort of partway, I'd say, towards the end of my PhD.

I had been aware of quantum computing as a concept, I had learned a couple of the basic algorithms along the way, but I'd noticed that it started to become an actual trend in industry, and there were companies building quantum computers and trying to actually use them for practical purposes.

And so I thought, Okay, well, given that I don't really want to go down the academic path, that seems like a pretty good possible option after graduate school.

Max: Yeah. Well, can I ask what area of physics were you studying before that?

Ian: Yeah. So yeah, I studied theoretical condensed matter physics, which can mean a lot of things. I was kind of, there's a kind of community of physicists that you that sort of loosely called it from qubit, which is kind of at the intersection of quantum condensed matter physics, that is studying the physics of many-body quantum mechanical systems, quantum information theory, which studies things like entanglement entropy, and things like that in physical systems and formal high energy physics were sort of the string theorists come from.

So I, the things I did my PhD were pretty varied, ranged from working in things, working a bit on ATS CFT, which is kind of more in the high energy physics realm to numerical simulations of sort of just lattice like condensed matter physics systems.

Max: Yeah, some of this is getting kind of beyond my knowledge of even where the fields are. But let's, let's talk about, let's start with quantum mechanics a little bit. You know, I took one class at Yale on physics, which was the hardest, I didn't mean to take the hardest physics class for like, you know, there are different levels.

But, you know, it was the only one that fit into my schedule. And it was like, it was like, you know, you had to take you already had to be really tight with linear algebra and multi dimensional manifolds, which I was like, Oh, just kind of wrapping my head around.

Ian: Was it like the advanced like, like, first year physics course or something?

Max: Yeah. Yeah. And it was like.

Ian: That was also the hardest physics course for me.

Max: Yeah, it was like, one day they came in and he derived the theory of relativity from scratch. Basically, if I remember correctly, this is 20 years ago, so. But quantum mechanics was was a part of it. And I remember thinking, okay, like, now we're talking about probability clouds or something. And maybe this is one of the early, earliest experience, come to think of it for me when I was thinking about information as probability clouds.

Of course, quantum mechanics has a really unique way of representing that, and come to think of it. I actually did ask a previous guest on the show, I'm gonna write this down, a mathematician, Tai-Danae Bradley about, I think it was her. When, I think at some point, the conversation weaved into like, hey, like, is there any way to represent probability as like, you know, these imaginary numbers and have it be something useful that we can use to like, you know, model something in it?

Well, I mean, it does matter something in the real world, obviously, quantum mechanics, but I'm talking like, you know, like, if I'm trying to model like marketing data, or something, I don't know. But anyway, I'm rambling a little bit on that. But maybe, maybe we can start because this is this is tough stuff for a lot of people.

Maybe we can start by explaining how quantum mechanics is different from regular old mechanics, and where computing fits in, and let's try to keep it you know, let's, let's try to we can let's try to keep most people and then we can push it afterward.

Ian: Sure. I'll start with a mildly technical sort of explanation. Okay. But then I will, then then I'll give a broader stroke, because I think, for the yeah, so the mildly technical one is just for those that have at least a vague memory of linear algebra. Okay. If you know linear algebra, then quantum mechanics is not so scary.

So essentially, let's see. A quantum mechanical system mathematically consists of a state often called a wave function. And that's represented in a vector space. And importantly, that state is normalized. So it maintains a link unit length. The state has a particular structure, it's a Hilbert space, which means it has a particular inner product.

Max: Normalized meaning, like, the space in some sense, adds up to one?

Ian: So that the length of this vector is always one. Okay. So it's the length squared, rather, which is the reason that is.

Max: That is, it's like, well, one squared is one, right?

Ian: It’s so that it maintains its interpretation of the wave function squared, or magnitude squared maintains the interpretation of a probability distribution, right? Okay. So this vector, and if, you know, you can imagine a vector in say, on XYZ Cartesian coordinates, okay. These are the vectors.

Say we have some, some vector in this space. It's a linear combination of the X, Y, and Z basis vectors. And if we normalize it, as in quantum mechanics, each component of that vector represents essentially the probability or the extent to which that quantum mechanical state occupies each one of those basis states.

So let me rewind, a little bit. I'll rewind a little bit there. So, okay, I've mentioned we have these states, might have gone a little too technical there. They're an important point about an important feature of quantum mechanics and maybe the basic feature that makes it so unintuitive to start at a human scale reasoning is that fundamentally, things are probabilistic. And that when a quantum mechanical system is not being observed when it's just evolving freely, it can be in a superposition of multiple different states.

So that could be probably a familiar example from, you know, high school chemistry, say in an atom, the electrons in the cloud can be in a superposition, that is to say, like a probability distribution over several of the different electron orbitals. And that probability distribution, or rather, that probability distribution corresponds to the square magnitude of the quantum mechanical wave function, which is the ultimate the state that defines this system.

Max: So the way I think about it, like tell me if I'm off base, is like, in our space in the universe, like almost, you could almost say, like, location doesn't exist, or at least like points in space don't exist.

But of course, that sort of screws with our notions of like, Newtonian physics, or, you know, so it'm but, yeah, I guess the whole, like marbles on a board thing doesn't work when you actually look at the marbles.

Ian: So when you get to the scale of marbles, this no longer exactly applies. I can sort of explain why later. But that would be sort of a digression. But yeah, the point is, whether it's, you know, if you have the simplest molecule of say hydrogen, where you have one electron, it can be in a superposition of these orbitals, until you observe the electron.

And depending on what you measure, suppose I measure the energy of this electron, it will then subsequently collapse. And don't ask me how, because that's a longer digression, the state will collapse into one of the definite energy state orbitals.

So previously, it occupied a, a superposition of these orbitals with different energies until I try to measure or observe the energy at which point it collapses into a definite state of the orbitals.

Max: Right? So yeah, so what does that have to do with computing? And I find it really interesting that we could even compute with these kinds of systems, like how does that even work?

Ian: Can I add a little bit of a technical aside that will just be useful for those without, it’s not strictly necessary, but useful to keep in the back of your mind for later.

Okay, so the other important thing is that, so a quantum mechanical system, and we'll go to an even simpler system, and this is what we'll use for most of the explanations that like the simplest quantum mechanical systems are spins, like specifically spin one half objects, which you can think of as well, physically, you can think of as little magnets but fundamentally, that it's a system that can occupy two states up or down.

And the wave function of a spin could be some combination of these two, so that when I measure it, I have say, 60%, probability of landing on an upstate, 40% probability of landing on the downstate etc. And of course, again, this wavefunction is complex, complex valued. So we take the square magnitude of it to get a probability distribution complex,

Max: Complex, not as uncomplicated, but as in complex numbers.

Ian: Yeah. So the digression I wanted to mention is that the so, you know, I said that, you know, at the quantum mechanical scale, things are fundamentally probabilistic. And that is true.

When you're doing measurements, you can't predict perfectly what the outcome of a measurement will be. However, the evolution of a closed quantum mechanical system is deterministic. You've probably heard of Schrodinger’s equation?

Max: It's deterministic before you've observed is what you're saying.

Ian: Correct. So the wave function evolves according to Schrodinger’s equation. Which is to say so, so the system, essentially, its energy, and the interactions between the different degrees of freedom are encoded in what's called a Hamiltonian.

And if you essentially, solve Schrodinger’s equation, which is a bit like, it looks a bit like the heat equation, it's a sort of wave equation, but with complex numbers in it, you find that if you have some initial state, and you evolve it forward in time, with a solution to Schrodinger’s equation that the state maintains its normalization.

To put it in a slightly more technical terms, the time evolution operators for closed quantum systems are unitary operators. So for discrete systems that would be unitary matrices. And well, yeah, I'll leave it at that. 

Max: Yeah, I think you're, you're, you're losing us, is some of us over here. But I think, I think the the bottom line that I got out of it, so I'm just gonna try to summarize, is that okay, we have these wave functions, instead of, instead of like points or something, we have these wave functions to represent particles objects, you know, they could be superpositions, two things, up and down, they could be something more complicated than that.

And if you have some particles, like a bunch of wave functions that overlap, and you don't mess with it, you let it go. It's deterministic. Like if the wave function is this at time zero, then a minute later, it'll definitely look like that. That's deterministic, in terms of where the, in terms of where the probability juice goes.

So it's like only when you observe somewhere in between that, then does it have this like, kind of spooky, you know, hey, wavefunction collapse, which it's my understanding that like, if physicists are not like, in agreement on how to interpret that, just yet, my Am I wrong about that?  Or am I right about that?

Ian: I don't think I don't think that's a huge area of contention. As far as doing calculations, you don't really need to think about that.

Max: Right. In terms of like, debating about whether there are alternate universes or whatever.

Ian: Sure and and not only you don't necessarily even, you don't even need to go into the philosophical realm to get interesting answers about what happens during wavefunction collapse. Okay. But I'll leave that there.

So, getting back to, okay, how the hell does all this relate to information and computing? So we'll go back to spins, our simple to state systems. And so we're treating these as an abstraction. You know, this is just an abstract two-state system the same way we think of bits as just abstract two-state systems. I can talk later about how you can encode them in a physical system.

But okay, so these spins can occupy two possible states up or down, or zero and one if you prefer. And so to describe an arbitrary state of a spin. You need roughly speaking, two numbers basically. The probability that it's pointing up and the probability that it's pointing down. Really, it's one real number and one imaginary number.

Max: We don't have to get into the math of it.

Ian: But roughly speaking to describe the state of a single spin, you need two real numbers. Okay. Two floating point numbers.

Max: Now, I have a question. Maybe. I don't want to get you off track here. Is this something that like, as the computer operator, is this something that we know beforehand, like okay, we can set it up? So that this particle is 60-40? And then we're gonna see how the system evolves? 

Ian: Yeah, for a single spin. Yeah, I could, I could write that down on that piece of paper.

Max: Can you actually create it in the physical world?

Ian: Yes. And we'll get into that.

Max: Oh, wow.

Ian: So, right, okay, so that's one spin. That's fine. It's a two dimensional vector space, okay, two dimensional complex value.

Max: And I’m allowed to observe it.

Ian: Yeah, you're about you're allowed to observe it, and it'll collapse to one of those strange states.

Max: So that can be a really expensive random number generator.

Ian: In fact, that is one of the earliest sort of possible applications. And that is what some quantum computers currently are. Not to throw shade. So in quantum information theoretic terms, what I just described, we'll call a qubit. 

So as opposed to a traditional computing bit, that is in a deterministic state of 00 or one where information is stored in essentially strings of bits. And qubits can be in superposition of zero and one. And what happens when I add a second qubit? The dimension of the possible state space goes from two to four, I multiply the dimensions of the two state spaces of the two qubits.

Max: So okay, right. That makes sense. I mean, same with regular bits, right? Then you have four, four different combinations.

Ian: Yeah. And so if I have n bits, I have a 2^n, dimensional, roughly speaking, space.

Max: And now it's a box that you're in the interior of a box instead of…you’re in like hypercube.

Ian: Well, you're really on a hypersphere, because it's a normalized vector. So the difficult part comes, so this is also true for bits as you correctly. So if I have n bits, there are 2^n possible configurations of the bits.

But in classical computing, the bits are only ever in a particular deterministic state. Right, right, with a qubit. If I have n qubits, I need, roughly speaking, 2^n floating point numbers to describe the wave function that they're currently occupying to describe the full quantum mechanical dynamics of it. And in order to-

Max: Wait, you need 2^n numbers, not just n numbers?

Ian: Correct.

Max: Because, okay, because I was thinking, hey, each one has a probability associated with it between zero and one. Okay, fine, we do something. We make a quantum, we make it a complex number. Fine. But that's much more complicated. But what I'm hearing is no, like, every subset of them needs some kind of a number.

Ian: So yeah, to add a little technical jargon, the space in which multiple qubits live is the tensor product space of the individual qubits. And basically just what that means, as each qubit is a two dimensional system, every time I add another one, I multiply the size of the, the dimension of the state space by two.

Max: So okay, here's the way I'm thinking about it. When you add a bit in traditional computing, you are adding a dimension. Because you're kind of adding a dimension to the box or a let's say, you add a new floating point.

Ian: Well, you’re still multiplying the dimension when you add a traditional bit. But you don't have to keep track of superpositions of overall possible bits.

Max: Right, right. So it sounds like you're actually, it’s increasing the number of possibilities increasing by like an order of magnitude, or like exponentially as compared to traditional computing. Because you are adding, in traditional computing because like, if I have 10 numbers, that's 10 dimensions, I had an 11th number, that's the 11th dimension. But it sounds like in quantum, no, it's like two to the 11. And so things are going crazy.

Ian: Yeah.

Max: I know, I'm giving my like, I'm oversimplifying, and we don't have time to like, you don't try to explain to me the whole thing. But that's what I'm hearing.

Ian: Yeah no, so, if you if you think you can think about it in terms of so before, you know, a single qubit is a zero or one. So we have two qubits, okay, so that it can occupy four possible states now. 0011, short, 1001?

Sure, sure. And then, so we need four numbers to describe that, yeah, we put another qubit in the system, now we have an eight dimensional space, okay. And you can list out all of the, you know, 0011, etcetera.

Now, think about a binary string of length n. And now think about, and each one of those we associate with a dimension in a vector space. So there are 2^n dimensions. And our vector, our state, the state of our qubit lives somewhere in this space as a continuous linear combination of all of these binary bit strings of n bits.

Max: So then it's put it another way, they're not independent probabilities.

Ian: Correct. And we can talk about entanglement, but the fact that you can. This is ultimately what entanglement boils down to as well. I can demystify that as well. So the point is, if you want to simulate a system of n qubits, you need 2^n, you need to store and manipulate 2^n floating point numbers. So that gets, that very quickly chews up your memory and like computing power.

Max: Do like, okay, 64 bits, I can store 64 bits easily. But 64 cubits, that's, I don't know if we're getting to the realm where that's impossible.

Ian: So the world record for exactly simulating without approximations, a system of qubits, I think is something like 40 cubits. And maybe that has changed, but that, you know, required a huge computing cluster. On this laptop here, if I wanted to exact, say exactly solve Schrodinger’s equation for some system of interacting qubits.

I could do it pretty quickly with like 12 qubits. When I get to 14 or 16, it's gonna get really slow. And so at that point, and that's still, you know, 14, or 16 qubits is nothing right? A couple grams of metal has 10^23, 10^24 atoms, and each of which contain, you know, many, many things. Many, many things that are larger than qubits in their dimension.

Max: Yeah.

Ian: Go ahead.

Max: Well, no, I was gonna say this all really interesting, if you have anything to add on that, but like, I want to step back from, so that's like, okay, that's how the quantum computer works on the most basic level. But computers, okay. Traditional computers, I don't know what you call them, like, classical? Classical work on bits.

But then let's build up to like, okay, we're kind of familiar with what classical computers can do. What does this mean? What can quantum computers do? I mean, I was always, I of course, have to bring up the lecture that I went to on it one more time in 2002. So that's now 21 years ago.

Ian: So yeah, I think I do need to give a bit more. So the reason it's potentially promising is because you have this naturally occurring, immense information storage and manipulation capability inherent to quantum mechanics.

Because again, like you can't you can't simulate 100, or 1000 qubits exactly, it's impossible, but 100 or 1000, physical representations of qubits, maybe maybe you could store and manipulate and if you can manipulate them in a controlled way, which is to say, to perform gates on them, the way we do with classical computing gates, you know, NAND and XOR, operators and whatnot, quantum, the quantum mechanical equivalents of those, then maybe we can make algorithms?

And we can, we can manipulate the states of these qubits in a controlled way such that we, when we ultimately take a measurement at the end, because we want again, at the end of the day, you if you want to know anything about your quantum mechanical system, you have to measure something.

Max: So it contains lots of information when it's being simulated, but it's not like you can actually use it to store all that information,

Ian: When it's being simulated, or when it's just existing. But when you want to take a look at it, you have to, depending on how much information you want to extract, you have to measure something at the end of the day, right? And you can't, you can't at any point, just get the full state of the qubits for any sufficiently large system.

Max: So it’s not so the first thing that was in my mind wouldn't work where I'm like, okay, let's say I want to condense all the videos on YouTube, and then like, just just place them in some qubit configuration. You can't get all the videos back because you have to collapse the wave function. But maybe there are applications where you can store lots of stuff.

Ian: So yeah, I mean, in principle, you could store all of the videos on YouTube in a large number of qubits. Yeah, getting them back would be pretty difficult. That would not be an ideal setting for that. So quantum algorithms, you know, what they boil down to is, you have a number of qubits.

You apply a series of gates which take the form of unitary matrices or operators that manipulate single qubits or act on multiple qubits at a time to entangle them, or swap them or disentangle them so as to produce a wave function on these qubits, a state that hen measured in a particular way, perhaps through many repetitions will give the answer to some to some, some question or some calculation.

Max: So you're sampling from probability distribution all on the hardware. And I think and then you can do it many times. Okay, so you can build a pretty decent sampler, I guess.

Ian: Yeah. So I'll give an example of one of the sort of first algorithms, a person learns maybe when they're reading a quantum mechanics textbook, and if you want a recommendation, if anyone is curious, the sort of the Bible is Nielsen and Chuang, I forget the exact title. It's called Quantum Information or something. But that's a good place to get started if you're curious.

So Grover's Algorithm is a search algorithm where you, let's see. So you take advantage of the fact that you can have a superposition of potentially all of the bit states at any given time. And you repeatedly apply a particular operator that amplifies the probability of finding the thing that you're searching for. That was a very, very broad overview of Grover's algorithm. Mostly because I forget the details.

Max: Okay, think I got a concept here, you have some probability distribution you're pulling from, you're sort of applying something to it where you are, you're constantly increasing the probability of the thing you want, then I guess at some point, you try to get it, maybe you got it, maybe not. But if you do it a bunch of times, it kind of works.

Ian: Right. So okay, so yeah, well, what can this be used for? These seem,you know, normal, the classical computing algorithms, you know, took geniuses and in many cases to come up with so, like, these seem like a lot harder to invent. Because you're not just like, it's not just like a, you know, a Turing machine where you have a nice definite state, and you're doing definite operations, and you get a definite answer.

Max: Or at least I could wrap my head around how the machine works. They literally tell you about a Turing machine is like something on a ticker tape. So it's, like, very intuitive.

Ian: Yeah, here, we have to do something where we're sort of manipulating a probability distribution to sort of push it in the direction, such that when we measure it, we get something that's more often in the outcome that we want.

Max: So I mean, yeah, we don't have to, we don't have to get into like all the algorithms here, because that's going to be too much for your audio. But like, you know, when I was in a lecture, they were like, we've done all this research, and we finally figured out how to factorize 15 into three and five. I'm sure you're familiar with that example. So have they done better in the last 20 years?

Ian: Yeah, so they're probably so that's an example of Shor's algorithm. So okay. Yeah, before I talk about algorithms, and again, I won't go into like, you know, gritty details of the algorithms. But basically, it's at this point in time, it's important to divide quantum computing algorithms into two basic categories.

One are NISQ algorithms — NISQ. So noisy intermediate scale quantum computers. So basically, those are the quantum computers we have now. They are noisy, that is the qubits do not maintain perfect fidelity. And ultimately, this is the biggest challenge in building a quantum computer that is practical is reducing the amount of noise.

But with the existing quantum computers, which range from, you know, a handful to dozens to, in some cases, hundreds of qubits, but whether those are all that useful is a question. People have nonetheless and including myself, have spent time thinking about, okay, how might we make use of these noisy qubits that are imperfect but are still pretty good. They still have some fidelity. 

Max: So yeah, so maybe, can you think of some like applications that we can wrap our head around? Yeah, that’s kind of like coming. Maybe that, I can divide them into what's coming near term and what's coming long term.

Ian: So a good example of a type of NISQ algorithm. So there are a lot of, basically variational NISQ algorithms, some of them are sort of machine learning oriented, there are quantum neural networks, another, maybe easier one to wrap your head around is called the variational quantum eigensolver.

So basically, I have the, so I have, say the Hamiltonian for some quantum system, which is like the energy function for it, and I want to find its ground state, its lowest energy state, and the lowest energy value. Okay, so, so much like in machine learning where you have a loss function, and you have some parameters that you minimize, to the some parameters that you that you adjust to, say, minimize your loss function, here our loss function is, so we create a circuit that contains variable parameters in it on some qubits.

And then at the end of it, we measure the energy, the expectation value of the energy over this probability distribution. And we, then this is what's called a hybrid algorithm, because we measure this energy at a particular parameter value. And then we use a classical computer to compute the gradient of these parameters. And we do gradient descent or something like that, to minimize the energy to get an approximate representation of the ground state of this Hamiltonian. It's called variational quantum eigensolver.

Max: So this is some people just getting used to AI now they're gonna think about quantum AI. Think it's just gonna make training some of these systems much more efficient, or much more broader than what you're doing now?

Ian: So this, the next bit will be sort of editorial. No, I don't think I don't think VQE or most of these sort of, we call them hybrid variational algorithms. Yeah, hybrid, because you still need the classical computer to compute gradients. And there's this feedback loop between the quantum and classical.

If you'd asked me a year ago, I would have been more optimistic about the potential for, say, industrial applications. I'm less optimistic about that now. And so before I go into that, I should say that the other broad class of algorithms are what are called fault tolerant algorithms, which are algorithms that require quantum error correction, which includes Shor's algorithm, which you alluded to earlier, which factorizes numbers into primes.

So right, so yeah, as I mentioned, the biggest challenge to building quantum computers is just the presence of noise, we're dealing with very small, delicate, physical systems. There are a bunch of different physical systems that can be used as quantum computers. And they're very sensitive to environmental noise, to thermal fluctuations, to errant photons, to weird sort of nonlinear behavior, you know, couplings between distant qubits, you didn't anticipate, all of the above and more.

And so suppressing noise in these systems is very difficult. And so there's always going to be some noise associated with these systems. And in order to get qubits that maintain perfect fidelity, you actually don't need a you don't need a perfectly noiseless physical qubit. So, without digressing too much, a common example, a common qubit architecture is what's called a trapped ion.

It's kind of exactly what it sounds like. It's an atom, a charged atom, an ion, where the qubit is the two lowest energy states of the atom. And you basically shoot a laser at it to move between those two states, roughly speaking. Okay, so that's, we'll call that a physical qubit. It's always going to have some some noise level, just for an example like, uh, you know, single qubit gates.

So an operation on a single one of these qubits. You know, these these, you know, in ideal settings can have, say 99.99%, fidelity, a two qubit gate, in trapped ions might have 99.8% fidelity in a very idealized experiment. When you're running a lot of them together and you have to run hundreds or 1000s of gates. The errors accumulate very quickly. And you lose fidelity.

Max: You really need like 99.999.

Ian: Yeah. So but we don't need, we don't actually need perfect fidelity. And in fact, the classical computers we use don't have perfect fidelity or occasionally there are errant bit flips. But because of their physical size, they're the physical size of transistors, they're less susceptible to this noise than qubits are.

Max: And we have error correcting codes.

Ian: Yeah. And we have error correcting codes, and analogously, there are quantum error correcting codes, which work a bit differently than classical error correcting codes. So, you know, the simplest sort of classical error correcting code is just a repetition code where I just copy, if I want to send you a one, I just send you, you know, 10 copies of it. And if a couple of them get corrupted, you just take the majority vote, right, and you're likely to receive the correct message.

Unfortunately, in quantum mechanics, you can't make copies of states the way you can, there's no free lunch. You can't make copies of qubits while they're in their superposition.

Max: You could collapse it to a bit make a copy of that, right.

Ian: But then we're back to classical computing.

Max: Yeah.

Ian: Right. But there are algorithms that, like in classical error correcting codes, use multiple physical qubits to encode a single logical qubit. And you can execute a series of operations on this collection of bits to diagnose and correct errors that occur.

Max: Interesting. Okay, once if we solve this problem? Are we going to be able to factorize large numbers in this and like break encryption?

Ian: So there are lots of quantum error correction algorithms that exist. I'm not going to explain them here, it'd be way too technical. But, you know, roughly it, like I said it, you take a bunch of a bunch of physical qubits, and you get one or some small number of logical qubits, the actual logical units that you're going to operate on out of them, and the estimate that of what you need to, so again, the algorithms are out there, there are lots of them.

Lots of people are working on this since the 90s, I think. But if you want to have a perfectly error corrected qubit, which you will need in order to say break RSA encryption, or to do anything with these fault tolerant algorithms, you want to have a perfectly error corrected qubit, you're going to, one need, you'll still need quite good fidelity.

So you know, you'll want your two qubit fidelities, or, you know, the error rate to be less than, say, one in well, you know, 1/1000 of a percent per operation. And you'll probably need 1000s of physical qubits per single logical qubit.

Okay, so that means if I want to, and I think off the top of my head, I don't know, but I think if you want to break RSA encryption, or RSA 2048, I'm sure it's been, there's there's upgraded versions of it. I think people estimate you need several 1000 logical qubits, error corrected qubits, each of which consists of possibly 1000s of physical qubits. So millions of physical qubits with very low fidelity. So that's-

Max: I take it that's hard.

Ian: Yeah, it's hard. 

Max: Is there some kind of equivalent to Moore's Law for quantum computing that could kind of tell us that this might be possible at some point in the future?

Ian: Yeah, there is actually. Yeah. So it's a little different than Moore's law. So you know, Moore's law, basically measures, essentially from, it's like the density of transistors.

Max: I hope you’re not going to tell me that it's a complex variable version of Moore's law.

Ian: No, but if I'm not mistaken, Moore's law is like that, like an exponential growth in basically like the density of transistors and classical computers, right. So the analogous thing in quantum computing that's kind of just emerged as a benchmark is something called Quantum volume. Which is, like, you know, we're not concerned about density because we're already dealing with microscopic things.

But quantum volume sort of takes into account, it's a measure that I think IBM invented. But a lot of people have adopted it to kind of like benchmark and show off their systems. It's a measure that takes into account both the size of the system, the number of qubits, and the fidelity of the system, the the error rate, the low error rates.

So the bigger you have a system you have and the lower of an error rate you have, after executing. Well, yeah. So let me back that up a little bit. It's a measure basically of the width of the system, which is to say the number of qubits you have, the depth of the circuit you can run, the number of operations you can do in this qubit. And then corrected by the noise level that it experiences.

So the less noise, the more qubits, the less noise and the more operations you can do, the higher the quantum volume you can achieve. So you can look it up. I don't know the formula of it off the top of my head. The current? Well, if I say number of the current record, it’s not going to be anything. But basically…

Max: It's increasing.

Ian: Yeah, and exponentially like Moore's law. So that's, I suppose, promising. And I would also say that, like industry trends, so certainly for a while, even though I only started really paying attention to the quantum computing industry, in late 2019.

Back then people were like, all in on NISQ, you know, near term algorithms for doing, you know, chemistry and doing pharmaceuticals, and, you know, solving all these complex problems and finance and stuff. I think the enthusiasm for that has waned a bit. Like I’ve seen so many, like quantum algorithm, quantum software, startups come and go.

And I think industry is more focused now on just the long term goal of improving hardware fidelity, and just aiming for ultimately error corrected systems.

Max: So I mean, my sense is, you sometimes hear people on the internet saying, hey, quantum computers are going to break encryption, like any day now. And it almost seems like it sounds like it's, it's, it's something that could come down the road. But it's, we're not close. And I almost like to see I'm sure someone's calculated it out with this quantum volume, Moore's law, someone's calculated out like, when they'd be able to crack this, I almost want to look that up.

Ian: Yeah, that's probably not the measure you'd want. You can look up, you can definitely look up the number of logical qubits you'd need. So Shor's algorithm is the algorithm you'd use to crack RSA encryption.

But of course, there are other encryption algorithms out there that don't rely on factorizing numbers. And there's a sub research field of post quantum encryption, which I imagine will probably move faster than the progress in hardware. So yeah, no, I wouldn't worry about quantum computers cracking encryption anytime soon.

Max: Yeah, but it sounds like there are applications in like, you know, search and optimization and machine learning and that kind of thing. Yes, that's exciting. 

Ian: And I think even with not perfectly error corrected quantum computers, but slightly less noisy, slightly larger quantum computers that we have, than we have now, there still could be worthwhile applications for things, like simulating molecules for drug discovery, or materials development.

Max: A lot of these are approximations anyway.

Ian: Yeah, and they're inherently quantum calculations that are well suited, right? Things that are a little more distantly connected would be like optimization algorithms that may potentially, I think, at this moment, don't have much promise. But if the noisy quantum computers get a little larger and a little less noisy, potentially could be useful before full error correction. But that's just speculation.

Max: All right. Yeah. So I mean, we've been talking for a while. So I don't want to keep you but there's one more question that before we wrap up, which is like, when you program a quantum computer, do you have to use a special language or a special framework? Are you just like sitting there using Python or?

Ian: Yeah, I mean, so like, just typically, like yeah, if you program a quantum computer, I mean, usually so you could go home and do this tonight. You could go to search Qiskit, or Penny Lane. Qiskit is IBM's. Quantum simulator and, and interface to their quantum computers. Yeah, it's basically a Python. Yeah, it is a Python package. And you essentially, you essentially program at Quantum assembly level. In fact, the language.

Max: So you're, you're simulating quantum computer on your own classical computer. Yeah.

Ian: And then you can also gain access even just as a regular civilian to some of their smaller computers and run small things.

Max: Really? How does one do that? Like, go on their website?

Ian: Yeah, go to IBM, search IBM quantum. Yeah, you can buy credits from them or IonQ.

Max: I mean, I don't know why I would do that. But it's almost like if any listener out there finds the need, I'd love to hear about it.

Ian: Yeah. And, and they have very small ones available. I think you can use for free to a limited extent. But yeah, so yeah, you're just programming in Python. But you're using that to encode, basically, assembly level operation.

So you're literally encoding a sequence of gates, like, while CNOT is the quantum equivalent of a NOT gate, and then rotation operators on single qubits. There aren't really yet high level quantum computing, programming languages.

Max: You're not doing like higher order functions.

Ian: No, no, in fact, the language I think the most common language for writing quantum algorithms is called QASM, which is Quantum Assembly language. And Qiskit. Python package is just kind of a wrapper for QASM, more or less.

Max: See, you're technically using Python, but it's almost like you're, you're you're encoding in Python, very low level assembly like instructions.

Ian: Yeah, gate level instructions. And some people you know, if you want to get the most performance, you can, can go deeper than that, and can do things like directly shape the, you know, the pulses of light that you're shooting at qubits.

But that's, yeah, that's a level even lower than the assembly language. But yeah, there are no like, you know, sub routines or higher level, like abstractions above assembly language, that have really gained any traction. I'm sure people have tried to make them but they're not too useful yet.

Max: Yeah, almost all this stuff makes me think. And it might be a long time, or maybe never when the average developer is actually using this stuff. But do you think they'll come a time when like, you know, the many companies will be wanting access to quantum computing or maybe using it without knowing it?

Ian: Many companies? Possibly.

Max: Certainly like governments.

Ian: I can see them being very useful in specific high value cases, and definitely in academic settings too, so that's another early area where some noises tolerating is simply just simulating quantum systems for basic science. People already do that with quantum computers.

So, you know, I do find it hard to imagine having like a, you know, buying like a QPU the way you buy a GPU and just installing it in your desktop. Yeah. I mean, I suppose.

Max: I mean, if I were writing a science fiction movie, yeah, maybe, maybe I would have my character go to Best Buy and pick one of those.

Ian: It's not impossible to imagine that, you know, that being used for some specialized like, optimization subroutines, you know, the way GPUs are used for very specialized subroutines, but certainly in the like, next couple of decades, I imagine any practical use that could possibly come out of quantum computing will be sort of at the large industry or government level or academic level? Gotcha. Yeah.

Max: Yeah. All right. Yeah, this whole discussion has been great. It's just it's given us a lot to think about. And I feel like it's been like, kind of drinking from the firehose experience, experience. So I'm going to try to like end it here, and maybe we can all try to sleep on it and wrap our heads around it. I'd love to get some feedback from my listeners on what they think of quantum computing after this discussion.

So Ian, thank you so much for coming on the show. Do you have any last thoughts and anything you want to promote? Where can people find out more about you on social media or whatever or or more about what we've spoken about today? Although I have some very good links.

Ian: Sure. Yeah. Well, yeah, thank you, Max for having me. It was definitely fun to talk about this. I hope it was. I hope I didn't use too much jargon.

Max: It's unavoidable in this topic.

Ian: I would recommend if you want to learn about this, just go on IBM Quantum, IBM's Quantum website, they have like a series of tutorials for different levels of technical background that can be fun to play around with. If you're interested in this.

As far as social media, I am not particularly active on social media, at least not under my real name. And the stuff I'm working on right now, I'd have to be a bit secretive about but if things go well, you'll hear about it in the future. It's tangentially related to quantum computing, but not exactly that.

Max: Okay, so if anyone has a question for you, they can go through me. Alright, sounds good. All right. Ian, thank you so much for coming on the show.

Ian: Yeah. Thank you, Max. 

Max: All right. I feel like not only did I get the theoretical rundown today, but for the first time, it feels more real, as I have links to actual software and hardware where I could get started. So like, you know, before it was just kind of on a whiteboard or on a blackboard, blackboard or whiteboard, what's the difference?

But now I feel like I actually can like, you know, write. Maybe it would take some learning, but I feel like it could actually figure out how to go in and deploy some of this stuff if I wanted to. So that feels more real. I and all these links are going to be on the show notes page at localmaxradio.com/276. And those links, the actual software and hardware to get started. Okay.

And of course, I just want you all to join our locals to talk more about quantum computing maximum.locals.com. Hope to hear from you there soon. I hope to get an interview in with Aaron this week. We'll see if we can do that. And we have episodes coming up on open source software as well. And 276, I believe it'll be 276 is going to be a very special episode that might throw you for a loop. So look forward to that. Have a great week, everyone.

That's the show to support the Local Maximum sign up for exclusive content and their online community at maximum.locals.com. A Local Maximum is available wherever podcasts are found. If you want to keep up.

Remember to subscribe on your podcast app. Also, check out the website with show notes and additional materials at localmaxradio.com. If you want to contact me, the host, send an email to localmaxradio@gmail.com. Have a great week.

Episode 275 - Connecticut Chronicles, Columbia Conferences & Questioning Bots

Episode 275 - Connecticut Chronicles, Columbia Conferences & Questioning Bots

Episode 273 - Stop Making AI Boring

Episode 273 - Stop Making AI Boring