quantum-visualizations / qmsolve

⚛️ A module for solving and visualizing the Schrödinger equation.
BSD 3-Clause "New" or "Revised" License
931 stars 119 forks source link

Solving the Schrodinger Equation in SI untis. #32

Open gratisnotas opened 9 months ago

gratisnotas commented 9 months ago

It is not clear from the examples how to solve the Schrodinger equation in SI units from the examples. Could you please clarify on this?

rafael-fuente commented 9 months ago

This solver uses Hartree atomic units by default, which are more convenient for atomic scale computations.

Common SI unit factor conversions are found here. If you have the constants of your system specified in SI units, let's say, for example, 0.05 Joules, for converting to atomic units, you need to import the J constant and multiply your SI specified energy by it and will be converted to qmsolve atomic energy units (hartrees).

from qmsolve import J
energy = 0.05*J

More commonly energy of quantum systems are specified in eV. In the quantum harmonic oscillator example the oscillator k constant is specified eV / Å2. When multiplied by these two conversion factors, the k constant will be numerically expressed in atomics units, hartrees/bohr_radius 2