Skip to content

Instantly share code, notes, and snippets.

@cburdine
cburdine / polarization_gradient.py
Last active November 29, 2021 01:43
Illustration of Polarization Gradient
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
def make_wave(_lambda=1.0, tau=1.0, e_x=0.0, e_y=0.0, b_x=0.0, b_y=0.0):
E_zt = lambda z,t : np.real(np.array([e_x, e_y, 0],dtype=np.complex128)* \
np.exp(2j*np.pi*(z/_lambda - t/tau))) + np.array([0,0,z])
B_zt = lambda z,t : np.real(np.array([b_x, b_y, 0],dtype=np.complex128)* \
np.exp(2j*np.pi*(z/_lambda - t/tau))) + np.array([0,0,z])
return E_zt, B_zt
@cburdine
cburdine / requirements.txt
Last active June 15, 2023 19:34
requirements.txt for the Materials+ML workshop
numpy
scipy
matplotlib
pandas
scikit-learn
tqdm
itables
ase
mp-api
torch
@cburdine
cburdine / gist:082d1b7cfb58b4c74432aeb24d48f936
Last active October 3, 2025 16:37
Student requirements.txt for Quantum Mechanics (Fall 2025)
numpy
scipy
matplotlib
sympy
pytest
jupyter