Environments of Open Quantum Systems
written by Paul Menczel and Gerardo Suarez
QuTiP can describe environments of open quantum systems. They can be passed to various solvers, where their influence is taken into account exactly or approximately. In the following, we will discuss bosonic and fermionic thermal environments. In our definitions, we follow [BoFiN23].
Note that currently, we only support a single coupling term per environment. If a more generalized coupling would be useful to you, please let us know on GitHub.
Bosonic Environments
A bosonic environment is described by a continuum of harmonic oscillators. The open quantum system and its environment are thus described by the Hamiltonian
(in the case of a single bosonic environment). Here, \(H_{\rm s}\) is the Hamiltonian of the open system and \(Q\) a system coupling operator. The sums enumerate the environment modes with frequencies \(\omega_k\) and couplings \(g_k\). The couplings are described by the spectral density
Equivalently, a bosonic environment can be described by its auto-correlation function
(where \(X(t)\) is the interaction picture operator) or its power spectrum
which is the inverse Fourier transform of the correlation function. The correlation function satisfies the symmetry relation \(C(-t) = C(t)^\ast\).
Assuming that the initial state is thermal with inverse temperature \(\beta\), in the continuum limit the correlation function and the power spectrum can be calculated from the spectral density via
Here, \(\operatorname{sign}(\omega) = \pm 1\) depending on the sign of \(\omega\). At zero temperature, these equations become \(C(t) = \int_0^\infty \frac{\mathrm d\omega}{\pi} J(\omega) \mathrm e^{-\mathrm i\omega t}\) and \(S(\omega) = 2 \Theta(\omega) J(|\omega|)\), where \(\Theta\) is the Heaviside function.
If the environment is coupled weakly to the open system, the environment induces quantum jumps with transition rates \(\gamma \propto S(-\Delta\omega)\), where \(\Delta\omega\) is the energy change in the system corresponding to the quantum jump. In the strong coupling case, QuTiP provides exact integration methods based on multi-exponential decompositions of the correlation function, see below.
Note
We generally assume that the frequencies \(\omega_k\) are all positive and hence \(J(\omega) = 0\) for \(\omega \leq 0\). To handle a spectral density \(J(\omega)\) with support at negative frequencies, one can use an effective spectral density \(J'(\omega) = J(\omega) - J(-\omega)\). This process might result in the desired correlation function, because
where \([\cdots]\) stands for the square brackets in Eq. (1). Note however that the derivation of Eq. (1) is not valid in this situation, since the environment does not have a thermal state.
Note
Note that the expressions provided above for \(S(\omega)\) are ill-defined at \(\omega=0\). For zero temperature, we simply have \(S(0) = 0\).
For non-zero temperature, one obtains
Hence, \(S(0)\) diverges if the spectral density is sub-ohmic.
Pre-defined Environments
Ohmic Environment
Ohmic environments can be constructed in QuTiP using the class OhmicEnvironment
.
They are characterized by spectral densities of the form
where \(\alpha\) is a dimensionless parameter that indicates the coupling strength, \(\omega_{c}\) is the cutoff frequency, and \(s\) is a parameter that determines the low-frequency behaviour. Ohmic environments are usually classified according to this parameter as
Sub-Ohmic (\(s<1\))
Ohmic (\(s=1\))
Super-Ohmic (\(s>1\)).
Note
In the literature, the Ohmic spectral density can often be found as \(J(\omega) = \alpha \frac{\omega^s}{\omega_c^{s-1}} f(\omega)\), where \(f(\omega)\) with \(\lim\limits_{\omega \to \infty} f(\omega) = 0\) is known as the cutoff function. The cutoff function ensures that the spectral density and its integrals (for example (1)) do not diverge. Sometimes, with sub-Ohmic spectral densities, an infrared cutoff is used as well so that \(\lim\limits_{\omega \to 0} J(\omega) = 0\). This pre-defined Ohmic environment class is restricted to an exponential cutoff function, which is one of the most commonly used in the literature. Other cutoff functions can be used in QuTiP with user-defined environments as explained below.
Substituting the Ohmic spectral density (2) into (1), the correlation function can be computed analytically:
where \(\beta\) is the inverse temperature, \(\Gamma\) the Gamma function, and \(\zeta\) the Hurwitz zeta function. The zero temperature case can be obtained by taking the limit \(\beta \to \infty\), which results in
The evaluation of the zeta function for complex arguments requires mpmath, so certain features of the Ohmic enviroment are only available if mpmath is installed.
Multi-exponential approximations to Ohmic environments can be obtained through
the fitting procedures approx_by_cf_fit
and approx_by_sd_fit
.
The following example shows how to create a sub-Ohmic environment, and how to use
approx_by_cf_fit
to fit the real and imaginary parts
of the correlation function with two exponential terms each.
import numpy as np
import qutip as qt
import matplotlib.pyplot as plt
# Define a sub-Ohmic environment with the given temperature, coupling strength and cutoff
env = qt.OhmicEnvironment(T=0.1, alpha=1, wc=3, s=0.7)
# Fit the correlation function with three exponential terms
tlist = np.linspace(0, 3, 250)
approx_env, info = env.approx_by_cf_fit(tlist, target_rsme=None, Nr_max=3, Ni_max=3, maxfev=1e8)
The environment approx_env created here could be used, for example, with the HEOM solver. The variable info contains info about the convergence of the fit; here, we will just plot the fit together with the analytical correlation function. Note that a larger number of exponential terms would have yielded a better result.
plt.plot(tlist, np.real(env.correlation_function(tlist)), label='Real part (analytic)')
plt.plot(tlist, np.real(approx_env.correlation_function(tlist)), '--', label='Real part (fit)')
plt.plot(tlist, np.imag(env.correlation_function(tlist)), label='Imag part (analytic)')
plt.plot(tlist, np.imag(approx_env.correlation_function(tlist)), '--', label='Imag part (fit)')
plt.xlabel('Time')
plt.ylabel('Correlation function')
plt.tight_layout()
plt.legend()
Drude-Lorentz Environment
Drude-Lorentz environments, also known as overdamped environments, can be constructed in QuTiP
using the class DrudeLorentzEnvironment
. They are characterized by spectral densities of the form
where \(\lambda\) is a coupling strength (with the dimension of energy) and \(\gamma\) the cutoff frequency.
To compute the corresponding correlation function, one can apply the Matsubara expansion:
The coefficients of this expansion are
The function approx_by_matsubara
creates a multi-exponential
approximation to the Drude-Lorentz environment by truncating this series at a finite index \(N_k\).
This approximation can then be used with the HEOM solver, for example.
The HEOM section of this guide contains further examples using the Drude-Lorentz enviroment.
Similarly, the function approx_by_pade
can be used to apply
and truncate the numerically more efficient Padé expansion.
Underdamped Environment
Underdamped environments can be constructed in QuTiP
using the class UnderDampedEnvironment
. They are characterized by spectral densities of the form
where \(\lambda\), \(\Gamma\) and \(\omega_0\) are the coupling strength (with dimension \((\text{energy})^{3/2}\)), the cutoff frequency and the resonance frequency.
Similar to the Drude-Lorentz environment, the correlation function can be approximated by a
Matsubara expansion. This functionality is available with the
approx_by_matsubara
function.
For small temperatures, the Matsubara expansion converges slowly. It is recommended to instead use a fitting procedure for the Matsubara contribution as described in [Lambert19].
User-Defined Environments
As stated in the introduction, a bosonic environment is fully characterized by its temperature and spectral density (SD), or alternatively by its correlation function (CF) or its power spectrum (PS). QuTiP allows for the creation of an user-defined environment by specifying either the spectral density, the correlation function, or the power spectrum.
QuTiP then computes the other two functions based on the provided one. To do so, it converts between the SD and the PS using the formula \(S(\omega) = \operatorname{sign}(\omega)\, J(|\omega|) \bigl[ \coth( \beta\omega / 2 ) + 1 \bigr]\) introduced earlier, and between the PS and the CF using the fast Fourier transform. The former conversion requires the bath temperature to be specified; the latter requires a cutoff frequency (or cutoff time) to be provided together with the specified function (SD, CF or PS). In this way, all characteristic functions can be computed from the specified one.
The following example manually creates an environment with an underdamped spectral density. It then compares the correlation function obtained via fast Fourier transformation with the Matsubara expansion. The slow convergence of the Matsubara expansion is visible around \(t=0\).
# Define underdamped environment parameters
T = 0.1
lam = 1
gamma = 2
w0 = 5
# User-defined environment based on SD
def underdamped_sd(w):
return lam**2 * gamma * w / ((w**2 - w0**2)**2 + (gamma*w)**2)
env = qt.BosonicEnvironment.from_spectral_density(underdamped_sd, wMax=50, T=T)
tlist = np.linspace(-2, 2, 250)
plt.plot(tlist, np.real(env.correlation_function(tlist)), label='FFT')
# Pre-defined environment and Matsubara approximations
env2 = qt.UnderDampedEnvironment(T, lam, gamma, w0)
for Nk in range(0, 11, 2):
approx_env = env2.approx_by_matsubara(Nk)
plt.plot(tlist, np.real(approx_env.correlation_function(tlist)), label=f'Nk={Nk}')
plt.xlabel('Time')
plt.ylabel('Correlation function (real part)')
plt.tight_layout()
plt.legend()
Multi-Exponential Approximations
Many approaches to simulating the dynamics of an open quantum system strongly coupled to an environment assume that the environment correlation function can be approximated by a multi-exponential expansion like
with small numbers \(N_{R,I}\) of exponents. Note that \(C_R(t)\) and \(C_I(t)\) are the real and imaginary parts of the correlation function, but the coefficients \(c^{R,I}_k\) and exponents \(\nu^{R,I}_k\) are not required to be real in general.
In the previous sections, various methods of obtaining multi-exponential approximations were introduced.
The output of these approximation functions are ExponentialBosonicEnvironment
objects.
An ExponentialBosonicEnvironment
is basically a collection of CFExponent
s, which store (in the bosonic case)
the coefficient, the exponent, and whether the exponent contributes to the real part, the imaginary part, or both.
As we have already seen above, one can then compute the spectral density, correlation function and power spectrum corresponding
to the exponents, in order to compare them to the original, exact environment.
Let \(c_k \mathrm e^{-\nu_k t}\) be a term in the correlation function (i.e., \(c_k = c^R_k\) or \(c_k = \mathrm i c^I_k\)). The corresponding term in the power spectrum is
and, if a temperature has been specified, the corresponding term in the spectral density can be computed as described above.
The following example shows how to manually create an ExponentialBosonicEnvironment
for the simple example
\(C(t) = c \mathrm e^{-\nu t}\) with real \(c\), \(\nu\). The power spectrum then is a Lorentzian,
\(S(\omega) = 2c\nu / (\nu^2 + \omega^2)\).
c = 1
nu = 2
wlist = np.linspace(-3, 3, 250)
env = qt.ExponentialBosonicEnvironment([c], [nu], [], [])
plt.figure(figsize=(4, 3))
plt.plot(wlist, env.power_spectrum(wlist))
plt.plot(wlist, 2 * c * nu / (nu**2 + wlist**2), '--')
plt.xlabel('Frequency')
plt.ylabel('Power spectrum')
plt.tight_layout()
Fermionic environments
The implementation of fermionic environments in QuTiP is not yet as advanced as the bosonic environments. Currently, user-defined fermionic environments and fitting are not implemented.
However, the overall structure of fermionic environments in QuTiP is analogous to the bosonic environments. There is one pre-defined fermionic environment, the Lorentzian environment, and multi-exponential fermionic environments. Lorentzian environments can be approximated by multi-exponential Matsubara or Padé expansions.
In the fermionic case, we consider the number-conserving Hamiltonian
where the bath operators \(b_k\) and the system operator \(c\) obey fermionic anti-commutation relations. In analogy to the bosonic case, we define the spectral density
which may however now be defined for all (including negative) frequencies, since the spectrum of each mode is bounded.
The fermionic environment is characterized either by its spectral density, inverse temperature \(\beta\) and chemical potential \(\mu\), or equivalently by two correlation functions or by two power spectra. The correlation functions are
where \(\sigma = \pm 1\), \(B^+ = B^\dagger\) and \(B^- = B\). Further, \(f_F(x) = (\mathrm e^x + 1)^{-1}\) is the Fermi-Dirac function. Note that we still have \(C^\sigma(-t) = C^\sigma(t)^\ast\). The power spectra are the Fourier transformed correlation functions,
Since \(f_F(x) + f_F(-x) = 1\), we have \(S^+(\omega) + S^-(\omega) = J(\omega)\).
Note
The relationship between the spectral density and the two power spectra (or the two correlation functions) is not one-to-one. A pair of functions \(S^\pm(\omega)\) is physical if they satisfy the condition
For the correlation functions, the condition becomes \(C^-(t) = \mathrm e^{-\beta\mu}\, C^+(t - \mathrm i\beta)^\ast\). For flexibility, we do not enforce the power spectra / correlation functions to be physical in this sense.
Lorentzian Environment
Fermionic Lorentzian environments are represented by the class LorentzianEnvironment
.
They are characterized by spectral densities of the form
where \(\gamma\) is the coupling strength, \(W\) the spectral width and \(\omega_0\) the resonance frequency. Often, the resonance frequency is taken to be equal to the chemical potential of the environment.
As with the bosonic Drude-Lorentz environments, multi-exponential approximations of the correlation functions,
can be obtained using the Matsubara or Padé expansions.
The functions approx_by_matsubara
and
approx_by_pade
implement these approximations in QuTiP,
yielding approximated environments that can be used, for example, with the HEOM solver.
Note that for this type of environment, the Matsubara expansion is very inefficient, converging much more slowly than the Padé expansion.
Typically, at least \(N_k \geq 20\) is required for good convergence.
For reference, we tabulate the values of the coefficients and exponents in the following. For the Matsubara expansion, they are
The Padé decomposition approximates the Fermi distribution as:
where \(\kappa_k\) and \(\epsilon_k\) are coefficients that depend on \(N_k\) and are defined in J. Chem Phys 133, “Efficient on the fly calculation of time correlation functions in computer simulations”. This approach results in the exponents
Multi-Exponential Fermionic Environment
Analogous to the ExponentialBosonicEnvironment
in the bosonic case, the ExponentialFermionicEnvironment
describes fermionic environments
where the correlation functions are given by multi-exponential decompositions,
Like in the bosonic case, the class allows us to automatically compute the spectral density and power spectra that correspond to the multi-exponential correlation functions. In this case, they are
and \(J(\omega) = S^+(\omega) + S^-(\omega)\).