Skip to content

Commit

Permalink
revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gsuarezr committed Nov 27, 2023
1 parent 65a8299 commit ca7095a
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 141 deletions.
26 changes: 9 additions & 17 deletions qutip/solver/heom/bofin_baths.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ class Bath:
All of the parameters are available as attributes.
"""

def __init__(self, exponents):
self.exponents = exponents

Expand Down Expand Up @@ -231,7 +230,6 @@ class BosonicBath(Bath):
bath). It defaults to None but can be set to help identify which
bath an exponent is from.
"""

def _check_cks_and_vks(self, ck_real, vk_real, ck_imag, vk_imag):
if len(ck_real) != len(vk_real) or len(ck_imag) != len(vk_imag):
raise ValueError(
Expand Down Expand Up @@ -372,7 +370,6 @@ class DrudeLorentzBath(BosonicBath):
bath). It defaults to None but can be set to help identify which
bath an exponent is from.
"""

def __init__(
self, Q, lam, gamma, T, Nk, combine=True, tag=None,
):
Expand Down Expand Up @@ -479,7 +476,6 @@ class DrudeLorentzPadeBath(BosonicBath):
bath). It defaults to None but can be set to help identify which
bath an exponent is from.
"""

def __init__(
self, Q, lam, gamma, T, Nk, combine=True, tag=None
):
Expand Down Expand Up @@ -569,8 +565,8 @@ def _delta(self, i, j):

def _calc_eps(self, Nk):
alpha = np.diag([
1. / np.sqrt((2 * k + 5) * (2 * k + 3))
for k in range(2 * Nk - 1)
1. / np.sqrt((2 * k + 5) * (2 * k + 3))
for k in range(2 * Nk - 1)
], k=1)
alpha += alpha.transpose()
evals = eigvalsh(alpha)
Expand All @@ -579,8 +575,8 @@ def _calc_eps(self, Nk):

def _calc_chi(self, Nk):
alpha_p = np.diag([
1. / np.sqrt((2 * k + 7) * (2 * k + 5))
for k in range(2 * Nk - 2)
1. / np.sqrt((2 * k + 7) * (2 * k + 5))
for k in range(2 * Nk - 2)
], k=1)
alpha_p += alpha_p.transpose()
evals = eigvalsh(alpha_p)
Expand All @@ -592,7 +588,6 @@ class _DrudeLorentzTerminator:
""" A class for calculating the terminator of a Drude-Lorentz bath
expansion.
"""

def __init__(self, Q, lam, gamma, T):
self.Q = Q
self.lam = lam
Expand Down Expand Up @@ -657,7 +652,6 @@ class UnderDampedBath(BosonicBath):
bath). It defaults to None but can be set to help identify which
bath an exponent is from.
"""

def __init__(
self, Q, lam, gamma, w0, T, Nk, combine=True, tag=None,
):
Expand Down Expand Up @@ -834,7 +828,6 @@ class LorentzianBath(FermionicBath):
bath). It defaults to None but can be set to help identify which
bath an exponent is from.
"""

def __init__(self, Q, gamma, w, mu, T, Nk, tag=None):
ck_plus, vk_plus = self._corr(gamma, w, mu, T, Nk, sigma=1.0)
ck_minus, vk_minus = self._corr(gamma, w, mu, T, Nk, sigma=-1.0)
Expand Down Expand Up @@ -913,7 +906,6 @@ class LorentzianPadeBath(FermionicBath):
bath). It defaults to None but can be set to help identify which
bath an exponent is from.
"""

def __init__(self, Q, gamma, w, mu, T, Nk, tag=None):
ck_plus, vk_plus = self._corr(gamma, w, mu, T, Nk, sigma=1.0)
ck_minus, vk_minus = self._corr(gamma, w, mu, T, Nk, sigma=-1.0)
Expand Down Expand Up @@ -970,8 +962,8 @@ def _delta(self, i, j):

def _calc_eps(self, Nk):
alpha = np.diag([
1. / np.sqrt((2 * k + 3) * (2 * k + 1))
for k in range(2 * Nk - 1)
1. / np.sqrt((2 * k + 3) * (2 * k + 1))
for k in range(2 * Nk - 1)
], k=1)
alpha += alpha.transpose()

Expand All @@ -981,10 +973,10 @@ def _calc_eps(self, Nk):

def _calc_chi(self, Nk):
alpha_p = np.diag([
1. / np.sqrt((2 * k + 5) * (2 * k + 3))
for k in range(2 * Nk - 2)
1. / np.sqrt((2 * k + 5) * (2 * k + 3))
for k in range(2 * Nk - 2)
], k=1)
alpha_p += alpha_p.transpose()
evals = eigvalsh(alpha_p)
chi = [-2. / val for val in evals[0: Nk - 1]]
return chi
return chi
Loading

0 comments on commit ca7095a

Please sign in to comment.