Skip to content

Instantly share code, notes, and snippets.

View ahmadabdulnasir's full-sized avatar
🏠
Working from home

Ahmad Abdulnasir Shuaib ahmadabdulnasir

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
__author__ = 'Ahmad Abdulnasir Shu'aib <me@ahmadabdulnasir.com.ng>'
__homepage__ = https://ahmadabdulnasir.com.ng
__copyright__ = 'Copyright (c) 2017, salafi'
__version__ = "0.01t"
"""
import uuid, time
@ahmadabdulnasir
ahmadabdulnasir / schrodingersim.py
Created February 12, 2018 17:08 — forked from martin2250/schrodingersim.py
Simulate Schrodinger Equation in 1D with python
#!/usr/bin/python
from __future__ import print_function
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
def D_wrap(A, dX):
d = A - np.roll(A, 1)
d = 0.5 * (d + np.roll(d, -1))