Learn Python with Talk Python's 270 hours of courses

#403: Fusion Ignition Breakthrough and Python Transcript

Recorded on Wednesday, Feb 1, 2023.

00:00 Imagine a world with free and unlimited clean energy.

00:04 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:12 We see the sun every day, and yet impossibly far away as a technology.

00:16 However, we took a major step towards this becoming a reality when the folks at the Lawrence Livermore National Laboratory in the US achieved ignition, 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:37 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:47 This is "Talk Python to Me," episode 403, recorded February 1st, 2023.

00:52 (upbeat music)

00:56 Welcome to Talk Python to Me, a weekly podcast on Python.

01:09 This is your host, Michael Kennedy.

01:11 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:21 There are many.

01:22 Keep up with the show and listen to over seven years of past episodes at talkpython.fm.

01:27 We've started streaming most of our episodes live on YouTube.

01:31 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 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:01 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:09 Pleasure to be here.

02:09 - It's a pleasure to have you.

02:11 Congratulations.

02:12 - Thanks, thanks.

02:13 And of course, I would be remiss if I didn't totally qualify that this, and he congrats have to be accepted on behalf of hundreds of people at the NIF, at the laboratory and laboratories and industry around, and indeed extending back six decades of research that went into this.

02:29 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, 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 ChatGPT and stable diffusion and all those things.

02:57 - Things are changing.

02:58 - Yeah, 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 little tiny, you know, water powered cars and stuff, but 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 months even, right?

03:18 So I'm still processing both of those actually.

03:21 So yeah, it's going to be an interesting world.

03:24 I think as far as ignition, it is still a long path forward towards utilization. We can talk about that.

03:32 >> Yeah, we will. But it's so exciting because with renewables, that's great.

03:37 But there's always a cost to that in terms of like, well, just think solar panels, the mountains of e-waste of those things as they deteriorate over time or just getting them all 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, I think that's a fun story and so I'm happy to have a chance to share it.

04:00 >> Yeah, and you've been central to it, which is 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. I always wanted to be a scientist growing up.

04:14 As a little kid, it was always space and dinosaurs and dinosaurs and space and all.

04:19 That's how it started.

04:21 Then I remembered, it's actually just about this time, about 40 years ago or so, my dad brought home a Commodore 64.

04:28 This would have been the after Christmas buzz of learning basic and stuff, my sister and I. That really started my computational journey.

04:36 And then fast forwarding to I got a degree in physics from Montana State University, did a cosmology with Bill Hiscock there, and then moved to California, took some time off.

04:46 I worked at Chevron in the geophysics staff for a couple years, met my wife there, 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:59 I looked around, I didn't really wanna 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 also always be a tricky balance.

05:11 - Yeah, exactly, exactly.

05:12 That's always a constraint.

05:13 And ultimately, that's a fairly stupid reason to make decisions, but it actually worked out very well 'cause it made me look around, and it turned out there was this amazing graduate program at this place called Lawrence Livermore National Laboratory, run through the UC Davis, University of California Davis, called the Department of Applied Science.

05:30 And so I ended up going there for five years for a PhD and studied gamma ray bursts, the largest explosions in the universe that come 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 I worked on modeling, doing numerical modeling of neutron stars in their last few orbits and few milliseconds before they coalesce as the default model for gamma ray bursts at the time.

05:56 But it was a great experience programming in C++ and doing general relativity and such.

06:02 Then I did a postdoc after that and I got involved with another code at the lab that's actually people who are interested in numerical astrophysics might look into.

06:11 It's called Cosmos++ with Peter Aninos and Chris Fregeel at College of Charleston.

06:16 Again C++ doing more gamma ray burst research and such.

06:20 That's what I did until about 20 years ago when I took a job at Ignition with the ICF campaign, the inertial confinement fusion campaign.

06:29 That's where I've basically been ever since.

06:31 When things sort of switched gears, I basically kind of, I still worked with Cosmos++ for a few years part-time, but really I kind of retired my compiled efforts and went more towards the interpreted world and 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 simulations, see what they'll do.

06:58 And we use interpreted languages to interface with those, either to run the code to help 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:12 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 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 by a physicist at Livermore, Dave Monroe, and so it's fairly extensively used at the lab.

07:35 And it actually is, 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 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 Python just kept coming back.

07:55 So I've since bitten down on that hook and drank Kool-Aid pretty readily.

08:00 So for the last 10 years or so, it's been all Python all the time.

08:04 >> Nice.

08:05 >> Yeah.

08:06 >> Now you 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. I keep my whole back.

08:16 >> Yeah. Right.

08:17 >> One thing that stands out with that story, which is really interesting, I think it seems to me like there's quite a move in the sciences in general to move more towards open source and more towards sharing in terms of, "Hey, if you use this library and we use that library, then maybe we can both have a better library type of sharing." >> Yeah.

08:35 >> Than they traditionally been.

08:37 >> Absolutely. That's something that I've been fortunate enough to watch happen over the course of these years.

08:43 I think what we see that it's non-linear, it's just exploding.

08:47 I think one of the appeals of Python has been PyPI and just this proliferation of packages.

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:03 You got to keep up and pick and choose, but there's all sorts of new things.

09:07 The paradigm has shifted for me and I think a lot of people, where I have this thing to do, 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:21 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 one maybe two computer science type classes.

09:34 And it was all about algorithms and, and how can you evaluate, oh, this bubble sort versus that, 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, 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.

09:54 Right.

09:54 It's more building with Lego blocks that it is, you know, building with wiring kits, I don't know, 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 and, and, you know, and copilot and stuff can bring.

10:10 I mean, you know, I think Andrej Karpathy made the comment that the new interpreted language is English, right?

