Qmsolve

This is an attempt at making a robust, easy to use solver, capable of solving and visualizing the Schrödinger equation for multiple particles, and representing the solutions both in 1D, 2D, and 3D.

The way this simulator works is by discretizing the Hamiltonian of an arbitrary potential and diagonalizing it for getting the energies and eigenstates of the system. It also features the possibility of interactively visualizing a superposition of the computed eigenstastes and studying the time dependence of the resulting wavefunction.

This is work in progress. Stay up to date about the next features!

Installation

Just clone or download this repo. The package requirements are:

  1. numpy
  2. matplotlib
  3. scipy
  4. mayavi (only for 3D simulations)

Examples

Just run from the command line the corresponding Python scripts:

python 1D_harmonic_oscillator.py

1D_harmonic_oscillator

python 3D_two_gaussian_wells.py

3D_two_gaussian_wells

python 3D_four_gaussian_wells.py

3D_four_gaussian_wells
python 1D_interactive_fermions_HO.py

1D_interactive_fermions

python 1D_non_interactive_fermions_HO.py

1D_non_interactive_fermions

In the examples from above you can check how in the non interactive case the energy levels are equally spaced and degenerated, however in the interactive case the degeneracy is broken. As a starting point I suggest you to modify the confinement and the interaction potential to see what happens!

The interface use Hartree atomic units for input. In the file constants.py there is a list of common conversion factors from other units, that can be imported and used to build your potential.

3D examples are considerably faster when using a GPU. GPU acceleration requires having CuPy and CUDA installed in your computer.

To use GPU acceleration in your 3D simulations, add the argument method ='lobpcg-cupy' in the Hamiltonian solve method. For example:

eigenstates = H.solve( max_states = 100, method ='lobpcg-cupy')

GitHub

https://github.com/quantum-visualizations/qmsolve