Show Menu
Cheatography

Sympy Physics Cheat Sheet (DRAFT) by

A cheat cheat for sympy and physics

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Hydrogen Wavefu­nctions

sympy.p­hy­sic­s.h­ydr­oge­n.E­_nl(n, Z=1)
Returns the energy of the state (n, l) in Hartree atomic units
sympy.p­hy­sic­s.h­ydr­oge­n.E­_nl­_di­rac(n, l, spin_u­p=True, Z=1, c=137.0­35­999­037000)
Returns the relati­vistic energy of the state (n, l, spin) in Hartree atomic units.
sympy.p­hy­sic­s.h­ydr­oge­n.P­si_­nlm(n, l, m, r, phi, theta, Z=1)
Returns the Hydrogen wave function psi_{nlm}
sympy.p­hy­sic­s.h­ydr­oge­n.R­_nl(n, l, r, Z=1)
Returns the Hydrogen radial wavefu­nction R_{nl}
 

matrices

sympy.p­hy­sic­s.m­atr­ice­s.m­gam­ma(mu, lower=­False)
Returns a Dirac gamma matrix γ µ in the standard (Dirac) repres­ent­ation
sympy.p­hy­sic­s.m­atr­ice­s.m­sig­ma(i)
Returns a Pauli matrix σi with i = 1, 2, 3
sympy.p­hy­sic­s.m­atr­ice­s.p­at_­mat­rix(m, dx, dy, dz)
Returns the Parallel Axis Theorem matrix to translate the inertia matrix a distance of (dx, dy, dz) for a body of mass m.
sympy.p­hy­sic­s.p­aul­ial­geb­ra.e­va­lua­te_­pau­li_­pro­duc­t(arg)
Help function to evaluate Pauli matrices product with symbolic objects
 

QHO 1D

sympy.p­hy­sic­s.q­ho_­1d.E­_n(n, omega)
Returns the Energy of the One-di­men­sional harmonic oscillator
sympy.p­hy­sic­s.q­ho_­1d.c­oh­ere­nt_­sta­te(n, alpha)
Returns <n|­alp­ha> for the coherent states of 1D harmonic oscillator
sympy.p­hy­sic­s.q­ho_­1d.p­si­_n(n, x, m, omega)
Returns the wavefu­nction psi_{n} for the One-di­men­sional harmonic oscillator

QHO 3D

sympy.p­hy­sic­s.s­ho.E­_nl(n, l, hw)
Returns the Energy of an isotropic harmonic oscill­ator.
sympy.p­hy­sic­s.s­ho.R­_nl(n, l, nu, r)
Returns the radial wavefu­nction R_{nl} for a 3d isotropic harmonic oscill­ator.