lime/polariton/cavity.py
def ham_ho(freq, n, ZPE=False):
    """
    input:
        freq: fundemental frequency in units of Energy
        n : size of matrix
    output:
        h: hamiltonian of the harmonic oscilator
    """
    
    if ZPE:
        energy = np.arange(n + 0.5) * freq
    else:
        energy = np.arange(n) * freq

    return np.diagflat(energy)

    input:
        freq: fundemental frequency in units of Energy
        n : size of matrix
    output:
        h: hamiltonian of the harmonic oscilator
    
fundemental frequency in units of Energy
n : size of matrix
output:
h: hamiltonian of the harmonic oscilator
fundemental frequency in units of Energy n : size of matrix output : h : hamiltonian of the harmonic oscilator
def ham_ho(freq, n, ZPE=False):
    if ZPE:
        energy = np.arange(n + 0.5) * freq
    else:
        energy = np.arange(n) * freq
    return np.diagflat(energy)
def ham_ho ( freq , n , ZPE = False ) : if ZPE : energy = np . arange ( n + 0.5 ) * freq else : energy = np . arange ( n ) * freq return np . diagflat ( energy )
input:
freq: fundemental frequency in units of Energy
n : size of matrix
output:
h: hamiltonian of the harmonic oscilator
input : freq : fundemental frequency in units of Energy n : size of matrix output : h : hamiltonian of the harmonic oscilator
"""
    input:
        freq: fundemental frequency in units of Energy
        n : size of matrix
    output:
        h: hamiltonian of the harmonic oscilator
    """
freq
n
ZPE