10:15 And it's almost getting to that point where we can just almost dictate what we want, you know, which is sort of the next level of abstraction, you know, I think that's just going to happen now, right?

10:24 Yeah.

10:24 It's we're past the 30 years, I guess.

10:26 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 libraries are available and now you have thousands or millions of people working on it and using it, not just a single research lab.

10:40 >> Yeah. It's nice to actually see, I think from my little vantage point, I'm not always aware of it, but the lab Livermore, for instance, and I think all the labs participate, they release a wealth of open-source software as well.

10:53 It tends to be fairly focused on high-performance computing.

10:56 It has a niche, but it's definitely, we're trying to give back and be part of that conversation.

11:03 >> This portion of Talk Python to me is brought to you by Taipy. Taipy is the next generation open source Python application builder. With Taipy, you can turn data and AI algorithms into full web apps in no time. Here's how it works.

11:18 You start with a bare algorithm written in Python. You then use Taipy's innovative tool set that enables Python developers to build interactive end user applications quickly.

11:28 There's a visual designer to develop highly interactive GUIs ready for production. And for inbound data streams, you can program against the Taipy core layer as well.

11:37 Taipy core provides intelligent pipeline management, data caching, and scenario and cycle management facilities.

11:44 That's it.

11:45 You'll have transformed a bare algorithm into a full-fledged decision support system for end users.

11:50 Taipy is pure Python and open source, and you install it with a simple pip install taipy.

11:56 For large organizations that need fine-grained control and authorization around their data, there is a paid Taipy Enterprise Edition.

12:02 the Taipy core and GUI described above is completely free to use. Learn more and get started by visiting talkpython.fm/taipy. That's T-A-I-P-Y. The links in your show notes. Thank you to Taipy 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 down to the Python inside of it. Yeah. Let's talk about just all the stuff this led up to fusion in general and then the science and the attempts that have led up to this great breakthrough?

12:36 Yeah, so like I mentioned, actually, you know, laser-induced fusion has been a research area for six decades at the lab.

12:45 When the first ideas were starting, when the first lasers were around and the first people started thinking about that as a driver for fusion.

12:52 And again, this concept of fusion is inertial confinement fusion.

12:56 sort of based on the concept of taking some hydrogen, hydrogen isotopes, we tend to use deuterium and tritium, those are the heavier versions of hydrogen because they have a higher cross-section for fusion reacting. And we implode them, so yes, you have a diagram here that you're showing. So we have a capsule, rather than that distinct from magnetic fusion, which is sort of the other camp where it's a little bit more like the fluorescent bulb model for fusion where you're running plasma through a torus or some sort of a manifold like that, making it very hot but at low density and maybe something a little more akin to the corona of the sun, say, and fusion will happen there in those schemes.

13:36 And then here we're actually taking all of the fuel and putting it inside of one little capsule and then we're compressing that capsule, getting it to very dense as opposed to fusion or magnetic fusion, which is low density, very dense and hot conditions where fusion can transpire. It's actually sort of analogous, I think, to an internal combustion engine in that regard. So we're actually, you know, driving fusion. It happens and it blows itself apart.

14:01 Okay. The graphics that I had seen largely were those big Taurus-like structures. Was it? There's a name for that, the T.

14:09 Well, there's Tokamaks and Spherimaks. Yeah, there's several concepts out there.

14:13 Right. That's the one. So those I think is probably, yeah, that's probably what a lot of people are familiar with.

14:17 And this project is focused on aiming a bunch of lasers at a really small point and just really compressing it and heating it all all at once.

14:28 Right.

14:28 Exactly.

14:29 So, you know, just to kind of, I guess, give the outline is just like you said.

14:33 So the NIF is a big, big stadium size facility at the Northeast corner of Lawrence Livermore 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, and there are 192 of them. They each basically work in concert to shine a pulse of just a few nanoseconds long, and this pulse goes down, and kind of as the graphic you showed, they all are basically trying to converge at a point. But rather than just a point, what we put at the center of this convergence of all these 192 beams is a little tiny gold can, 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 and the no enclosure, the laser entrance holes that LEH is so, and so it's rather amazing, these 192 beams of, of, you know, gigantic lasers and when they're, when they're being amplified, they're actually several feet across.

15:30 So the beams are spread out.

15:31 They're huge, but they all get focused down to the point where they can all go through just a couple of millimeter sized hole, both at the top and the bottom of this gold can and they shine into the can and they shine on the inside wall of the can 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 and this can we, we refer to it as a whole room.

15:52 That's a German word that refers roughly, translates roughly to hollow room.

15:57 And that's just simply because it's something that holds, you know, holds the heat and all rooms are actually.

16:02 Everywhere in our life, right?

16:04 Our ovens are a whole room, whole 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 hole rooms up to actually x-ray temperatures so that they're so hot, they're beyond visual, they're beyond ultraviolet, but into the x-rays, 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 horn beforehand, a hapless little capsule.

16:39 And this capsule is about exactly, you know, you kind of feel sorry for it.

16:44 Yeah.

16:46 Anthropomorphize it a little bit, but, and, and this capsule is, is made of, it's a very, very thin shell, just a couple hundred microns or a hundred or so microns, thick.

16:55 And, right now that these shots are being actually there, they're used a nano, nano crystalline diamond.

17:01 So they're like pure carbon.

17:03 shelves and so they're very dense.

17:05 And so it's, it's kind of funny.

17:06 We have a gold whole on the whole room is made out of gold and the capsule is made out of diamond, right?

17:11 And so could you have picked more prosaic ingredients, but these are the ones that work.

17:16 And so the point of this capsule is really just, it's, 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:27 It's just does pretty much exactly what you'd kind of think.

