marl0ny / QM-Simulator-2D

Interactive simulation of a quantum particle in 2D.

Home Page:https://marl0ny.github.io/QM-Simulator-2D/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quantum Mechanics in 2D

This WebGL program simulates the quantum mechanics of a single particle confined in a 2D box, where inside this box the user can create new potential barriers and scatter Gaussian wavepackets off them. Link to the full instructions.

The default integration method used in this simulation is described in page 690 of An Introduction to Computer Simulation Methods by H. Gould et al (which references an article by P. Visscher). This method basically involves splitting the complex-valued wave function into its real and imaginary components, where each component is updated separately for each time step. Some other numerical methods may be chosen as well, such as the Crank-Nicolson and Split-Operator method. Their usage are more fully described in the Integration Methods section of the instructions.

Also provided is a (work in progress) simulation of a 2D relativistic quantum particle using the Dirac equation. The Dirac equation is numerically solved by updating each of the two two-component spinors separately at staggered time and spatial steps. This method is found in an article by R. Hammer and W. Pötz. A separate Dirac simulation using the Split operator method instead of the method described above is available as well.

More experimental and less stable features are located on a separate branch. Note that this branch is not included in Github Pages, so you will need to download or pull from it separately.

Some basic examples are showcased in this YouTube playlist.

APIs and Frameworks Used

References

  • Gould, H., Tobochnik J., Christian W. (2007). Quantum Systems. In An Introduction to Computer Simulation Methods, chapter 16. Pearson Addison-Wesley.

  • Visscher, P. (1991). A fast explicit algorithm for the time‐dependent Schrödinger equation. Computers in Physics, 5, 596-598. https://doi.org/10.1063/1.168415

  • Schroeder D. Quantum Scattering in Two Dimensions.

Crank-Nicolson Method:

  • Wikipedia contributors. (2021, October 6). Crank-Nicolson method. In Wikipedia, The Free Encyclopedia.

  • Wikipedia contributors. (2021, August 1). Jacobi method. In Wikipedia, The Free Encyclopedia.

  • Sadovskyy I., Koshelev A., Phillips C., Karpeyev D., Glatz A. (2015). Stable large-scale solver for Ginzburg-Landau equations for superconductors. Journal of Computational Physics 294, 639-654. https://doi.org/10.1016/j.jcp.2015.04.002

Split-Step:

Dirac Equation:

  • Wikipedia contributors. (2021, June 16). Dirac equation. In Wikipedia, The Free Encyclopedia.

  • Wikipedia contributors. (2021, August 5). Dirac spinor. In Wikipedia, The Free Encyclopedia.

  • Hammer, R., Pötz W. (2014). Staggered grid leap-frog scheme for the (2 + 1)D Dirac equation. Computer Physics Communications, 185(1), 40-53. https://doi.org/10.1016/j.cpc.2013.08.013

Nonlinear Schrödinger Equation:

Laplacian Stencils:

Approximating the vector potential:

Fast Fourier Transform:

Hartree Atomic Units:

  • Wikipedia contributors. (2021, May 14). Hartree atomic units. In Wikipedia, The Free Encyclopedia.

Names of the Different Boundary Conditions:

About

Interactive simulation of a quantum particle in 2D.

https://marl0ny.github.io/QM-Simulator-2D/index.html

License:BSD 2-Clause "Simplified" License


Languages

Language:JavaScript 65.2%Language:GLSL 32.5%Language:HTML 1.6%Language:Python 0.7%