All Projects → FelixDesrochers → Numerov

FelixDesrochers / Numerov

Licence: MIT license
A python script that solves the one dimensional time-independent Schrodinger equation for bound states. The script uses a Numerov method to solve the differential equation and displays the desired energy levels and a figure with an approximate wave function for each of these energy levels.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Numerov

SchrodingerWellPython
2D 3D Time independent FDM Schrodinger equation solver for arbitrary shape of well
Stars: ✭ 21 (-60.38%)
Mutual labels:  quantum-mechanics, schrodinger-equation
Python-2D-Simulation-of-Schrodinger-Equation
Une simulation de l'évolution d'un paquet d'onde gaussien
Stars: ✭ 39 (-26.42%)
Mutual labels:  quantum-mechanics, schrodinger-equation
Quantica.jl
Simulation of quantum systems on a lattice
Stars: ✭ 24 (-54.72%)
Mutual labels:  quantum-mechanics
spicyphysics
Sup bois, here's my work
Stars: ✭ 22 (-58.49%)
Mutual labels:  quantum-mechanics
Quantum-Computing-Collection-Of-Resources
A Well Maintained Repository On Quantum Computing Resources [Code+Theory] Updated Regularly During My Time At IBM, Qubit x Qubit And The Coding School's Introduction To Quantum Computing Course '21
Stars: ✭ 183 (+245.28%)
Mutual labels:  quantum-mechanics
FastExpm.jl
Implementation of a fast exponential matrix for large matrices (full and sparse)
Stars: ✭ 22 (-58.49%)
Mutual labels:  quantum-mechanics
OpenJij
OpenJij : Framework for the Ising model and QUBO.
Stars: ✭ 57 (+7.55%)
Mutual labels:  quantum-mechanics
mbsolve
An open-source solver tool for the Maxwell-Bloch equations.
Stars: ✭ 14 (-73.58%)
Mutual labels:  quantum-mechanics
marburg
physics meets neural networks
Stars: ✭ 93 (+75.47%)
Mutual labels:  quantum-mechanics
miniqubit
Quantum emulator of the IBM Quantum experience
Stars: ✭ 24 (-54.72%)
Mutual labels:  quantum-mechanics
NumQM Basic
A mini-course offered to Undergrad physics students
Stars: ✭ 35 (-33.96%)
Mutual labels:  quantum-mechanics
krotov
Python implementation of Krotov's method for quantum optimal control
Stars: ✭ 46 (-13.21%)
Mutual labels:  quantum-mechanics
chemlib
🧪 A comprehensive chemistry library for Python.
Stars: ✭ 26 (-50.94%)
Mutual labels:  quantum-mechanics
qmflows
This library tackles the construction and efficient execution of computational chemistry workflows
Stars: ✭ 35 (-33.96%)
Mutual labels:  quantum-mechanics
IonSim.jl
a simple tool for simulating trapped ion systems
Stars: ✭ 46 (-13.21%)
Mutual labels:  quantum-mechanics
Qu.js
Quantum Computing for Humans!
Stars: ✭ 15 (-71.7%)
Mutual labels:  quantum-mechanics
QuantumOptics.jl-examples
Examples for QuantumOptics.jl
Stars: ✭ 16 (-69.81%)
Mutual labels:  quantum-mechanics
Schroedinger
A Schroedinger Equation solver in C++, with flexible basis definition
Stars: ✭ 31 (-41.51%)
Mutual labels:  quantum-mechanics
TimeEvolvingMPO
A Python 3 package to efficiently compute non-Markovian open quantum systems.
Stars: ✭ 43 (-18.87%)
Mutual labels:  computational-physics
qrefine
Quantum Refinement Module
Stars: ✭ 13 (-75.47%)
Mutual labels:  quantum-mechanics

Numerov

A python script that solves the one dimensional time-independent Schrodinger equation for bound states. The script uses a Numerov method to solve the differential equation and displays the desired energy levels and a figure with an approximate wave function for each of these energy levels.

Running

To run this code simply clone this repository and run the Numerov.py script with python (the numpy and matplotlib modules are required):

$ git clone https://github.com/FelixDesrochers/Numerov/
$ cd Numerov
$ python Numerov.py

Then the program will ask you to enter the number of energy levels you want to display and the desired potential (make sure that the potential is approximately centered at x=0):

$ >> Which first energy levels do you want (enter an integer) : 4
$ >> Potential (as a fonction of x): 3*(x^4)-2*(x^3)-6*(x^2)+x+5

Note: The programm may sometimes display less energy levels than what has been asked. To solve this problem modify the values of x_V_min and x_V_max in the parameters section of the Numerov.py script.

Examples

Harmonic Oscillator

For instance, if we want the energy levels for the quantum harmonic oscillator we would run the following commands:

$ python Numerov.py
$ >> Which first energy levels do you want (enter an integer) : 8
$ >> Potential (as a fonction of x): x**2

The program then displays the following figure:

And the following energies (please note that these are obtained using atomic units, see https://en.wikipedia.org/wiki/Atomic_units for more details):

Energy level 0 : 0.707658207399
Energy level 1 : 2.12132034435
Energy level 2 : 3.5355339059
Energy level 3 : 4.94974746826
Energy level 4 : 6.36396103051
Energy level 5 : 7.77817459266
Energy level 6 : 9.19238815459
Energy level 7 : 10.6066017163

Other Examples

This program can also solve the Schrödinger equation for all sorts of unorthodox problems such as the double-well potential or the absolute value potential.

Double-Well Potential

For a "double-well potential" with the following input,

$ python Numerov.py
$ >> Which first energy levels do you want (enter an integer) : 7
$ >> Potential (as a fonction of x): (x^4)-6*(x^2)+9

we get the following results:

Energy level 0 : 2.35727297545
Energy level 1 : 2.35937176485
Energy level 2 : 6.54881394689
Energy level 3 : 6.68442950475
Energy level 4 : 9.41561275062
Energy level 5 : 10.6784965326
Energy level 6 : 12.8773418447

Absolute value potential

And for the absolute value potential (V(x)=|x|), we get:

Energy level 0 : 0.81639999999
Energy level 1 : 1.85575743448
Energy level 2 : 2.57809582976
Energy level 3 : 3.24460762395
Energy level 4 : 3.82571482969
Energy level 5 : 4.38167123906
Energy level 6 : 4.89181971232
Energy level 7 : 5.38661378006
Energy level 8 : 5.8513002713
Energy level 9 : 6.30526300457

Algorithm

All informations about the used algorithm are described in the explain_algorithm.pdf file (incomplete).

Contributing

I am open to any improvement suggestion or contribution. If you wish to contribute to this repository just follow these simple steps:

  1. Fork it (https://github.com/yourname/yourproject/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License

MIT - http://alco.mit-license.org

(See the LICENSE.md for more informations)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].