17:29 It just, it heats and explodes.

17:32 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 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 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 spirit.

17:59 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 the payload inward, and you try to compress it into a tiny little pellet, again, trying to achieve very, very high densities, hundreds of grams per cubic centimeter and tens of kilovolts.

18:18 That's no enclature, we can talk more about that.

18:20 But to get to the point where you're actually at fusion conditions, and what you're looking for and the goal, the reason why we're talking right now is you're always, the goal was always to achieve an ignition.

18:31 So for a very long time, people have been 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 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 another fusion or several more fusions, which will cause more fusions.

18:51 And you get what's called an ignition and it's ignition wave where actually the fusions will cause more fusions and they'll actually cause a burn propagating from the tiny center of that little assembled 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, you get a macroscopic amount of the 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 in 192 lasers and probably a chaotic dynamic reaction of some form of explosion and interaction there.

19:32 It's not super easy to control 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, traditional nuclear reactions that we already leverage, the way that it kind of propagates and once you get it going, it sounds actually oddly similar.

19:50 Yeah, I mean, fission, the good thing about it is, or the nice thing about it is that it's passive, right? But it does operate on that same idea. If you put fission products really close together and one goes off, then it might cause others to go off and you can get that chain reaction. And exactly, we're trying to get that to happen with fusion.

20:09 But the thing is that, you know, fusion, these particles are so light and they're all like charges, right? So they're all trying to push each other away. And as soon as you start putting heat into it, the product of fusion, the thing you wanted to get out of it, it immediately blows itself apart and turns itself off.

20:25 Unlike fission, that's really kind of always the trick.

20:29 That's the hard part.

20:29 Yeah.

20:30 Yeah, exactly.

20:31 You have to really carefully balance the lasers to, to keep the confinement happening 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 know a little bit about them.

20:47 I know enough about them to simulate them.

20:49 But they're amazing technological achievements that you can get all of these to run together.

20:54 What they do is actually they give this blast, they heat the whole room and they actually heat it, not just like turn it 450 like you're having.

21:01 They actually heat it in these very precise stages that are time all over the course of this few nanoseconds.

21:08 You're actually trying to ablate this rocket fuel in steps.

21:13 You're not just trying to just blam.

21:15 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 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 lasers over the course of these few nanoseconds, just sort of pulsing in a sense, if you will, to heat this whole room in these stages.

21:36 So all of that has to be just perfect.

21:38 It has to be very uniform.

21:40 And then that ends up driving this capsule.

21:42 And the capsule doesn't want to actually implode.

21:45 And that's another big thing is 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 rooms, I got Adams in a room and try to move them into one corner, right?

21:57 It doesn't let you do that easily.

22:00 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 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 load this capsule by a factor of 30 in linear scale, 20 to 30.

22:17 And, you know, if you tried to take a balloon and do that, right, you can imagine you push it in and it pops out where your, your fingers don't, you know, where your fingers aren't.

22:25 So you bring in a friend and they, you push together and you're all pushing together and pretty soon the balloon is finding tiny little places to squeeze out, but, but it's 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 going through these rather miraculous increments beyond their original design specs to the point where they're, they're delivering more energy than they were originally promised and with, with unprecedented smoothness and precision, but also the capsule and its smoothness and perfection is amazing.

23:02 So like this capsule, these capsules, if you just sort of think of out of roundness, They're about 200 nanometers, maybe out of round, out of a millimeter.

23:11 And, you know, the earth is roughly 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 the earth, you know, and it's just a tiny little, you know, millim, two millimeters across a capsule.

23:26 Right.

23:27 So they're, they're very, very smooth and that's something that's, that's been progressing.

23:31 And I would say those two achievements are kind of the things that had to be incrementally improved to the point where you're trying to realize the ideal.

23:40 Our codes are good at simulating ideals, and we do a lot of work to try to actually simulate the imperfections as well, and capture as many of those imperfections as possible.

23:50 But we've always been able to do the ideal and say, "Yeah, the ideal works." The whole spherical cow ideal.

23:57 >> It's exactly high around this ideal circle, and of course, it's going to work like this, and there you go.

24:03 - Exactly, and it's like, oh, that works really well.

24:05 And that's been the issue.

24:06 And really what's happening is these large teams of experimentalists have been able to make the laser better and continue to and make these targets better.

24:16 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 really a testament to that hard work.

24:26 - Yeah, really amazing.

24:27 So what we're all learning is to collapse this balloon, you need 192 friends or 191 friends, if you don't count yourself right.

24:34 >> Right. The fact that we're doing a can like this whole room is very important.

24:40 We're not actually shining the lasers on the capsule.

24:43 That's something that's called direct drive and indeed that is a field of study.

24:47 That provides its own challenge because indeed, each laser is like a little fingertip trying to push on the capsule.

24:53 This is so-called indirect drive because we're driving the capsule by 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, 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, right? You know, if you turn on the broil elements, you'll burn your toast, right?

25:33 And so you have to know where to put those elements, where do those spots hit the inside of the plurum to heat as uniformly as possible.

25:41 Yeah. And people might be thinking, well, compressing something 30 times, it's not that crazy. We do that with air all the time. You look at combustion engines and other stuff, but you're also heating it.

25:50 Well, it's 30 times linearly.

25:52 You're also heating it to the near the temperature of the sun. It wants to get a lot bigger really It doesn't want to even stay where it is, right?

25:59 - Absolutely, yes.

26:00 You're heating it up to actually temperatures in excess of the center of the sun.

26:05 So yeah, it doesn't want to be there.

26:07 (laughing)

26:08 - It wants to get moving.

26:09 All right, fantastic.

