added parameter estimation tutorial for schrodinger equation#79
added parameter estimation tutorial for schrodinger equation#79a-b-h-a-y-s-h-i-n-d-e wants to merge 2 commits into
Conversation
| @@ -0,0 +1,618 @@ | |||
| Parameter Learning of the Schrödinger Equation | |||
| =============================================== | |||
|
|
|||
There was a problem hiding this comment.
Please add context on what Schrödinger's equation models (the physics and mathematics)
| time-dependent Schrödinger equation using gradient descent in Physika. | ||
| The Schrödinger equation is a partial differential equation that governs | ||
| the evolution of the wave function of a non-relativistic quantum-mechanical | ||
| system. |
There was a problem hiding this comment.
Please briefly describe what a "non-relativistic quantum-mechanical
system" is
| \frac{\partial \psi}{\partial t} = -\frac{i}{\hbar} \left( -\frac{\hbar^2}{2m} \frac{\partial^2 \psi}{\partial x^2} + V(x)\psi \right) | ||
| \end{align*} | ||
|
|
||
| This is the RHS of the Schrödinger equation — the rate of change of the |
There was a problem hiding this comment.
I think we can remove this
| .. code-block:: text | ||
|
|
||
| Nx : ℕ = 1024 | ||
| x : ℝ[Nx] = linspace(-200, 200, Nx) |
There was a problem hiding this comment.
Lets make sure this (and other tutorials) runs properly with the new type system
| hbar : ℝ = 1.0 | ||
| mass : ℝ = 1.0 | ||
|
|
||
| The timestep is chosen using the CFL stability condition for the |
There was a problem hiding this comment.
Please describe whar CFL is
| Nt : ℕ = 3271 | ||
|
|
||
|
|
||
| The Initial Condition — Gaussian Wave Packet |
There was a problem hiding this comment.
Lets remove "The"
| return history | ||
|
|
||
|
|
||
| .. note:: |
There was a problem hiding this comment.
Let's implement this with physika
|
|
||
| x0 : ℝ = -50.0 # initial position | ||
| k0 : ℝ = 2.0 # wavenumber (controls momentum) | ||
| sigma : ℝ = 10.0 # width of the wave packet |
There was a problem hiding this comment.
Can we use greek letters?
| psi0 = (1 / sigma*sqrt(3.14))**0.5 * exp(1j * k0 * x) * exp(-((x - x0)**2) / (2 * sigma**2)) | ||
|
|
||
|
|
||
| Discretizing the RHS |
There was a problem hiding this comment.
What does RHS refer to? I understand is d𝜓/dt from above, but please lets make it more explicit.
| Discretizing the RHS | ||
| --------------------- | ||
|
|
||
| We discretize space into :math:`N_x` points with uniform spacing |
There was a problem hiding this comment.
Please add an explanation about discretization, why is relevant? What is the purpose of discretization?
| \end{align*} | ||
|
|
||
| When the wave packet hits this barrier, part of it is reflected and part | ||
| tunnels through — a purely quantum mechanical phenomenon with no classical |
There was a problem hiding this comment.
What is the purpose of this text "— a purely quantum mechanical phenomenon with no classical
analogue"? If its not adding, lets remove it
| When the wave packet hits this barrier, part of it is reflected and part | ||
| tunnels through — a purely quantum mechanical phenomenon with no classical | ||
| analogue. The ratio of transmitted to reflected probability depends | ||
| sensitively on :math:`V_0`, which is why it is a learnable parameter. |
There was a problem hiding this comment.
I'm not sure that "The ratio of transmitted to reflected probability depends
sensitively on :math:V_0" implies "a learnable parameter." but the parameter we are trying to learn
|
|
||
| def adam(bh: ℝ, g: ℝ, m: ℝ, v: ℝ, t: ℝ, lr: ℝ) : ℝ[4]: | ||
| beta1: ℝ = 0.9 | ||
| beta2: ℝ = 0.999V: ℝ[Nx] = make_potential(1.8) |
There was a problem hiding this comment.
Looks like V: ℝ[Nx] = make_potential(1.8) is a new line
| scalar. | ||
|
|
||
|
|
||
| .. figure:: /_static/tutorial_files/pred_results_plot.gif |
There was a problem hiding this comment.
Very nice results!!
Uh oh!
There was an error while loading. Please reload this page.