Skip to content

bruno-who-likes/SchrodingerEq_1D_tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SchrodingerEq_1D_tutorial

Solving Schrodinger Equation Numerically in Python

Files

  • SchrodingerEq_1D_tutorial.ipynb A tutorial of solving 1-D Schrodinger equation. (Simple-Harmonic-Oscillator)
  • step_potential/step_potential.py A script to generate the animation that shows a wave-packet scattered by a step-potential.
  • step_potential_cpp/step_potential_rk4.cpp The C++ source code for simulating a wave-packet scattered by a step-potential.
  • step_potential_cpp/plot.py A script to generate the animation from the result of step_potential_rk4.

Environment (macOS, suggested)

  1. Install MacPort
  2. Install ffmpeg (for MP4)
sudo port install ffmpeg +gpl +postproc +lame +theora +libogg +vorbis +xvid +x264 +a52 +faac +faad +dts +nonfree
  1. Install Miniconda
  2. Install Python packages
conda install numpy scipy matplotlib jupyter ipython imagemagick
  1. conda activate
  2. jupyter-notebook

Environment for C++ version (macOS, suggested)

  1. Install Eigen
# macOS
sudo port install eigen3

# Ubuntu
sudo apt install libeigen3-dev
  1. Modify step_potential_cpp/Makefile with proper path to your Eigen installation.
  2. Compile
cd step_potential_cpp
make
  1. Run and generate plots(animations)
cd step_potential_cpp
./step_potential_rk4
conda activate
./plot.py

About

Solving Schrodinger Equation Numerically

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 93.8%
  • C++ 3.6%
  • Python 2.3%
  • Makefile 0.3%