Latest / Talk Python To Me / #403: Fusion Ignition Breakthrough and Python
Transcript
- 0:00Imagine a world with free and unlimited clean energy.
- 0:03That's the musings of a great science fiction story, isn't it?
- 0:07But nuclear fusion, the kind that powers the sun, has always been close at hand.
- 0:11We see the sun every day, and yet impossibly far away as a technology.
- 0:15However, we took a major step towards this becoming a reality
- 0:19when the folks at the Lawrence Livermore National Laboratory in the U.S. achieved ignition,
- 0:23where they got significantly more energy out than they put in.
- 0:28And Python played a major role in this research and experiment.
- 0:31We have Jay Solomansson here to give us a look at the science and the Python code of this discovery.
- 0:36Also, I've linked a five-minute YouTube video explaining the details
- 0:40and showing this massive machine that they used.
- 0:44It's worth watching before you listen further.
- 0:46This is Talk Python To Me, episode 403, recorded February 1st, 2023.
- 0:52Welcome to Talk Python To Me, a weekly podcast on Python.
- 1:08This is your host, Michael Kennedy.
- 1:10Follow me on Mastodon, where I'm @mkennedy,
- 1:13and follow the podcast using @talkpython, both on fosstodon.org.
- 1:18Be careful with impersonating accounts on other instances.
- 1:20There are many.
- 1:21Keep up with the show and listen to over seven years of past episodes at talkpython.fm.
- 1:26We've started streaming most of our episodes live on YouTube.
- 1:30Subscribe to our YouTube channel over at talkpython.fm/youtube
- 1:34to get notified about upcoming shows and be part of that episode.
- 1:39This episode is brought to you by Taipy.
- 1:41Taipy is here to take on the challenge of rapidly transforming a bare algorithm in Python
- 1:46into a full-fledged decision support system for end users.
- 1:49Check them out at talkpython.fm/taipy, T-A-I-P-Y.
- 1:54And it's also brought to you by User Interviews.
- 1:57Earn extra income for sharing your software developer opinion.
- 2:00Head over to talkpython.fm/userinterviews to participate today.
- 2:05Jay, welcome to Talk Python To Me.
- 2:07Thanks for having me, Michael.
- 2:08Pleasure to be here.
- 2:09It's a pleasure to have you.
- 2:11Congratulations.
- 2:11Thanks.
- 2:12Thanks.
- 2:13And of course, I would be remiss if I didn't totally qualify that, that any congrats have
- 2:18to be accepted on behalf of hundreds of people at the NIF, at the laboratory and laboratories
- 2:23and industry around, and indeed extending back six decades of research that went into this.
- 2:29And so my part is insignificant, but not negligible.
- 2:33I'm having a couple of my mental models broken recently.
- 2:36For me, fusion has always been one of those things that's always 30 years out.
- 2:42It's like, oh, we know it's possible, but it's just, we're really barely scratching the surface.
- 2:49And the other mental model is AI is always 30 years out as well.
- 2:53And this year of ChatGP and stable diffusion and all those things.
- 2:57Things are changing.
- 2:58Yeah.
- 2:58And this huge breakthrough that you all had.
- 3:00I'm sure there's still work to be done.
- 3:02You're not there yet, right?
- 3:03We're not all driving around with little tiny, you know, water-powered cars and stuff, but
- 3:08it shows that it's possible, right?
- 3:11And that it's a massive deal.
- 3:13Yeah, no, you're absolutely right.
- 3:14There are a couple of big changes here in the last, in just months even, right?
- 3:18So I'm still kind of processing both of those, actually.
- 3:21So yeah, it's going to be an interesting world.
- 3:24I think, you know, as far as ignition, well, you know, it is still a long, long path forward
- 3:30towards utilization.
- 3:31We can talk about that.
- 3:32Yeah, we will, but it's so exciting because with renewables, that's great, but there's
- 3:38always a cost to that in terms of like, well, just, you know, big solar panels, like the
- 3:43mountains of e-waste of those things as they deteriorate over time or just getting them all
- 3:47produced.
- 3:47But I think this is different and I'm super excited to be diving into it with you.
- 3:51I'm also really interested to hear how Python played an interesting role in it.
- 3:55Yeah.
- 3:56Yeah.
- 3:56I think that's a kind of a fun story.
- 3:58And so I'm happy to have a chance to share it.
- 4:00Yeah.
- 4:00And you've been central to it, which is, it's fantastic.
- 4:03Now, before we get into all that, let's get into your story.
- 4:05How'd you get into, I guess, physics as well as Python?
- 4:09Yeah.
- 4:10Yeah.
- 4:10So I was, you know, always wanted to be a scientist growing up, you know, as a little
- 4:14kid, it was always space and dinosaurs and dinosaurs and space and all.
- 4:19And that's how it sort of started.
- 4:20And then I remembered it's actually just about this time, about 40 years ago or so, you know,
- 4:25my dad brought home a Commodore 64.
- 4:28So this would have been the after Christmas buzz of learning basic and stuff, my sister
- 4:33and I.
- 4:33And so that really started my, you know, computational journey.
- 4:36And then fast forwarding to, I got a degree in physics from Montana State University, did
- 4:41a cosmology with Bill Hiscock there.
- 4:44And then I moved to California, took some time off.
- 4:46I worked at Chevron and the geophysics staff for a couple of years, met my wife there,
- 4:50worked at NASA Ames Research Center in Mountain View for a year.
- 4:55Then I decided to go back to school, which is what I always wanted to do.
- 4:58I looked around.
- 4:59I didn't really want to move very much.
- 5:01I was in the East Bay and San Francisco Bay Area.
- 5:04It's nice there.
- 5:05It is nice there.
- 5:06You have a family as well, right?
- 5:08Which makes it, that can always be a tricky balance.
- 5:10Yeah, exactly.
- 5:11Exactly.
- 5:12That's always a constraint.
- 5:13And ultimately, it's a fairly stupid reason to make decisions.
- 5:16But it actually worked out very well because it made me look around.
- 5:19And it turned out there was this amazing graduate program at this place called Morris Livermore
- 5:24National Laboratory run through the UC Davis, University of California, Davis, called the Department
- 5:29of Applied Science.
- 5:29And so I ended up going there for five years for a PhD and studied gamma ray bursts, the
- 5:35largest explosions in the universe from across the universe.
- 5:39They send their high energy radiation from these giant relativistic mysterious explosions.
- 5:43It's very exciting.
- 5:44And I worked on modeling, doing a numerical modeling of neutron stars in their last few orbits
- 5:51in a few milliseconds before they coalesce as the defunct model for gamma ray bursts at the
- 5:56time.
- 5:56But it was a great experience programming in C++ and doing general relativity and such.
- 6:01And then I did a postdoc after that.
- 6:04And I got involved with another code at the lab that's actually people who are interested
- 6:08in numerical astrophysics might look into.
- 6:10It's called Cosmos++ with Peter Aninos and Chris Fregil at College of Charleston.
- 6:15Again, C++ doing more gamma ray burst research and such.
- 6:19And that's what I did until about 20 years ago when I took a job at Ignition with the ICF
- 6:26campaign, the inertial confinement fusion campaign.
- 6:28And that's where I've basically been ever since.
- 6:31Then things sort of switched gears.
- 6:32I basically kind of, I still worked with Cosmos++ for a few years part time.
- 6:37But really, I kind of retired my compiled efforts and went more towards the interpreted world and
- 6:42got more involved in that.
- 6:43Because then in ICF, the whole point was NIF was being built.
- 6:47It was still a hole in the ground at the time.
- 6:49And there are these big multi-physics codes.
- 6:52That's what we use at the lab to kind of research our ideas, to run them in simulation, see what
- 6:57they'll do.
- 6:57And we use interpreted languages to interface with those, either to run the code to help
- 7:03steer it, if you will, but also to post-process.
- 7:06And so I got really involved with a few languages.
- 7:09And Python didn't actually come to the fore at first.
- 7:11I was introduced with Python a little bit in the 90s.
- 7:14I wrote a little cron job that went to the weather service and put a weather map of my background
- 7:19every hour, which I thought was pretty nifty.
- 7:22And so I saw that it had potential.
- 7:24But one of the languages that I was first introduced to was Yorick, which was actually written
- 7:29by a physicist at Livermore, Dave Monroe.
- 7:32And so it's fairly extensively used at the lab.
- 7:34And it actually is.
- 7:35It has a causal connection to particularly the numpy library in Python.
- 7:40I also actually got pretty involved in Perl at the time.
- 7:43Something about it sort of appealed to me.
- 7:45I sort of liked its lexical structure.
- 7:47You know, Larry Wall is a linguist and all.
- 7:49But definitely for the last 10 years or so, the weak couplings that are appealing about
- 7:53Python just kept coming back.
- 7:55And so I've since bitten down on that hook and drank Goulade pretty readily.
- 8:00And so for the last 10 years or so, it's been all Python all the time.
- 8:04Nice.
- 8:04Yeah.
- 8:06Now you've just got to tattoo the Python logo and it's no going back.
- 8:09Exactly.
- 8:10Got it.
- 8:11You have one, right?
- 8:13That's right.
- 8:14I keep my whole back.
- 8:15Right, right.
- 8:16One thing that stands out with that story, which is really interesting, I think it seems to
- 8:21me like there's quite a move in the sciences in general to move more towards open source
- 8:27and more towards sharing in terms of, hey, if you use this library and we use that library,
- 8:31then maybe we can both have a better library type of sharing.
- 8:34Yeah.
- 8:35And that's something that I've been fortunate enough to kind of watch happen over the course
- 8:42of these years.
- 8:43And I think, you know, we see that it's nonlinear.
- 8:46It's just exploding.
- 8:47You know, I think one of the appeals of Python has been, you know, PyPI and just this proliferation
- 8:54of packages.
- 8:54Right.
- 8:55I mean, shout out your Python Bytes podcast.
- 8:57I find that to be quite fun and almost overwhelming the new things that are coming out all the time.
- 9:02And, you know, you got to kind of keep up and pick and choose.
- 9:05But there's all sorts of new things.
- 9:07And, you know, the paradigm has shifted for me and I think a lot of people, right, where,
- 9:11oh, I have this thing to do.
- 9:13I better start doing that or crack a book or whatever.
- 9:16But no, it's like, let's find the package that already does that.
- 9:19And that's just a fundamental shift.
- 9:22And it's actually a lot of fun, I think.
- 9:24And you can contribute to it as well.
- 9:25Yeah, absolutely.
- 9:26I feel like when I went to school, I just took one or two, just maybe one or two.
- 9:31I certainly won, maybe two computer science type classes.
- 9:34And it was all about algorithms and how can you evaluate, oh, this bubble sort versus that
- 9:40or this data structure versus that.
- 9:42And it seems a lot less, not that that's relevant, but it seems way more important now to,
- 9:48oh, I can evaluate these libraries and pick this library.
- 9:51And it probably does something great inside, but I don't need to worry about it, right?
- 9:54It's more building with Lego blocks than it is, you know, building with wiring kits.
- 9:59I don't know.
- 9:59Like, you know, it's more big pieces that you just put together.
- 10:02And, you know, kind of just to tie in, you know, the very first inklings of what ChatGPT
- 10:07and, you know, and Copilot and stuff can bring.
- 10:10I mean, you know, I think Andre Carpathie made the comment that the new interpret language
- 10:14is English, right?
- 10:15And it's almost getting to that point where we can just almost dictate what we want, you
- 10:19know, which is sort of the next level of abstraction.
- 10:21You know, I think that's just going to happen now, right?
- 10:24Yeah, it's, we're past the 30 years, I guess, and it's starting to get crazy.
- 10:28So I think this is really a positive move for the sciences in general, that so many of these
- 10:33libraries are available.
- 10:34And now you have thousands or millions of people working on it and using it, not just a single
- 10:39research lab.
- 10:40Yeah.
- 10:40And it's nice to actually see, you know, I think from my little vantage point, I'm not
- 10:44always aware of it, but the lab, Livermore, for instance, and I think all the labs participate,
- 10:49there's an, they release a wealth of open source software as well.
- 10:53So it tends to be fairly focused on high performance computing.
- 10:56You know, it has a niche, but it's, but it's definitely, we're trying to give back and
- 11:00be part of that conversation.
- 11:05This portion of Talk Python To Me is brought to you by TypePy.
- 11:08TypePy is the next generation open source Python application builder.
- 11:11With TypePy, you can turn data and AI algorithms into full web apps in no time.
- 11:16Here's how it works.
- 11:17You start with a bare algorithm written in Python.
- 11:21You then use TypePy's innovative tool set that enables Python developers to build interactive
- 11:26end user applications quickly.
- 11:27There's a visual designer to develop highly interactive GUIs ready for production.
- 11:32And for inbound data streams, you can program against the TypePy core layer as well.
- 11:37TypePy core provides intelligent pipeline management, data caching, and scenario and cycle management
- 11:42facilities.
- 11:43That's it.
- 11:44You'll have transformed a bare algorithm into a full-fledged decision support system for
- 11:49end users.
- 11:49TypePy is pure Python and open source, and you install it with a simple pip install TypePy.
- 11:55For large organizations that need fine-grained control and authorization around their data,
- 11:59there is a paid TypePy Enterprise Edition.
- 12:02But the TypePy core and GUI described above is completely free to use.
- 12:06Learn more and get started by visiting talkpython.fm/taipy.
- 12:11That's T-A-I-P-Y.
- 12:12The links in your show notes.
- 12:14Thank you to TypePy for sponsoring the show.
- 12:18Well, let's start our conversation and our exploration here with some science, and then we'll get back
- 12:24down to the Python inside of it.
- 12:26Yeah.
- 12:27Let's talk about just all the stuff that's led up to fusion in general, and then the science
- 12:33and the attempts that have led up to this great breakthrough.
- 12:36Yeah.
- 12:36So, like I mentioned, actually, you know, laser-induced fusion has been a research area for six decades
- 12:44at the lab.
- 12:45I mean, when the first ideas were starting, when the first lasers were around and the first
- 12:49people started thinking about that as a driver for fusion.
- 12:52And again, this concept of fusion is inertial confinement fusion.
- 12:56It's sort of based on the concept of taking some hydrogen isotopes.
- 13:00We tend to use deuterium and tritium.
- 13:02Those are the heavier versions of hydrogen because they have a higher cross-section for
- 13:06fusion reacting.
- 13:07And we implode them.
- 13:09So, yes, you have a diagram here that you're showing.
- 13:12So, we have a capsule rather than that distinct from magnetic fusion, which is sort of the other
- 13:18camp where it's a little bit more like the fluorescent bulb model for fusion where you're running
- 13:23plasma through a torus or some sort of a manifold like that, making it very hot but at low density
- 13:29and maybe something a little more akin to the corona of the sun, say, and fusion will happen there
- 13:34in those schemes.
- 13:35And then here, we're actually taking all of the fuel and putting it inside of one little capsule.
- 13:41And then we're compressing that capsule, getting it to very dense as opposed to fusion or magnetic
- 13:47fusion, which is low density, very dense and hot conditions where fusion can transpire.
- 13:51It's actually sort of analogous, I think, to an internal combustion engine in that regard.
- 13:56So, we're actually, you know, driving fusion.
- 13:59It happens and it blows itself apart.
- 14:00The graphics that I had seen largely were those big torus-like structures.
- 14:06Was it...
- 14:07There's a name for that, the T.
- 14:09Well, there's Tokamax and Spheramax.
- 14:11Yeah, there's several concepts out there.
- 14:13Right.
- 14:13That's the one.
- 14:14So, those I think is probably...
- 14:15Yeah, that's probably what a lot of people are familiar with.
- 14:17Mm-hmm.
- 14:18Mm-hmm.
- 14:18This project is focused on aiming a bunch of lasers at a really small point and just
- 14:25really compressing it and heating it all at once, right?
- 14:28Exactly.
- 14:29So, you know, just to kind of, I guess, give the outline, just like you said.
- 14:33So, the NIF is a big, big stadium-sized facility at the northeast corner of Lawrence-Livermore
- 14:38National Laboratory.
- 14:39And in it, it is filled with 192 gigantic beams.
- 14:43Each one of them is basically one of the largest laser facilities in the world.
- 14:47And there are 192 of them.
- 14:48They each basically work in concert to shine a pulse of just a few nanoseconds long.
- 14:55And this pulse goes down and it is kind of as the graphic you show.
- 14:58They all are basically trying to converge at a point.
- 15:01But rather than just a point, what we put at the center of this convergence of all these
- 15:06192 beams is a little tiny gold can.
- 15:09And so, the can is about a centimeter high and maybe half a centimeter wide.
- 15:13And on the top and bottom, you put these two little holes in the no-enculture, the laser
- 15:19entrance holes that LEH is.
- 15:21And so, it's rather amazing, these 192 beams of gigantic lasers.
- 15:27And when they're being amplified, they're actually several feet across.
- 15:30So, the beams are spread out.
- 15:31They're huge.
- 15:32But they all get focused down to the point where they can all go through just a couple
- 15:36millimeter-sized hole, both at the top and the bottom of this gold can.
- 15:40And they shine into the can and they shine on the inside wall of the can.
- 15:44And their goal is then to heat the can, right?
- 15:47So, you start with this laser light and then you want to heat this can.
- 15:50And in this can, we refer to it as a holerum.
- 15:52That's a German word that translates roughly to hollow room.
- 15:57And that's just simply because it's something that holds the heat.
- 16:00And holerums are actually everywhere in our life, right?
- 16:04Our ovens are a holerum.
- 16:05Ovens heat up to temperatures of our infrared temperatures, right?
- 16:09We can sort of feel that heat.
- 16:10We can't see it, but we can feel it.
- 16:13You know, if you get up, we heat these little holerums up to actually x-ray temperatures.
- 16:17So, they're so hot, they're beyond visual.
- 16:20They're beyond ultraviolet, but into the x-rays.
- 16:23And it's actually a fraction of the temperature at the center of the sun, in fact.
- 16:27And so, we're actually bathing this little tiny gold can within this superheated x-ray environment.
- 16:34And then we inserted inside of that holerum beforehand a hapless little capsule.
- 16:39And this capsule is about two millimeters across.
- 16:42It has no idea what's coming.
- 16:42Exactly.
- 16:43You know, you kind of feel sorry for it.
- 16:44You anthropomorphize it a little bit.
- 16:48But this capsule is made of, it's a very, very thin shell, just a couple hundred microns or 100 or so microns thick.
- 16:55And right now, these shots are being, actually, they're used nanocrystalline diamonds.
- 17:01So, they're like pure carbon shells.
- 17:03And so, they're very dense.
- 17:05And so, it's kind of funny.
- 17:06We have a gold holerum.
- 17:08The holerum is made out of gold and the capsule is made out of diamond, right?
- 17:11So, could you have picked more prosaic ingredients?
- 17:14But these are the ones that work.
- 17:16And so, the point of this capsule is really just, it acts like a rocket fuel.
- 17:21And so, what happens is the laser energy is absorbed into that diamond and it explodes.
- 17:26It just does pretty much exactly what you'd kind of think.
- 17:29It just, it heats and explodes.
- 17:31And then, you know, going back to your Newton's third law, right?
- 17:35So, if you have an action, for a reaction, there has to be an equal and opposite reaction.
- 17:39If you have this little capsule exploding outward, right?
- 17:43In this bath of x-rays, whatever you put inside of that capsule has to go inward.
- 17:47And happily, we were really, we actually put in a little bit of deuterium and tritium.
- 17:53And we actually froze it into an ice layer around the inside of that capsule.
- 17:56So, that becomes our payload.
- 17:58So, it's the spherical rocket analogy is actually very apt.
- 18:01So, you're actually, you're having this fuel blowing outward and causing thrust that pushes
- 18:07the payload inward and you try to compress it into a tiny little pellet.
- 18:11Again, trying to achieve very, very high densities, hundreds of grams per cubic centimeter and
- 18:16tens of kilovolts.
- 18:18That's no one in clature.
- 18:19We can talk more about that.
- 18:20But to get to the point, we're actually at fusion conditions.
- 18:23And what you're looking for and the goal, the reason why we're talking right now is you're
- 18:28always, the goal was always to achieve an ignition.
- 18:31So, for a very long time, people have demonstrated that you can get neutrons out of this.
- 18:36You can actually get a few of the billions or, well, billions of billions of hydrogen atoms
- 18:42in there to fuse.
- 18:43But what we're trying to do is get to the point where they bootstrap, where one fusion can cause
- 18:48another fusion or several more fusions, which will cause more fusions.
- 18:51And you get what's called an ignition.
- 18:53And it's ignition wave where actually the fusions will cause more fusions.
- 18:56And they'll actually cause a burn propagating from the tiny center of that little assembled
- 19:01piece of fuel, move outward and actually, you know, propagate and burn fuel as it goes out.
- 19:06And that way you can actually, you know, that's, that way you get a macroscopic amount of the
- 19:11fuel to burn, to convert to helium and release fusion energy, release neutrons.
- 19:16And that's, that's what we finally achieved.
- 19:18It's extremely difficult because basically everything has to work perfectly.
- 19:22192 lasers and probably a chaotic dynamic reaction of some form of explosion and interaction there.
- 19:31It's not super easy to control.
- 19:33And there's some interesting Python planning some of those experiments and stuff.
- 19:37But it sounds to me that it's, even though it's in a sense, very much the opposite of fission,
- 19:42traditional nuclear reactions that we already leverage, the way that it kind of propagates.
- 19:47And once you get it going, it sounds actually oddly similar.
- 19:50Yeah.
- 19:51I mean, the fission, fission, the good thing about it is, or the nice thing about it is that it's
- 19:55passive, right?
- 19:56But it does operate in that same idea.
- 19:58If you put, you know, fission products are really close together and one goes off, then it might
- 20:03cause others to go off and you can get that chain reaction.
- 20:06And exactly.
- 20:07That's, we're trying to get that to happen with, with fusion.
- 20:09But the thing is that, you know, fusion, these particles are so light and they, they're all like
- 20:14charges, right?
- 20:14So they're always trying to push each other away.
- 20:16And as soon as you start putting heat into it, the product of fusion, the thing you wanted
- 20:21to get out of it, it immediately blows itself apart and turns itself off.
- 20:25Unlike fission.
- 20:26That's really kind of always the trick.
- 20:29That's the hard part.
- 20:29Yeah.
- 20:30Yeah, exactly.
- 20:30So you have to really carefully balance the lasers to, to keep the confinement happening
- 20:36and keep the pressure there until it takes off, right?
- 20:39The lasers are short shrift.
- 20:41Unfortunately, there's, they're just amazing technological achievements, frankly.
- 20:44And I'm, I'm only just, you know, I know a little bit about them.
- 20:47I know enough about them to simulate them, but they're amazing technological achievements that
- 20:52you can get all of these to run together.
- 20:53And what they do is actually they give it, they give this blast, right?
- 20:57They heat the whole room and they actually heat it, not just like turn it 450, like your
- 21:01oven.
- 21:01They actually heat it in these very precise stages that are timed all over the course of
- 21:06this few nanoseconds to actually, you're actually trying to, to ablate this, this rocket
- 21:11fuel in steps.
- 21:13You're not just trying to just blam.
- 21:14You're just actually in, and doing that, you do that very precisely.
- 21:18So you're actually blowing a first step and then you do another step and then you actually
- 21:22hit it harder and really give it a good hard drive to really implode it.
- 21:26And all of that is happening by basically the light, the lasers over the course of these
- 21:29few nanoseconds, just sort of pulsing in a sense, if you will, to heat this whole room,
- 21:34you know, in these stages.
- 21:35So all of that has to be just perfect.
- 21:38It has to be very uniform.
- 21:39And then that's, ends up driving this, this capsule and the capsule doesn't want to actually
- 21:44implode.
- 21:45And that's another big thing is, is it's, it's unstable.
- 21:48You never, nature doesn't want to take nature.
- 21:50They always say nature hates a vacuum.
- 21:52Nature also hates when you take every, all the room, all atoms in a room and try to move
- 21:56them into one corner, right?
- 21:57It doesn't let you do that easily, right?
- 22:00And that's basically kind of what we're trying to do.
- 22:02We're trying to take all of these fusion, these hydrogens and, and put them all together
- 22:07into a tiny, tiny space.
- 22:08And kind of like you'd imagine just trying to press a balloon together.
- 22:12We're trying to implode this capsule by a factor of 30 in linear scale, 20 to 30.
- 22:18You know, if you tried to take a balloon and do that, right?
- 22:21You can imagine you push it in and it pops out where your, your fingers don't, you know,
- 22:24where your fingers aren't.
- 22:25So you bring in a friend and they, you push together and you're all pushing together.
- 22:29And pretty soon the balloon is finding tiny little places to squeeze out, but, but it's
- 22:33going to find them.
- 22:34Right.
- 22:34And so you have to just basically iteratively, you know, make everything as perfect as possible.
- 22:39And so the other hero of this achievement, not just the lasers, the lasers have been just
- 22:45going through these rather miraculous increments beyond their original design specs to the point
- 22:50where they're, they're delivering more energy than they were originally promised.
- 22:54And with, with unprecedented smoothness and precision, but also the capsule and its smoothness and
- 23:00perfection is amazing.
- 23:02So like this capsule, these capsules, if you just sort of think of out of roundness, they're
- 23:07about 200 nanometers, maybe out of round, out of, out of a millimeter.
- 23:10And, you know, the earth is roughly, you know, 20 kilometers out of, out of round, out of 6,000.
- 23:16So these are, if you do those ratios, this, this is actually about 10 times rounder than
- 23:21the earth.
- 23:21Wow.
- 23:22And, you know, and it's just a tiny little, you know, two millimeters across a capsule.
- 23:26Right.
- 23:26So they're, they're very, very smooth.
- 23:29And that's something that's, that's been progressing.
- 23:30And I would say those two achievements are kind of the things that had to be incrementally improved
- 23:35to the point where you're, you're kind of just sort of getting, you're trying to realize
- 23:39the ideal, you know, our codes are good at simulating ideals and we do a lot of work to try
- 23:44to actually simulate the imperfections as well.
- 23:46Right.
- 23:46And, and, and capture as many of those imperfections as possible.
- 23:49But we've always been able to sort of do the ideal and say, yeah, the ideal works, you know,
- 23:54the whole spherical cow idea.
- 23:56Right.
- 23:56It's exactly high around this ideal circle.
- 24:00And of course it's going to work like this.
- 24:02And there you go.
- 24:03Exactly.
- 24:03And it's like, oh, that works really well.
- 24:05And that's been the issue.
- 24:06And, and really what's happening is these large teams of, of, of experimentalists have been able
- 24:12to make the laser better and continue to, and, and make these targets better.
- 24:16And, and they're actually getting closer and closer to ideals that even just a few years ago were like ridiculous.
- 24:22So it's, it's, it's really a testament to the, that hard work.
- 24:26Yeah.
- 24:26Really amazing.
- 24:27So what we're all learning is to collapse this balloon, you need 192 friends or 191 friends.
- 24:32If you don't count yourself, right?
- 24:34Right.
- 24:35Right.
- 24:36The fact that we're doing a can, like this whole room is, is, is very important.
- 24:40And, you know, we're not actually shining the lasers on the capsule.
- 24:43That's something that's called direct drive.
- 24:44And indeed that is a, a field of study that provides its own challenge because indeed each laser is like a little fingertip trying to push on the capsule.
- 24:52This is so-called indirect drive because we're driving the capsule by the heating bath of the lasers.
- 24:59The lasers are heating this, this whole room and that's driving the capsule.
- 25:03So it's the actual, it's more of the shell that is playing the important role of, of doing the compression and you need to provide just enough controlled and even heating to make it go.
- 25:12Right.
- 25:13Yeah.
- 25:13You want to make that, but you still need to make that heating as controlled and even as you can.
- 25:18And it's still not even enough really when you, so there's been, you have to do a lot of work with, you know, making sure that heating, you know, where you put the beams, where the spots are, which are kind of like the elements in your oven.
- 25:29Right.
- 25:29You know, if you turn on the broil elements, you'll burn your toast.
- 25:33Right.
- 25:33And so you have to know where to put those elements, where to, where do those spots hit the inside of the whole room to heat as uniformly as possible.
- 25:41Yeah.
- 25:41And people might be thinking, well, compressing something 30 times.
- 25:44It's, it's not that crazy.
- 25:45We do that with air all the time.
- 25:47You look at combustion engines and other stuff, but you're also heating it.
- 25:50Well, it's 30 times linearly.
- 25:51You're also heating it to the near the temperature of the sun.
- 25:55It wants to get a lot bigger really quickly.
- 25:57It doesn't want to even stay where it is.
- 25:58Right.
- 25:59Absolutely.
- 25:59Yes.
- 26:00You're heating it up to, to actually temperatures in excess of the center of the sun.
- 26:04And then, so, yeah, it doesn't want to be there.
- 26:07It wants to get moving.
- 26:09All right.
- 26:09Fantastic.
- 26:10Let's just talk one more science side thing, then we'll dive into the software side.
- 26:14This is the first time this has been done and it's a huge accomplishment.
- 26:18How do you all see this, this very quick and small reaction potentially turning into actual energy sources?
- 26:26Where do we go from here to do something productive with this?
- 26:29It's important to note that the National Ignition Facility itself is a demonstration facility.
- 26:34It's a research facility.
- 26:35So it's not meant to become an energy facility.
- 26:38And indeed, there are other startups out there.
- 26:41And I think there are probably going to be more that are exploring ways to commoditize this.
- 26:46So it's kind of interesting to kind of think about the energy a little bit if I can, you know.
- 26:51So just to kind of add a scale to this, you know, like a human eats about 2,000 calories of food a day, right?
- 26:57An adult, right?
- 26:59And those are actually kilocalories, nutritional calories.
- 27:02So that's 2 million calories, which is, you know, two mega calories.
- 27:06And it turns out that a calorie is kind of convenient is 4 joules, another scientific measure of energy that we use all the time.
- 27:13So that 2 kilocalories we eat every day is basically 2 million calories, which is 8 megajoules, 8 million joules.
- 27:22So just multiply by that 4.
- 27:23So 8 megajoules you eat every day, right?
- 27:26So this laser is producing 2 megajoules, sort of like your breakfast, right, of energy.
- 27:33So it's actually not an achievable amount of energy, but it does it in just a few nanoseconds, right?
- 27:39And I don't know how to describe a nanosecond all that well, except to know that, you know, that the speed of light is a good measure, right?
- 27:46The speed of light.
- 27:47So, you know, at the speed of light, a light wave can go around the Earth 7.5 times in a second.
- 27:52But in a nanosecond, light only goes 30 centimeters.
- 27:54So about a foot.
- 27:56And so I think that gives you an idea of just how quick that is.
- 28:00And so that's the key.
- 28:01Yeah, it gives you a sense of how insane, how insanely precise those lasers have to be.
- 28:06Exactly.
- 28:06Yeah.
- 28:07They've got that 30 centimeters.
- 28:09Right.
- 28:10The entire, yeah, that's the cosmic speed limit.
- 28:13No information can go faster than that.
- 28:15And so everything has to be within this really small envelope.
- 28:19Okay.
- 28:19It's quite amazing.
- 28:20And so, and then the reason why we're talking about this particular achievement is that it actually yielded a little over 3 megajoules.
- 28:27So maybe, you know, breakfast plus lunch in fusion yield.
- 28:31And again, that happened, you know, instantaneously, effectively, that was released.
- 28:35So it's more about the release that makes it amazing.
- 28:39So, but the thing is that the energies aren't all that large at this point.
- 28:44And it occurred to me that, you know, well, if you think about, it's kind of interesting to think about, like, so going back to the food analogy.
- 28:51So you eat, make eight megajoules per day.
- 28:53A day is 24 hours times 60 minutes times 60 seconds.
- 28:56So 24 times 3600.
- 28:58It's 80 or 90,000 seconds.
- 29:00Right.
- 29:01So eight megajoules divided by say 80,000 seconds.
- 29:05That works out to 100 joules per second or 100 watts.
- 29:08So you as a human, you know, burn 100 watts.
- 29:12Right.
- 29:12Which is a very, we use that term all the time.
- 29:15Right.
- 29:15So, and you can kind of imagine taking a mannequin and putting a hundred watt incandescent bulb inside and it would kind of heat up to our skin temperatures.
- 29:23So we're going at a much, much higher wattage because we're doing it very quickly.
- 29:28But so you can actually sort of think of like, you know, a unit of measure that we often use in, you know, electricity and stuff is, you know, sort of the kilowatt hour.
- 29:36Right.
- 29:36A thousand watts times an hour, which is, again, just 3600.
- 29:40So a kilowatt hour is just 3.6 megajoules then.
- 29:43So 3600 times a thousand watts.
- 29:46So 3.6 megajoules is a kilowatt hour.
- 29:49This portion of Talk Python To Me is brought to you by User Interviews.
- 29:55As a developer, how often do you find yourself talking back to products and services that you use?
- 30:00Sometimes it may be frustration over how it's working poorly.
- 30:04And if they just did such and such, it would work better.
- 30:08And it's easy to do.
- 30:10Other times it might be delight.
- 30:11Wow, they auto-filled that section for me.
- 30:14How did they even do that?
- 30:15Wonderful.
- 30:15Thanks.
- 30:16While this verbalization might be great to get the thoughts out of your head, did you know that you can earn money for your feedback on real products?
- 30:24User Interviews connects researchers with professionals that want to participate in research studies.
- 30:29There is a high demand for developers to share their opinions on products being created for developers.
- 30:35Aside from the extra cash, you'll talk to people building products in your space.
- 30:40You will not only learn about new tools being created, but you'll also shape the future of the products that we all use.
- 30:46It's completely free to sign up and you can apply to your first study in under five minutes.
- 30:51The average study pays over $60.
- 30:53However, many studies specifically interested in developers pay several hundreds of dollars for a one-on-one interview.
- 31:00Are you ready to earn extra income from sharing your expert opinion?
- 31:04Head over to talkpython.fm/userinterviews to participate today.
- 31:09The link is in your podcast player show notes.
- 31:12Thank you to User Interviews for supporting the show.
- 31:16And not to put you on the spot, Michael, but do you know how much you pay per kilowatt hour for your electricity in your home?
- 31:22I think 17 cents.
- 31:23Oh, that's awesome.
- 31:25I'm so impressed.
- 31:26I'm pretty sure.
- 31:28I'm pretty sure.
- 31:28As long as I have the units right.
- 31:29Yeah.
- 31:30No, that's about right.
- 31:31Since I have an electric car, I have little stuff that'll show me.
- 31:34Like, here's how much you charge and how much it pays.
- 31:36Enter your price here to get your...
- 31:38So I'm pretty sure it's 17.
- 31:41It might have gone up just a tiny bit.
- 31:42Okay.
- 31:43Yeah.
- 31:43So I pay about 25 off peak and like 45 cents per kilowatt hour on peak.
- 31:49And so I have an EV and, you know, I'm kind of aware of all that as well.
- 31:53But so again, you know, this shot produced about a little over three mega joules when a kilowatt hour is 3.6.
- 32:00Right.
- 32:00Which is, as you said, you can buy one for 17 cents.
- 32:03So I can pretty much save with certainty that this experiment cost more than 17 cents.
- 32:08Even if you scale it up somewhat, it's going to be more than 17 cents.
- 32:13Yeah.
- 32:13Yeah.
- 32:14This one experiment for my one kilowatt hour I got out of, or a little less than a kilowatt hour I got out of it.
- 32:19And never mind that there was a certain amount put in.
- 32:22I had to put two mega joules in and there's inefficiencies as well.
- 32:26So I think that just sort of outlines the challenge of scale.
- 32:30Right.
- 32:30I mean, so, you know, I have to make a capsule that's way, way cheaper than 17 cents to make money.
- 32:36I have to, you know, probably I want to get more than a kilowatt hour per shot.
- 32:41I'll probably want a 10 or a hundred kilowatt hours per shot.
- 32:45And then I'm going to have to have a lot, a high rep rate because ultimately to power your home and my home and a town's home, you know, you need lots of kilowatt hours.
- 32:52And so, you know, scaling it up is a challenge.
- 32:55I think that's just sort of a nice way to illustrate, you know, where you have to go to get there.
- 33:00Yeah.
- 33:00You got to start somewhere, though.
- 33:01The first transistors, I'm sure, were expensive.
- 33:04You know, the first.
- 33:05Oh, exactly.
- 33:05100 kilobytes of hard drive storage seemed just insane.
- 33:09If you told somebody, well, we're going to need a terabyte on everybody's computer.
- 33:12I go, no, we can't do that.
- 33:13Exactly.
- 33:14Yeah.
- 33:14Absolutely.
- 33:15Yeah.
- 33:16On an SD card.
- 33:17Nothing.
- 33:17Yeah.
- 33:18So.
- 33:18Exactly.
- 33:19There's a lot to do.
- 33:21There's a lot of growth there that needs to happen.
- 33:22It's early stage for sure.
- 33:24Right, right, right.
- 33:25Awesome.
- 33:25Well, let's talk about some of the software side.
- 33:27I know that you guys have over at the LLNL, Lawrence Livermore National Laboratory, you have
- 33:32a software portal.
- 33:33We have a bunch of different applications and things that you're sharing, which are really
- 33:38great.
- 33:38And so I know that you've got a lot of neat things happening on the software side.
- 33:41Your area has been largely around designing and simulating the experiments.
- 33:46And then once someone runs them to go, okay, I got some data.
- 33:50How'd that work?
- 33:51How do we adjust?
- 33:51Maybe talk to us about some of the software side of what you're doing there.
- 33:55Yeah, right.
- 33:56Like we're saying, our kind of design cycle is that we have these quite impressive multi-physics
- 34:02codes that can simulate these experiments, right?
- 34:04that actually mock up the whole room and the capsule inside and actually fake lasers in
- 34:10and run how they would interact with the gold atoms and actually run the entire simulation.
- 34:17But, you know, you usually don't want to just push the button and just have it come out.
- 34:20Usually you're asking questions about it.
- 34:23You're instrumenting it up, if you will.
- 34:25You're testing, you're checking things.
- 34:26So you're kind of steering these simulations.
- 34:29And so one of the big facets of software that we've been working on for the last few years
- 34:34is to improve that steering in Python.
- 34:37We can talk a little bit more about that.
- 34:38But then also we have, so then you get out your simulations result, right?
- 34:42You say, oh, well, this result did such and such, right?
- 34:45But now you want to actually compare it to data.
- 34:47So you have to go over to a web page or talk to somebody who ran an experiment on NIF
- 34:51and talk to them and get that data.
- 34:52So that's another area that we've been working really hard on over the last five or six years.
- 34:57I've been to try to improve that ability test so that basically we're kind of bringing all
- 35:01the parties together so that making the simulations easier to run, easier to work with, and also
- 35:07having the data and tools proximate to that so that we can all sit in one place and actually
- 35:12ask all the questions and get all the answers in that one spot.
- 35:16So historically, that's kind of been the design cycle.
- 35:19And it's been fairly organic, right?
- 35:21Where people will write tools that work for them to steer code or to do some post-processing
- 35:27and then they'll share them with people and then somebody else will share it and they'll
- 35:31tweak it and eventually somebody will quit asking just friends and they'll put it in a directory
- 35:37somewhere, make it readable, right?
- 35:39So that had been the way we'd done business for a while and we're trying to actually improve
- 35:46that.
- 35:46So about five or six years ago, I was designing some experiments for the NIF and I was running
- 35:52one of these tools that were sort of an organically grown thing and I was trying to do something
- 35:56that was a little bit challenging for it and a little bit out of its strengths.
- 36:00And I basically kind of had an existential crisis.
- 36:03I just thought, I can't do this anymore.
- 36:05These tools aren't cutting it.
- 36:07The code underneath is great, but I'm just beating my head against the wall to talk to
- 36:12it and to get things out of it.
- 36:13And you can really burn a lot of human time doing that, which is very expensive.
- 36:18And so I basically just stopped running those tools.
- 36:21Like it was just, you know, kind of like the whole office space thing, you know, where the
- 36:25guy post-technotic suggestion, right?
- 36:27Yeah.
- 36:27I just thought, you know.
- 36:29I don't think I want to go to work today.
- 36:31I don't think I want to do that either.
- 36:34Like just, I was just kind of done.
- 36:36Right?
- 36:37I don't know.
- 36:38It was kind of like that.
- 36:39Mental model.
- 36:40Right.
- 36:41It was kind of like that.
- 36:42I just felt like I can't do that anymore.
- 36:45And I think my time would be better spent trying to improve the model, improve the ecosystem.
- 36:50And again, so I am drinking Python Kool-Aid all the time, learning more and more about the
- 36:55ecosystem.
- 36:56Also learning just about, you know, Git and continuous integration, just things that are
- 37:01out there that I'd been entirely naive about myself and realizing that, oh, you know, there's
- 37:06actually things to do.
- 37:07And in all fairness, of course, other people are thinking things like this as well.
- 37:11As per the page you've got up here, you know, the lab has tons of people who are doing
- 37:15this stuff in spades.
- 37:16But in our little corner of ignition land, that wasn't happening as much as I wanted.
- 37:23And so I basically looked around and I found a couple things that other people had just
- 37:27been starting.
- 37:28And one of them is basically a Python wrapper of one of our codes.
- 37:33We have one of our multi-physics codes.
- 37:35We call it Hydra.
- 37:36And the developer physicist Joe Koenig did the hard work of actually installing Python
- 37:41and a Python interpreter into that.
- 37:44So it actually talks to this big multi-physics parallel code.
- 37:47Interesting.
- 37:48So it's actually hosting the Python runtime, not the other way around, where Python is trying
- 37:53to wrap it C API?
- 37:54Right, right.
- 37:55No, no.
- 37:55The code itself is running and Python is just bolted on top of it.
- 38:01And so, yeah, so the code is still in control.
- 38:05It's actually very challenging.
- 38:06And Joe did a great job of doing that after the fact.
- 38:09But now you have the ability to actually, you know, to initialize the problem until it's
- 38:14run state purely in Python.
- 38:17And he was starting to build an infrastructure to develop our problems, our ignition problems,
- 38:21these whole arms and capsules and such.
- 38:23And I just jumped in on that.
- 38:24I thought, this is what we have to do.
- 38:26It was a tremendous amount of effort to build that up to make it something that actually worked.
- 38:31But I think that it's actually one of the easier tools out there, most robust and user-friendly
- 38:37tools we have now.
- 38:38And so that's sort of the one half of the puzzle is just making a Python interface, a purely
- 38:44Python interface to run these tools.
- 38:46And again, so this tool we call HyPyde for the Hydra Python deck.
- 38:51And again, Joe Koenig initiated it and I've been really involved.
- 38:54And Chris Young has gotten involved since then helping a lot.
- 38:57And so we basically just tried to build the entire ecosystem of how do you initially initialize
- 39:03the horum and the capsule and the laser and all of those things so that you can tell this
- 39:07Hydra code to run and give you some results, right?
- 39:10That's been a big push that I've been, you know, championing and proselytizing on.
- 39:14The other half of it, and this kind of goes back to Dave Monroe and Yorick, like I was
- 39:19mentioning earlier, a lot of people use Yorick.
- 39:22It's a very, very useful tool for data analysis.
- 39:25It's again, it's an interactive tool with a very, very nice array syntax.
- 39:29It's a think of it kind of like interpreted C if C was, you know, C syntax was just interpreted
- 39:35with a really nice array syntax built on.
- 39:38So it's still, it's still quite widely used, but I think to Dave's credit, Dave Monroe's
- 39:42credit, as he was near retirement a couple of years ago, he decided that Python was the
- 39:47way to go.
- 39:47He decided that the future was going with the leveraging what's out there and just going
- 39:53with Python.
- 39:53When you're the one who created your thing and you're like, you know what?
- 39:57I love my baby, but it's time to think beyond.
- 40:00Absolutely.
- 40:01I don't think he gets enough credit for that.
- 40:03I have immense respect for that because, I mean, I don't know if I would do that.
- 40:07We, you know, a lot of people become very protective of their, of their, of their babies.
- 40:11Right.
- 40:12But no, he, you know, it's what's best.
- 40:14Right.
- 40:15And so to, before he, you know, the thing that's nice of one of the nice things about
- 40:19Yorick is a lot like, you know, MATLAB or Mathematica, when you type Yorick and open
- 40:23a shell, a shell, it's everything you get is right there.
- 40:25Right.
- 40:26It's a, it's, it's a single environment.
- 40:27And, and, you know, like internet, Python is a little more heterogeneous and diverse than
- 40:32that.
- 40:32Right.
- 40:32And, it's a feature in a bug.
- 40:34So one of the things he wanted to do was to, as sort of a parting gift to us is he created
- 40:39this tool called iDesign that is basically at its core, it's a Python virtual environment
- 40:45that just pip installs all of the packages that we like to do.
- 40:49That's a lot of them that we've been building, you know, to create this Python ecosystem that
- 40:54will then talk to this Hypoid Hydra, you know, simulation layer.
- 40:58And, and, and basically then everybody can just type Python and they'll get that environment.
- 41:04And, you know, that's, yeah, that by itself, that's not all that big a deal, but it does
- 41:08actually have a certain amount of nice features that we've been able to build it into the,
- 41:12the, our GitLab continuous integration environment.
- 41:15We built an awful lot on it since, since he did, he did retire.
- 41:18And, you know, you can take snapshots of those environment state and some other things.
- 41:23So people have told us we need to open source that I've sort of balked at it, but I think
- 41:28I've made that the decision that we're going to.
- 41:31So iDesign will eventually be on that page you were showing earlier.
- 41:34So, you know, hopefully in a year or whatever, we're going to do that.
- 41:37But another key component, I think one of the things I get excited about, and it's one of
- 41:41the things that's exciting about Python in general is the fact that, you know, that you can have
- 41:45these, it's an enabling technology, right?
- 41:47And so now that you have an iDesign environment, everybody can come into a uniform Python environment
- 41:53and everybody speaks the same languages, has the same tools at their disposal.
- 41:56Well, now you can actually build in tools to go grab data from the NIF databases, right?
- 42:02This, where they're running shots and they're compiling all of this data.
- 42:05It's not always as easily accessible as, as you would like for, for, you know, maybe a non-expert
- 42:11in that particular, you know, diagnostic or whatever.
- 42:13And so what we've been doing at another big campaign that a part of this iDesign ecosystem
- 42:18is that we've been building what's called a shot data pipeline.
- 42:21And again, this runs in the GitLab continuous integration environment.
- 42:24Every night we go off to a bunch of databases and just harvest a whole bunch of data, bring
- 42:29it in and rebuild this iDesign environment with physical data, again, the tools, and then
- 42:34the ability to actually run the code all in Python, right?
- 42:37All in one environment.
- 42:38Yeah, probably before when people would run the experiments, I don't know what before is
- 42:42maybe way far back, but when you get started, you know, you're like, okay, I got to get the
- 42:46data here and then we got to maybe process it and then convert it to this other form and
- 42:50then filter this down.
- 42:51And then finally we can get it so we can import it over here and process it, right?
- 42:54And so you're talking about, well, what if you had a CI pipeline that could do a bunch of
- 42:58these sort of steps, right?
- 42:59Is that the idea?
- 43:00Basically, so experimental physicists who know their diagnostics extremely well.
- 43:05And so they actually will take that raw data and distill it to something useful.
- 43:09We're really just doing the more prosaic step of going and getting it and bringing it so
- 43:16that it's proximate to the designer.
- 43:18And, you know, that's one of those things that's like, well, yeah, right?
- 43:22Just go get it.
- 43:23But it's a huge task and it wastes an awful lot of designer time when you have to chase
- 43:27down data for shots.
- 43:29And so this is something that we're actually, it's not a lot of data really, but it's, but
- 43:33per shot, you might, you might only be dealing with, you might even only be dealing with a few
- 43:37numbers, few scalars, right?
- 43:38And then it can go up to images and it can go up, you can ask for a lot of, you know,
- 43:42you can get more detailed pictures, but even you might just be looking for, for just a few
- 43:46numbers.
- 43:46But, but the thing is, if you have to go ask for those few numbers every time, it's not
- 43:51like it always has to happen.
- 43:52It just, there wasn't a process in place to just sort of try to, that was sort of the
- 43:56culture, right?
- 43:56When you want something, you just go ask somebody, right?
- 43:59That's fine.
- 43:59But we've been trying to, trying to make the culture a little bit more like let's provide
- 44:03it and let's, let's automatically create it.
- 44:06And I think that's been really an exciting, then this whole Python framework has been the
- 44:10enabling technology to make, allow that to happen.
- 44:14And we're just at the point now over the last year or so that in fact, a lot of this stuff
- 44:18is still coming to fruition right now.
- 44:20You'd still consider it alpha and beta, but it's, it's actually, it's finally coming together,
- 44:25which I think is really exciting.
- 44:26And, and they know that, that starts maybe kind of slowly changing the culture, right?
- 44:31Where people start expecting, Hey, it's actually for easy for me.
- 44:34If I just put my data in a spot and, and those shot data pipeline guys, we're going to just
- 44:39going to harvest it every night.
- 44:40And we'll just, I don't have to worry about it.
- 44:42I don't have to feel email.
- 44:44Once the few, the foundation of the automation is there and people start to realize they can
- 44:49trust it.
- 44:50Then, then you start to get creative and put more things on there and leverage it more.
- 44:54And it just makes a lot of, it's PyPI, right?
- 44:57It's small.
- 44:58It is.
- 45:00It is.
- 45:00And another part of that is that the design community, which again, I talked about how
- 45:05a lot of things tool people will develop tools and then they'll just share them when they
- 45:08ask, maybe put it in a directory somewhere.
- 45:10Well, now we have a place where you can actually have your own repository and, and maybe a physicist
- 45:16isn't all that interested in learning what a Git repository is, but we can help with that.
- 45:20You know what I mean?
- 45:20And, you know, it can become a place where you can have your tools and they're available
- 45:24and they're deployed because we also have the issue that we have systems that are air
- 45:28gap.
- 45:28Right.
- 45:30And so we need to have this whole distribution mirrored over here with a physical pass off.
- 45:35Right.
- 45:35And so we try to do that now regularly rather than just piecemeal.
- 45:39And, you know, hey, if you create a little tool or whatever, whatever it is, it's just
- 45:43everywhere all of a sudden.
- 45:44Right.
- 45:45And that's really new.
- 45:46And I think that's, again, very empowering for the designers who are creating these new
- 45:50experiments.
- 45:51I think people who haven't experienced it, these organizations, these research labs and
- 45:55other similar places, they basically become software companies.
- 46:00At least they have a software team that is functioning really at a pretty high level.
- 46:05And I worked at a research place that had six or seven PhDs and a bunch of grad students and
- 46:10me and another software developer.
- 46:12And we were writing software full time and it just it kept getting better and better.
- 46:17And what actually the grad students would say to me is, if you keep doing this, we're going
- 46:22to be out of a job.
- 46:23All the software you're writing, this is what we do.
- 46:25And like, no, what you're going to do is you're going to do actual science and actually better
- 46:29stuff.
- 46:30And every time they'd be like, well, this was my job and here it is a button now.
- 46:33And nobody was fired from that.
- 46:35They just did more interesting stuff and took on more ambitious projects.
- 46:39It was it's pretty cool to see.
- 46:41Exactly.
- 46:41And I've been accused of that before.
- 46:44Like, you're going to put us all out of a job.
- 46:45And it's like, no, no, your job is so much more interesting now.
- 46:49And my job is more interesting.
- 46:51I mean, you know, I spend a lot of time developing now.
- 46:54I've kind of made this my passion and I have a smaller fraction of my time doing designing
- 46:59experiments, not zero, but smaller.
- 47:01But I actually feel like it's much, much more efficient than it ever was.
- 47:05Yeah.
- 47:06You might have a bigger impact, though, even though it's less time.
- 47:09Yeah, it's just a lot more.
- 47:10Yeah, exactly.
- 47:11It's just a lot more efficient.
- 47:12And it's fun to show, you know, younger people who are coming in, you know, how to how to
- 47:17do this and, you know, that it doesn't have to kind of be sort of a what I consider a painful
- 47:22cycle.
- 47:22I mean, you know, maybe maybe some people enjoy it.
- 47:25Yeah.
- 47:25So I like to say that I feel like I'm, you know, building the tools that I wish I had when
- 47:30I started.
- 47:31I think I can, you know, it's it's happening, you know.
- 47:33And again, we have a really, you know, I have a great team of folks that we're working with.
- 47:39I work with, you know, computer scientists, Ryan Tran and Jimmy Smith helped me build this
- 47:44stuff out.
- 47:44And it's just been it's been really great.
- 47:47Sounds fantastic.
- 47:47How many people are on the team?
- 47:49So it's just a small and a certain amount of it is, you know, people who who want to help.
- 47:53So it's just a few of us, you know, again, Joe Coding and Chris Young and Dave Strozzi and
- 47:58such.
- 47:59So and again, but then there are a lot of people who are starting to become contributors.
- 48:04That's where the leverage starts.
- 48:06Sort of a stone soup thing.
- 48:08Yeah.
- 48:09Yeah.
- 48:09And on the NIF more broadly, how many people are involved?
- 48:12Oh, NIF?
- 48:13Hundreds.
- 48:14Jeremy on the on the call here might be able to give an actual number, but it's hundreds of
- 48:19scientists.
- 48:21And so, you know, for scale, you have to keep in mind that the Lawrence Livermore lab
- 48:24has thousands of scientists.
- 48:25So even though the NIF is a big program, it's actually fairly small as a part of the greater
- 48:32lab portfolio.
- 48:33I guess I want to emphasize that I'm speaking kind of for the design corner.
- 48:37There's the experimental corner, the people who actually work with the hardware of the NIF
- 48:41and stuff.
- 48:42And we talk to them, particularly with vis-a-vis the Shot Data Pipeline.
- 48:46There are a lot of places that have their own architectures.
- 48:49You can see that with the open source page and stuff.
- 48:51So there's a tremendous amount.
- 48:52And a lot of those things are doing, you know, really great, their own great infrastructures.
- 48:56But this is really speaking towards the needs of the NIF ignition community.
- 49:01You talked about the specific libraries that you are really focused on the work there,
- 49:08but I'm sure you used a bunch of standard Python libraries, packages that people are familiar
- 49:14with.
- 49:14Maybe give us a sense of some of the tools and things that were at play that you're taking
- 49:19advantage of.
- 49:19Oh, yeah.
- 49:20Well, you know, of course, we're using all the numpy scipy stuff.
- 49:23That's sort of a given.
- 49:25And we also, and I design will bring, you know, we have, you know, PlasmaPy and X-Ray
- 49:31DB and some of these, again, these really nice physical data packages that people have developed
- 49:37in the open source community that now we just sort of bring in so that it's always there
- 49:41and maintained for designers at your fingertips.
- 49:43Certain number of us also do.
- 49:45Yeah, there you go.
- 49:46The page there you brought up.
- 49:48Pip install PlasmaPy.
- 49:49Or comments, all we prefer.
- 49:52There you go.
- 49:53Yeah.
- 49:53And, you know, a lot of us, including myself, are getting involved in, you know, machine
- 49:58learning as well.
- 49:58Of course, that's an important part of the emerging, you know, technology people are excited
- 50:03to take advantage of.
- 50:04And so, like, I install PyTorch into iDesign and try to make sure that's, which is a bit
- 50:10of a challenge, right?
- 50:11Because we have a really large, different architectures, you know, and taking advantage of their different
- 50:16GPUs.
- 50:16You have to, you know, it's not necessarily just a pip install.
- 50:19You might have to compile it.
- 50:20And so there are challenges there.
- 50:23But we try to, you know, just make that available for the, you know, design community, which is
- 50:27cool.
- 50:28Because again, I mean, not to harp on the enabling technology thing, but, you know, we can now,
- 50:32and, you know, I do, again, as a research thing, you know, I can import PyTorch into my
- 50:38HyPi, you know, that runs my big Hydra multi-physics simulation and have it do inference on some
- 50:44part of the, you know, simulation, right?
- 50:47And maybe, you know, even offload part of that.
- 50:49And so there have been other, there are other efforts at the lab as looking at those kinds
- 50:53of things as well.
- 50:54But again, I don't know how you would do that without these tools that we've been building,
- 50:58frankly, at least in our corner of the world.
- 51:00Yeah, you got to keep building that foundation until everything is ready to click it together.
- 51:04Yeah.
- 51:05Yeah, yeah, exactly.
- 51:06While it's as, while it's fun to imagine what would happen if you ask ChatGPT to, you know,
- 51:12say, imagine ChatGPT, you had the most precise lasers in the world.
- 51:16How would you design a fusion experiment?
- 51:19I'm sure that's not going to result in much.
- 51:21Where do you actually see like real constructive AI applied to this and machine learning?
- 51:27Do you have anything that you see on the radar there?
- 51:30There are several things that are being, that it's being applied to.
- 51:33And, and, and in fact, there are, you know, maybe there can be, you can find some links
- 51:38here that there have been some, there's a group that sort of predicted, there were, there gave
- 51:43some confidence whether this shot was going to achieve ignition, right?
- 51:46Where they're trying to learn from the experience of past shots and try to get some idea of predicting
- 51:51whether how a future shot will, will perform.
- 51:54Those are, you know, new things that are, that are happening.
- 51:57Sort of, I think the two sides of it are, are probably those kinds of, those kinds of
- 52:01high level things where you're trying to ask it, you know, big questions about, you know,
- 52:05what would happen if I do this?
- 52:07But there's, there's the other level of, of kind of using it to offload some of the big
- 52:12numerical heavy lifting that we do all the time.
- 52:14We run a lot of, you know, these simulations run massive calculations trying to, you know,
- 52:19do the physics of these lasers shining into these, these whole rooms and such.
- 52:23And some of those calculations could be learned by an inference engine and just maybe a simplified
- 52:28version provided over and over, right?
- 52:31And so there are several efforts being applied to that where, and basically training an agent
- 52:36to just learn some part of, of how the simulation, you know, what the physical data the simulation
- 52:41should provide.
- 52:42I've worked on some of those things.
- 52:43There's more of that going on.
- 52:45There's more details to that as well.
- 52:47I mean, the way we do our simulations, right, we divide, you know, you can sort of think
- 52:50of our simulations or multi-physics simulations, like, you know, like an image, right?
- 52:54An image divides, to make an image, you divide, divide it up into a whole bunch of little tiny
- 52:58pixels, right?
- 52:59And each pixel has a red, green, blue value.
- 53:02And that's what makes your image.
- 53:03And we kind of do that with our, our simulations.
- 53:05If you want to simulate a whole room with a capsule inside, you basically divide it up into
- 53:09a whole bunch of little tiny pixels.
- 53:12We call them nodes and we interconnect them with their nearest neighbors.
- 53:15So they create that links into a mesh.
- 53:17And rather than having red, green, blue, we have physics attributes.
- 53:21We tell it what it's made of.
- 53:23That node is what it's made of, how hot it is, you know, things like that.
- 53:26It's ionization state.
- 53:27And then we run the laws of physics on all of these nodes as they talk to each other.
- 53:31And then they, then that unfolds.
- 53:33And so, but as you can imagine, if you have sort of a mesh of all these nodes, they can tangle
- 53:37up and they can get all, all messed up.
- 53:39And so one of the things that we do is we have, you know, a certain amount of algorithms
- 53:44to try to keep that, that tangling from happening too much and crashing simulations.
- 53:49So that's sort of an inside baseball thing, but that's one of the things that I'm, I'm one
- 53:54of side projects I have, for instance, of, of actually using reinforcement learning to try
- 53:59to figure out just by giving it a whole bunch of trials, you know, what's the best policy
- 54:04for relaxing these, these nodes so that they don't crash a simulation.
- 54:09These things just make simulations easier again, right?
- 54:12And all of this, so you can ask, ask questions and explore more quickly and easily.
- 54:17Right.
- 54:18We all know how tricky even three body problems are in an orbiting system where they can become
- 54:24chaotic.
- 54:24And well, imagine, imagine this thing you're describing is the interactions are insane, right?
- 54:32And so if you could get something to predict, you just say, here's, here's a million different
- 54:36examples of what happened, how it started, how it started, how's it going?
- 54:40Sort of examples.
- 54:41Right, exactly.
- 54:41You got it, you got it.
- 54:43It started, we're thinking here, how's it going to go, right?
- 54:47Right, right.
- 54:48And of course, that's an experience in itself, right?
- 54:50I mean, to actually take these forays into data science and large scale data sets and, you
- 54:54know, training in multiple GPUs and stuff like that.
- 54:57It's, it's been, been fun.
- 54:59I mean, you know, I know people do that all the time, but it's, it's, it's interesting to
- 55:02have that experience.
- 55:03Yeah, for sure.
- 55:04There are some interesting articles of actually the CogSim team at LL&L and some of the work
- 55:09being done there.
- 55:10So I'll link, I'll link to those articles in the show notes.
- 55:13People can check that out.
- 55:13That is the team I'm kind of referring to that there is this effort to bring machine learning
- 55:18to bear on, on some of these problems.
- 55:20And so that's good work that they're doing.
- 55:22Yeah, of course.
- 55:23We're getting short on time here, but let's wrap this up with one other aspect.
- 55:28You talked about having air-gapped systems and, you know, not everything necessarily should
- 55:34be online or is online.
- 55:35You want it to be all kind of isolated and stable.
- 55:38So you've got a lot of computation you got to be doing.
- 55:42Tell us just a bit about the computing environment.
- 55:44You have like interesting clusters or, or grid computing or what's the story for actually
- 55:50running all this stuff?
- 55:51Yeah, yeah.
- 55:52Good, good question.
- 55:53Yeah.
- 55:53There's for the context.
- 55:55So, so basically we have a bunch of very, very large computer clusters at the lab and some
- 56:00of them, you know, are like near the biggest computers in the world or, or were at one time
- 56:05and such.
- 56:05I don't, I don't keep track of that, but those are all on lists and there are new ones on the,
- 56:10on the horizon that will take that crown again.
- 56:13What we do is basically submit our jobs, carving out some chunk of the machine to run, to run these,
- 56:19these multi-physics simulations for so many hours or days.
- 56:22And so we're doing that, you know, we do a certain amount of that on the, on the open
- 56:26side, but then we also, we have a lot of resources on these air gap systems.
- 56:30We do a lot of our running there.
- 56:32That's sort of the exigency of moving our data, physical data from the NIF and our tools
- 56:37over there.
- 56:38So we always have up-to-date tools to run there.
- 56:40These are made by different vendors.
- 56:42It's interesting.
- 56:43They're evolving where they're, you know, there's larger GPU components than there used
- 56:47to be.
- 56:47And the codes are having, are learning to adapt to that.
- 56:50So it's, it's a fairly dynamic environment.
- 56:52That's kind of the, I guess the general run environment we have that we're, we're running
- 56:57on a, on a bunch of clusters.
- 57:00How's quantum computing looking?
- 57:02Are there any quantum applicable problems here?
- 57:06Not directly from my experience.
- 57:08I know there are some people working on quantum computing at the lab closely attached to that.
- 57:12So I, yeah, I'm more, I'm specifically thinking like if you had a quantum computer, would
- 57:17this allow, not necessarily trying to invent quantum computing, but somebody happens to.
- 57:22Probably not.
- 57:23I mean, I, I, maybe somebody, somebody else would know something about it.
- 57:26Yeah.
- 57:27I mean, really we're just trying to kind of, you know, integrate these differential equations
- 57:31that describe the physical system.
- 57:33And, you know, maybe there's a way to diagonalize a matrix with quantum computing.
- 57:37That's way, way better than, than an explicit method, you know, that we, we use.
- 57:41But yeah, I'm not, I'm not aware of it.
- 57:44Yeah.
- 57:44At this point, I definitely don't know enough about quantum computing.
- 57:47Even suggest that.
- 57:49I have an opinion on this, but.
- 57:51Well, I guess we're due now.
- 57:52If we, if these, these barriers are falling, right?
- 57:55Yeah.
- 57:55That's right.
- 57:56Where's the trifecta?
- 57:57Come on.
- 57:57Yeah, exactly.
- 57:58We're trying to figure it of new things.
- 58:02Be careful what you wish for though.
- 58:04Right.
- 58:04I mean, having been able to crack any password, I don't know if that's a good thing.
- 58:08Exactly.
- 58:08I'd love faster computers.
- 58:10Wait, baking doesn't work anymore.
- 58:11Oh no.
- 58:12Right.
- 58:12Back to rubbing sticks together and sleeping on the wood.
- 58:18Exactly.
- 58:18I've got my money clip that I keep everything on my person.
- 58:22Exactly.
- 58:24I'll, I'll mail you some cash in, in physical mail.
- 58:27Get this.
- 58:28Right.
- 58:28Right.
- 58:29You're right.
- 58:29Careful what we wish for.
- 58:30And we won't have that much cash because chat GDP will be writing our software that we used
- 58:35to write.
- 58:35So it'll be tough.
- 58:36Well, this is true.
- 58:37This is true.
- 58:38No, honestly, I'm, I'm very optimistic about the future and a lot of these things and especially
- 58:43this.
- 58:43So awesome work.
- 58:45Now, before you get out of here, let me ask you the final two questions.
- 58:48If you're going to work on some of these Python projects, what editor are you using?
- 58:51I've kind of gone through the litany of editors in my evolution.
- 58:54I started with VI and went to Emacs, went and used Emacs for a very long time.
- 58:58And then probably five or so years ago, I decided I need to make a change.
- 59:02And I went to Adam and, you know, I could use Emacs binding.
- 59:06So I didn't have to rewire my muscle memory and really enjoyed that until of course, last
- 59:11summer when they, they killed it.
- 59:13And so I had to look around and it was funny because I had a summer student who I had just
- 59:17told how to use Adam.
- 59:18And I was like, oh, this is great.
- 59:19And then I had to tell him like literally a week later, forget that.
- 59:22You know, that thing you really love, they, they canceled it.
- 59:25I'm sorry.
- 59:25Yeah.
- 59:26Just don't, just don't.
- 59:27He was like, and he liked it too.
- 59:28I looked around and I think I did what a lot of people are doing.
- 59:32I went with, VS Code and I love it.
- 59:35My goodness.
- 59:35It's really mature and good.
- 59:37And, you know, co-pilot it's, it's again, you know, it's, I'm still, you know, learning
- 59:42how to use it effectively, but, it's amazing.
- 59:45It's a state changer.
- 59:46It is absolutely amazing.
- 59:47Because we are working on clusters.
- 59:49A lot of things are remote.
- 59:50You know, the fact that you can do remote SSH, you know, and you can have your, your software
- 59:55here and your notebook here and then a terminal below it.
- 59:58And it's all just in your VS Code window.
- 1:00:01It's, it's pretty sweet.
- 1:00:02Yeah.
- 1:00:02Yeah.
- 1:00:03You kind of connect to have your, your editor running locally, but connected.
- 1:00:06Right.
- 1:00:07There's no delay with typing and all, but, but you are running on a, on the heavy iron
- 1:00:12somewhere, the big iron somewhere.
- 1:00:13Indeed.
- 1:00:14I feel like a VS Code is maybe the natural successor to people who did Sublime and, and Adam.
- 1:00:19Those are, those are the, I see that kind of that, that flow there.
- 1:00:22All right.
- 1:00:23And then a notable PI PI package.
- 1:00:25You right off the bat, you put up at the beginning, you know, LL and L dot GitHub dot IO
- 1:00:29is, is I think, you know, a really good resource for just sort of seeing the, open source
- 1:00:35packages that are being developed at the lab.
- 1:00:37And again, they have a bent towards high performance computing and such.
- 1:00:41And like I said, eventually I design I'll be up there.
- 1:00:43We'll, we'll open source that.
- 1:00:45I will mention that one that, Dave Monroe again, and is sort of trying to, you know,
- 1:00:49take care of us before he retired.
- 1:00:51He wrote a nice little package called QND, which is on this for quick and dirty QND.
- 1:00:56And that's now being, maintained by Dave Strozzi.
- 1:00:59And, it's a nice little package, but what it does is actually unifies an interface
- 1:01:04for several different binary formats, in particular HDF five and at CDF and a lab internal
- 1:01:10format called PDB.
- 1:01:11And, it's one of those things that passes the test in my mind where I've actually reached
- 1:01:16for it in my own, just little projects where if I need to just store some data, right.
- 1:01:20Numpy has, has, has its own storage thing, but it doesn't do really good.
- 1:01:25If you, if you, you know, have a hierarchical data or if you want to do records, you know,
- 1:01:29and have things, you know, stored over time, but this is actually a simple enough and uniform
- 1:01:34enough interface that it's, it's, I, I, it's like, wow, this really works.
- 1:01:38And so anytime you actually reach for it, when you just need that tool, I think that, you know,
- 1:01:42it's past sort of some sort of threshold of usability.
- 1:01:45And again, it's open source.
- 1:01:46And I think, you know, for people who do things like that, you know, work with binary data,
- 1:01:51I think this might be something that, you know, other people might want to look at.
- 1:01:54One of those Lego building blocks.
- 1:01:55Yeah, exactly.
- 1:01:56One other, one other question, you know, people out there who are really interested in what
- 1:02:01you're talking about and maybe they previously thought of LL and L as just a place for physicists.
- 1:02:06And maybe you're starting to think, oh, maybe it's a place for software people and data scientists.
- 1:02:10Are you guys hiring?
- 1:02:12We are actually.
- 1:02:13A lot of opportunity for folks.
- 1:02:14Absolutely.
- 1:02:15Actually right now, strangely, you know, I think there might be some tailwinds after this success.
- 1:02:21That's above my pay grade, but I think that, you know, there's something that should be
- 1:02:25happening.
- 1:02:25There should be a lot more good stuff going on.
- 1:02:28But right now, even there's a lot of hiring going on.
- 1:02:30And so if you find some of this, you know, interesting Python chops, you know, check us out.
- 1:02:36Definitely.
- 1:02:36Jay, thanks for being here.
- 1:02:38Congratulations once again.
- 1:02:40That's really amazing work.
- 1:02:41And I know it's, I know it's early days, but we'll look back on it, I'm sure.
- 1:02:44Yeah.
- 1:02:45Thank you, Michael.
- 1:02:45Yeah.
- 1:02:46It's been a lot of fun.
- 1:02:47It's fun to be a part of it and look back on the, on the road.
- 1:02:50It's still a long road ahead.
- 1:02:51It is, but it's, I'll be tracking it.
- 1:02:53It'll be exciting to see where it goes.
- 1:02:55Thanks.
- 1:02:55This has been another episode of Talk Python To Me.
- 1:02:59Thank you to our sponsors.
- 1:03:01Be sure to check out what they're offering.
- 1:03:03It really helps support the show.
- 1:03:04TypeI is here to take on the challenge of rapidly transforming a bare algorithm in Python
- 1:03:10into a full-fledged decision support system for end users.
- 1:03:13Get started with TypePy core and GUI for free at talkpython.fm/typei, T-A-I-P-Y.
- 1:03:20Earn extra income from sharing your software development opinion at user interviews.
- 1:03:26Head over to talkpython.fm/user interviews to participate today.
- 1:03:30Want to level up your Python?
- 1:03:32We have one of the largest catalogs of Python video courses over at Talk Python.
- 1:03:37Our content ranges from true beginners to deeply advanced topics like memory and async.
- 1:03:42And best of all, there's not a subscription in sight.
- 1:03:44Check it out for yourself at training.talkpython.fm.
- 1:03:47Be sure to subscribe to the show.
- 1:03:49Open your favorite podcast app and search for Python.
- 1:03:52We should be right at the top.
- 1:03:53You can also find the iTunes feed at /itunes,
- 1:03:57the Google Play feed at /play,
- 1:03:58and the direct RSS feed at /rss on talkpython.fm.
- 1:04:03We're live streaming most of our recordings these days.
- 1:04:06If you want to be part of the show and have your comments featured on the air,
- 1:04:09be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
- 1:04:14This is your host, Michael Kennedy.
- 1:04:16Thanks so much for listening.
- 1:04:17I really appreciate it.
- 1:04:18Now get out there and write some Python code.
- 1:04:20I'll see you next time.