File:Quantum simple pendulum.webm
Summary
Description |
English: A quantum simple pendulum.
The pendulum position is spread out, with opacity here being proportional to the probability that the pendulum is at that position at a given time. The average position of the quantum dynamics is the same as the classical pendulum dynamics (Ehrenfest theorem). Technicalities: I used the Crank-Nicholson method to evolve the system in time. This is a 1D problem, and the only variable I considered was the angle, with the initial state being a Gaussian. |
Date | |
Source | https://mathstodon.xyz/@j_bertolotti/112038394907883281 |
Author | Berto |
Permission (Reusing this file) |
https://mathstodon.xyz/@j_bertolotti/111363365323269417 |
Mathematica 14.0 code
L = 100; (*System size*) dx = 0.1; (*Space step*) dt = 0.0025; (*time step*) k0 = 0; (*Momentum of the incident packet*)
V1 = Table[50 (Cos[(2 \[Pi])/L x] + 1), {x, 0, L, dx}]; (*Potential*)
dim = Dimensions[V1][[1]]
(*For a undergraduate level explanation of why this works, see physik.uni-graz.at/~pep/Theses/BachelorThesis_Wachter_2017.pdf *)
\[Alpha] = (I dt)/(2 dx^2);
\[Xi]1 = Table[1 + (I dt)/2 (2/dx^2 + V1[[j]]), {j, 1, dim}];
\[Gamma]1 = Table[1 - (I dt)/2 (2/dx^2 + V1[[j]]), {j, 1, dim}];
U1 = SparseArray[{Band[{1, 1}] -> \[Xi]1, Band[{2, 1}] -> -\[Alpha], Band[{1, 2}] -> -\[Alpha]}, {dim, dim}];
U2 = SparseArray[{Band[{1, 1}] -> \[Gamma]1, Band[{2, 1}] -> \[Alpha], Band[{1, 2}] -> \[Alpha]}, {dim, dim}];
\[Psi]0 = Table[E^(-((x - L/2 + L/4)^2/(2 2^2))) E^(I k0 x), {x, 0, L, dx}]; (*Initial condiotion*)
\[Psi]0 = \[Psi]0/Sqrt[Total[Abs[\[Psi]0]^2]]; (*Normalization*)
nsteps = 20000; (*Number of time steps*)
U = Inverse[U1] . U2; (*Evolution operator*)
evo1 = NestList[Dot[U, #] &, \[Psi]0, nsteps]; (*Apply the evolution operator repeatedly to obtain the soltion at each time step*)
xTo\[Theta][x_] := x/dim 2 \[Pi];
timedim = Dimensions[evo1][[1]];
expect = Table[xTo\[Theta]@Range[dim] . Abs[evo1[[t]] ]^2, {t, 1, timedim, 1}];
frames = Table[
Graphics[{
Black, Thickness[0.02], Line[{{0, 0}, {Sin[expect[[timestep]]], Cos[expect[[timestep]]]}}], Disk[{Sin[expect[[timestep]]], Cos[expect[[timestep]]]}, 0.12],
White, Thickness[0.01], Line[{{0, 0}, {Sin[expect[[timestep]]], Cos[expect[[timestep]]]}}], Disk[{Sin[expect[[timestep]]], Cos[expect[[timestep]]]}, 0.11],
Thick, Black,
Table[{Opacity[5*Abs[evo1[[timestep, j]] ]^2], Line[{{0, 0}, {Sin[xTo\[Theta][j]], Cos[xTo\[Theta][j]]}}], Disk[{Sin[xTo\[Theta][j]], Cos[xTo\[Theta][j]]}, 0.1]}, {j, 1, dim}], Red, Point[{0, 0}]},
PlotRange -> {{-1.2, 1.2}, {-1.2, 1.2}}]
, {timestep, 1, timedim, 100}];
ListAnimate[frames]
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
![]() ![]() |
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
|