26:10 Let's just talk one more science side thing, then we'll dive into the software side.

26:15 This is the first time this has been done, and it's a huge accomplishment.

26:19 How do you all see 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 It's not meant to become an energy facility.

26:39 Indeed, there are other startups out there, I think there are probably going to be more, that are exploring ways to commoditize this.

26:46 It's interesting to think about the energy a little bit if I can.

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, an adult, right?

26:59 And those are actually kilocalories, nutritional calories.

27:02 So that's two million calories, which is, you know, two megacalories.

27:06 And it turns out that a calorie, it's kind of convenient, is four joules, another scientific measure of energy that we use all the time.

27:14 So that two kilocalories we eat every day is basically two million calories, which is eight megajoules, eight million joules.

27:22 So just multiply by that four.

27:24 So eight megajoules you eat every day, right?

27:27 So this laser is producing two megajoules, sort of like your breakfast, right, of energy.

27:33 So it's actually not an unachievable 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 the speed of light is a good measure, right, the speed of light.

27:47 So at the speed of light, a light wave can go around the Earth seven and a half times in a second.

27:52 But in a nanosecond, light only goes 30 centimeters, 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, yeah.

28:07 - They've got that 30 centimeters.

28:10 - Right, 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 It's quite amazing.

28:21 Then the reason why we're talking about this particular achievement is that it actually yielded a little over three megajoules, so maybe breakfast plus lunch in fusion yield.

28:31 Again, that happened instantaneously effectively that was released.

28:35 It's more about the release that makes it amazing.

28:39 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, it's kind of interesting to think about like, so going back to the food analogy, 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 3,600, it's 80 or 90,000 seconds, right?

29:01 So eight megajoules divided by say 80,000 seconds, that works out to a hundred joules per second or a hundred Watts.

29:08 So you as a human, you know, burn a hundred Watts, right?

29:12 which is a very, we use that term all the time.

29:16 You can imagine taking a mannequin and putting a 100 watt incandescent bulb inside and it would heat up to our skin temperatures.

29:24 We're going at a much, much higher wattage because we're doing it very quickly.

29:28 You can actually think of a unit of measure that we often use in electricity and stuff is the kilowatt hour, 1,000 watts times an hour, which is again, just 3,600.

29:40 So a kilowatt hour is just 3.6 megajoules then, so 3,600 times 1,000 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:01 Sometimes it may be frustration over how it's working poorly, and if they just did such and such, it would work better, and it's easy to do.

30:10 Other times it might be delight.

30:12 Wow, they auto-filled that section for me.

30:14 How did they even do that?

30:15 Wonderful, thanks.

30:17 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:30 There is a high demand for developers to share their opinions on products being created for developers.

30:36 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:54 However, many studies specifically interested in developers pay several hundreds of dollars for a one-on-one interview.

31:01 Are you ready to earn extra income from sharing your expert opinion?

31:04 Head over to talkpython.fm/userinterviews to participate today.

31:10 The link is in your podcast player show notes.

31:12 Thank you to user interviews for supporting the show.

31:14 And not to put you on the spot, Michael, but do you know how much you pay for kilowatt hour for your electricity in your home?

31:22 I think 17 cents.

31:24 Oh, that's awesome.

31:25 I'm so impressed.

31:27 I'm pretty sure.

31:28 I'm pretty sure as long as I have the units, right.

31:29 Because yeah, no, that's about right.

31:31 I have an electric car.

31:32 I have little stuff that'll show me like, here's how much you charge and how much it pays into your price here to get your, like, so I'm pretty sure.

31:40 I'm pretty sure it's 17.

31:41 It might have gone up just a tiny bit.

31:42 >> Okay. Yeah. I pay about 25 off peak and like 45 cents per kilowatt hour on peak.

31:49 I have an EV and I'm aware of all that as well.

31:53 Again, this shot produced about a little over three megajoules when a kilowatt hour is 3.6, which is, as you said, you can buy one for 17 cents.

32:04 I can pretty much say with certainty that this experiment cost more than 17 cents.

32:09 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, one kilowatt hour I got out of, or a little less than a kilowatt hour I got out of it.

32:19 That's, and nevermind that there was a certain amount put in, I had to put two megajoules in and there's inefficiencies as well, but 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:37 I have to, you know, probably I want to get more than a kilowatt hour per shot.

32:41 I'll probably want to 10 or a hundred kilowatt hours per per shot.

32:45 And then I'm going to have to have a lot of 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, 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, like, no, we can't do that.

33:13 >> Exactly. Yeah. Absolutely.

33:16 >> On an SD card, nothing.

33:18 >> Exactly. There's a lot to do.

33:21 There's a lot of growth there that needs to happen.

33:23 >> It's early stage for sure.

33:24 >> Right.

33:25 >> Awesome. 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 a software portal.

33:33 We have a bunch of different applications and things that you're sharing, which are really great.

33:38 And so I know that you've got a lot of neat things happening on the software side.

33:42 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. How'd that work? How do we adjust?" Maybe talk to us about some of the software side of what you're doing there.

33:55 Yeah, right. Like we were saying, our kind of design cycle is that we have these quite impressive multi physics codes that can simulate these experiments, right, that actually mock up the whole room and the capsule inside and, and actually fake lasers in and run the how they would interact with the gold atoms and actually run the entire simulation.

34:17 But, you know, usually don't want to just push the button and just have it come out.

34:20 Usually you're asking questions about it, you're instrumenting it up, if you will, you're test, 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 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 and talk to them and get that data.

