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