Solving Physics Problems with Schrödinger's Equations

Ricardo from Wolfram Research shows how to solve quantum mechanics problems using a new Schrödinger PDE component in Wolfram Language 14.0. He walks through a harmonic oscillator, a double-slit simulation, and a pyramidal quantum dot model, covering boundary conditions and unit handling for real research workflows.
Chapters
Welcome. I am Ricardo. I work in the numerics group at Wolfram Research. I'm a physics application developer and I'm here to talk to you about the Schrodinger equation. First I want to introduce the Schrodinger PD component. There is a new function that will be for 14.0 version and I want to show you as well some examples that are 1 in 1D, 2D and 3D, particularly in 3D. I focus on an application from a research problem and also one time independent problem that is also interesting. So the Schrodinger equation, as you may know, is this equation that has one kinetic energy term and potential energy term. And it describes the evolution of the wave function that describes the can describe one or many particles, quantum particles, and the Schweringer P component. Basically what it does is you give it the variables and some parameters and it gives you back the DPD operator that you will use in functions like ND eigensystem or ND solve to solve the partial differential equation. The Schrodinger P component has some parameters. Mainly the schrodinger potential is 1. You specify this potential term and the reduced Planck constant or the Planck constant. You can also specify as you as you like, as well as the mass. But also you can specify a magnetic vector potential if you want to model the magnetic field interaction. And in that case you can also specify the charge of the particle. Also there is one other parameter that is called azimuthal quantum number that will take a look a bit later on. One example that has axial symmetry. Yeah. So when you first use the Stringer PD component, you can just give it one independent variable and one dependent variable. And the parameters you give us an association. If you leave the association empty, you simply get this. That is just the kinetic energy term. And to understand why is that the case, you can also specify for example a reduced Planck constant to be H bar and the mass to be one, and you get a symbolic expression of that. Yeah. And what happens that if you replace the value of H bar with the value of the reduced Planck constant in the SI base units, you get the same thing that you did before. So basically what the Schwinger PD component is doing is that internally it uses the SI base units and by default it uses the usual value for the reduced Planck constant. Now let's see some examples here. Let's look at one example in one dimension, the harmonic oscillator. In this case, we can simplify them all by setting the reduce planck constant to 1 and the mass to 1 and the Schrodinger potential will be X squared. And this is what you get back to solve it. It's really simple. You need to use the ND eigensystem function. You specify the operator that was just defined above the independent variable and the range or the domain of the variables and how many eigenstates you like to calculate. And you can just use the plot function to visualize the probability density of this particular example. As you may know, this is a common example, a common problem that has an analytical solution. So you could just really plot the hermit polynomials. But let's say you have a bit more complicated potential. So say that for the positive side of the X, you, you, you have 2x to the power of 3. And for the negative x you have x squared over 2. So you will have this PDE operator. And in that case it's not so simple to solve this type of problem analytically. But in a matter of seconds you can use the same function and the eigensystem and you can plot them right away. Another type of problem, let's say you have a 3D problem that has some axial symmetry. So you can in many cases justify this variable changes. The separation of variables. Then you will have, if you're working in cylindrical coordinates, you will have the one part that depends on R and C and another part is just e to the minus I l 5, where l is the azimuthal quantum number. So to specify that, we will just specify the the variables as before, but this time R and C. And the overall simplified model, you can use these values for the constant and the mass. And you add also this option. There is region symmetry and you choose axis symmetric. And what that does is that adds this term that basically makes sense that are in cylindrical coordinates. Now. And if you add the azimuthal quantum number parameter, you get this term that comes from the separation of variables that is A proportional to L squared and inversely proportional to R squared. Okay, so the example that I'm going to show you in this case is imagine that the particle is confined in a torus. So the particle has an axial symmetry and you can justify the separation of variables. So here, instead of solving the 3D problem that is more time consuming, you could just solve one cross section of the torus that I'm showing in this visualization. But really the the domain that you're solving on is just a disk. And here I'm using discretized region with this option to set how small the elements in that region are going to be. And in this case the particle will be confined in an infinite potential. That means that the wave function will go to zero at every wall in the boundary. At every boundary. So here I just specify directly condition and set that is to true in all boundaries. So here again this is a time independent problem. So we use ND eigensystem because we want the eigenvalues and the eigenfunctions. So here I added additionally the boundary condition. And here I replace the L for a value of three. So I could just have chosen any value of decimal quantum number, but I choose three Just to give you an example of what is possible. And here what I'm plotting is I'm using density plot 3D. There is a really handy function to be selected with functions in my opinion. And I'm plotting the real part and the imaginary parts of each state. But the whole wave function where you're really calculating is just the this part. Right. But here I'm plotting the the whole wave function. So it's a complex function. So I'm plotting separately the real part and the imaginary parts. And as you can see here. Okay, so for the 3D case I wanted to, I wanted to make replicate a research problem that is actually a paper published in. In this, in this magazine. In this. I forgot the name in this, in this. Yeah. Journal. And it is calculating basically the eigenstates and the eigenfunctions of the. Of a pyramid shape. A quantum dot. Quantum dot. You may, if you never had heard that word, maybe you have in the recent months because of the. This year's Nobel Prize in Chemistry. But what quantum dots are, and this is a bit of an introduction of quantum dots for people who may have not heard that never. So in layman terms, they are nanoscale islands made out of semiconductor materials that can trap shard carriers like electrons inside them. How would you build something like that? Well, you use some machine the as this one and you basically should say shoot molecules or atoms to, to the sample. And you basically can build layer by layer the, the quantum dot. Yeah, by the way, the, the quantum dots are a bit more broad than this one. These are a type of quantum node, but many type of quantum dots. So I'm not experimentalist, by the way. I just happen to read a bit of this research. I'm just theoretical. But what you can do is that you start layering, building layer by layer these quantum dots and, and you start for example building a layer of indium arsenide and then you Start layering on top of that, gallium arsenide as an example. And what happens is that the lattices don't match exactly. So there is some strain here. And basically after, when you continue to the growing process, that the material relaxes and by itself converts into islands. So here you have. How would that look? Well, you can use cross sectional scaling, tunneling microscopy, and that will let you see how these islands turn out. And basically you have regions where you have for example, gallium arsenide, the indium arsenide, the islands, and then again gallium arsenide. And because you start layering the the material, you are left with a small layer that is called the wet layer that sometimes can. Some interesting physics can happen there. And as you can see, some of them can have pyramid shapes. And that is when we're going to focus on. What is interesting about this, is that they can confine charged carriers like electrons. So imagine here you have a material B that has some energy band gap. And here you have a material A that has also an energy band gap. And an electron that is in the conduction band of material A will see this delta of energy between the two bands as a confining potential. And since these are structures that are on the size of nanometers, then you can expect that they are going to be confined and they are going to present the confinement, the quantum confinement effect. So basically they will have energy quantized energy levels. So what these persons in this paper did was they considering this geometry. And here are two important things that are important to mention. First is that the, you can have the potential, the energy, the potential energy Inside the quantum B0 and be a finite, a finite potential energy outside it. So basically you have the one electron, for example, confined here. And also is that to model that, we need to apply what is called the effective mass approximation and the envelope function approximations. So basically that lets you solve this Schrodinger equation for the particles that are confined inside this quantum dot. But you need to change the mass. And the mass is different for different materials. So you have the effective mass of gallium arsenide that would be the outside region. You have the effective mass of indium arsenide that will be inside the quantum dot. So to do that you need to define the geometry. So here are the parameters that these researchers use. Use the and to. To replicate it. What I did was first I define a cube that will represent the outside region, a pyramid with this function that obviously depends on the parameters defined earlier. The weighting layer that is just A cuboid and the quantum will be just the union of those of these two that you can see right here. Now to solve it, we're going to use the finite element method. So the final element method, you need to import this FEM package to use the two element mesh function and you use. And what we do is we do a regional difference between the outside region, the cube and the what is represented quantum dot and then merge that with fusion union with the wedging layer and we get this, this mesh that we are going to, to solve the, the Schrodinger equation with. As you can see here is the. The pyramid. Okay, so I told you that the mass and the potential energy are piece Y functions. So to model that we define a region member function that tell us if, if the, if the, if what we. If the coordinate that we are evaluated with is inside the quantum dot or not. So we defined the effective mass with a piecewise function that is some effective mass inside the quantum dot and some effective mass when it's outside the quantum dot. And the same for the, for the potential function. And here we also use quantity and give it the dimensions that are correspondent. Because once we put that in the Schrodinger PD component, what the Schrodinger PD component does is. Does it is that, sorry, it converts them to the SI based units by default. But also once the mass and the potential are specified, you can use this important parameter as well. What this does is if you take a look, we define the mesh in nanometers. All these dimensions are in nanometers, as you can see. But to make sense of that, what we tell the stronger P component is, okay, take the meters in the IBASE units and convert that and put nanometers. So all the units in this PDE operator makes sense. And as you can see, the PD operators include the piece wave functions. As you can expect here, what the authors did is that they said that the wave function will vanish on the top as well as on the bottom of the region. So that basically is the approach that they took. There is other options and there could be a discussion between physicists about these are the best boundary conditions for this problem. But when there is no there is RDBC condition on the top and on the bottom, but the rest of the boundaries have what is called a Neumann zero condition. So that will basically translate in Ben Daniel Duke boundary condition for people who are familiar with that. And to solve this again really easily, you use take ND eigensystem and you add the boundary condition, the variables and the Mesh and you said to you telling how many eigens? 10 to get back to you. So to plot it you can use contour plots. That is a really good option to visualize wave functions as here or here we are plotting actually the probability density with density plot 3D. That is also a really good option for that. Okay. To make sense of the values of the eigenvalues that were calculated in this step here the energy we need to take into account what we did earlier that we told them to convert meters to nanometers. So now the energy is actually in the ink is will be kilograms nanometer squared per second squared. It will be like Newtons. But replacing meters with nanometers and that quantity we, we then can convert to any, any, any energy unit that we like. Instead in this case we could use my electron balls and we can get the eigenvalues that way. Okay, so here these are the, the wave functions that the there are in the paper and here the one that we calculated. And we can see that without doing much code and too much work, we can get results that are actually publishable in a journal. So yeah, I'm almost finished. I went took a bit of a time dependent example here. What I'm presenting here is a double slit experiment type of simulation. You can use Boolean regions to make this region, right? But the interesting thing is that we can put an initial condition that is a, a wave packet that had some momentum in the Y direction and will eventually hit the double slit for that obviously the boundaries, the wave function goes zero to in the boundaries. And here you use the shrink component. But this time you put time into the equation and you get a really simple PD operator that in this case is time dependent. And since it's time dependent you don't use ndigamesystem, you use ND solve or ND solve value and you specify the initial condition, the boundary conditions, the range in time that you're going to solve this and you, you get the solution. You can animate the solution. In this case we are animating the probability density and you can use listanimate to, to see what happens in this dispersion type problem. So as you can see, you, you will get, if you put a screen in this area you will, you will see an interference pattern that you will expect from this type of experiment. So that was the examples that I wanted to show you. I think that this could be useful for teachers or for people in education as well as for researchers that want to solve this Rohinger equation or need to solve this Rohinger equation. And if you want to see more, I encourage you 1, 14.0 is out to go to the revenue page. There are more examples there. And Also already in 13.3 you can see this monograph that is about a quantum ring that is actually a type of quantum dot similar to the one I described earlier. And here we model what happens if we put a magnetic field. Also what to do with the eigenfunctions once you have them. You can calculate the optical absorption and yeah, that could be actually lead you to some type of problems that are actually publishable and can have applications. Yeah, so you just need to paste this on the. On the documentation window. This notebook is in the. In the handout section if you want to download it. And thanks with that I open to any questions. Thank you. So the. There is. Sergio says, do you see some functions specific to quantum mechanics being added to the FEM context, like ones in solid mechanics? Yeah, we're thinking about, Thinking about what happens when you have a boundary that it's an absorbing boundary. That is the. For example, you can send enough wave packet and the boundary will absorb it. We're thinking about perhaps seeing 14.1 to add a function that gives you the actual boundary condition that you will need for that. Is the Stringer PD component available in version 13? No, it is only available for in version 14.0. So it will be available. But you can read the quantum ring monograph if you like. That is in 13.3. That will give you some example, some guidance on how to solve these type of problems with the Stringer equation. So I think if there is no more question or if someone wants to chat or ask me anything, I'm open to that. I think I can type my email here. Thank you for your time. You can contact me if you have any question or want to chat.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