34:53 So that's another area that we've been working really hard on over the last five or six years I've been to try to improve that ability to so that basically we're kind of bringing all the parties together so that the making the simulations easier to run easier to work with and also having the data and tools proximate to that so that we can all sit in one place and actually ask all the questions and get all the answers in that one spot. So historically that's kind of been the design cycle and it's been fairly organic right where people will write tools that work for them to steer code or to do some post-processing, and then they'll share them with people, and then somebody else will share it, and they'll tweak it, and eventually somebody will quit asking just friends and they'll put it in a directory somewhere, make it readable.

35:39 That had been the way we'd done business for a while, and we're trying to actually improve that.

35:47 About five or six years ago, I was designing some experiments for the NIF, and I was running one of these tools that were sort of an organically grown thing, and I was trying to do something that was a little bit challenging for it, and a little bit out of its strengths.

36:00 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." The code underneath is great, but I'm just beating my head against the wall to talk to it and to get things out of it.

36:13 You can really burn a lot of human time doing that, which is very expensive.

36:18 So I basically just stopped running those tools.

36:21 It was just like the whole office space thing, where the guy post hypnotic suggestion.

36:27 I don't think I want to go to work today.

36:31 Exactly.

36:32 >> I don't think I want to do that either.

36:34 I just got it done.

36:36 >> 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 Again, so I am drinking the Python Kool-Aid all the time, learning more and more about the ecosystem, also learning just about Git and continuous integration, just things that are out there that I'd been entirely naive about myself, and realizing that, oh, there's actually things to do.

37:07 In all fairness, of course, other people are thinking things like this as well as per the page you've got up here.

37:13 The lab has tons of people who are doing this stuff in spades.

37:16 But there are a little corner of ignition land that wasn't happening as much as I wanted.

37:23 I basically looked around and I found a couple things that other people had just been starting.

37:28 One of them is basically a Python wrapper of one of our codes.

37:33 We have one of our multi-physics codes, we call it Hydra.

37:36 The developer physicist, Joe Koning, did the hard work of actually installing Python.

37:42 and a Python interpreter into that.

37:44 So it actually talks to this big multiphysics parallel code.

37:47 >> Interesting. So it's actually hosting the Python runtime, not the other way around where Python is trying to wrap it CAPI?

37:54 >> Right. No, the code itself is running and Python is just bolted on top of it.

38:00 >> Okay.

38:01 >> Yeah. So the code is still in control.

38:05 It's actually very challenging 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 and tell it its run state purely in Python.

38:17 And he was starting to build an infrastructure to develop our problems, our ignition problems, these whole arms and capsules and such.

38:23 And I just jumped in on that. 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 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 Python interface to run these tools.

38:46 And again, so this tool we call HyPy for the Hydra Python deck, and again, Joe Koenig initiated it, and I've been really involved, and Chris Young has gotten involved since then, helping a lot.

38:58 And so we basically just tried to build the entire ecosystem of how do you initialize the horum, and the capsule, and the laser, and all of those things, so that you can tell this hydrocode to run and give you some results.

39:10 That's been a big push that I've been championing and proselytizing on.

39:15 The other half of it, and this goes back to Dave Monroe and Yorick, like I was mentioning earlier, a lot of people use Yorick.

39:22 It's a very, very useful tool for data analysis.

39:25 Again, it's an interactive tool with a very, very nice array syntax.

39:30 Think of it like interpreted C, if C syntax was just interpreted with a really nice array syntax built on.

39:38 So it's still quite widely used, but I think to Dave's credit, Dave Monroe's credit as he was near retirement a couple of years ago, he decided that Python was the way to go.

39:47 He decided that the future was going with leveraging what's out there and just going with Python.

39:53 >> When you're the one who created your thing and you're like, "You know what? I love my baby, but it's time to think beyond." Absolutely. 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 was to do that.

40:08 A lot of people become very protective of their babies, but no, it's what's best.

40:15 Before, the thing that's nice, one of the nice things about Yorick is a lot like Matlab or Mathematica.

40:21 When you type Yorick and open a shell, everything you get is right there.

40:26 It's a single environment.

40:28 >> Like it or not, Python is a little more heterogeneous and diverse than that.

40:33 It's a feature in a bug.

40:35 One of the things he wanted to do as a parting gift to us, is he created this tool called IDesign that is basically, at its core, it's a Python virtual environment that just pip installs all of the packages that we like to do.

40:49 There's a lot of them that we've been building to create this Python ecosystem that will then talk to this Hypeide Hydra simulation layer.

40:59 Basically, then everybody can just type Python, and they'll get that environment.

41:05 By itself, that's not all that big a deal, but it does actually have a certain amount of nice features that we've been able to build it into our GitLab continuous integration environment.

41:15 We built an awful lot on it since he did retire.

41:19 You can take snapshots of those environment state and some other things.

41:24 People have told us we need to open source that I've sort of balked at it, but I think I've made 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 the things that's exciting about Python in general, is the fact that, you know, that you can have 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, 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, where they're running shots and they're compiling all of this data.

42:05 It's not always as easily accessible as you would like for maybe a non-expert in that particular diagnostic or whatever.

42:13 What we've been doing is another big campaign, a part of this iDesign ecosystem 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 it in and rebuild this IDesign environment with physical data, again, the tools, and then the ability to actually run the code, all in Python, right? All in one environment.

42:38 Yeah, probably before when people run the experiments, I don't know what before is, maybe way far back, but when you get started, you know, you're like, "Okay, I got to get the data here, and then we got to maybe process it and then convert it to this other form, and then filter this down and then finally we can get it so we can import it over here and process it.

42:54 Right?

42:55 So you're talking about, well, what if you had a CI pipeline that could do a bunch of these sort of steps, right?

42:59 Is that the idea?

43:01 Basically.

43:02 So experimental physicists who know their diagnostics extremely well, and so they actually will take that raw data and distill it to something useful.

