Giter VIP home page Giter VIP logo

c0rychu / schrodingereq_1d_tutorial Goto Github PK

View Code? Open in Web Editor NEW
38.0 1.0 15.0 41.29 MB

Solving Schrodinger Equation Numerically

Home Page: https://blog.gwlab.page/solving-1-d-schrodinger-equation-in-python-dcb3518ce454

Jupyter Notebook 93.84% Python 2.27% Makefile 0.32% C++ 3.56%
animation pde-solver python rk4 schrodinger schrodinger-equation schrodinger-equation-solution finite-difference physics physics-simulation

schrodingereq_1d_tutorial's Introduction

SchrodingerEq_1D_tutorial

Solving 1-D Schrodinger Equation Numerically in either Python or C++.
Please refer to this blog article for more detail explaination of the code.

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

schrodingereq_1d_tutorial's People

Contributors

c0rychu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.