Skip to content

Commit

Permalink
def ham
Browse files Browse the repository at this point in the history
  • Loading branch information
HussainAther committed Apr 15, 2019
1 parent 4b1db6d commit 71b710d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions biophysics/photon.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ def quanta(n):
c, a = canda(n) # get the creation and annihilation eigenstates
m = np.abs(a)**2 # m is mean number of quanta
return np.exp(-m) * m**(n) / factorial(n)

def ham(p, q):
"""
Mechanistic realization of the harmonic oscillator as a mass m hangign
from a spring with p and q momentum and position of the mass.
"""

0 comments on commit 71b710d

Please sign in to comment.