SigmaAdrich / SchrodingerEq_1D_tutorial

Solving Schrodinger Equation Numerically

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Languages

Language:Jupyter Notebook 93.9%Language:C++ 3.6%Language:Python 2.3%Language:Makefile 0.3%