43:10 We're really just doing the more prosaic step of going and getting it and bringing it so that it's proximate to the designer.

43:18 That's one of those things it's like, well, yeah, 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 down data for shots.

43:29 >> How much data are you talking in?

43:31 >> It's not a lot of data really, but per shot, you might only be dealing with few numbers, few scalers, and then it can go up to images.

43:40 You can ask for a lot of, you can get more detailed pictures, but even you might just be looking for just a few numbers.

43:46 But the thing is, if you have to go ask for those few numbers every time, it's not like it always has to happen.

43:52 It's just there wasn't a process in place to just try to, that was the culture.

43:56 When you want something, you just go ask somebody.

43:59 That's fine, but we've been trying to make the culture a little bit more like, let's provide it and let's automatically rate it.

44:06 I think that's been really an exciting.

44:08 This whole Python framework has been the enabling technology to allow that to happen.

44:14 We're just at the point now over the last year or so that, in fact, a lot of this stuff is still coming to fruition right now.

44:20 You'd still consider it Alpha and Beta, but it's actually finally coming together, which I think is really exciting.

44:26 That starts maybe slowly changing the culture, where people start expecting, "Hey, it's actually easy for me if I just put my data in a spot and those shot data pipeline guys, we're going to just going to harvest every night.

44:41 I don't have to worry about it. I don't have to feel email.

44:44 - Once the foundation of the automation is there and people start to realize they can trust it, then you start to get creative and put more things on there and leverage it more and it just makes a lot of--

44:55 - Exactly. - A lot of stuff take off.

44:56 - It's PyPI, right?

44:58 It's small.

44:58 - It is, it is.

45:00 - And another part of that is that the design community, which again, I talked about how a lot of things, people will develop tools and then they'll just share them when asked, maybe put it in a directory somewhere.

45:10 Well, now we have a place where you can actually have your own repository.

45:14 And maybe a physicist isn't all that interested in learning what a Git repository is, but we can help with that.

45:20 You know, I mean, it can become a place where you can have your tools and they're available and they're deployed because we also have the issue that we have systems that are air-gapped, right?

45:29 And so we need to have this whole distribution mirrored over here with a physical pass-off, 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 it is, it's just everywhere all of a sudden.

45:45 That's really new and I think that's again, very empowering for the designers who are creating these new experiment.

45:51 >> I think people who haven't experienced it, these organizations, these research labs and other similar places, they basically become software companies.

46:01 At least they have a software team that is functioning really at a pretty high level in them.

46:05 I worked at a research place that had six or seven PhDs and a bunch of grad students, and me and another software developer, and we were writing software full-time, and it just, it kept getting better and better, and what actually the grad students would say to me is, if you keep doing this, we're gonna 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 gonna do is you're gonna do actual science and actually better stuff, 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's pretty cool to see.

46:41 >> Exactly. I've been accused of that before.

46:44 You're going to put us all out of the job.

46:45 But it's like, no, no.

46:47 Your job is so much more interesting now, and my job is more interesting.

46:51 I spend a lot of time developing now.

46:54 I've made this my passion.

46:56 I have a smaller fraction of my time doing designing 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. You might have a bigger impact though, even though it's less time.

47:09 >> Yeah, exactly.

47:11 It's just a lot more efficient and it's fun to show younger people who are coming in how to do this and that it doesn't have to be what I consider a painful cycle.

47:22 I mean, maybe some people enjoy it.

47:25 Yeah. I like to say that I feel like I'm building the tools that I wish I had when I started.

47:31 I think it's happening.

47:33 Again, we have a really great team of folks that we're working with, I work with, you know, computer scientists, Ryan Tran and Jimmy Smith, who helped me build this stuff out.

47:44 And it's, 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 such.

47:59 So, and again, but then there, 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. On the NIF more broadly, how many people are involved?

48:13 >> NIF? Hundreds. Jeremy on the call here might be able to give an actual number, but it's hundreds of scientists.

48:21 For scale, you have to keep in mind that the Lawrence Livermore Lab has thousands of scientists.

48:26 Even though the NIF is a big program, it's actually fairly small as a part of the greater lab portfolio.

48:33 I guess I want to emphasize that I'm speaking for the design corner.

48:37 there's the experimental corner, the people who actually work with the hardware of the NIF and stuff.

48:42 We talked to them particularly with vis-a-vis the ShotData 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 and a lot of those things are doing really great their own great infrastructures.

48:56 But this is really speaking towards the needs of the NIF ignition community.

49:01 >> Yeah. You talked about the specific libraries that you are really focused on the work there, but I'm sure you used a bunch of standard Python libraries, packages that people are familiar with.

49:14 Maybe give us a sense of some of the tools and things that were at play that you're taking advantage of.

49:20 >> Oh, yeah. Well, of course, we're using all the NumPy, SciPy stuff.

49:24 That's a given.

49:25 We also, in Dye Design, we have PlasmaPy and X-Ray, DB, and some of these.

49:32 Again, these really nice physical data packages that people have developed in the open source community that now we just sort of bring in so that it's always there and maintained for designers at your fingertips.

49:44 Certain number of us also do, yeah, there you go, the page there you brought up.

49:48 >> pip install PlasmaPy.

49:50 >> Or conda if you prefer.

49:52 >> There you go, yeah.

49:54 A lot of us, including myself, are getting involved in machine learning as well.

49:58 Of course, that's an important part of the emerging technology people are excited to take advantage of.

50:04 And so I install PyTorch into IDesign and try to make sure that's...

50:09 Which is a bit of a challenge, right?

50:11 Because we have really large, different architectures, and taking advantage of their different GPUs.

