Skip to content

๐Ÿซ 2D quantum particle

JavaScriptThree.js

This demo visualizes the stationary eigenstates belonging to the Hamiltonian of a 2D quantum particle:

iโ„โˆ‚ฯˆ(x,y,t)โˆ‚t=[โˆ’โ„22m(โˆ‚2โˆ‚x2+โˆ‚2โˆ‚y2)+V(x,y)]ฯˆ(x,y,t)i\hbar \frac{\partial \psi (x,y,t)}{\partial t}=\left[ -\frac{\hbar ^{2}}{2m}\left(\frac{\partial ^{2}}{\partial x^{2}}+\frac{\partial ^{2}}{\partial y^{2}}\right)+V(x,y) \right]\psi (x,y,t)

Where:

  • ฯˆ(x,y,t)\psi(x, y, t) is the wave function of the system.
  • โˆ‚2/โˆ‚x2+โˆ‚2/โˆ‚y2=โˆ‡2\partial^2/\partial x^2 + \partial^2/\partial y^2 = \nabla^2 is the 2D Laplacian operator.
  • โ„\hbar is the reduced Planckโ€™s constant, set to 11 in the code.
  • mm is the mass of the particle, set to 11 in the code.
  • V(x,y)V(x, y) is the potential energy function, e.g. an isotropic harmonic oscillator potential:
V(x,y)=12k(x2+y2)V(x,y)=\dfrac{1}{2}k(x^2+y^2)
Source

Select different eigenstates to explore how their amplitude and phase form distinct wave-like patterns, including the characteristic lobes and nodes of quantum wavefunctions.

The solver implements the so-called Lanczos algorithm featuring full reorthogonalization, matrix-free Hamiltonian application, Ritz vectors, eigenvalue ordering, residual checks and QL-diagonalization.

For the isotropic harmonic oscillator, the analytic energies are given by k(nx+ny+1)\sqrt{k}(n_x +n_y+1) with k=0.05k=0.05:

nx+nyn_x+n_ydegeneracyanalytic EnE_ncalulated EnE_n
010.223610.22354
120.447210.44701, 0.44701
230.670820.67043, 0.67043, 0.67049
340.894430.89391, 0.89391, 0.89433, 0.89433
451.118031.11733, 1.11780, 1.11780, 1.12074, 1.12074

The degeneracies arise because e.g. the second level can be formed in two ways (nx=0,ny=1n_x=0, n_y=1 and nx=1,ny=0n_x=1, n_y=0), the third level in three ways (nx=0,ny=2n_x=0, n_y=2, nx=1,ny=1n_x=1, n_y=1, nx=2,ny=0n_x=2, n_y=0), etc.

The small differences between the energies of the degenerate shells are a consequence of the discrete numeric representation on a finite lattice. The differences with the analytic values increase with the energy levels, which is expected for a numeric solver like this. However, they are still extremely small, e.g. in the order of 0.06 % for the highest energy levels.

The analytic expression for the energies are now given by:

Enx,ny=ฯ€2โ„22mL2(nx2+ny2),nx,ny=1,2,โ€ฆE_{n_x,n_y} = \frac{\pi^2\hbar^2}{2mL^2}(n_x^2+n_y^2), \qquad n_x,n_y=1,2,\ldots

In the code we configured the constants to be:

hbar = 1
m = 1
N = 110
extent = 0.15 * (N - 1) = 16.35

So the fundamental unit of energy is:

E0=ฯ€22L2โ‰ˆ0.01845E_0=\frac{\pi^2}{2L^2} \approx 0.01845

This leads to the following result:

nx2+ny2n_x^2+n_y^2degeneracyanalytic EOur E
210.036900.03692
520.092250.09228
820.147600.14764
1010.184500.18450
1320.239850.23986
1720.313650.31349
1810.332100.33207
2020.369000.36885
2520.461250.46107

The degeneracies are in accordance with theory:

0.0369177 1
0.0922788 0.0922788 2
0.1476400 1
0.1844963 0.1844963 2
0.2398575 0.2398575 2
...

Also note that the InfiniteSquareWell in our code is realised by imposing a boundary condition on the Hamiltonian.apply():

static withoutParameters = () => /** @type {SingleParticle} */ particle => 0;

As such, it is not genuine potential barrier, but a boundary condition on the domain:

for (let y = 1; y < ny - 1; y++)
for (let x = 1; x < nx - 1; x++)

This is the correct way to represent an infinite square well with Dirichlet boundary conditions and makes this test useful to test both our Lanczos-solver, as well as the implementation of the discrete Laplace-operator + boundary conditions.