Summary
The future of computation and our understanding of the world around us is driven by the quantum world. This week Paul Nation explains how the Quantum Toolbox in Python (QuTiP) is being used in research projects that are expanding our knowledge of the physical universe.
Preface
- Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
- I would like to thank everyone who supports us on Patreon. Your contributions help to make the show sustainable.
- When you’re ready to launch your next project you’ll need somewhere to deploy it. Check out Linode at www.podastinit.com/linode?utm_source=rss&utm_medium=rss and get a $20 credit to try out their fast and reliable Linux virtual servers for running your awesome app.
- Need to learn more about how to scale your apps or learn new techniques for building them? Pluralsight has the training and mentoring you need to level up your skills. Go to www.pythonpodcast.com/pluralsight?utm_source=rss&utm_medium=rss to start your free trial today.
- Visit the site to subscribe to the show, sign up for the newsletter, read the show notes, and get in touch.
- To help other people find the show please leave a review on iTunes, or Google Play Music, tell your friends and co-workers, and share it on social media.
- If you work with data for your job or want to learn more about how open source is powering the latest innovations in data science then make your way to the Open Data Science Conference, happening in London in October and San Francisco in November. Follow the links in the show notes to register and help support the show in the process.
- Your host as usual is Tobias Macey and today I’m interviewing Paul Nation about QuTIP, the quantum toolbox in Python.
Interview
- Introductions
- How did you get introduced to Python?
- Before we start talking about QuTiP, can you provide us with a baseline definition of what quantum mechanics is?
- What is QuTIP and how did the project get started?
- Is QuTiP used purely in academics, or are there other users?
- What are some of the practical innovations that have been created as a result of research into different areas of quantum optics?
- How do you foresee the advent of practical quantum computers impacting the state of quantum mechanical research?
- Given the inherent complexity of the subject matter that you are dealing with, how do you approach the challenge of trying to present a usable API to users of QuTiP while not inhibiting their ability to operate at a low level when necessary?
- What is the process for incorporating new understandings of quantum mechanical theory into the QuTiP package?
- What are some of the most difficult aspects of simulating quantum systems in a standard computational environment?
- What is the most enjoyable aspect of working on QuTiP, what is the least enjoyable?
- What are some of the most notable research results that you are aware of which used QuTiP as part of their studies?
- What are some resources that you can recommend for anyone who wants to learn more about quantum mechanics?
Keep In Touch
Picks
- Tobias
- Paul
Links
- Quantum Optics
- 2 Level System
- Complex Numbers
- Qubit
- Quantum Computing
- Harmonic Oscillator
- Nature Scientific Journal
- IBM Quantum Experience
- D-Wave
- Rigetti Quantum Computing
- Quantum Supremacy
- Hamiltonian
- Sparse Matrix
- Richard Feynman
- Dask
- Project Q
- Quantum State Transfer via Noisy Photonic and Phononic Waveguides paper by Peter Zoller
- Extending the lifetime of a quantum bit with error correction in superconducting circuits paper by Rob Shoelkopf (Yale)
- QuTiP Documentation
The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA
[00:00:14]
Unknown:
Hello, and welcome to podcast. In it, the podcast about Python and the people who make it great. I would like to thank everyone who supports us on Patreon. Your contributions helped to make the show sustainable. When you're ready to launch your next project, you'll need somewhere to deploy it. So you should check out linode at www.podcastinit.com/linode and get a $20 credit to try out their fast and reliable Linux virtual servers for running your next app. Do you need to learn more about how to scale your apps or learn new techniques for building them? Pluralsight has the training and mentoring you need to level up your skills. Go to www.podcastinit.com/pluralsite to start your free trial today.
You can visit the site to subscribe to the show, sign up for the newsletter, read the show notes, get in touch, and support the show. To help other people find the show, please leave a review on Itunes or Google Play Music, tell your friends and coworkers, and share it on social media. If you work with data for your job or want to learn more about how open source is powering the latest innovations in data science, then make your way to the Open Data Science Conference happening in London in October and San Francisco in November. Follow the links in the show notes to register. Your host as usual is Tobias Macy. And today, I'm interviewing Paul Nation about QTIP, the quantum toolbox in Python. So, Paul, could you please introduce yourself?
[00:01:24] Unknown:
Yeah. So my name is Paul Nation. I'm a theoretical physicist. I work in, quantum optics. I am kind of the lead developer on this Q tip package for the last 7 or 8 years now. And do you remember how you first got introduced to Python? I don't think I was particularly introduced. I was taking a graduate class in electromagnetic boundary value problems, which is about as exciting as it sounds. And, the choice was MATLAB or something of your choice. And, I used to work, for the army, doing biological aerosol detection and had used MATLAB and grew to dislike it. So I was like, what what is interesting and what, has nice numerical packages? And so Python was the choice, and you know, that was about 8 or 9 years ago now.
[00:02:15] Unknown:
And before we get too far into talking about QTIP in particular, can you provide us with a bit of a baseline definition of what quantum mechanics is and some of the groundwork of the subject matter that we'll be discussing?
[00:02:27] Unknown:
Yeah. So I guess I guess the best thing to do is maybe narrow down the the question if I could and just say, what is quantum optics? So quantum optics is a subset of quantum mechanics, but it's it's kinda more to the point of, you know, what Q tip is, geared towards. So quantum optics in a nutshell is the interaction between light, and, matter. And by matter, we mean things like atoms. And so there's 2 basic ingredients, versus the atom part, and the atom is is a simple thing to model. So just, think of the earth. Right? And picture the surface of the earth as being smooth. Right? There's no bumps on it. And you take an arrow that starts from the center of the earth and then points to the surface.
Okay. And we'll just call that arrow has length 1. So it's 1 length. And so that arrow of course can point anywhere on the earth. It can point at the North Pole, it can point on the South pole, and it can point in any other all direction you want. This particular thing is actually, a model for an atom in quantum optics and it's called the 2 level system. And the reason it's called the 2 level system is because it turns out that if you describe everything in terms of the North pole and the South pole, then any other point on the earth you can represent by just a combination of North Pole and South Pole.
And in order to do that, it requires complex numbers, but, it's a, just a a technical detail. And so anything can be described in just terms of up and down. Okay. That's why it's called 2 level system, up and down. That's all basically all you need to do. This ingredient also has another name. This is what's called the cubit. And so cubit is a word that's used quite a bit, in in quantum computing and quantum information as well. So if you hear a quantum computer, a quantum computer is nothing but these 2 level systems. Again, nothing but a little earth with an arrow on. The other ingredient is is the light part, and it turns out that light, can be modeled essentially identical to a a spring. So, you know, if you push on a spring or pull on a spring and you let it go, that spring bounces back and forth. It oscillates back and forth and then eventually stops.
So in the quantum mechanical world when you look at that spring, it turns out that spring behaves almost identically as it would in the classical world, except the amount of energy that the spring has comes in unique little packets. And these packets only have a precise amount of energy, and it's proportional to the frequency of the vibration. Okay? And so these 2 little ingredients, this this quantum mechanical spring and this 2 level system, when you glue them together and you see what happens, that's basically all of quantum optics. And so that field has been around a long time. And if I had just left everything there, we probably wouldn't need Python and a computer to solve anything. The real action comes in when you realize that in addition to your your little 2 level system and your your quantum mechanical spring, there's other things that are interacting with it. So if you think of a bubble floating around in a room, the bubble is not by itself. It's being bombarded by light. It's being bombarded by little dust molecules. Other air molecules hit it. And then if I tried to describe the motion of all that stuff, it'd be very, very complicated because there's too many atoms. There's too many dust particles and things like that. And they all interact with the bubble. It turns out there's always stuff interacting with our 2 level system and our harmonic oscillator.
Okay. And we call that noise. And it turns out noise is a very very complicated thing to model. So quantum optics with noise is is something that you can't usually write down with pencil and paper, and so you need to turn to the merits. And and, basically, that is what QTIP is all about.
[00:06:15] Unknown:
And now that we have sort of a frame of reference to work from, can you describe a bit about what Q Tip is in particular and how the project first got started?
[00:06:26] Unknown:
Yeah. So the project itself was started back in 2, 010. I was, finishing up my, PhD at the time, and this was up in New Hampshire. And it was too cold to go outside and do anything, and so I was sitting around probably drinking too much wine. And I just wanted to make my own, numerical package because I had used a a previous 1, which is called the the quantum toolbox or q q o toolbox, which was a MATLAB, toolbox. And, of course, I'm I'm not a big fan of MATLAB. So I was like, well, let's just write it myself. And so that went on for a little bit. And then, as a postdoc, I went to Japan and, met the, really the guy who helped me take it from nothing to something, Robert Johansen.
And then so I had kind of the core in Python, and then he happened to have a bunch of c routines that he used. And he he was like, well, I'll just I'll just convert them to Python, and we can actually, you know, combine forces. And that's kinda how it started. But the basic idea is, again, you take these 2 level systems, The these quantized springs, these harmonic oscillators. You glue various combinations of these things together. You put them in some initial state, and we want to see as a function of time what what pops out at the end. Okay? And again, there's always these noise factors that are that complicate things. And so Q tip is basically how you get from an initial state to a final state for 1 of these systems, taking into account the the real world noise.
And that's basically all it does, but in various different settings.
[00:08:00] Unknown:
And is the Q tip package something that is primarily used in academic settings, or is it also used in industry and other forms of research?
[00:08:10] Unknown:
Yeah. So it it's actually a a a mix. So we have a a wide variety of academic users. We we get about 26, 000, visitors, per year to the the website. So the vast majority of of them are, academics, mostly from the US and then places like Germany, and now China. China, I think, is number 2 now. But also, it it turns out that it's it's widely used, in government research labs, Lawrence Livermore. It's actually a requirement to get some jobs at Lawrence Livermore. And also these big, Fortune 500 companies that you hear about, trying to build a quantum computer, IBM, Google, etcetera. There's actually quite a few of them now, Intel, Rigetti, and so on.
All these places actually use it as well, basically, to to do, this noise modeling for for their their quantum computers.
[00:09:05] Unknown:
And so quantum computing is definitely something that a lot of people are at least tangentially aware of, if not, you know, heavily interested in? And are there any other sort of practical use cases for our understanding of quantum optics and the simulations that QTIP is able to facilitate?
[00:09:24] Unknown:
So yeah. I mean, the the the keyword there is is practical, and so a a a lot of what is done using q tip is more at the basic, research level. So this is not to say that quantum optics doesn't have practical benefits. You know, thing, you know, when you when you when you go into an an an elevator and the door does not shut on you when you're passing through, the the reason it it it doesn't squish you is because quantum optics is doing something called the photoelectric effect, which Einstein got the Nobel Prize for, and actually is the whole reason why you're not being crushed by your elevator door or your garage door, for example. So there's there's practical stuff for quantum optics, but the the the core user group of QTIP is basically really fundamental research. Do you want to call quantum computing at this stage, practical?
It depends on who you ask, but it's definitely headed in that direction. But, basically, I would say, really, this is fundamental research.
[00:10:24] Unknown:
Yeah. As with every field of science, it's always difficult to be able to trace any sort of direct lineage between the innovations that happen in the sort of day to day experiences people have and the abstract research that's being conducted at any given point because there are so many different avenues of inspiration and innovation that can be triggered in sort of, seemingly random ways as well. So
[00:10:49] Unknown:
I think it was a professor back in the day saying, you know, it's practical if you can make money off of it. You know, given given that benchmark, Q tip does not make any money. Right? It's open source. And, you know, even the quantum computing stuff, there's there's not money that's there's not money being made in that yet. It's it's company's spending money to try to reach that point, but we're not quite there yet. So I guess I guess nothing practical in that benchmark.
[00:11:13] Unknown:
1 of the things that I was curious about too is what your thoughts are in terms of how you view the advent of practical quantum computing and the effect that it might have on our ability to further the fields of study into
[00:11:30] Unknown:
quantum mechanical theory and quantum optics and all of the other related fields? Yeah. So I I guess the the short answer is I don't know, and I don't think many people know. So, you know, there's I think right now we're living in kind of the quantum computing bubble because there's a there's a lot of hype, there's a lot of money flowing in from these same kind of companies I've mentioned earlier. But in if you actually ask someone what is a quantum computer good for, The it's we don't really know the answer for that. So a lot of these companies in the short term are are focused on just proving the idea of a quantum computer that, you know, it can outperform a classical computer, or are focused on really small scale, quantum chemistry type experiments. So, actually, to in today's, Nature journal, there was a paper by IBM looking at eigenvalue solving, of quantum chemistry problems. And so, they know the answer to these problems so that they can compare. And so, you know, in the long term, there's a lot of things that, you know, a lot of lofty things that people say they're gonna be useful for, but we don't We don't actually know. There's there's not so many algorithms that actually show exponential speed up and, you know, what you know, can you leverage things? I mean, it's a it's a complicated situation. So, you know, like the early days of classical computing, you know, when when people first started building, you know, the first Intel chips, I don't think the envisioned, you know, software and, you know, hardware that allow us to talk like we're doing now. So we're we're still in this kinda area where we're just kind of exploring, you know, you know, the the the ground floor of this, this, you know, quantum computing structure.
[00:13:08] Unknown:
It will be interesting to see the impacts that it has on the ways in which we interact with computation and if there are any sort of benefits that can be gained in terms of computational algorithms that are currently impractical simply due to the limits of our computational ability and, what that might mean. I know that 1 of the areas of concern is the effect that it'll have on the field of cryptography. And so there are already people who are doing research into new algorithms that will be resistant to the capabilities quantum computation. But as you said, a lot of that is purely speculative because we don't actually know what the concrete capabilities of a fully operational quantum computer are beyond some of the initial experimental tests that we've done with I believe that most of that has been done is something on the order of, like, 3 to 5 cubits of information,
[00:13:57] Unknown:
contained within a quantum computer. Yeah. You know, well, you know, these I think recently, you know, IBM has their little you know, you can play with their was 16 cubit version. I think that that's in the last month or 2 that that was put online. So anyone can actually play with that for free. That's the IBM, Quantum experience. And there's, you know, there's there's competitor Google is gonna do the same thing. They they're kinda closed as to when that's actually gonna happen, but they're gonna have an online thing as well that I'm sure to some extent will be free to play with. There's another Rigetti Quantum Computing, which is a startup based 1. We also have, I think, an 8 qubit thing, and I'm not sure if you can play with it or not. But, you know, we're starting to get up there and, you know, Google, in in, I'm guessing, IBM as well, they're they're kind of the 2 major players, you know, are are are trying to prove what's called quantum supremacy, by showing that, you know, if you have 50 cubits, you can do things that a classical computer could not, just because storing 50 cubits takes some some outrageous number of petabytes of memory if you actually wanted to store it. So we're actually seeing some progress, but if you, you know, the next question would be, okay, how many cubits and things do you need to actually do something interesting?
And then, that becomes a more difficult question.
[00:15:15] Unknown:
Bringing it back to QTIP, given the inherent complexity of the subject matter that you're dealing with and the forms of the computation that are necessary, how do you approach the challenge of trying to encapsulate all of that into a usable API that people who are trying to use Q Tip will be able to still perform all of the different kinds of manipulation of information that they want to do while also making it approachable for somebody who isn't necessarily as deeply in familiar with the the theory behind the computation?
[00:15:49] Unknown:
Yes. I mean, that's kinda the so the the goals of QTIP are kinda, you know, have have this open source, you know, you know, computation ability to do these things that, you know, to some extent are are, you know, technically challenging. But at the same time, we really worked hard to try to I don't wanna say dumb it down, but I mean simplify where you really don't need to know much beyond something that an undergraduate student would know, as the input. And so, basically, you know, from the user's point of view, for a lot of these things, we ask for just a few basic ingredients.
1 of them is, what's called the Hamiltonian, which basically just describes the system, those 2 level systems and springs, though that that interaction is described by something called the Hamiltonian. Some initial states, so you just your initial configuration, some some simple things that describe the noise, you know, and and then just some things that are kind of standard stuff if you need to solve, ordinary differential equations. Given all that stuff, which which is relatively simple to understand, we take that and then and then go and and play with that. So we we we try to abstract everything out as much as possible and then give the flexibility to the user at the input, and then, you know, we we kinda do a lot of dirty work, behind the scenes to clean it up. So, you know, our goal is to, you know, make it so you don't really have to know what's going on behind the scenes.
And, you know, we do some very complicated stuff, you know, and, unfortunately, we we haven't published a lot of it just due to to lack of of time and resources. But there's a lot of tricks that go on underneath, you know, that are are, you know, about efficiency and optimization and things like this. So not only is it easy to run, I mean, you you know, you're just passing Python things around. But internally, you know, everything is running
[00:17:41] Unknown:
essentially using c plus plus or or or similar things. And because of the fact that you are working in an area that does have a certain amount of active research being performed, do you have any sort of process for determining when to incorporate any new findings into the modeling that you supply in QTIP. Because I know that as part of the scientific process, even if a particular, study is published, you still need to do some amount of verification and validation before it's accepted as sort of, general, fact. And so do you have any way of determining when to, bring that into Q Tip or any sort of maybe,
[00:18:23] Unknown:
transitional module where you say these are all the computations that are currently in theoretical stages and haven't been proven sufficiently to bring into the core? The the funny thing about that is that in reality, the the algorithms that are in QTIP minus, again, the the the theoretical algorithms themselves are are in in some cases, you know, 50, 60 years old. You know, how you how you take it from a theorist point of view to something that works well on a computer is a completely different story. So actually, a lot of the stuff is are quite old tech techniques, but they're useful. The newer techniques, they tend to be not as useful in the fact that they're not very general. So there's a lot of powerful techniques that get around assumptions that people made, you know, 30, 50 years ago, and do much more powerful analysis, but they're only good for a subset of problems. And so for newer algorithms, there is some there is some concern about, you know, is is it actually valid? But the bigger concern is what is the range of generality and, you know, how do I take these very complex mathematical things and actually be able to solve it efficiently? And there's there's a lot of constraints on solving quantum mechanical problems on a classical computer that constrain what you can do, you know, in your programming techniques.
[00:19:39] Unknown:
And how have you architected QTIP in order to be able to allow for that flexibility and evolution of the algorithms and the computational aspects of the program?
[00:19:51] Unknown:
Well, so we we kinda have a a core mod well, not module, class. It's called a a quantum object, a q object. And so that's kind of the basic structure, and that really hasn't changed over the last 7 years. And so, basically, everything we try to do is handle sparse matrices, because the objects you get for quantum mechanics are are sparse, and the larger they get, the sparser they get. So everything is really manipulating sparse matrices. And so this quantum object class is basically just a class where the data is represented by a sparse object. There's a lot of other attributes that describe various quantum mechanical things that you might be interested in, and, of course, a lot of methods, for working on those. And so just given those generic objects, you you know, we we use those and pass those around even to our our our new functions. Internally, you know, internally, we do a lot of different stuff with the sparse matrices. We've we've improved that. We don't even use sci pi or anything like that. We have our own sparse stuff these days. But, really, we just pass around these these quantum objects, and then
[00:20:53] Unknown:
everything can kind of be derived from those. And for people who are using QTIP for doing their analysis and research, is it primarily space and data bound or primarily CPU bound in terms of the limitations that they reach when trying to work with the information that they're processing?
[00:21:12] Unknown:
Yeah. So well, it it's kind of a combination. So Richard Feynman, who who had a Nobel Prize in Physics, he was kind of the the first to point out that if you try to simulate a quantum system on a classical computer, the amount of resources you need, you know, by resources, you know, this is memory and time. These tend to blow up exponentially. And so, it it it turns out that actually being able to simulate quantum systems are actually limited to a very narrow window of which you can actually simulate. Fortunately, it turns out to be an important window for research or, you know, things like quantum computing. And so, like I said, everything is essentially sparse matrices.
And so, at least we're not storing a bunch of zeros, so so that's a good thing. But, you know, let's let's say we we haven't reached the the point where our memory is exponentially exploding yet. So we have something we can fit on, let's say, 64 gigabytes of memory or something like that. When you deal with sparse matrices, it turns out that first of all, many things are only serial in nature. I can't do parallel algorithms on a lot of this stuff. And it turns out even if I do, we do this in in q tip. It turns out that the most important operation, which is just sparse matrix times a DIN specter, that operation is limited by memory bandwidth. And and so it it turns out that, you know, even if you want to, you have 32 cores or something like this, it it turns out that as your system size grows, basically, at least for the the the kernel that we use in in q tip to do the operation, only about 1 and a half CPU's is actually useful, because you're you're essentially saturated your memory bandwidth. So there's a lot of stuff in there, but, you know, memory is the main 1, but but time is also a major 1 because again, we we can't take advantage of a lot of parallel stuff.
[00:22:57] Unknown:
And so you touched upon a lot of the sort of resource limitations that you run up against when trying to be able to simulate these complex systems of quantum mechanical interactions. Are there any other aspects of performing that simulation that are difficult given the sort of nature and architecture of our current computational capabilities?
[00:23:18] Unknown:
Let's see here. It would again, I mean, being able to do not do things in parallel is a is a bit disappointing. I mean, you know, these days, everyone tries to do multi core, you know, GPU, you know, huge, you know, huge levels of of parallelism, but, you know, we can't really take advantage of that. The nicest thing would be, have something, have a very fast memory bandwidth. And then in that case, if we have a really fast memory bandwidth, then we can actually invoke more cores in in parallel computation. So, really, if if we had ultrahigh bandwidth memory, then, you know, things would be very interesting.
[00:23:53] Unknown:
And so given the fact that you're limited so much by that memory bandwidth, it seems like even using something like DASK to break up the computation across multiple instances
[00:24:12] Unknown:
Yeah. You know, I mean, we're we're kind of a ragtag team of people. Yeah. You know, I mean, we're we're kind of a ragtag team of people. None of us really have access to, like, a a big cluster, for example. So, you know, I've never personally tried to do things where I, you know, I distribute things around and and and see what happens. There are examples of people who do similar stuff. There's a a Python thing called project q. Q is, of course, for quantum, where they took a variant of that and did a big distributed, classical simulation of some quantum computing stuff and kinda push the the limits. I think it was, like, 2 and a half petabytes of memory they needed to do that. In that case, they're a bit more specialized, and so they can they can do a bit more optimization than we can. We're we're a bit more generic.
That's kind of an open question, but, you know, this fact is, you know, sparse matrix inspector multiplication and and memory bottlenecks. It's kind of well known. And, you know, for structures like ours, I've played around with it, you know, for for a long time. And there's a few optimizations 1 could do based on graph theory kind of stuff. But, basically, we're we're kinda stuck with what we got. So it sounds like you're a fairly busy person in general,
[00:25:19] Unknown:
and not everybody has the capability of being able to spend time working on open source projects. So what is it about Q Tip that you enjoy enough for you to keep spending time on it and contributing to it? And, conversely, what are some of the aspects of it that you, least enjoy? Well, you know, I mean, you know, I I'm a busy guy, but, you know, unfortunately, I don't
[00:25:39] Unknown:
actually have the time. So I don't I'm not in academics anymore. And so really, q tip, I can only do kind of at night when my wife and kids go to sleep. And so for the past year or 2, you know, I've been I've been able to get quite a bit done, but, really, it's, you know, it's just, you know, kind of a labor of love kind of thing. You know, I've been doing this for so long. It's kind of my baby, and there's a lot of people who who find advantage, you know, in using it, and it's able to help people. And so, you know, I kinda I kinda stick with it even though, you know, I I'm I'm losing sleep and gaining weight, but, you know, it's it's fun and, you know, it's useful to the, community, and that's really the most, you know, the most enjoyment 1 gets out of it is is, you know, we I we kinda keep track of, you know, academic citations and things like that. And, again, not being an academic, I don't particularly care about the number of citations, but it it's a really good feeling to see that, you know, these people did this and, you know, they actually used my tools. And so it's a bit different because, I used to do some stuff on black holes and things like this. And, you know, people people would cite that and stuff, but a lot of those citations are kinda just yeah. We we have to cite you because, you know, you have a paper in the general area. We didn't read it, but we have to. And so the difference here is is that, you know, when when someone cites it, you're like, they actually used my stuff, you know, to further science. And, you know, that's a that's a great feeling. That's that's basically why I stay up at night and do it. So that's really my main enjoyment. The most difficult things to deal with, I guess, there are 2. So the first 1 is documentation.
Documentation is a painful experience, especially you where you just got done with something. It took forever. You debugged it. Then you have to go and write the documentation. Now in itself, that would be okay, but, you know, you spend a lot time writing documentation. I think we have something like 300 pages of documentation. 200, 300, somewhere in there. And then you spend all that time, and then no 1 bothers to read it. And so, you know, we have a little Google help group, and 9 out of 10 questions are something that could have been found in the documentation. So that's kind of a kind of a painful thing. I think it's a bit a bit more painful than bug hunting, but it depends on when you ask me. And then the the other thing, and it's related to the, you know, having only an hour of time on Q tip is, you know, whether whether it's in academics or outside of academics, actually being able to secure funding or resources to actually do this project is just a has been a not joyous thing to deal with. So, you know, we we've had some success and, you know, again, if it's used by a lot of people, it's been cited by a lot of people, but actually getting funding or other things to actually do the work, people are very hesitant to do it. And there's a lot of reasons why, and, you know, it it's boring to talk about them. But, you know, actually being able to, you know, there's there's postdocs and people like that who, of course, contribute stuff about a handful of them. And, you know, I've always had some thought if it would be nice to be able to give these people something like a 3 month salary to polish off some ideas that go in QTIP and things like this. But, you know, again, that's a very difficult thing. And, of course, we're not the only open source project that has problems finding resources. I think everyone does. But, you know, it's it's a bit of a drag sometimes.
[00:28:51] Unknown:
And is Q tip something that you still use in your day to day work, or is it purely just something that you work on outside of work and outside of, sort of daytime hours purely because of your ongoing association with it and your desire to see it move forward. So, so I've I've currently, I've I've worked for a a company,
[00:29:12] Unknown:
that does, work it does work on quantum computing. I won't say the name. If if someone's interested, they can find out the name. But, you know, we do use Q tip related things. And so, I still do use it in my day to day stuff, but the development of that is is orthogonal. So, again, the the develop it is, me just at night doing it. The stuff I use at work, the relevant aspects of that are are stuff that was developed, like, 5 or 6 years ago. The new stuff is really just just the labor of love. How do I optimize improvements? You know, what new stuff can I add now that I'm a bit smarter than I was, you know, 7 years ago kind of stuff? And you mentioned that there have been at least a certain number of citations
[00:29:56] Unknown:
of QTIP in published research papers. So what are some of the most notable results and studies that you're aware of which have used QTIP as part of their tool chain?
[00:30:06] Unknown:
Yeah. So I think we're up to 300 plus cite citations at the moment. So there's a lot of different things and, you know, it it I guess it'd be easy to just go back and look and see who's in nature and who's in science. But I guess, 2 of them, I guess, I can think of off the top of my head. There's 1, from the group of Peter Zoller, who who's out in Germany. It's a bit technical what they did, but, basically, what they did is they they showed that you can transmit information, from 1 place to another in the microwave frequency domain, and that transmission is perfect even if there's noise. And again, it it's a technical thing, but the the nice thing I like about this is they use q tip. That's nice. But it's also something that is, very important and also conceptually easy to understand, so I can And so, the nice thing about this is is that in the microwave regime, this is where people, think about, doing quantum computing. And so what the result would mean is I can transfer information from 1 quantum computer over here to another 1 over here without any, loss of information.
And it's relatively easy to do that. So that's a very nice result, I think. At least, personally, I like it. And then, another 1 is, I think it's from Rob Schoecoff's group in Yale. So they're a big name in quantum computing and and superconducting circuits in general. And, what they did is actually a a quantum computing related thing. But instead of using these cubits that I mentioned kind of at the beginning of our talk, they actually use the other part, the, the the springs, the harmonic oscillators. They actually take those and manipulate them to look like the, 2 level systems.
And the reason I like that 1 is because everyone in the world, when they do this quantum computing stuff, they always use these little 2 level systems. And there's no fundamental reason why, except they're easy to manipulate. And so, at least as a first go, it's easy to do. The oscillator stuff is a bit more interesting because it's harder to manipulate, but it has better properties if you actually wanna do computations and stuff like that. And not too many people look at that. Everyone's talking about cubits and things like that. And these people are like, well, let's try something different. And so difference is always cool. Yeah. It's definitely
[00:32:15] Unknown:
easy to sort of get lost in the fields of research that people are doing when you start getting to the purely theoretical aspects of our understanding of the physical world around us. And I personally have had a long interest in quantum mechanical theory and a lot of the sort of esoteric aspects of the research that we're doing in physics and chemistry. So I I I I'm sure that if I were to actually start going through the list of citations, I'd probably end up find finding myself down a huge rabbit hole with a lot of time invested in it, but definitely interesting sounding stuff. For anybody who's interested in finding out more about quantum mechanical theory or just, improving their baseline understanding of the some of the stuff we've been talking about today, are there any particular resources that you can recommend
[00:32:59] Unknown:
either at the intro or sort of intermediate level? Well, you know, these days, we we got the web. So, you know, there's, you know, there's a lot of courses that are, you know, online and they happen to be from the best schools. And so, you know, there's there's no shame in in doing those. I've I've looked at, you know, undergraduate level of quantum mechanics courses even though I've I've been out of school a long time, you know, just because these people explain things well and you always learn something new. So, I mean, the Internet, your friend, you know, I could I could say things about textbooks and stuff. But, you know, these days, there's a wealth of information that is already online. You know, how you how these things get done on a computer, you know, like, we have, like I said, 200 pages of documentation. So, the Internet's your friend. If you look up, you know, quantum optics, you'll you'll get a bunch of lectures and stuff like that, and they're usually pretty good. And then, you know, if something sparks your interest, you can always go from there. Great. Are there any other aspects of QTIP or quantum optics or anything else that you think we should discuss before we start to close out the show? I mean, I think I think we covered, the bulk of it. You know? You know, we can always go down various rabbit holes where things get technical, but, you know, we'll save that for another day. Okay. Well, for anybody who wants to get in touch with you and follow the work that you're doing
[00:34:13] Unknown:
and, Q Tip itself. I'll have you add your preferred contact information to the show notes. And with that, I'll move us on to the picks. And so for my pick this week, I guess I'll choose the edx.org platform. So, as you mentioned, having the Internet available for, learning and educating ourselves is definitely a valuable thing, and edx.org is an organization that I actually work fairly closely with in my day to day because I'm at MIT and run the Open edX platform for residential courses. And, it's definitely a great platform with a lot of wonderful information. MIT actually publishes a lot of their courses on edx.org for people to take free of charge. Or if you wanna pay a little bit, you can, get a certificate of completion to show that you actually learned some stuff there. So for anybody who does wanna learn more about quantum mechanics or, just about anything else, I think edX is a good place to start. And so with that, I'll pass it to you, Paul. Do you have any picks for us? Oh, I'm I'm sure I do. We're talking about Python, so, you know, I have to give a shout out to Cython. You know, qtip would be nothing without Cython.
[00:35:17] Unknown:
I can't say enough about it. It's awesome stuff. Highly recommend it. Also, matplotlib, you know, when I started doing, MATLAB, you know, you you you export a figure, you have to go and edit the EPS file by hand. So matplotlib is definitely the way to go. And then I guess last 1, I'll just say if you're ever in the,
[00:35:35] Unknown:
Colorado area, Colorado Springs, the Cheyenne Mountain Zoo, If you have kids, do their giraffe feeding. You'll you'll definitely be rewarded. Alright. Sounds like a lot of fun. Well, I appreciate you taking the time out of your day and time away from Q Tip to share your story of working on it and some some of the background of why you got involved in it in the first place and of the things that it's being used for. So I appreciate your time, and I hope you enjoy the rest of your evening. Oh, the pleasure was all mine, man. Have a good evening.
Hello, and welcome to podcast. In it, the podcast about Python and the people who make it great. I would like to thank everyone who supports us on Patreon. Your contributions helped to make the show sustainable. When you're ready to launch your next project, you'll need somewhere to deploy it. So you should check out linode at www.podcastinit.com/linode and get a $20 credit to try out their fast and reliable Linux virtual servers for running your next app. Do you need to learn more about how to scale your apps or learn new techniques for building them? Pluralsight has the training and mentoring you need to level up your skills. Go to www.podcastinit.com/pluralsite to start your free trial today.
You can visit the site to subscribe to the show, sign up for the newsletter, read the show notes, get in touch, and support the show. To help other people find the show, please leave a review on Itunes or Google Play Music, tell your friends and coworkers, and share it on social media. If you work with data for your job or want to learn more about how open source is powering the latest innovations in data science, then make your way to the Open Data Science Conference happening in London in October and San Francisco in November. Follow the links in the show notes to register. Your host as usual is Tobias Macy. And today, I'm interviewing Paul Nation about QTIP, the quantum toolbox in Python. So, Paul, could you please introduce yourself?
[00:01:24] Unknown:
Yeah. So my name is Paul Nation. I'm a theoretical physicist. I work in, quantum optics. I am kind of the lead developer on this Q tip package for the last 7 or 8 years now. And do you remember how you first got introduced to Python? I don't think I was particularly introduced. I was taking a graduate class in electromagnetic boundary value problems, which is about as exciting as it sounds. And, the choice was MATLAB or something of your choice. And, I used to work, for the army, doing biological aerosol detection and had used MATLAB and grew to dislike it. So I was like, what what is interesting and what, has nice numerical packages? And so Python was the choice, and you know, that was about 8 or 9 years ago now.
[00:02:15] Unknown:
And before we get too far into talking about QTIP in particular, can you provide us with a bit of a baseline definition of what quantum mechanics is and some of the groundwork of the subject matter that we'll be discussing?
[00:02:27] Unknown:
Yeah. So I guess I guess the best thing to do is maybe narrow down the the question if I could and just say, what is quantum optics? So quantum optics is a subset of quantum mechanics, but it's it's kinda more to the point of, you know, what Q tip is, geared towards. So quantum optics in a nutshell is the interaction between light, and, matter. And by matter, we mean things like atoms. And so there's 2 basic ingredients, versus the atom part, and the atom is is a simple thing to model. So just, think of the earth. Right? And picture the surface of the earth as being smooth. Right? There's no bumps on it. And you take an arrow that starts from the center of the earth and then points to the surface.
Okay. And we'll just call that arrow has length 1. So it's 1 length. And so that arrow of course can point anywhere on the earth. It can point at the North Pole, it can point on the South pole, and it can point in any other all direction you want. This particular thing is actually, a model for an atom in quantum optics and it's called the 2 level system. And the reason it's called the 2 level system is because it turns out that if you describe everything in terms of the North pole and the South pole, then any other point on the earth you can represent by just a combination of North Pole and South Pole.
And in order to do that, it requires complex numbers, but, it's a, just a a technical detail. And so anything can be described in just terms of up and down. Okay. That's why it's called 2 level system, up and down. That's all basically all you need to do. This ingredient also has another name. This is what's called the cubit. And so cubit is a word that's used quite a bit, in in quantum computing and quantum information as well. So if you hear a quantum computer, a quantum computer is nothing but these 2 level systems. Again, nothing but a little earth with an arrow on. The other ingredient is is the light part, and it turns out that light, can be modeled essentially identical to a a spring. So, you know, if you push on a spring or pull on a spring and you let it go, that spring bounces back and forth. It oscillates back and forth and then eventually stops.
So in the quantum mechanical world when you look at that spring, it turns out that spring behaves almost identically as it would in the classical world, except the amount of energy that the spring has comes in unique little packets. And these packets only have a precise amount of energy, and it's proportional to the frequency of the vibration. Okay? And so these 2 little ingredients, this this quantum mechanical spring and this 2 level system, when you glue them together and you see what happens, that's basically all of quantum optics. And so that field has been around a long time. And if I had just left everything there, we probably wouldn't need Python and a computer to solve anything. The real action comes in when you realize that in addition to your your little 2 level system and your your quantum mechanical spring, there's other things that are interacting with it. So if you think of a bubble floating around in a room, the bubble is not by itself. It's being bombarded by light. It's being bombarded by little dust molecules. Other air molecules hit it. And then if I tried to describe the motion of all that stuff, it'd be very, very complicated because there's too many atoms. There's too many dust particles and things like that. And they all interact with the bubble. It turns out there's always stuff interacting with our 2 level system and our harmonic oscillator.
Okay. And we call that noise. And it turns out noise is a very very complicated thing to model. So quantum optics with noise is is something that you can't usually write down with pencil and paper, and so you need to turn to the merits. And and, basically, that is what QTIP is all about.
[00:06:15] Unknown:
And now that we have sort of a frame of reference to work from, can you describe a bit about what Q Tip is in particular and how the project first got started?
[00:06:26] Unknown:
Yeah. So the project itself was started back in 2, 010. I was, finishing up my, PhD at the time, and this was up in New Hampshire. And it was too cold to go outside and do anything, and so I was sitting around probably drinking too much wine. And I just wanted to make my own, numerical package because I had used a a previous 1, which is called the the quantum toolbox or q q o toolbox, which was a MATLAB, toolbox. And, of course, I'm I'm not a big fan of MATLAB. So I was like, well, let's just write it myself. And so that went on for a little bit. And then, as a postdoc, I went to Japan and, met the, really the guy who helped me take it from nothing to something, Robert Johansen.
And then so I had kind of the core in Python, and then he happened to have a bunch of c routines that he used. And he he was like, well, I'll just I'll just convert them to Python, and we can actually, you know, combine forces. And that's kinda how it started. But the basic idea is, again, you take these 2 level systems, The these quantized springs, these harmonic oscillators. You glue various combinations of these things together. You put them in some initial state, and we want to see as a function of time what what pops out at the end. Okay? And again, there's always these noise factors that are that complicate things. And so Q tip is basically how you get from an initial state to a final state for 1 of these systems, taking into account the the real world noise.
And that's basically all it does, but in various different settings.
[00:08:00] Unknown:
And is the Q tip package something that is primarily used in academic settings, or is it also used in industry and other forms of research?
[00:08:10] Unknown:
Yeah. So it it's actually a a a mix. So we have a a wide variety of academic users. We we get about 26, 000, visitors, per year to the the website. So the vast majority of of them are, academics, mostly from the US and then places like Germany, and now China. China, I think, is number 2 now. But also, it it turns out that it's it's widely used, in government research labs, Lawrence Livermore. It's actually a requirement to get some jobs at Lawrence Livermore. And also these big, Fortune 500 companies that you hear about, trying to build a quantum computer, IBM, Google, etcetera. There's actually quite a few of them now, Intel, Rigetti, and so on.
All these places actually use it as well, basically, to to do, this noise modeling for for their their quantum computers.
[00:09:05] Unknown:
And so quantum computing is definitely something that a lot of people are at least tangentially aware of, if not, you know, heavily interested in? And are there any other sort of practical use cases for our understanding of quantum optics and the simulations that QTIP is able to facilitate?
[00:09:24] Unknown:
So yeah. I mean, the the the keyword there is is practical, and so a a a lot of what is done using q tip is more at the basic, research level. So this is not to say that quantum optics doesn't have practical benefits. You know, thing, you know, when you when you when you go into an an an elevator and the door does not shut on you when you're passing through, the the reason it it it doesn't squish you is because quantum optics is doing something called the photoelectric effect, which Einstein got the Nobel Prize for, and actually is the whole reason why you're not being crushed by your elevator door or your garage door, for example. So there's there's practical stuff for quantum optics, but the the the core user group of QTIP is basically really fundamental research. Do you want to call quantum computing at this stage, practical?
It depends on who you ask, but it's definitely headed in that direction. But, basically, I would say, really, this is fundamental research.
[00:10:24] Unknown:
Yeah. As with every field of science, it's always difficult to be able to trace any sort of direct lineage between the innovations that happen in the sort of day to day experiences people have and the abstract research that's being conducted at any given point because there are so many different avenues of inspiration and innovation that can be triggered in sort of, seemingly random ways as well. So
[00:10:49] Unknown:
I think it was a professor back in the day saying, you know, it's practical if you can make money off of it. You know, given given that benchmark, Q tip does not make any money. Right? It's open source. And, you know, even the quantum computing stuff, there's there's not money that's there's not money being made in that yet. It's it's company's spending money to try to reach that point, but we're not quite there yet. So I guess I guess nothing practical in that benchmark.
[00:11:13] Unknown:
1 of the things that I was curious about too is what your thoughts are in terms of how you view the advent of practical quantum computing and the effect that it might have on our ability to further the fields of study into
[00:11:30] Unknown:
quantum mechanical theory and quantum optics and all of the other related fields? Yeah. So I I guess the the short answer is I don't know, and I don't think many people know. So, you know, there's I think right now we're living in kind of the quantum computing bubble because there's a there's a lot of hype, there's a lot of money flowing in from these same kind of companies I've mentioned earlier. But in if you actually ask someone what is a quantum computer good for, The it's we don't really know the answer for that. So a lot of these companies in the short term are are focused on just proving the idea of a quantum computer that, you know, it can outperform a classical computer, or are focused on really small scale, quantum chemistry type experiments. So, actually, to in today's, Nature journal, there was a paper by IBM looking at eigenvalue solving, of quantum chemistry problems. And so, they know the answer to these problems so that they can compare. And so, you know, in the long term, there's a lot of things that, you know, a lot of lofty things that people say they're gonna be useful for, but we don't We don't actually know. There's there's not so many algorithms that actually show exponential speed up and, you know, what you know, can you leverage things? I mean, it's a it's a complicated situation. So, you know, like the early days of classical computing, you know, when when people first started building, you know, the first Intel chips, I don't think the envisioned, you know, software and, you know, hardware that allow us to talk like we're doing now. So we're we're still in this kinda area where we're just kind of exploring, you know, you know, the the the ground floor of this, this, you know, quantum computing structure.
[00:13:08] Unknown:
It will be interesting to see the impacts that it has on the ways in which we interact with computation and if there are any sort of benefits that can be gained in terms of computational algorithms that are currently impractical simply due to the limits of our computational ability and, what that might mean. I know that 1 of the areas of concern is the effect that it'll have on the field of cryptography. And so there are already people who are doing research into new algorithms that will be resistant to the capabilities quantum computation. But as you said, a lot of that is purely speculative because we don't actually know what the concrete capabilities of a fully operational quantum computer are beyond some of the initial experimental tests that we've done with I believe that most of that has been done is something on the order of, like, 3 to 5 cubits of information,
[00:13:57] Unknown:
contained within a quantum computer. Yeah. You know, well, you know, these I think recently, you know, IBM has their little you know, you can play with their was 16 cubit version. I think that that's in the last month or 2 that that was put online. So anyone can actually play with that for free. That's the IBM, Quantum experience. And there's, you know, there's there's competitor Google is gonna do the same thing. They they're kinda closed as to when that's actually gonna happen, but they're gonna have an online thing as well that I'm sure to some extent will be free to play with. There's another Rigetti Quantum Computing, which is a startup based 1. We also have, I think, an 8 qubit thing, and I'm not sure if you can play with it or not. But, you know, we're starting to get up there and, you know, Google, in in, I'm guessing, IBM as well, they're they're kind of the 2 major players, you know, are are are trying to prove what's called quantum supremacy, by showing that, you know, if you have 50 cubits, you can do things that a classical computer could not, just because storing 50 cubits takes some some outrageous number of petabytes of memory if you actually wanted to store it. So we're actually seeing some progress, but if you, you know, the next question would be, okay, how many cubits and things do you need to actually do something interesting?
And then, that becomes a more difficult question.
[00:15:15] Unknown:
Bringing it back to QTIP, given the inherent complexity of the subject matter that you're dealing with and the forms of the computation that are necessary, how do you approach the challenge of trying to encapsulate all of that into a usable API that people who are trying to use Q Tip will be able to still perform all of the different kinds of manipulation of information that they want to do while also making it approachable for somebody who isn't necessarily as deeply in familiar with the the theory behind the computation?
[00:15:49] Unknown:
Yes. I mean, that's kinda the so the the goals of QTIP are kinda, you know, have have this open source, you know, you know, computation ability to do these things that, you know, to some extent are are, you know, technically challenging. But at the same time, we really worked hard to try to I don't wanna say dumb it down, but I mean simplify where you really don't need to know much beyond something that an undergraduate student would know, as the input. And so, basically, you know, from the user's point of view, for a lot of these things, we ask for just a few basic ingredients.
1 of them is, what's called the Hamiltonian, which basically just describes the system, those 2 level systems and springs, though that that interaction is described by something called the Hamiltonian. Some initial states, so you just your initial configuration, some some simple things that describe the noise, you know, and and then just some things that are kind of standard stuff if you need to solve, ordinary differential equations. Given all that stuff, which which is relatively simple to understand, we take that and then and then go and and play with that. So we we we try to abstract everything out as much as possible and then give the flexibility to the user at the input, and then, you know, we we kinda do a lot of dirty work, behind the scenes to clean it up. So, you know, our goal is to, you know, make it so you don't really have to know what's going on behind the scenes.
And, you know, we do some very complicated stuff, you know, and, unfortunately, we we haven't published a lot of it just due to to lack of of time and resources. But there's a lot of tricks that go on underneath, you know, that are are, you know, about efficiency and optimization and things like this. So not only is it easy to run, I mean, you you know, you're just passing Python things around. But internally, you know, everything is running
[00:17:41] Unknown:
essentially using c plus plus or or or similar things. And because of the fact that you are working in an area that does have a certain amount of active research being performed, do you have any sort of process for determining when to incorporate any new findings into the modeling that you supply in QTIP. Because I know that as part of the scientific process, even if a particular, study is published, you still need to do some amount of verification and validation before it's accepted as sort of, general, fact. And so do you have any way of determining when to, bring that into Q Tip or any sort of maybe,
[00:18:23] Unknown:
transitional module where you say these are all the computations that are currently in theoretical stages and haven't been proven sufficiently to bring into the core? The the funny thing about that is that in reality, the the algorithms that are in QTIP minus, again, the the the theoretical algorithms themselves are are in in some cases, you know, 50, 60 years old. You know, how you how you take it from a theorist point of view to something that works well on a computer is a completely different story. So actually, a lot of the stuff is are quite old tech techniques, but they're useful. The newer techniques, they tend to be not as useful in the fact that they're not very general. So there's a lot of powerful techniques that get around assumptions that people made, you know, 30, 50 years ago, and do much more powerful analysis, but they're only good for a subset of problems. And so for newer algorithms, there is some there is some concern about, you know, is is it actually valid? But the bigger concern is what is the range of generality and, you know, how do I take these very complex mathematical things and actually be able to solve it efficiently? And there's there's a lot of constraints on solving quantum mechanical problems on a classical computer that constrain what you can do, you know, in your programming techniques.
[00:19:39] Unknown:
And how have you architected QTIP in order to be able to allow for that flexibility and evolution of the algorithms and the computational aspects of the program?
[00:19:51] Unknown:
Well, so we we kinda have a a core mod well, not module, class. It's called a a quantum object, a q object. And so that's kind of the basic structure, and that really hasn't changed over the last 7 years. And so, basically, everything we try to do is handle sparse matrices, because the objects you get for quantum mechanics are are sparse, and the larger they get, the sparser they get. So everything is really manipulating sparse matrices. And so this quantum object class is basically just a class where the data is represented by a sparse object. There's a lot of other attributes that describe various quantum mechanical things that you might be interested in, and, of course, a lot of methods, for working on those. And so just given those generic objects, you you know, we we use those and pass those around even to our our our new functions. Internally, you know, internally, we do a lot of different stuff with the sparse matrices. We've we've improved that. We don't even use sci pi or anything like that. We have our own sparse stuff these days. But, really, we just pass around these these quantum objects, and then
[00:20:53] Unknown:
everything can kind of be derived from those. And for people who are using QTIP for doing their analysis and research, is it primarily space and data bound or primarily CPU bound in terms of the limitations that they reach when trying to work with the information that they're processing?
[00:21:12] Unknown:
Yeah. So well, it it's kind of a combination. So Richard Feynman, who who had a Nobel Prize in Physics, he was kind of the the first to point out that if you try to simulate a quantum system on a classical computer, the amount of resources you need, you know, by resources, you know, this is memory and time. These tend to blow up exponentially. And so, it it it turns out that actually being able to simulate quantum systems are actually limited to a very narrow window of which you can actually simulate. Fortunately, it turns out to be an important window for research or, you know, things like quantum computing. And so, like I said, everything is essentially sparse matrices.
And so, at least we're not storing a bunch of zeros, so so that's a good thing. But, you know, let's let's say we we haven't reached the the point where our memory is exponentially exploding yet. So we have something we can fit on, let's say, 64 gigabytes of memory or something like that. When you deal with sparse matrices, it turns out that first of all, many things are only serial in nature. I can't do parallel algorithms on a lot of this stuff. And it turns out even if I do, we do this in in q tip. It turns out that the most important operation, which is just sparse matrix times a DIN specter, that operation is limited by memory bandwidth. And and so it it turns out that, you know, even if you want to, you have 32 cores or something like this, it it turns out that as your system size grows, basically, at least for the the the kernel that we use in in q tip to do the operation, only about 1 and a half CPU's is actually useful, because you're you're essentially saturated your memory bandwidth. So there's a lot of stuff in there, but, you know, memory is the main 1, but but time is also a major 1 because again, we we can't take advantage of a lot of parallel stuff.
[00:22:57] Unknown:
And so you touched upon a lot of the sort of resource limitations that you run up against when trying to be able to simulate these complex systems of quantum mechanical interactions. Are there any other aspects of performing that simulation that are difficult given the sort of nature and architecture of our current computational capabilities?
[00:23:18] Unknown:
Let's see here. It would again, I mean, being able to do not do things in parallel is a is a bit disappointing. I mean, you know, these days, everyone tries to do multi core, you know, GPU, you know, huge, you know, huge levels of of parallelism, but, you know, we can't really take advantage of that. The nicest thing would be, have something, have a very fast memory bandwidth. And then in that case, if we have a really fast memory bandwidth, then we can actually invoke more cores in in parallel computation. So, really, if if we had ultrahigh bandwidth memory, then, you know, things would be very interesting.
[00:23:53] Unknown:
And so given the fact that you're limited so much by that memory bandwidth, it seems like even using something like DASK to break up the computation across multiple instances
[00:24:12] Unknown:
Yeah. You know, I mean, we're we're kind of a ragtag team of people. Yeah. You know, I mean, we're we're kind of a ragtag team of people. None of us really have access to, like, a a big cluster, for example. So, you know, I've never personally tried to do things where I, you know, I distribute things around and and and see what happens. There are examples of people who do similar stuff. There's a a Python thing called project q. Q is, of course, for quantum, where they took a variant of that and did a big distributed, classical simulation of some quantum computing stuff and kinda push the the limits. I think it was, like, 2 and a half petabytes of memory they needed to do that. In that case, they're a bit more specialized, and so they can they can do a bit more optimization than we can. We're we're a bit more generic.
That's kind of an open question, but, you know, this fact is, you know, sparse matrix inspector multiplication and and memory bottlenecks. It's kind of well known. And, you know, for structures like ours, I've played around with it, you know, for for a long time. And there's a few optimizations 1 could do based on graph theory kind of stuff. But, basically, we're we're kinda stuck with what we got. So it sounds like you're a fairly busy person in general,
[00:25:19] Unknown:
and not everybody has the capability of being able to spend time working on open source projects. So what is it about Q Tip that you enjoy enough for you to keep spending time on it and contributing to it? And, conversely, what are some of the aspects of it that you, least enjoy? Well, you know, I mean, you know, I I'm a busy guy, but, you know, unfortunately, I don't
[00:25:39] Unknown:
actually have the time. So I don't I'm not in academics anymore. And so really, q tip, I can only do kind of at night when my wife and kids go to sleep. And so for the past year or 2, you know, I've been I've been able to get quite a bit done, but, really, it's, you know, it's just, you know, kind of a labor of love kind of thing. You know, I've been doing this for so long. It's kind of my baby, and there's a lot of people who who find advantage, you know, in using it, and it's able to help people. And so, you know, I kinda I kinda stick with it even though, you know, I I'm I'm losing sleep and gaining weight, but, you know, it's it's fun and, you know, it's useful to the, community, and that's really the most, you know, the most enjoyment 1 gets out of it is is, you know, we I we kinda keep track of, you know, academic citations and things like that. And, again, not being an academic, I don't particularly care about the number of citations, but it it's a really good feeling to see that, you know, these people did this and, you know, they actually used my tools. And so it's a bit different because, I used to do some stuff on black holes and things like this. And, you know, people people would cite that and stuff, but a lot of those citations are kinda just yeah. We we have to cite you because, you know, you have a paper in the general area. We didn't read it, but we have to. And so the difference here is is that, you know, when when someone cites it, you're like, they actually used my stuff, you know, to further science. And, you know, that's a that's a great feeling. That's that's basically why I stay up at night and do it. So that's really my main enjoyment. The most difficult things to deal with, I guess, there are 2. So the first 1 is documentation.
Documentation is a painful experience, especially you where you just got done with something. It took forever. You debugged it. Then you have to go and write the documentation. Now in itself, that would be okay, but, you know, you spend a lot time writing documentation. I think we have something like 300 pages of documentation. 200, 300, somewhere in there. And then you spend all that time, and then no 1 bothers to read it. And so, you know, we have a little Google help group, and 9 out of 10 questions are something that could have been found in the documentation. So that's kind of a kind of a painful thing. I think it's a bit a bit more painful than bug hunting, but it depends on when you ask me. And then the the other thing, and it's related to the, you know, having only an hour of time on Q tip is, you know, whether whether it's in academics or outside of academics, actually being able to secure funding or resources to actually do this project is just a has been a not joyous thing to deal with. So, you know, we we've had some success and, you know, again, if it's used by a lot of people, it's been cited by a lot of people, but actually getting funding or other things to actually do the work, people are very hesitant to do it. And there's a lot of reasons why, and, you know, it it's boring to talk about them. But, you know, actually being able to, you know, there's there's postdocs and people like that who, of course, contribute stuff about a handful of them. And, you know, I've always had some thought if it would be nice to be able to give these people something like a 3 month salary to polish off some ideas that go in QTIP and things like this. But, you know, again, that's a very difficult thing. And, of course, we're not the only open source project that has problems finding resources. I think everyone does. But, you know, it's it's a bit of a drag sometimes.
[00:28:51] Unknown:
And is Q tip something that you still use in your day to day work, or is it purely just something that you work on outside of work and outside of, sort of daytime hours purely because of your ongoing association with it and your desire to see it move forward. So, so I've I've currently, I've I've worked for a a company,
[00:29:12] Unknown:
that does, work it does work on quantum computing. I won't say the name. If if someone's interested, they can find out the name. But, you know, we do use Q tip related things. And so, I still do use it in my day to day stuff, but the development of that is is orthogonal. So, again, the the develop it is, me just at night doing it. The stuff I use at work, the relevant aspects of that are are stuff that was developed, like, 5 or 6 years ago. The new stuff is really just just the labor of love. How do I optimize improvements? You know, what new stuff can I add now that I'm a bit smarter than I was, you know, 7 years ago kind of stuff? And you mentioned that there have been at least a certain number of citations
[00:29:56] Unknown:
of QTIP in published research papers. So what are some of the most notable results and studies that you're aware of which have used QTIP as part of their tool chain?
[00:30:06] Unknown:
Yeah. So I think we're up to 300 plus cite citations at the moment. So there's a lot of different things and, you know, it it I guess it'd be easy to just go back and look and see who's in nature and who's in science. But I guess, 2 of them, I guess, I can think of off the top of my head. There's 1, from the group of Peter Zoller, who who's out in Germany. It's a bit technical what they did, but, basically, what they did is they they showed that you can transmit information, from 1 place to another in the microwave frequency domain, and that transmission is perfect even if there's noise. And again, it it's a technical thing, but the the nice thing I like about this is they use q tip. That's nice. But it's also something that is, very important and also conceptually easy to understand, so I can And so, the nice thing about this is is that in the microwave regime, this is where people, think about, doing quantum computing. And so what the result would mean is I can transfer information from 1 quantum computer over here to another 1 over here without any, loss of information.
And it's relatively easy to do that. So that's a very nice result, I think. At least, personally, I like it. And then, another 1 is, I think it's from Rob Schoecoff's group in Yale. So they're a big name in quantum computing and and superconducting circuits in general. And, what they did is actually a a quantum computing related thing. But instead of using these cubits that I mentioned kind of at the beginning of our talk, they actually use the other part, the, the the springs, the harmonic oscillators. They actually take those and manipulate them to look like the, 2 level systems.
And the reason I like that 1 is because everyone in the world, when they do this quantum computing stuff, they always use these little 2 level systems. And there's no fundamental reason why, except they're easy to manipulate. And so, at least as a first go, it's easy to do. The oscillator stuff is a bit more interesting because it's harder to manipulate, but it has better properties if you actually wanna do computations and stuff like that. And not too many people look at that. Everyone's talking about cubits and things like that. And these people are like, well, let's try something different. And so difference is always cool. Yeah. It's definitely
[00:32:15] Unknown:
easy to sort of get lost in the fields of research that people are doing when you start getting to the purely theoretical aspects of our understanding of the physical world around us. And I personally have had a long interest in quantum mechanical theory and a lot of the sort of esoteric aspects of the research that we're doing in physics and chemistry. So I I I I'm sure that if I were to actually start going through the list of citations, I'd probably end up find finding myself down a huge rabbit hole with a lot of time invested in it, but definitely interesting sounding stuff. For anybody who's interested in finding out more about quantum mechanical theory or just, improving their baseline understanding of the some of the stuff we've been talking about today, are there any particular resources that you can recommend
[00:32:59] Unknown:
either at the intro or sort of intermediate level? Well, you know, these days, we we got the web. So, you know, there's, you know, there's a lot of courses that are, you know, online and they happen to be from the best schools. And so, you know, there's there's no shame in in doing those. I've I've looked at, you know, undergraduate level of quantum mechanics courses even though I've I've been out of school a long time, you know, just because these people explain things well and you always learn something new. So, I mean, the Internet, your friend, you know, I could I could say things about textbooks and stuff. But, you know, these days, there's a wealth of information that is already online. You know, how you how these things get done on a computer, you know, like, we have, like I said, 200 pages of documentation. So, the Internet's your friend. If you look up, you know, quantum optics, you'll you'll get a bunch of lectures and stuff like that, and they're usually pretty good. And then, you know, if something sparks your interest, you can always go from there. Great. Are there any other aspects of QTIP or quantum optics or anything else that you think we should discuss before we start to close out the show? I mean, I think I think we covered, the bulk of it. You know? You know, we can always go down various rabbit holes where things get technical, but, you know, we'll save that for another day. Okay. Well, for anybody who wants to get in touch with you and follow the work that you're doing
[00:34:13] Unknown:
and, Q Tip itself. I'll have you add your preferred contact information to the show notes. And with that, I'll move us on to the picks. And so for my pick this week, I guess I'll choose the edx.org platform. So, as you mentioned, having the Internet available for, learning and educating ourselves is definitely a valuable thing, and edx.org is an organization that I actually work fairly closely with in my day to day because I'm at MIT and run the Open edX platform for residential courses. And, it's definitely a great platform with a lot of wonderful information. MIT actually publishes a lot of their courses on edx.org for people to take free of charge. Or if you wanna pay a little bit, you can, get a certificate of completion to show that you actually learned some stuff there. So for anybody who does wanna learn more about quantum mechanics or, just about anything else, I think edX is a good place to start. And so with that, I'll pass it to you, Paul. Do you have any picks for us? Oh, I'm I'm sure I do. We're talking about Python, so, you know, I have to give a shout out to Cython. You know, qtip would be nothing without Cython.
[00:35:17] Unknown:
I can't say enough about it. It's awesome stuff. Highly recommend it. Also, matplotlib, you know, when I started doing, MATLAB, you know, you you you export a figure, you have to go and edit the EPS file by hand. So matplotlib is definitely the way to go. And then I guess last 1, I'll just say if you're ever in the,
[00:35:35] Unknown:
Colorado area, Colorado Springs, the Cheyenne Mountain Zoo, If you have kids, do their giraffe feeding. You'll you'll definitely be rewarded. Alright. Sounds like a lot of fun. Well, I appreciate you taking the time out of your day and time away from Q Tip to share your story of working on it and some some of the background of why you got involved in it in the first place and of the things that it's being used for. So I appreciate your time, and I hope you enjoy the rest of your evening. Oh, the pleasure was all mine, man. Have a good evening.
Introduction to Paul Nation and QTIP
Basics of Quantum Mechanics and Quantum Optics
Origins and Development of QTIP
Applications and Users of QTIP
Future of Quantum Computing
Design and Usability of QTIP
Incorporating New Research into QTIP
Challenges in Quantum Simulation
Personal Commitment to QTIP
Notable Research Using QTIP
Resources for Learning Quantum Mechanics
Closing Remarks and Picks