50:16 It's not necessarily just a pip install.

50:19 I might have to compile it.

50:20 And so there are challenges there.

50:23 but we try to just make that available for the design community, which is cool because again, I mean, not to harp on the enabling technology thing, but we can now and I do, again, as a research thing, I can import PyTorch into my HyPy that runs my big Hydra multi-physics simulation and have it do inference on some part of the simulation, and maybe even offload part of that.

50:49 So there have been other, there are other efforts at the lab as looking at those kinds 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, frankly, at least in our corner of the world.

51:00 - Yeah, you gotta keep building that foundation until everything is ready to click it together.

51:05 Yeah. - Yeah, yeah, exactly.

51:06 - While it's fun to imagine what would happen if you ask chatGTP to say, imagine chatGTP you had the most precise lasers in the world, how would you design a fusion experiment?

51:20 I'm sure that's not gonna result in much.

51:22 Where do you actually see real constructive AI applied to this or machine learning?

51:27 Do you have anything that you see on the radar there?

51:30 - There are several things that it's being applied to.

51:33 And in fact, maybe you can find some links here that there have been some, there's a group that sort of predicted, they gave 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 how a future shot will perform.

51:54 Those are new things that are happening.

51:57 I think the two sides of it are probably those kinds of high-level things where you're trying to ask big questions about what would happen if I do this.

52:07 But there's the other level of using it to offload some of the big numerical heavy lifting that we do all the time.

52:14 We run a lot of, the simulations run massive calculations trying to do the physics of these lasers shining into these whole rooms and such.

52:23 Some of those calculations could be learned by an inference engine and just maybe a simplified version provided over and over.

52:31 There are several efforts being applied to that.

52:34 We're trying to basically train an agent to just learn some part of how the simulation, what physical data the simulation 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, we divide, you can think of our simulations or multi-physics simulations like an image.

52:55 To make an image, you divide it up into a whole bunch of little tiny pixels and each pixel has a red, green, blue value and that's what makes your image.

53:03 We do that with our simulations.

53:05 If you want to simulate a whole room with a capsule inside, you basically divide it up into a whole bunch of little tiny pixels.

53:11 we call them nodes and we interconnect them with their nearest neighbors.

53:15 So they create that links into a mesh.

53:17 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, things like that.

53:26 It's ionization state.

53:28 Then we run the laws of physics on all of these nodes as they talk to each other and then that unfolds.

53:33 But as you can imagine, if you have a mesh of all these nodes, they can tangle up and they can get all messed up.

53:40 One of the things that we do is we have a certain amount of algorithms to try to keep that tangling from happening too much and crashing simulations.

53:49 That's an inside baseball thing, but that's one of the things, then I'm one of the side projects I have, for instance, of actually using reinforcement learning to try to figure out, just by giving it a whole bunch of trials, what's the best policy for relaxing these nodes so that they don't crash a simulation.

54:09 These things just make simulations easier again, and all of this, so you can ask questions and explore more quickly and easily.

54:17 >> We all know how tricky even three-body problems are in an orbiting system where they can become chaotic.

54:24 Well, imagine this thing you're describing is the interactions are insane.

54:31 >> Oh, yeah.

54:32 >> If you could get something to predict, you just say, here's a million different examples of what happened, how it started, how it started, how's it going, sort of examples.

54:41 >> Exactly. You got it.

54:43 >> It started, we're thinking here, how's it going to go, right?

54:47 >> Right. Of course, that's an experience in itself.

54:50 I mean, to actually take these forays into data science and large-scale datasets and training in multiple GPUs and stuff like that, it's been fun.

54:59 I mean, I know people do that all the time, but it's interesting to have that experience.

55:03 >> Yeah, for sure. There are some interesting articles of actually the CogSim team at LLNL and some of the work being done there.

55:10 So I'll link to those articles in the show notes.

55:13 People can check that out.

55:14 - That is the team I'm kind of referring to, that there is this effort to bring machine learning to bear on some of these problems.

55:21 So that's good work that they're doing.

55:23 - Yeah, of course.

55:24 We're getting short on time here, but let's wrap this up with one other aspect.

55:29 You talked about having air-gapped systems and not everything necessarily should be online or is online.

55:35 you want it to be all kind of isolated and stable.

55:38 So, and then you've got a lot of computation you gotta be doing.

55:42 Tell us just a bit about the computing environment.

55:44 Do you have like interesting clusters or grid computing or what's the story for actually running all this stuff?

55:51 - Yeah, yeah, good question.

55:53 Yeah, there's, for the context.

55:55 So basically we have a bunch of very, very large computer clusters at the lab.

56:00 And some of them, you know, are like near the biggest computers in the world or were at one time.

56:05 I don't keep track of that, but those are all on lists and there are new ones 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 these multi-physics simulations for so many hours or days.

56:23 We're doing that. We do a certain amount of that on the open side, but then we also 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 over there.

56:38 So we always have up-to-date tools to run there.

56:41 These are made by different vendors.

56:42 It's interesting, they're evolving where there's larger GPU components than there used to be, and the codes are learning to adapt to that.

56:50 So it's a fairly dynamic environment.

56:52 That's kind of, I guess, the general run environment we have, that we're running on a bunch of clusters.

57:00 How's quantum computing looking?

57:03 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 >> Yeah.

57:13 >> I'm specifically thinking if you had a quantum computer, would this allow you, not necessarily trying to invent quantum computing, but somebody happens to.

57:22 >> Probably not. Maybe somebody else would know something.

57:26 But yeah, I mean, really, we're just trying to kind of, you know, integrate these differential equations that describe the physical system.

57:33 And, you know, maybe there's a way to diagonalize a matrix with quantum computing that's way, way better than an explicit method, you know, that we use.

