Skip to content

Commit

Permalink
trying to avoid the failure in macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
gsuarezr committed Nov 14, 2024
1 parent 1278271 commit 82747b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doc/guide/guide-environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Environments of Open Quantum Systems

.. _pm: https://www.menczel.net/
.. |pm| replace:: *Paul Menczel*
.. _gs: https://scholar.google.com/citations?user=yi6jJAQAAAAJ&hl=es
.. _gs: https://gsuarezr.github.io/
.. |gs| replace:: *Gerardo Suarez*
.. (this is a workaround for italic links in rst)
Expand Down
14 changes: 7 additions & 7 deletions qutip/core/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,13 +1339,13 @@ def _matsubara_params(self, Nk):
Om = np.sqrt(self.w0**2 - (self.gamma / 2)**2)
Gamma = self.gamma / 2

with np.errstate(divide='ignore'):
ck_real = ([
(self.lam**2 / (4 * Om))
* (1 / np.tanh((Om + 1j * Gamma) / (2*self.T))),
(self.lam**2 / (4 * Om))
* (1 / np.tanh((Om - 1j * Gamma) / (2*self.T))),
])
z = float('inf') if self.T == 0 else (Om + 1j * Gamma) / (2*self.T)
ck_real = ([
(self.lam**2 / (4 * Om))
* (1 / np.tanh(z)),
(self.lam**2 / (4 * Om))
* (1 / np.tanh(np.conjugate(z))),
])

ck_real.extend([
(-2 * self.lam**2 * self.gamma * self.T) * (2 * np.pi * k * self.T)
Expand Down

0 comments on commit 82747b3

Please sign in to comment.