57:42 But, yeah, I'm not, I'm not aware of it at this point.

57:45 I definitely don't know enough about quantum computing to even suggest that.

57:49 Well, I guess we're due now, if we, if these, these barriers are falling, right?

57:55 Yeah, exactly.

57:56 We need to try and be ready to do things.

57:59 Be careful what you wish for though, right?

58:01 I mean, having been able to crack any password, I don't know if that's a good thing.

58:05 Exactly.

58:06 I'd love faster computers.

58:07 Wait, baking doesn't work anymore.

58:08 Oh no.

58:09 Right.

58:10 Back to rubbing sticks together and sleeping on the wood.

58:15 I've got my money clip that I keep everything on my person.

58:20 Exactly.

58:21 I'll, I'll do that.

58:22 on my person.

58:23 (laughs)

58:24 - Exactly.

58:24 I'll mail you some cash in physical mail.

58:28 Get this.

58:29 - Right, right.

58:29 - You write careful what we wish for.

58:30 (laughs)

58:31 And we won't have much cash 'cause chatGTP will be writing our software that we used to write though.

58:36 It'll be fine.

58:36 - Well, this is true.

58:37 This is true.

58:38 (laughs)

58:39 - No, honestly, I'm very optimistic about the future in a lot of these things and especially 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 gonna work on some of these Python projects, what editor are you using?

58:51 I've 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 Then probably five or so years ago, I decided I need to make a change and I went to Atom.

59:04 I can use Emacs binding so I didn't have to rewire my muscle memory.

59:08 Really enjoyed that until of course, last summer when they killed it.

59:13 I had to look around.

59:14 It was funny because I had a summer student who I just told how to use Atom and I was like, "Oh, this is great." and then I had to tell him literally a week later, forget that.

59:23 >> The thing you really love, they canceled it. I'm sorry.

59:25 >> Yeah. Just don't. He liked it too.

59:29 I looked around and I think I did what a lot of people are doing with VS Code.

59:34 I love it. My goodness, it's really mature and good.

59:38 Co-pilot, again, I'm still learning how to use it effectively, but it's amazing, it's a state changer.

59:46 >> It is absolutely amazing.

59:47 because we are working on clusters, a lot of things are remote.

59:50 The fact that you can do remote SSH and you can have your software here and your notebook here and then a terminal below it, and it's all just in your VS Code window, it's pretty sweet.

01:00:02 >> Yeah. You connect to it, have your editor running locally, but connected to that area.

01:00:08 >> There's no delay with typing and all, but you are running on the heavy iron somewhere, the big iron somewhere.

01:00:13 Indeed, I feel like VS Code is maybe the natural successor to people who did Sublime and Atom.

01:00:19 Those are the, I see that kind of that flow there.

01:00:22 All right, and then a notable PyPI package?

01:00:25 Right off the bat, you put up at the beginning, you know, llnl.github.io is, I think, you know, a really good resource for just sort of seeing the open source 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 will be up there.

01:00:43 We'll open source that.

01:00:45 I will mention one that Dave Monroe, again, and is sort of trying to 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, 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 for several different binary formats, in particular, HDF5, NetCDF, and a lab internal format called PDB.

01:01:12 It's one of those things that passes the test in my mind where I've actually reached for it in my own just little projects, where if I need to just store some data, NumPy has its own storage thing, but it doesn't do really good if you have a hierarchical data or if you want to do records and have things stored over time.

01:01:31 But this is actually a simple enough and uniform enough interface that it's like, wow, this really works.

01:01:38 So anytime you actually reach for it when you just need that tool, I think that it's past some threshold of usability.

01:01:45 Again, it's open source and I think for people who do things like that, work with binary data, I think this might be something that 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 question, people out there who are really interested in what you're talking about, and maybe they previously thought of LL and LL is just a place for a physicist, And maybe you're starting to think, maybe it's a place for software people and data scientists.

01:02:11 Are you guys hiring?

01:02:12 We are actually.

01:02:14 Absolutely, actually, right now, strangely, you know, I think there might be some tailwinds after the success. That's above my pay grade, but I think that, you know, there's something that should be happening. There should be a lot more good stuff going on. But right now, even there's a lot of hiring going on. And so if you find some of this, you know, interesting Python chops, you know, check us out, definitely.

01:02:37 Jay, thanks for being here.

01:02:38 Congratulations once again.

01:02:40 It's really amazing work, and I know it's early days, but we'll look back on it, I'm sure.

01:02:44 Yeah, thank you, Michael.

01:02:45 Yeah, it's been a lot of fun.

01:02:47 It's fun to be a part of it and look back on the road.

01:02:50 It's still a long road ahead.

01:02:51 It is, but 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 Taipy is here to take on the challenge of rapidly transforming a bare algorithm in Python into a full-fledged decision support system for end users.

01:03:13 Get started with Taipy Core and GUI for free at talkpython.fm/taipy.

01:03:21 Earn extra income from sharing your software development opinion at user interviews.

01:03:26 Head over to talkpython.fm/userinterviews to participate today.

01:03:31 Want to level up your Python?

01:03:33 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:45 Check it out for yourself at training.talkpython.fm.

01:03:48 Be sure to subscribe to the show, open your favorite podcast app, and search for Python.

01:03:52 We should be right at the top.

01:03:54 You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the Direct rss feed at /rss on talkpython.fm. 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, be sure to subscribe to our YouTube channel at talkpython.fm/youtube. This is your host, Michael Kennedy. Thanks so much for listening. I really appreciate it. Now get out there and and write some Python code.

01:04:21 (upbeat music)

01:04:23 [Music]

01:04:38 (upbeat music)

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon