From ad7c64f6ff646427d70d9b383c17a4e22aed07dc Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Tue, 5 Nov 2024 04:26:16 +0000 Subject: [PATCH] build based on 274e7fa --- dev/.documenter-siteinfo.json | 2 +- dev/ADOs/index.html | 2 +- dev/LS_solvers/index.html | 2 +- dev/ODE_solvers/index.html | 2 +- dev/Parity/index.html | 2 +- dev/bath_boson/Boson_Drude_Lorentz/index.html | 2 +- dev/bath_boson/bosonic_bath_intro/index.html | 4 +- .../bosonic_bath_RWA_intro/index.html | 4 +- dev/bath_fermion/Fermion_Lorentz/index.html | 2 +- .../fermionic_bath_intro/index.html | 4 +- dev/cite/index.html | 2 +- .../SIAM/{7cb8f740.svg => ab51402f.svg} | 68 ++++----- dev/examples/SIAM/index.html | 2 +- .../cavityQED/{1923f9bc.svg => 042163bd.svg} | 64 ++++----- .../cavityQED/{14d27de2.svg => 0c68febc.svg} | 76 +++++----- .../cavityQED/{f76d671f.svg => 7e090e91.svg} | 64 ++++----- .../cavityQED/{6884d3ca.svg => ea1e51c4.svg} | 132 +++++++++--------- .../cavityQED/{4c76fb07.svg => ffe7798a.svg} | 132 +++++++++--------- dev/examples/cavityQED/index.html | 10 +- .../{6d37a450.svg => 449cd2ee.svg} | 72 +++++----- .../{2606f3eb.svg => b579872b.svg} | 54 +++---- dev/examples/dynamical_decoupling/index.html | 4 +- .../{5c550e60.svg => ffac93e7.svg} | 56 ++++---- dev/examples/electronic_current/index.html | 2 +- .../{cccad2fa.svg => 16f67f00.svg} | 62 ++++---- .../{f2432c6d.svg => fe0642f0.svg} | 54 +++---- dev/examples/quick_start/index.html | 4 +- dev/extensions/CUDA/index.html | 2 +- dev/heom_matrix/HEOMLS_intro/index.html | 2 +- dev/heom_matrix/M_Boson/index.html | 2 +- dev/heom_matrix/M_Boson_Fermion/index.html | 2 +- dev/heom_matrix/M_Fermion/index.html | 2 +- dev/heom_matrix/master_eq/index.html | 2 +- dev/heom_matrix/schrodinger_eq/index.html | 2 +- dev/hierarchy_dictionary/index.html | 2 +- dev/index.html | 2 +- dev/install/index.html | 2 +- dev/libraryAPI/index.html | 24 ++-- dev/search_index.js | 2 +- dev/spectrum/index.html | 6 +- dev/stationary_state/index.html | 8 +- dev/time_evolution/index.html | 6 +- 42 files changed, 475 insertions(+), 475 deletions(-) rename dev/examples/SIAM/{7cb8f740.svg => ab51402f.svg} (82%) rename dev/examples/cavityQED/{1923f9bc.svg => 042163bd.svg} (84%) rename dev/examples/cavityQED/{14d27de2.svg => 0c68febc.svg} (87%) rename dev/examples/cavityQED/{f76d671f.svg => 7e090e91.svg} (84%) rename dev/examples/cavityQED/{6884d3ca.svg => ea1e51c4.svg} (91%) rename dev/examples/cavityQED/{4c76fb07.svg => ffe7798a.svg} (91%) rename dev/examples/dynamical_decoupling/{6d37a450.svg => 449cd2ee.svg} (91%) rename dev/examples/dynamical_decoupling/{2606f3eb.svg => b579872b.svg} (93%) rename dev/examples/electronic_current/{5c550e60.svg => ffac93e7.svg} (89%) rename dev/examples/quick_start/{cccad2fa.svg => 16f67f00.svg} (91%) rename dev/examples/quick_start/{f2432c6d.svg => fe0642f0.svg} (89%) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index c9110334..45309256 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-04T03:00:05","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-05T04:26:10","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/ADOs/index.html b/dev/ADOs/index.html index 163675ad..479ea7a3 100644 --- a/dev/ADOs/index.html +++ b/dev/ADOs/index.html @@ -29,4 +29,4 @@ # with a list contains many ADOs ados_list::Vector{ADOs} -Elist = expect(A, ados_list)

Here, Elist contains the expectation values corresponding to the ados_list.

+Elist = expect(A, ados_list)

Here, Elist contains the expectation values corresponding to the ados_list.

diff --git a/dev/LS_solvers/index.html b/dev/LS_solvers/index.html index 8a02003f..89ea315c 100644 --- a/dev/LS_solvers/index.html +++ b/dev/LS_solvers/index.html @@ -2,4 +2,4 @@ LinearSolve solvers · Documentation | HierarchicalEOM.jl

LinearSolve solvers

In this page, we list several recommended solvers provided by LinearSolve.jl for solving steadystate and spectrum in hierarchical equations of motion approach.

Remember to import LinearSolve.jl

using LinearSolve

(click here to see the full solver list provided by LinearSolve.jl)

UMFPACKFactorization (Default solver)

This solver performs better when there is more structure to the sparsity pattern (depends on the complexity of your system and baths).

UMFPACKFactorization()

KLUFactorization

This solver performs better when there is less structure to the sparsity pattern (depends on the complexity of your system and baths).

KLUFactorization()

A generic BICGSTAB implementation from Krylov

KrylovJL_BICGSTAB()

Pardiso

This solver is based on Intel openAPI Math Kernel Library (MKL) Pardiso

Note

Using this solver requires adding the package Pardiso.jl, i.e. using Pardiso

using Pardiso
 using LinearSolve
 MKLPardisoFactorize()
-MKLPardisoIterate()
+MKLPardisoIterate() diff --git a/dev/ODE_solvers/index.html b/dev/ODE_solvers/index.html index e4413513..1ba96e30 100644 --- a/dev/ODE_solvers/index.html +++ b/dev/ODE_solvers/index.html @@ -1,2 +1,2 @@ -DifferentialEquations solvers · Documentation | HierarchicalEOM.jl

DifferentialEquations solvers

In this page, we list several recommended solvers provided by DifferentialEquations.jl for solving time evolution in hierarchical equations of motion approach.

Remember to import OrdinaryDiffEq.jl (or DifferentialEquations.jl)

using OrdinaryDiffEq ## or "using DifferentialEquations" 

(click here to see the full solver list provided by DifferentialEquations.jl)

For any extra solver options, we can add it in the function HEOMsolve with keyword arguments. These keyword arguments will be directly pass to the solvers in DifferentialEquations (click here to see the documentation for the common solver options)

DP5 (Default solver)

Dormand-Prince's 5/4 Runge-Kutta method. (free 4th order interpolant)

DP5()

RK4

The canonical Runge-Kutta Order 4 method. Uses a defect control for adaptive stepping using maximum error over the whole interval.

RK4()

Tsit5

Tsitouras 5/4 Runge-Kutta method. (free 4th order interpolant).

Tsit5()

Vern7

Verner's “Most Efficient” 7/6 Runge-Kutta method. (lazy 7th order interpolant).

Vern7()

Vern9

Verner's “Most Efficient” 9/8 Runge-Kutta method. (lazy 9th order interpolant)

Vern9()
+DifferentialEquations solvers · Documentation | HierarchicalEOM.jl

DifferentialEquations solvers

In this page, we list several recommended solvers provided by DifferentialEquations.jl for solving time evolution in hierarchical equations of motion approach.

Remember to import OrdinaryDiffEq.jl (or DifferentialEquations.jl)

using OrdinaryDiffEq ## or "using DifferentialEquations" 

(click here to see the full solver list provided by DifferentialEquations.jl)

For any extra solver options, we can add it in the function HEOMsolve with keyword arguments. These keyword arguments will be directly pass to the solvers in DifferentialEquations (click here to see the documentation for the common solver options)

DP5 (Default solver)

Dormand-Prince's 5/4 Runge-Kutta method. (free 4th order interpolant)

DP5()

RK4

The canonical Runge-Kutta Order 4 method. Uses a defect control for adaptive stepping using maximum error over the whole interval.

RK4()

Tsit5

Tsitouras 5/4 Runge-Kutta method. (free 4th order interpolant).

Tsit5()

Vern7

Verner's “Most Efficient” 7/6 Runge-Kutta method. (lazy 7th order interpolant).

Vern7()

Vern9

Verner's “Most Efficient” 9/8 Runge-Kutta method. (lazy 9th order interpolant)

Vern9()
diff --git a/dev/Parity/index.html b/dev/Parity/index.html index f13a83e4..8e362e36 100644 --- a/dev/Parity/index.html +++ b/dev/Parity/index.html @@ -21,4 +21,4 @@ ODD * EVEN # gives ODD ODD * ODD # gives EVEN !EVEN # gives ODD -!ODD # gives EVEN +!ODD # gives EVEN diff --git a/dev/bath_boson/Boson_Drude_Lorentz/index.html b/dev/bath_boson/Boson_Drude_Lorentz/index.html index 2f13edd5..28aef926 100644 --- a/dev/bath_boson/Boson_Drude_Lorentz/index.html +++ b/dev/bath_boson/Boson_Drude_Lorentz/index.html @@ -19,4 +19,4 @@ W # band-width of the environment kT # the product of the Boltzmann constant k and the absolute temperature T N # Number of exponential terms -bath = Boson_DrudeLorentz_Pade(Vs, Δ, W, kT, N - 1) +bath = Boson_DrudeLorentz_Pade(Vs, Δ, W, kT, N - 1) diff --git a/dev/bath_boson/bosonic_bath_intro/index.html b/dev/bath_boson/bosonic_bath_intro/index.html index 3a217b0d..28b2b869 100644 --- a/dev/bath_boson/bosonic_bath_intro/index.html +++ b/dev/bath_boson/bosonic_bath_intro/index.html @@ -1,6 +1,6 @@ Introduction · Documentation | HierarchicalEOM.jl

Bosonic Bath

Overview

The BosonBath object describes the interaction between the system ($s$) and a exterior bosonic environment ($b$), which can be modeled by

\[H_{sb}=V_{s}\sum_k g_k (b_k + b_k^\dagger),\]

in terms of the coupling strength $g_k$ and the annihilation (creation) operator $b_k (b_k^\dagger)$ associated to the $k$-th mode of the bosonic environment. Here, $V_s$ refers to the system-interaction operator. In particular, $V_s$ must be a Hermitian operator which can act on both bosonic and fermionic systems degree of freedom. In the fermionic system case, $V_s$ must have even parity to be compatible with charge conservation.

The effects of a bosonic environment (initially in thermal equilibrium and linearly coupled to the system) are completely encoded in the two-time correlation functions, namely

\[C(t_1, t_2) -=\frac{1}{2\pi}\int_{0}^{\infty} d\omega J(\omega)\left[n(\omega)e^{i\omega (t_1-t_2)}+(n(\omega)+1)e^{-i\omega (t_1-t_2)}\right],\]

where $J(\omega)=2\pi\Sigma_k |g_k|^2 \delta(\omega-\omega_k)$ is the spectral density of the bath and $n(\omega)=\{\exp(\omega/k_B T)-1\}^{-1}$ represents the Bose-Einstein distribution.

A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely

\[C(t_1, t_2)=\sum_i \eta_i e^{-\gamma_i (t_1-t_2)}.\]

This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).

Construct BosonBath (with real and imaginary parts are combined)

One can construct the BosonBath object with the coupling operator Vs::QuantumObject and the two lists η::AbstractVector and γ::AbstractVector which corresponds to the exponential terms $\{\eta_i\}_i$ and $\{\gamma_i\}_i$, respectively.

bath = BosonBath(Vs, η, γ)
Warning

Here, the length of η and γ should be the same.

Construct BosonBath (with real and imaginary parts are separated)

When $\gamma_i \neq \gamma_i^*$, a closed form for the HEOM can be obtained by further decomposing $C(t_1, t_2)$ into its real (R) and imaginary (I) parts as

\[C(t_1, t_2)=\sum_{u=\textrm{R},\textrm{I}}(\delta_{u, \textrm{R}} + i\delta_{u, \textrm{I}})C^{u}(t_1, t_2)\]

where $\delta$ is the Kronecker delta function and $C^{u}(t_1, t_2)=\sum_i \eta_i^u \exp(-\gamma_i^u (t_1-t_2))$

In this case, the BosonBath object can be constructed by the following method:

bath = BosonBath(Vs, η_real, γ_real, η_imag, γ_imag)
Warning

Here, the length of η_real and γ_real should be the same. Also, the length of η_imag and γ_imag should be the same.

Here, η_real::AbstractVector, γ_real::AbstractVector, η_imag::AbstractVector and γ_imag::AbstractVector correspond to the exponential terms $\{\eta_i^{\textrm{R}}\}_i$, $\{\gamma_i^{\textrm{R}}\}_i$, $\{\eta_i^{\textrm{I}}\}_i$ and $\{\gamma_i^{\textrm{I}}\}_i$, respectively.

Note

Instead of analytically solving the correlation function $C(t_1, t_2)$ to obtain a sum of exponential terms, one can also use the built-in functions (for different spectral densities $J(\omega)$ and spectral decomposition methods, which have been analytically solved by the developers already). See the other categories of the Bosonic Bath in the sidebar for more details.

One can check the information of the BosonBath by the print function, for example:

print(bath)
BosonBath object with 4 exponential-expansion terms

Calculate the correlation function

To check whether the exponential terms in the BosonBath is correct or not, one can call C(bath::BosonBath, tlist::AbstractVector) to calculate the correlation function $C(t)$, where $t=t_1-t_2$:

c_list = C(bath, tlist)

Here, c_list is a list which contains the value of $C(t)$ corresponds to the given time series tlist.

Exponent

HierarchicalEOM.jl also supports users to access the specific exponential term with brakets []. This returns an Exponent object, which contains the corresponding value of $\eta_i$ and $\gamma_i$:

e = bath[2] # the 2nd-term
+=\frac{1}{2\pi}\int_{0}^{\infty} d\omega J(\omega)\left[n(\omega)e^{i\omega (t_1-t_2)}+(n(\omega)+1)e^{-i\omega (t_1-t_2)}\right],\]

where $J(\omega)=2\pi\Sigma_k |g_k|^2 \delta(\omega-\omega_k)$ is the spectral density of the bath and $n(\omega)=\{\exp(\omega/k_B T)-1\}^{-1}$ represents the Bose-Einstein distribution.

A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely

\[C(t_1, t_2)=\sum_i \eta_i e^{-\gamma_i (t_1-t_2)}.\]

This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).

Construct BosonBath (with real and imaginary parts are combined)

One can construct the BosonBath object with the coupling operator Vs::QuantumObject and the two lists η::AbstractVector and γ::AbstractVector which corresponds to the exponential terms $\{\eta_i\}_i$ and $\{\gamma_i\}_i$, respectively.

bath = BosonBath(Vs, η, γ)
Warning

Here, the length of η and γ should be the same.

Construct BosonBath (with real and imaginary parts are separated)

When $\gamma_i \neq \gamma_i^*$, a closed form for the HEOM can be obtained by further decomposing $C(t_1, t_2)$ into its real (R) and imaginary (I) parts as

\[C(t_1, t_2)=\sum_{u=\textrm{R},\textrm{I}}(\delta_{u, \textrm{R}} + i\delta_{u, \textrm{I}})C^{u}(t_1, t_2)\]

where $\delta$ is the Kronecker delta function and $C^{u}(t_1, t_2)=\sum_i \eta_i^u \exp(-\gamma_i^u (t_1-t_2))$

In this case, the BosonBath object can be constructed by the following method:

bath = BosonBath(Vs, η_real, γ_real, η_imag, γ_imag)
Warning

Here, the length of η_real and γ_real should be the same. Also, the length of η_imag and γ_imag should be the same.

Here, η_real::AbstractVector, γ_real::AbstractVector, η_imag::AbstractVector and γ_imag::AbstractVector correspond to the exponential terms $\{\eta_i^{\textrm{R}}\}_i$, $\{\gamma_i^{\textrm{R}}\}_i$, $\{\eta_i^{\textrm{I}}\}_i$ and $\{\gamma_i^{\textrm{I}}\}_i$, respectively.

Note

Instead of analytically solving the correlation function $C(t_1, t_2)$ to obtain a sum of exponential terms, one can also use the built-in functions (for different spectral densities $J(\omega)$ and spectral decomposition methods, which have been analytically solved by the developers already). See the other categories of the Bosonic Bath in the sidebar for more details.

One can check the information of the BosonBath by the print function, for example:

print(bath)
BosonBath object with 4 exponential-expansion terms

Calculate the correlation function

To check whether the exponential terms in the BosonBath is correct or not, one can call C(bath::BosonBath, tlist::AbstractVector) to calculate the correlation function $C(t)$, where $t=t_1-t_2$:

c_list = C(bath, tlist)

Here, c_list is a list which contains the value of $C(t)$ corresponds to the given time series tlist.

Exponent

HierarchicalEOM.jl also supports users to access the specific exponential term with brackets []. This returns an Exponent object, which contains the corresponding value of $\eta_i$ and $\gamma_i$:

e = bath[2] # the 2nd-term
 print(e)
Bath Exponent with types = "bRI", η = 1.5922874021206546e-6 + 0.0im, γ = 0.3141645167860635 + 0.0im.

The different types of the (bosonic-bath) Exponent:

  • "bR" : from real part of bosonic correlation function $C^{u=\textrm{R}}(t_1, t_2)$
  • "bI" : from imaginary part of bosonic correlation function $C^{u=\textrm{I}}(t_1, t_2)$
  • "bRI" : from combined (real and imaginary part) bosonic bath correlation function $C(t_1, t_2)$

One can even obtain the Exponent with iterative method:

for e in bath
     println(e)
 end
Bath Exponent with types = "bRI", η = 4.995832638723504e-5 - 2.5e-6im, γ = 0.005 + 0.0im.
@@ -9,4 +9,4 @@
 
 Bath Exponent with types = "bRI", η = 1.0039844180003819e-6 + 0.0im, γ = 0.6479143347831898 + 0.0im.
 
-Bath Exponent with types = "bRI", η = 3.1005439801387293e-6 + 0.0im, γ = 1.8059644711829272 + 0.0im.
+Bath Exponent with types = "bRI", η = 3.1005439801387293e-6 + 0.0im, γ = 1.8059644711829272 + 0.0im. diff --git a/dev/bath_boson_RWA/bosonic_bath_RWA_intro/index.html b/dev/bath_boson_RWA/bosonic_bath_RWA_intro/index.html index 57c59a2d..e706449b 100644 --- a/dev/bath_boson_RWA/bosonic_bath_RWA_intro/index.html +++ b/dev/bath_boson_RWA/bosonic_bath_RWA_intro/index.html @@ -2,7 +2,7 @@ Introduction · Documentation | HierarchicalEOM.jl

Bosonic Bath (under rotating wave approximation)

Overview

This describes the interaction between the system ($s$) and a exterior bosonic environment ($b$) under the rotating wave approximation (RWA), which can be modeled by

\[H_{sb}=\sum_k g_k b_k^\dagger a_s + g_k^* b_k a_s^\dagger,\]

where $g_k$ is the coupling strength and $b_k (b_k^\dagger)$ is the annihilation (creation) operator for the $k$-th mode of the bosonic environment. Here, $a_s$ refers to the system annihilation operator.

The effects of a bosonic environment (initially in thermal equilibrium, linearly coupled to the system, and under the rotating wave approximation) are completely encoded in the two-time correlation functions, namely

\[C^{\nu}(t_{1},t_{2}) =\frac{1}{2\pi}\int_{0}^{\infty} d\omega J(\omega)\left[\delta_{\nu,-1}+ n(\omega) -\right]e^{\nu i\omega (t_{1}-t_{2})}.\]

where $J(\omega)=2\pi\Sigma_k |g_k|^2 \delta(\omega-\omega_k)$ is the spectral density of the bath and $n(\omega)=\{\exp[\omega/k_B T]-1\}^{-1}$ represents the Bose-Einstein distribution. Here, $\nu=+$ and $\nu=-$ denotes the absorption and emission process of the bosonic system, respectively.

A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely

\[C^{\nu}(t_1, t_2)=\sum_i \eta_i^{\nu} e^{-\gamma_i^{\nu} (t_1-t_2)}.\]

This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).

Construct BosonBath (RWA)

One can construct the BosonBath object under RWA by calling the function BosonBathRWA together with the following parameters: system annihilation operator a_s::QuantumObject and the four lists η_absorb::AbstractVector, γ_absorb::AbstractVector, η_emit::AbstractVector and γ_emit::AbstractVector which correspond to the exponential terms $\{\eta_i^{+}\}_i$, $\{\gamma_i^{+}\}_i$, $\{\eta_i^{-}\}_i$ and $\{\gamma_i^{-}\}_i$, respectively.

bath = BosonBathRWA(a_s, η_absorb, γ_absorb, η_emit, γ_emit)
Warning

Here, the length of the four lists (η_absorb, γ_absorb, η_emit and γ_emit) should all be the same. Also, all the elements in γ_absorb should be complex conjugate of the corresponding elements in γ_emit.

One can check the information of the BosonBath by the print function, for example:

print(bath)
BosonBath object with 4 exponential-expansion terms

Note that BosonBath under RWA always have even number of exponential terms (half for $C^{\nu=+}$ and half for $C^{\nu=-}$)

Calculate the correlation function

To check whether the exponential terms in the FermionBath is correct or not, one can call C(bath::BosonBath, tlist::AbstractVector) to calculate the correlation function $C(t)$, where $t=t_1-t_2$:

cp_list, cm_list = C(bath, tlist)

Here, cp_list and cm_list are the lists which contain the value of $C^{\nu=+}(t)$ and $C^{\nu=-}(t)$ correspond to the given time series tlist, respectively.

Exponent

HierarchicalEOM.jl also supports users to access the specific exponential term with brakets []. This returns an Exponent object, which contains the corresponding value of $\eta_i^\nu$ and $\gamma_i^\nu$:

e = bath[2] # the 2nd-term
+\right]e^{\nu i\omega (t_{1}-t_{2})}.\]

where $J(\omega)=2\pi\Sigma_k |g_k|^2 \delta(\omega-\omega_k)$ is the spectral density of the bath and $n(\omega)=\{\exp[\omega/k_B T]-1\}^{-1}$ represents the Bose-Einstein distribution. Here, $\nu=+$ and $\nu=-$ denotes the absorption and emission process of the bosonic system, respectively.

A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely

\[C^{\nu}(t_1, t_2)=\sum_i \eta_i^{\nu} e^{-\gamma_i^{\nu} (t_1-t_2)}.\]

This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).

Construct BosonBath (RWA)

One can construct the BosonBath object under RWA by calling the function BosonBathRWA together with the following parameters: system annihilation operator a_s::QuantumObject and the four lists η_absorb::AbstractVector, γ_absorb::AbstractVector, η_emit::AbstractVector and γ_emit::AbstractVector which correspond to the exponential terms $\{\eta_i^{+}\}_i$, $\{\gamma_i^{+}\}_i$, $\{\eta_i^{-}\}_i$ and $\{\gamma_i^{-}\}_i$, respectively.

bath = BosonBathRWA(a_s, η_absorb, γ_absorb, η_emit, γ_emit)
Warning

Here, the length of the four lists (η_absorb, γ_absorb, η_emit and γ_emit) should all be the same. Also, all the elements in γ_absorb should be complex conjugate of the corresponding elements in γ_emit.

One can check the information of the BosonBath by the print function, for example:

print(bath)
BosonBath object with 4 exponential-expansion terms

Note that BosonBath under RWA always have even number of exponential terms (half for $C^{\nu=+}$ and half for $C^{\nu=-}$)

Calculate the correlation function

To check whether the exponential terms in the FermionBath is correct or not, one can call C(bath::BosonBath, tlist::AbstractVector) to calculate the correlation function $C(t)$, where $t=t_1-t_2$:

cp_list, cm_list = C(bath, tlist)

Here, cp_list and cm_list are the lists which contain the value of $C^{\nu=+}(t)$ and $C^{\nu=-}(t)$ correspond to the given time series tlist, respectively.

Exponent

HierarchicalEOM.jl also supports users to access the specific exponential term with brackets []. This returns an Exponent object, which contains the corresponding value of $\eta_i^\nu$ and $\gamma_i^\nu$:

e = bath[2] # the 2nd-term
 print(e)
Bath Exponent with types = "bA", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 - 0.005im.

The different types of the (bosonic-bath under RWA) Exponent:

  • "bA" : from absorption bosonic correlation function $C^{\nu=+}(t_1, t_2)$
  • "bE" : from emission bosonic correlation function $C^{\nu=-}(t_1, t_2)$

One can even obtain the Exponent with iterative method:

for e in bath
     println(e)
 end
Bath Exponent with types = "bA", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 - 0.005im.
@@ -11,4 +11,4 @@
 
 Bath Exponent with types = "bE", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 + 0.005im.
 
-Bath Exponent with types = "bE", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 + 0.005im.
+Bath Exponent with types = "bE", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 + 0.005im. diff --git a/dev/bath_fermion/Fermion_Lorentz/index.html b/dev/bath_fermion/Fermion_Lorentz/index.html index d2407bfa..906eb415 100644 --- a/dev/bath_fermion/Fermion_Lorentz/index.html +++ b/dev/bath_fermion/Fermion_Lorentz/index.html @@ -23,4 +23,4 @@ W # band-width of the environment kT # the product of the Boltzmann constant k and the absolute temperature T N # Number of exponential terms for each correlation functions (C^{+} and C^{-}) -bath = Fermion_Lorentz_Pade(ds, Γ, μ, W, kT, N - 1) +bath = Fermion_Lorentz_Pade(ds, Γ, μ, W, kT, N - 1) diff --git a/dev/bath_fermion/fermionic_bath_intro/index.html b/dev/bath_fermion/fermionic_bath_intro/index.html index 0e09d1d8..32909497 100644 --- a/dev/bath_fermion/fermionic_bath_intro/index.html +++ b/dev/bath_fermion/fermionic_bath_intro/index.html @@ -2,7 +2,7 @@ Introduction · Documentation | HierarchicalEOM.jl

Fermionic Bath

Overview

The FermionBath object describes the interaction between the system ($s$) and a exterior fermionic environment ($f$), which can be modeled by

\[H_{sf}=\sum_k g_k c_k^\dagger d_s + g_k^* c_k d_s^\dagger,\]

where $g_k$ is the coupling strength and $c_k (c_k^\dagger)$ annihilates (creates) a fermion in the $k$-th state of the fermionic environment. Here, $d_s$ refers to the system-interaction operator and should be an odd-parity operator destroying a fermion in the system.

The effects of a fermionic environment (initially in thermal equilibrium and linearly coupled to the system) are completely encoded in the two-time correlation functions, namely

\[C^{\nu}(t_{1},t_{2}) =\frac{1}{2\pi}\int_{-\infty}^{\infty} d\omega J(\omega)\left[\frac{1-\nu}{2}+\nu n(\omega) -\right]e^{\nu i\omega (t_{1}-t_{2})}.\]

where $J(\omega)=2\pi\Sigma_k |g_k|^2 \delta(\omega-\omega_k)$ is the spectral density of the bath and $n(\omega)=\{\exp[(\omega-\mu)/k_B T]+1\}^{-1}$ represents the Fermi-Dirac distribution (with chemical potential $\mu$). Here, $\nu=+$ and $\nu=-$ denotes the absorption and emission process of the fermionic system, respectively.

A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely

\[C^{\nu}(t_1, t_2)=\sum_i \eta_i^{\nu} e^{-\gamma_i^{\nu} (t_1-t_2)}.\]

This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).

Construct FermionBath

One can construct the FermionBath object with the system annihilation operator ds::QuantumObject and the four lists η_absorb::AbstractVector, γ_absorb::AbstractVector, η_emit::AbstractVector and γ_emit::AbstractVector which correspond to the exponential terms $\{\eta_i^{+}\}_i$, $\{\gamma_i^{+}\}_i$, $\{\eta_i^{-}\}_i$ and $\{\gamma_i^{-}\}_i$, respectively.

bath = FermionBath(ds, η_absorb, γ_absorb, η_emit, γ_emit)
Warning

Here, the length of the four lists (η_absorb, γ_absorb, η_emit and γ_emit) should all be the same. Also, all the elements in γ_absorb should be complex conjugate of the corresponding elements in γ_emit.

Note

Instead of analytically solving the correlation function $C^{\nu=\pm}(t_1, t_2)$ to obtain a sum of exponential terms, one can also use the built-in functions (for different spectral densities $J(\omega)$ and spectral decomposition methods, which have been analytically solved by the developers already). See the other categories of the Fermionic Bath in the sidebar for more details.

One can check the information of the FermionBath by the print function, for example:

print(bath)
FermionBath object with 4 exponential-expansion terms

Note that FermionBath always have even number of exponential terms (half for $C^{\nu=+}$ and half for $C^{\nu=-}$)

Calculate the correlation function

To check whether the exponential terms in the FermionBath is correct or not, one can call C(bath::FermionBath, tlist::AbstractVector) to calculate the correlation function $C(t)$, where $t=t_1-t_2$:

cp_list, cm_list = C(bath, tlist)

Here, cp_list and cm_list are the lists which contain the value of $C^{\nu=+}(t)$ and $C^{\nu=-}(t)$ correspond to the given time series tlist, respectively.

Exponent

HierarchicalEOM.jl also supports users to access the specific exponential term with brakets []. This returns an Exponent object, which contains the corresponding value of $\eta_i^\nu$ and $\gamma_i^\nu$:

e = bath[2] # the 2nd-term
+\right]e^{\nu i\omega (t_{1}-t_{2})}.\]

where $J(\omega)=2\pi\Sigma_k |g_k|^2 \delta(\omega-\omega_k)$ is the spectral density of the bath and $n(\omega)=\{\exp[(\omega-\mu)/k_B T]+1\}^{-1}$ represents the Fermi-Dirac distribution (with chemical potential $\mu$). Here, $\nu=+$ and $\nu=-$ denotes the absorption and emission process of the fermionic system, respectively.

A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely

\[C^{\nu}(t_1, t_2)=\sum_i \eta_i^{\nu} e^{-\gamma_i^{\nu} (t_1-t_2)}.\]

This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).

Construct FermionBath

One can construct the FermionBath object with the system annihilation operator ds::QuantumObject and the four lists η_absorb::AbstractVector, γ_absorb::AbstractVector, η_emit::AbstractVector and γ_emit::AbstractVector which correspond to the exponential terms $\{\eta_i^{+}\}_i$, $\{\gamma_i^{+}\}_i$, $\{\eta_i^{-}\}_i$ and $\{\gamma_i^{-}\}_i$, respectively.

bath = FermionBath(ds, η_absorb, γ_absorb, η_emit, γ_emit)
Warning

Here, the length of the four lists (η_absorb, γ_absorb, η_emit and γ_emit) should all be the same. Also, all the elements in γ_absorb should be complex conjugate of the corresponding elements in γ_emit.

Note

Instead of analytically solving the correlation function $C^{\nu=\pm}(t_1, t_2)$ to obtain a sum of exponential terms, one can also use the built-in functions (for different spectral densities $J(\omega)$ and spectral decomposition methods, which have been analytically solved by the developers already). See the other categories of the Fermionic Bath in the sidebar for more details.

One can check the information of the FermionBath by the print function, for example:

print(bath)
FermionBath object with 4 exponential-expansion terms

Note that FermionBath always have even number of exponential terms (half for $C^{\nu=+}$ and half for $C^{\nu=-}$)

Calculate the correlation function

To check whether the exponential terms in the FermionBath is correct or not, one can call C(bath::FermionBath, tlist::AbstractVector) to calculate the correlation function $C(t)$, where $t=t_1-t_2$:

cp_list, cm_list = C(bath, tlist)

Here, cp_list and cm_list are the lists which contain the value of $C^{\nu=+}(t)$ and $C^{\nu=-}(t)$ correspond to the given time series tlist, respectively.

Exponent

HierarchicalEOM.jl also supports users to access the specific exponential term with brackets []. This returns an Exponent object, which contains the corresponding value of $\eta_i^\nu$ and $\gamma_i^\nu$:

e = bath[2] # the 2nd-term
 print(e)
Bath Exponent with types = "fA", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 - 0.005im.

The different types of the (fermionic-bath) Exponent:

  • "fA" : from absorption fermionic correlation function $C^{\nu=+}(t_1, t_2)$
  • "fE" : from emission fermionic correlation function $C^{\nu=-}(t_1, t_2)$

One can even obtain the Exponent with iterative method:

for e in bath
     println(e)
 end
Bath Exponent with types = "fA", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 - 0.005im.
@@ -11,4 +11,4 @@
 
 Bath Exponent with types = "fE", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 + 0.005im.
 
-Bath Exponent with types = "fE", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 + 0.005im.
+Bath Exponent with types = "fE", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 + 0.005im. diff --git a/dev/cite/index.html b/dev/cite/index.html index 2a217ce7..f1f618ee 100644 --- a/dev/cite/index.html +++ b/dev/cite/index.html @@ -16,4 +16,4 @@ author={Huang, Yi-Te and Kuo, Po-Chen and Lambert, Neill and Cirio, Mauro and Cross, Simon and Yang, Shen-Liang and Nori, Franco and Chen, Yueh-Nan}, journal={arXiv preprint arXiv:2306.07522}, year={2023} -} +} diff --git a/dev/examples/SIAM/7cb8f740.svg b/dev/examples/SIAM/ab51402f.svg similarity index 82% rename from dev/examples/SIAM/7cb8f740.svg rename to dev/examples/SIAM/ab51402f.svg index 262cdbe4..d7434263 100644 --- a/dev/examples/SIAM/7cb8f740.svg +++ b/dev/examples/SIAM/ab51402f.svg @@ -1,48 +1,48 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/SIAM/index.html b/dev/examples/SIAM/index.html index a1c55e49..ef03a68d 100644 --- a/dev/examples/SIAM/index.html +++ b/dev/examples/SIAM/index.html @@ -61,4 +61,4 @@

Calculate density of states (DOS)

(see also Spectrum)

ωlist = -10:1:10
 dos = DensityOfStates(M_odd, ados_s, d_up, ωlist)
 
-Plots.plot(ωlist, dos)
Example block output

This page was generated using Literate.jl.

+Plots.plot(ωlist, dos)Example block output

This page was generated using Literate.jl.

diff --git a/dev/examples/cavityQED/1923f9bc.svg b/dev/examples/cavityQED/042163bd.svg similarity index 84% rename from dev/examples/cavityQED/1923f9bc.svg rename to dev/examples/cavityQED/042163bd.svg index 32c9f882..7ada99cc 100644 --- a/dev/examples/cavityQED/1923f9bc.svg +++ b/dev/examples/cavityQED/042163bd.svg @@ -1,46 +1,46 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/cavityQED/14d27de2.svg b/dev/examples/cavityQED/0c68febc.svg similarity index 87% rename from dev/examples/cavityQED/14d27de2.svg rename to dev/examples/cavityQED/0c68febc.svg index e405f0d6..7796a48c 100644 --- a/dev/examples/cavityQED/14d27de2.svg +++ b/dev/examples/cavityQED/0c68febc.svg @@ -1,52 +1,52 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/cavityQED/f76d671f.svg b/dev/examples/cavityQED/7e090e91.svg similarity index 84% rename from dev/examples/cavityQED/f76d671f.svg rename to dev/examples/cavityQED/7e090e91.svg index 7f406448..17f93ea0 100644 --- a/dev/examples/cavityQED/f76d671f.svg +++ b/dev/examples/cavityQED/7e090e91.svg @@ -1,46 +1,46 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/cavityQED/6884d3ca.svg b/dev/examples/cavityQED/ea1e51c4.svg similarity index 91% rename from dev/examples/cavityQED/6884d3ca.svg rename to dev/examples/cavityQED/ea1e51c4.svg index 853ce53e..ab1872dc 100644 --- a/dev/examples/cavityQED/6884d3ca.svg +++ b/dev/examples/cavityQED/ea1e51c4.svg @@ -1,84 +1,84 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/cavityQED/4c76fb07.svg b/dev/examples/cavityQED/ffe7798a.svg similarity index 91% rename from dev/examples/cavityQED/4c76fb07.svg rename to dev/examples/cavityQED/ffe7798a.svg index 2055003e..4ad909e3 100644 --- a/dev/examples/cavityQED/4c76fb07.svg +++ b/dev/examples/cavityQED/ffe7798a.svg @@ -1,84 +1,84 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/cavityQED/index.html b/dev/examples/cavityQED/index.html index b90b27e3..cb4ea050 100644 --- a/dev/examples/cavityQED/index.html +++ b/dev/examples/cavityQED/index.html @@ -59,7 +59,7 @@ Plots.plot!(tlist_test, imag(Ct2), label = "N=1000 (imag part)", linestyle = :solid, linewidth = 3) Plots.xaxis!("t") -Plots.yaxis!("C(t)")Example block output

Construct HEOMLS matrix

(see also HEOMLS Matrix for Bosonic Baths) Here, we consider an incoherent pumping to the atom, which can be described by an Lindblad dissipator (see here for more details).

Furthermore, we set the important threshold to be 1e-6.

pump = 0.01
+Plots.yaxis!("C(t)")
Example block output

Construct HEOMLS matrix

(see also HEOMLS Matrix for Bosonic Baths) Here, we consider an incoherent pumping to the atom, which can be described by an Lindblad dissipator (see here for more details).

Furthermore, we set the important threshold to be 1e-6.

pump = 0.01
 J_pump = sqrt(pump) * σm'
 
 tier = 2
@@ -118,11 +118,11 @@
     linestyle = [:solid :dash],
 )
 Plots.plot(p1, p2, layout = [1, 1])
-Plots.xaxis!("t")
Example block output

Power spectrum

(see also Spectrum)

ω_list = 1:0.01:3
+Plots.xaxis!("t")
Example block output

Power spectrum

(see also Spectrum)

ω_list = 1:0.01:3
 psd_H = PowerSpectrum(M_Heom, steady_H, a, ω_list)
 
 Plots.plot(ω_list, psd_H, linewidth = 3)
-Plots.xaxis!(L"\omega")
Example block output

Compare with Master Eq. approach

(see also HEOMLS for Master Equations)

The Lindblad master equations which describs the cavity couples to an extra bosonic reservoir with Drude-Lorentzian spectral density is given by

# Drude_Lorentzian spectral density
+Plots.xaxis!(L"\omega")
Example block output

Compare with Master Eq. approach

(see also HEOMLS for Master Equations)

The Lindblad master equations which describes the cavity couples to an extra bosonic reservoir with Drude-Lorentzian spectral density is given by

# Drude_Lorentzian spectral density
 Drude_Lorentz(ω, Γ, W) = 4 * Γ * W * ω / ((ω)^2 + (W)^2)
 
 # Bose-Einstein distribution
@@ -165,8 +165,8 @@
     linestyle = [:solid :dash],
 )
 Plots.plot(p1, p2, layout = [1, 1])
-Plots.xaxis!("t")
Example block output

We can also calculate the power spectrum

ω_list = 1:0.01:3
+Plots.xaxis!("t")
Example block output

We can also calculate the power spectrum

ω_list = 1:0.01:3
 psd_M = PowerSpectrum(M_master, steady_M, a, ω_list)
 
 Plots.plot(ω_list, psd_M, linewidth = 3)
-Plots.xaxis!(L"\omega")
Example block output

Due to the weak coupling between the system and an extra bosonic environment, the Master equation's outcome is expected to be similar to the results obtained from the HEOM method.


This page was generated using Literate.jl.

+Plots.xaxis!(L"\omega")Example block output

Due to the weak coupling between the system and an extra bosonic environment, the Master equation's outcome is expected to be similar to the results obtained from the HEOM method.


This page was generated using Literate.jl.

diff --git a/dev/examples/dynamical_decoupling/6d37a450.svg b/dev/examples/dynamical_decoupling/449cd2ee.svg similarity index 91% rename from dev/examples/dynamical_decoupling/6d37a450.svg rename to dev/examples/dynamical_decoupling/449cd2ee.svg index cadd076a..12658efd 100644 --- a/dev/examples/dynamical_decoupling/6d37a450.svg +++ b/dev/examples/dynamical_decoupling/449cd2ee.svg @@ -1,50 +1,50 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/dynamical_decoupling/2606f3eb.svg b/dev/examples/dynamical_decoupling/b579872b.svg similarity index 93% rename from dev/examples/dynamical_decoupling/2606f3eb.svg rename to dev/examples/dynamical_decoupling/b579872b.svg index ac761f77..13bdb75a 100644 --- a/dev/examples/dynamical_decoupling/2606f3eb.svg +++ b/dev/examples/dynamical_decoupling/b579872b.svg @@ -1,41 +1,41 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/dynamical_decoupling/index.html b/dev/examples/dynamical_decoupling/index.html index b777db92..cc53aa3e 100644 --- a/dev/examples/dynamical_decoupling/index.html +++ b/dev/examples/dynamical_decoupling/index.html @@ -41,7 +41,7 @@ [[pulse(amp_fast, delay, t) for t in tlist], [pulse(amp_slow, delay, t) for t in tlist]], label = ["Fast Pulse" "Slow Pulse"], linestyle = [:solid :dash], -)Example block output

Construct bath objects

We assume the bosonic reservoir to have a Drude-Lorentz Spectral Density, and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters:

  • the coupling strength $\Gamma$ between system and reservoir
  • the band-width $W$
  • the product of the Boltzmann constant $k$ and the absolute temperature $T$ : $kT$
  • the total number of exponentials for the reservoir $(N + 1)$
Γ = 0.0005
+)
Example block output

Construct bath objects

We assume the bosonic reservoir to have a Drude-Lorentz Spectral Density, and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters:

  • the coupling strength $\Gamma$ between system and reservoir
  • the band-width $W$
  • the product of the Boltzmann constant $k$ and the absolute temperature $T$ : $kT$
  • the total number of exponentials for the reservoir $(N + 1)$
Γ = 0.0005
 W = 0.005
 kT = 0.05
 N = 3
@@ -95,4 +95,4 @@
     xlabel = L"t",
     ylabel = L"\rho_{01}",
     grid = false,
-)
Example block output

This example is from QuTiP-BoFiN paper : Phys. Rev. Research 5, 013181 (2023).


This page was generated using Literate.jl.

+)Example block output

This example is from QuTiP-BoFiN paper : Phys. Rev. Research 5, 013181 (2023).


This page was generated using Literate.jl.

diff --git a/dev/examples/electronic_current/5c550e60.svg b/dev/examples/electronic_current/ffac93e7.svg similarity index 89% rename from dev/examples/electronic_current/5c550e60.svg rename to dev/examples/electronic_current/ffac93e7.svg index 962105d8..ad20cdc7 100644 --- a/dev/examples/electronic_current/5c550e60.svg +++ b/dev/examples/electronic_current/ffac93e7.svg @@ -1,42 +1,42 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/electronic_current/index.html b/dev/examples/electronic_current/index.html index 79f5b432..727a8039 100644 --- a/dev/examples/electronic_current/index.html +++ b/dev/examples/electronic_current/index.html @@ -105,4 +105,4 @@ xlabel = "time", ylabel = "Current", grid = false, -)Example block output

Note that this example can also be found in qutip documentation


This page was generated using Literate.jl.

+)Example block output

Note that this example can also be found in qutip documentation


This page was generated using Literate.jl.

diff --git a/dev/examples/quick_start/cccad2fa.svg b/dev/examples/quick_start/16f67f00.svg similarity index 91% rename from dev/examples/quick_start/cccad2fa.svg rename to dev/examples/quick_start/16f67f00.svg index cf5c080a..bd21cc1c 100644 --- a/dev/examples/quick_start/cccad2fa.svg +++ b/dev/examples/quick_start/16f67f00.svg @@ -1,45 +1,45 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/quick_start/f2432c6d.svg b/dev/examples/quick_start/fe0642f0.svg similarity index 89% rename from dev/examples/quick_start/f2432c6d.svg rename to dev/examples/quick_start/fe0642f0.svg index 60d27aa4..31d939eb 100644 --- a/dev/examples/quick_start/f2432c6d.svg +++ b/dev/examples/quick_start/fe0642f0.svg @@ -1,41 +1,41 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/examples/quick_start/index.html b/dev/examples/quick_start/index.html index 211265cf..c13f307a 100644 --- a/dev/examples/quick_start/index.html +++ b/dev/examples/quick_start/index.html @@ -142,7 +142,7 @@ ) xlabel!("time") -ylabel!("Population")Example block output

Multiple Baths

HierarchicalEOM.jl also supports for system to interact with multiple baths.

All you need to do is to provide a list of baths instead of a single bath

# The system Hamiltonian
+ylabel!("Population")
Example block output

Multiple Baths

HierarchicalEOM.jl also supports for system to interact with multiple baths.

All you need to do is to provide a list of baths instead of a single bath

# The system Hamiltonian
 Hsys = Qobj([
     0.25 1.50 2.50
     1.50 0.75 3.50
@@ -180,4 +180,4 @@
 plot!(tlist, p1, linewidth = 3, linecolor = "orange", label = L"P_1")
 plot!(tlist, p2, linewidth = 3, linecolor = :green, label = L"P_2")
 xlabel!("time")
-ylabel!("Population")
Example block output

Note that this example can also be found in qutip documentation.


This page was generated using Literate.jl.

+ylabel!("Population")Example block output

Note that this example can also be found in qutip documentation.


This page was generated using Literate.jl.

diff --git a/dev/extensions/CUDA/index.html b/dev/extensions/CUDA/index.html index 146625f7..f6bd81b0 100644 --- a/dev/extensions/CUDA/index.html +++ b/dev/extensions/CUDA/index.html @@ -36,4 +36,4 @@ M_odd_gpu = cu(M_odd_cpu) # solve steady state with CPU -ados_ss = steadystate(M_even_cpu);
Note

This extension does not support for solving stationary state on GPU since it is not efficient and might get wrong solutions. If you really want to obtain the stationary state with GPU, you can repeatedly solve the time evolution until you find it.

Solving time evolution with CPU

ados_list_cpu = HEOMsolve(M_even_cpu, ρ0, tlist)

Solving time evolution with GPU

ados_list_gpu = HEOMsolve(M_even_gpu, ρ0, tlist)

Solving Spectrum with CPU

dos_cpu = DensityOfStates(M_odd_cpu, ados_ss, d_up, ωlist)

Solving Spectrum with GPU

dos_gpu = DensityOfStates(M_odd_gpu, ados_ss, d_up, ωlist; solver=KrylovJL_BICGSTAB(rtol=1f-10, atol=1f-12))
+ados_ss = steadystate(M_even_cpu);
Note

This extension does not support for solving stationary state on GPU since it is not efficient and might get wrong solutions. If you really want to obtain the stationary state with GPU, you can repeatedly solve the time evolution until you find it.

Solving time evolution with CPU

ados_list_cpu = HEOMsolve(M_even_cpu, ρ0, tlist)

Solving time evolution with GPU

ados_list_gpu = HEOMsolve(M_even_gpu, ρ0, tlist)

Solving Spectrum with CPU

dos_cpu = DensityOfStates(M_odd_cpu, ados_ss, d_up, ωlist)

Solving Spectrum with GPU

dos_gpu = DensityOfStates(M_odd_gpu, ados_ss, d_up, ωlist; solver=KrylovJL_BICGSTAB(rtol=1f-10, atol=1f-12))
diff --git a/dev/heom_matrix/HEOMLS_intro/index.html b/dev/heom_matrix/HEOMLS_intro/index.html index 1ad66fa3..dd2abb93 100644 --- a/dev/heom_matrix/HEOMLS_intro/index.html +++ b/dev/heom_matrix/HEOMLS_intro/index.html @@ -21,4 +21,4 @@ M[10, 12] M[2:4, 2:4] M[1,:] -M[:,2] +M[:,2] diff --git a/dev/heom_matrix/M_Boson/index.html b/dev/heom_matrix/M_Boson/index.html index 6b55597a..e30d1a1b 100644 --- a/dev/heom_matrix/M_Boson/index.html +++ b/dev/heom_matrix/M_Boson/index.html @@ -14,4 +14,4 @@ M.sup_dim M.parity M.bath -M.hierarchy +M.hierarchy diff --git a/dev/heom_matrix/M_Boson_Fermion/index.html b/dev/heom_matrix/M_Boson_Fermion/index.html index 83850dcb..bc45edc4 100644 --- a/dev/heom_matrix/M_Boson_Fermion/index.html +++ b/dev/heom_matrix/M_Boson_Fermion/index.html @@ -18,4 +18,4 @@ M.parity M.Bbath M.Fbath -M.hierarchy +M.hierarchy diff --git a/dev/heom_matrix/M_Fermion/index.html b/dev/heom_matrix/M_Fermion/index.html index 594ee330..4f682a26 100644 --- a/dev/heom_matrix/M_Fermion/index.html +++ b/dev/heom_matrix/M_Fermion/index.html @@ -14,4 +14,4 @@ M.sup_dim M.parity M.bath -M.hierarchy +M.hierarchy diff --git a/dev/heom_matrix/master_eq/index.html b/dev/heom_matrix/master_eq/index.html index a4f9d355..7dca9760 100644 --- a/dev/heom_matrix/master_eq/index.html +++ b/dev/heom_matrix/master_eq/index.html @@ -7,4 +7,4 @@ J = [J1, J2, ..., Jn] # jump operators M1_even = addFermionDissipator(M0_even, J) -M1_odd = addFermionDissipator(M0_odd, J) +M1_odd = addFermionDissipator(M0_odd, J) diff --git a/dev/heom_matrix/schrodinger_eq/index.html b/dev/heom_matrix/schrodinger_eq/index.html index ec4c5709..ed41c2cb 100644 --- a/dev/heom_matrix/schrodinger_eq/index.html +++ b/dev/heom_matrix/schrodinger_eq/index.html @@ -10,4 +10,4 @@ M.dims M.N M.sup_dim -M.parity +M.parity diff --git a/dev/hierarchy_dictionary/index.html b/dev/hierarchy_dictionary/index.html index 21fe5209..574ea913 100644 --- a/dev/hierarchy_dictionary/index.html +++ b/dev/hierarchy_dictionary/index.html @@ -87,4 +87,4 @@ # do some calculations you want end -end +end diff --git a/dev/index.html b/dev/index.html index 0fe1c65c..628b3b32 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Introduction · Documentation | HierarchicalEOM.jl

HierarchicalEOM.jl: An efficient Julia framework for Hierarchical Equations of Motion (HEOM) in open quantum systems

HierarchicalEOM.jl is a numerical framework written in Julia. It provides a user-friendly and efficient tool based on hierarchical equations of motion (HEOM) approach to simulate complex open quantum systems, including non-Markovian effects due to non-perturbative interaction with one (or multiple) environment(s). It is built upon QuantumToolbox.jl.

While integrating many of the features present in other open-source HEOM packages, HierarchicalEOM.jl also includes new functionalities, such as the construction of even- and odd-parity HEOM Liouvillian superoperator (HEOMLS) matrices, the estimation of importance values for all auxiliary density operators (ADOs), and the calculation of spectra for both bosonic and fermionic systems.

By wrapping some functions from other Julia packages (DifferentialEquations.jl, LinearSolve.jl and fastExpm.jl), HierarchicalEOM.jl collects different methods and could further optimize the computation for the stationary state, and the time evolution of all ADOs. The required handling of the ADOs multi-indexes is achieved through a user-friendly interface called Hierarchy Dictionary.

HEOM Ecosystem

We believe that HierarchicalEOM.jl will be a valuable tool for researchers working in different fields such as quantum biology, quantum optics, quantum thermodynamics, quantum information, quantum transport, and condensed matter physics.

If you like HierarchicalEOM.jl and find the framework useful in your research, we would be grateful if you could cite our publication [ Commun. Phys. 6, 313 (2023) ] using the bibtex entry here.

+Introduction · Documentation | HierarchicalEOM.jl

HierarchicalEOM.jl: An efficient Julia framework for Hierarchical Equations of Motion (HEOM) in open quantum systems

HierarchicalEOM.jl is a numerical framework written in Julia. It provides a user-friendly and efficient tool based on hierarchical equations of motion (HEOM) approach to simulate complex open quantum systems, including non-Markovian effects due to non-perturbative interaction with one (or multiple) environment(s). It is built upon QuantumToolbox.jl.

While integrating many of the features present in other open-source HEOM packages, HierarchicalEOM.jl also includes new functionalities, such as the construction of even- and odd-parity HEOM Liouvillian superoperator (HEOMLS) matrices, the estimation of importance values for all auxiliary density operators (ADOs), and the calculation of spectra for both bosonic and fermionic systems.

By wrapping some functions from other Julia packages (DifferentialEquations.jl, LinearSolve.jl and fastExpm.jl), HierarchicalEOM.jl collects different methods and could further optimize the computation for the stationary state, and the time evolution of all ADOs. The required handling of the ADOs multi-indexes is achieved through a user-friendly interface called Hierarchy Dictionary.

HEOM Ecosystem

We believe that HierarchicalEOM.jl will be a valuable tool for researchers working in different fields such as quantum biology, quantum optics, quantum thermodynamics, quantum information, quantum transport, and condensed matter physics.

If you like HierarchicalEOM.jl and find the framework useful in your research, we would be grateful if you could cite our publication [ Commun. Phys. 6, 313 (2023) ] using the bibtex entry here.

diff --git a/dev/install/index.html b/dev/install/index.html index 78c43fff..aa0d27ae 100644 --- a/dev/install/index.html +++ b/dev/install/index.html @@ -2,4 +2,4 @@ Installation · Documentation | HierarchicalEOM.jl

Installation

HierarchicalEOM.jl

To install HierarchicalEOM.jl, run the following commands inside Julia's interactive session (also known as REPL):

using Pkg
 Pkg.add("HierarchicalEOM")

Alternatively, this can also be done in Julia's Pkg REPL by pressing the key ] in the REPL to use the package mode, and then type the following command:

(1.10) pkg> add HierarchicalEOM

More information about Julia's package manager can be found at Pkg.jl.

Julia 1.10

HierarchicalEOM.jl requires Julia 1.10 or higher (we dropped Julia 1.9 since ver.2.1.0)

To load the package and check the version information, use either HierarchicalEOM.versioninfo() or HierarchicalEOM.about(), namely

using HierarchicalEOM
 HierarchicalEOM.versioninfo()
-HierarchicalEOM.about()

QuantumToolbox.jl

HierarchicalEOM.jl is built upon QuantumToolbox.jl, which is a cutting-edge Julia package designed for quantum physics simulations, closely emulating the popular Python QuTiP package. It provides many useful functions to create arbitrary quantum states and operators which can be combined in all the expected ways. It uniquely combines the simplicity and power of Julia with advanced features like GPU acceleration and distributed computing, making simulation of quantum systems more accessible and efficient.

Note

Start from HierarchicalEOM v2.0.0+, the inputs states and operators must be in the type of QuantumObject (defined in QuantumToolbox)

Other Useful Packages

In order to get a better experience and take full advantage of HierarchicalEOM, we recommend to install the following external packages:

DifferentialEquations.jl

DifferentialEquations is needed to provide the low-level ODE solvers especially for solving time evolution. For low dependency usage, users can use OrdinaryDiffEq.jl instead.

LinearSolve.jl

LinearSolve is a unified interface for the linear solving packages of Julia. It interfaces with other packages of the Julia ecosystem to make it easier to test alternative solver packages and pass small types to control algorithm swapping. It is needed to provide the solvers especially for solving stationary state and spectra for both bosonic and fermionic systems.

JLD2.jl

JLD2 saves and loads Julia data structures in a format comprising a subset of HDF5. Because the size of matrix in HierarchicalEOM is usually super large and leads to long time calculation, we support the functionality for saving and loading the HierarchicalEOM-type objects into files by JLD2 >= 0.4.23.

PyPlot.jl

PyPlot.jl provides a Julia interface to the Matplotlib plotting library from Python, and specifically to the matplotlib.pyplot module.

+HierarchicalEOM.about()

QuantumToolbox.jl

HierarchicalEOM.jl is built upon QuantumToolbox.jl, which is a cutting-edge Julia package designed for quantum physics simulations, closely emulating the popular Python QuTiP package. It provides many useful functions to create arbitrary quantum states and operators which can be combined in all the expected ways. It uniquely combines the simplicity and power of Julia with advanced features like GPU acceleration and distributed computing, making simulation of quantum systems more accessible and efficient.

Note

Start from HierarchicalEOM v2.0.0+, the inputs states and operators must be in the type of QuantumObject (defined in QuantumToolbox)

Other Useful Packages

In order to get a better experience and take full advantage of HierarchicalEOM, we recommend to install the following external packages:

DifferentialEquations.jl

DifferentialEquations is needed to provide the low-level ODE solvers especially for solving time evolution. For low dependency usage, users can use OrdinaryDiffEq.jl instead.

LinearSolve.jl

LinearSolve is a unified interface for the linear solving packages of Julia. It interfaces with other packages of the Julia ecosystem to make it easier to test alternative solver packages and pass small types to control algorithm swapping. It is needed to provide the solvers especially for solving stationary state and spectra for both bosonic and fermionic systems.

JLD2.jl

JLD2 saves and loads Julia data structures in a format comprising a subset of HDF5. Because the size of matrix in HierarchicalEOM is usually super large and leads to long time calculation, we support the functionality for saving and loading the HierarchicalEOM-type objects into files by JLD2 >= 0.4.23.

PyPlot.jl

PyPlot.jl provides a Julia interface to the Matplotlib plotting library from Python, and specifically to the matplotlib.pyplot module.

diff --git a/dev/libraryAPI/index.html b/dev/libraryAPI/index.html index a5632194..221d8240 100644 --- a/dev/libraryAPI/index.html +++ b/dev/libraryAPI/index.html @@ -1,49 +1,49 @@ -Library API · Documentation | HierarchicalEOM.jl

Library API

Contents

Index

Bath Module

HierarchicalEOM.CMethod
C(bath, tlist)

Calculate the correlation function $C(t)$ for a given bosonic bath and time list.

if the input bosonic bath did not apply rotating wave approximation (RWA)

\[C(t)=\sum_{u=\textrm{R},\textrm{I}}(\delta_{u, \textrm{R}} + i\delta_{u, \textrm{I}})C^{u}(t)\]

where

\[C^{u}(t)=\sum_i \eta_i^u e^{-\gamma_i^u t}\]

if the input bosonic bath applies rotating wave approximation (RWA)

\[C^{\nu=\pm}(t)=\sum_i \eta_i^\nu e^{-\gamma_i^\nu t}\]

Parameters

  • bath::BosonBath : The bath object which describes a certain bosonic bath.
  • tlist::AbstractVector: The specific time.

Returns (without RWA)

  • clist::Vector{ComplexF64} : a list of the value of correlation function according to the given time list.

Returns (with RWA)

  • cplist::Vector{ComplexF64} : a list of the value of the absorption ($\nu=+$) correlation function according to the given time list.
  • cmlist::Vector{ComplexF64} : a list of the value of the emission ($\nu=-$) correlation function according to the given time list.
source
HierarchicalEOM.CMethod
C(bath, tlist)

Calculate the correlation function $C^{\nu=+}(t)$ and $C^{\nu=-}(t)$ for a given fermionic bath and time list. Here, $\nu=+$ represents the absorption process and $\nu=-$ represents the emmision process.

\[C^{\nu=\pm}(t)=\sum_i \eta_i^\nu e^{-\gamma_i^\nu t}\]

Parameters

  • bath::FermionBath : The bath object which describes a certain fermionic bath.
  • tlist::AbstractVector: The specific time.

Returns

  • cplist::Vector{ComplexF64} : a list of the value of the absorption ($\nu=+$) correlation function according to the given time list.
  • cmlist::Vector{ComplexF64} : a list of the value of the emission ($\nu=-$) correlation function according to the given time list.
source
HierarchicalEOM.ExponentType
struct Exponent

An object which describes a single exponential-expansion term (naively, an excitation mode) within the decomposition of the bath correlation functions.

The expansion of a bath correlation function can be expressed as : $C(t) = \sum_i \eta_i \exp(-\gamma_i t)$.

Fields

  • op::QuantumObject : The system coupling operator according to system-bath interaction.
  • η::Number : the coefficient $\eta_i$ in bath correlation function.
  • γ::Number : the coefficient $\gamma_i$ in bath correlation function.
  • types::String : The type-tag of the exponent.

The different types of the Exponent:

  • "bR" : from real part of bosonic correlation function $C^{u=\textrm{R}}(t)$
  • "bI" : from imaginary part of bosonic correlation function $C^{u=\textrm{I}}(t)$
  • "bRI" : from combined (real and imaginary part) bosonic bath correlation function $C(t)$
  • "bA" : from absorption bosonic correlation function $C^{\nu=+}(t)$
  • "bE" : from emission bosonic correlation function $C^{\nu=-}(t)$
  • "fA" : from absorption fermionic correlation function $C^{\nu=+}(t)$
  • "fE" : from emission fermionic correlation function $C^{\nu=-}(t)$
source
HierarchicalEOM.BosonBathType
struct BosonBath <: AbstractBath

An object which describes the interaction between system and bosonic bath

Fields

  • bath : the different boson-bath-type objects which describes the interaction between system and bosonic bath
  • op : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • Nterm : the number of exponential-expansion term of correlation functions
  • δ : The approximation discrepancy which is used for adding the terminator to HEOM matrix (see function: addTerminator)

Methods

One can obtain the $k$-th exponent (exponential-expansion term) from bath::BosonBath by calling : bath[k]. HierarchicalEOM.jl also supports the following calls (methods) :

bath[1:k];   # returns a vector which contains the exponents from the `1`-st to the `k`-th term.
+Library API · Documentation | HierarchicalEOM.jl

Library API

Contents

Index

Bath Module

HierarchicalEOM.CMethod
C(bath, tlist)

Calculate the correlation function $C(t)$ for a given bosonic bath and time list.

if the input bosonic bath did not apply rotating wave approximation (RWA)

\[C(t)=\sum_{u=\textrm{R},\textrm{I}}(\delta_{u, \textrm{R}} + i\delta_{u, \textrm{I}})C^{u}(t)\]

where

\[C^{u}(t)=\sum_i \eta_i^u e^{-\gamma_i^u t}\]

if the input bosonic bath applies rotating wave approximation (RWA)

\[C^{\nu=\pm}(t)=\sum_i \eta_i^\nu e^{-\gamma_i^\nu t}\]

Parameters

  • bath::BosonBath : The bath object which describes a certain bosonic bath.
  • tlist::AbstractVector: The specific time.

Returns (without RWA)

  • clist::Vector{ComplexF64} : a list of the value of correlation function according to the given time list.

Returns (with RWA)

  • cplist::Vector{ComplexF64} : a list of the value of the absorption ($\nu=+$) correlation function according to the given time list.
  • cmlist::Vector{ComplexF64} : a list of the value of the emission ($\nu=-$) correlation function according to the given time list.
source
HierarchicalEOM.CMethod
C(bath, tlist)

Calculate the correlation function $C^{\nu=+}(t)$ and $C^{\nu=-}(t)$ for a given fermionic bath and time list. Here, $\nu=+$ represents the absorption process and $\nu=-$ represents the emission process.

\[C^{\nu=\pm}(t)=\sum_i \eta_i^\nu e^{-\gamma_i^\nu t}\]

Parameters

  • bath::FermionBath : The bath object which describes a certain fermionic bath.
  • tlist::AbstractVector: The specific time.

Returns

  • cplist::Vector{ComplexF64} : a list of the value of the absorption ($\nu=+$) correlation function according to the given time list.
  • cmlist::Vector{ComplexF64} : a list of the value of the emission ($\nu=-$) correlation function according to the given time list.
source
HierarchicalEOM.ExponentType
struct Exponent

An object which describes a single exponential-expansion term (naively, an excitation mode) within the decomposition of the bath correlation functions.

The expansion of a bath correlation function can be expressed as : $C(t) = \sum_i \eta_i \exp(-\gamma_i t)$.

Fields

  • op::QuantumObject : The system coupling operator according to system-bath interaction.
  • η::Number : the coefficient $\eta_i$ in bath correlation function.
  • γ::Number : the coefficient $\gamma_i$ in bath correlation function.
  • types::String : The type-tag of the exponent.

The different types of the Exponent:

  • "bR" : from real part of bosonic correlation function $C^{u=\textrm{R}}(t)$
  • "bI" : from imaginary part of bosonic correlation function $C^{u=\textrm{I}}(t)$
  • "bRI" : from combined (real and imaginary part) bosonic bath correlation function $C(t)$
  • "bA" : from absorption bosonic correlation function $C^{\nu=+}(t)$
  • "bE" : from emission bosonic correlation function $C^{\nu=-}(t)$
  • "fA" : from absorption fermionic correlation function $C^{\nu=+}(t)$
  • "fE" : from emission fermionic correlation function $C^{\nu=-}(t)$
source
HierarchicalEOM.BosonBathType
struct BosonBath <: AbstractBath

An object which describes the interaction between system and bosonic bath

Fields

  • bath : the different boson-bath-type objects which describes the interaction between system and bosonic bath
  • op : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • Nterm : the number of exponential-expansion term of correlation functions
  • δ : The approximation discrepancy which is used for adding the terminator to HEOM matrix (see function: addTerminator)

Methods

One can obtain the $k$-th exponent (exponential-expansion term) from bath::BosonBath by calling : bath[k]. HierarchicalEOM.jl also supports the following calls (methods) :

bath[1:k];   # returns a vector which contains the exponents from the `1`-st to the `k`-th term.
 bath[1:end]; # returns a vector which contains all the exponential-expansion terms
 bath[:];     # returns a vector which contains all the exponential-expansion terms
 from b in bath
     # do something
-end
source
HierarchicalEOM.BosonBathMethod
BosonBath(op, η, γ, δ=0.0; combine=true)

Generate BosonBath object for the case where real part and imaginary part of the correlation function are combined.

\[\begin{aligned} +end

source
HierarchicalEOM.BosonBathMethod
BosonBath(op, η, γ, δ=0.0; combine=true)

Generate BosonBath object for the case where real part and imaginary part of the correlation function are combined.

\[\begin{aligned} C(\tau) &=\frac{1}{2\pi}\int_{0}^{\infty} d\omega J(\omega)\left[n(\omega)e^{i\omega \tau}+(n(\omega)+1)e^{-i\omega \tau}\right]\\ &=\sum_i \eta_i \exp(-\gamma_i \tau), -\end{aligned}\]

where $J(\omega)$ is the spectral density of the bath and $n(\omega)$ represents the Bose-Einstein distribution.

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η::Vector{Ti<:Number} : the coefficients $\eta_i$ in bath correlation function $C(\tau)$.
  • γ::Vector{Tj<:Number} : the coefficients $\gamma_i$ in bath correlation function $C(\tau)$.
  • δ::Number : The approximation discrepancy (Default to 0.0) which is used for adding the terminator to HEOM matrix (see function: addTerminator)
  • combine::Bool : Whether to combine the exponential-expansion terms with the same frequency. Defaults to true.
source
HierarchicalEOM.BosonBathMethod
BosonBath(op, η_real, γ_real, η_imag, γ_imag, δ=0.0; combine=true)

Generate BosonBath object for the case where the correlation function splits into real part and imaginary part.

\[\begin{aligned} +\end{aligned}\]

where $J(\omega)$ is the spectral density of the bath and $n(\omega)$ represents the Bose-Einstein distribution.

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η::Vector{Ti<:Number} : the coefficients $\eta_i$ in bath correlation function $C(\tau)$.
  • γ::Vector{Tj<:Number} : the coefficients $\gamma_i$ in bath correlation function $C(\tau)$.
  • δ::Number : The approximation discrepancy (Default to 0.0) which is used for adding the terminator to HEOM matrix (see function: addTerminator)
  • combine::Bool : Whether to combine the exponential-expansion terms with the same frequency. Defaults to true.
source
HierarchicalEOM.BosonBathMethod
BosonBath(op, η_real, γ_real, η_imag, γ_imag, δ=0.0; combine=true)

Generate BosonBath object for the case where the correlation function splits into real part and imaginary part.

\[\begin{aligned} C(\tau) &=\frac{1}{2\pi}\int_{0}^{\infty} d\omega J(\omega)\left[n(\omega)e^{i\omega \tau}+(n(\omega)+1)e^{-i\omega \tau}\right]\\ &=\sum_i \eta_i \exp(-\gamma_i \tau), -\end{aligned}\]

where $J(\omega)$ is the spectral density of the bath and $n(\omega)$ represents the Bose-Einstein distribution.

When $\gamma_i \neq \gamma_i^*$, a closed form for the HEOM can be obtained by further decomposing $C(\tau)$ into its real (R) and imaginary (I) parts as

\[C(\tau)=\sum_{u=\textrm{R},\textrm{I}}(\delta_{u, \textrm{R}} + i\delta_{u, \textrm{I}})C^{u}(\tau)\]

where $\delta$ is the Kronecker delta function and $C^{u}(\tau)=\sum_i \eta_i^u \exp(-\gamma_i^u \tau)$

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η_real::Vector{Ti<:Number} : the coefficients $\eta_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • γ_real::Vector{Tj<:Number} : the coefficients $\gamma_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • η_imag::Vector{Tk<:Number} : the coefficients $\eta_i$ in imaginary part of bath correlation function $C^{u=\textrm{I}}$.
  • γ_imag::Vector{Tl<:Number} : the coefficients $\gamma_i$ in imaginary part of bath correlation function $C^{u=\textrm{I}}$.
  • δ::Number : The approximation discrepancy (Default to 0.0) which is used for adding the terminator to HEOM matrix (see function: addTerminator)
  • combine::Bool : Whether to combine the exponential-expansion terms with the same frequency. Defaults to true.
source
HierarchicalEOM.bosonRealType
struct bosonReal <: AbstractBosonBath

A bosonic bath for the real part of bath correlation function $C^{u=\textrm{R}}$

Fields

  • Comm : the super-operator (commutator) for the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • γ : the coefficients $\gamma_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonRealMethod
bosonReal(op, η_real, γ_real)

Generate bosonic bath for the real part of bath correlation function $C^{u=\textrm{R}}$

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η_real::Vector{Ti<:Number} : the coefficients $\eta_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • γ_real::Vector{Tj<:Number} : the coefficients $\gamma_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
source
HierarchicalEOM.bosonImagType
struct bosonImag <: AbstractBosonBath

A bosonic bath for the imaginary part of bath correlation function $C^{u=\textrm{I}}$

Fields

  • Comm : the super-operator (commutator) for the coupling operator.
  • anComm : the super-operator (anti-commutator) for the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ in imaginary part of bath correlation function $C^{u=\textrm{I}}$.
  • γ : the coefficients $\gamma_i$ in imaginary part of bath correlation function $C^{u=\textrm{I}}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonImagMethod
bosonImag(op, η_imag, γ_imag)

Generate bosonic bath for the imaginary part of correlation function $C^{u=\textrm{I}}$

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η_imag::Vector{Ti<:Number} : the coefficients $\eta_i$ in imaginary part of bath correlation functions $C^{u=\textrm{I}}$.
  • γ_imag::Vector{Tj<:Number} : the coefficients $\gamma_i$ in imaginary part of bath correlation functions $C^{u=\textrm{I}}$.
source
HierarchicalEOM.bosonRealImagType
sturct bosonRealImag <: AbstractBosonBath

A bosonic bath which the real part and imaginary part of the bath correlation function are combined

Fields

  • Comm : the super-operator (commutator) for the coupling operator.
  • anComm : the super-operator (anti-commutator) for the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η_real : the real part of coefficients $\eta_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • η_imag : the imaginary part of coefficients $\eta_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • γ : the coefficients $\gamma_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonRealImagMethod
bosonRealImag(op, η_real, η_imag, γ)

Generate bosonic bath which the real part and imaginary part of the bath correlation function are combined

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η_real::Vector{Ti<:Number} : the real part of coefficients $\eta_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • η_imag::Vector{Tj<:Number} : the imaginary part of coefficients $\eta_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • γ::Vector{Tk<:Number} : the coefficients $\gamma_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
source
HierarchicalEOM.BosonBathRWAFunction
BosonBathRWA(op, η_absorb, γ_absorb, η_emit, γ_emit, δ=0.0)

A function for generating BosonBath object where the interaction between system and bosonic bath applies the rotating wave approximation (RWA).

\[\begin{aligned} +\end{aligned}\]

where $J(\omega)$ is the spectral density of the bath and $n(\omega)$ represents the Bose-Einstein distribution.

When $\gamma_i \neq \gamma_i^*$, a closed form for the HEOM can be obtained by further decomposing $C(\tau)$ into its real (R) and imaginary (I) parts as

\[C(\tau)=\sum_{u=\textrm{R},\textrm{I}}(\delta_{u, \textrm{R}} + i\delta_{u, \textrm{I}})C^{u}(\tau)\]

where $\delta$ is the Kronecker delta function and $C^{u}(\tau)=\sum_i \eta_i^u \exp(-\gamma_i^u \tau)$

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η_real::Vector{Ti<:Number} : the coefficients $\eta_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • γ_real::Vector{Tj<:Number} : the coefficients $\gamma_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • η_imag::Vector{Tk<:Number} : the coefficients $\eta_i$ in imaginary part of bath correlation function $C^{u=\textrm{I}}$.
  • γ_imag::Vector{Tl<:Number} : the coefficients $\gamma_i$ in imaginary part of bath correlation function $C^{u=\textrm{I}}$.
  • δ::Number : The approximation discrepancy (Default to 0.0) which is used for adding the terminator to HEOM matrix (see function: addTerminator)
  • combine::Bool : Whether to combine the exponential-expansion terms with the same frequency. Defaults to true.
source
HierarchicalEOM.bosonRealType
struct bosonReal <: AbstractBosonBath

A bosonic bath for the real part of bath correlation function $C^{u=\textrm{R}}$

Fields

  • Comm : the super-operator (commutator) for the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • γ : the coefficients $\gamma_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonRealMethod
bosonReal(op, η_real, γ_real)

Generate bosonic bath for the real part of bath correlation function $C^{u=\textrm{R}}$

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η_real::Vector{Ti<:Number} : the coefficients $\eta_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
  • γ_real::Vector{Tj<:Number} : the coefficients $\gamma_i$ in real part of bath correlation function $C^{u=\textrm{R}}$.
source
HierarchicalEOM.bosonImagType
struct bosonImag <: AbstractBosonBath

A bosonic bath for the imaginary part of bath correlation function $C^{u=\textrm{I}}$

Fields

  • Comm : the super-operator (commutator) for the coupling operator.
  • anComm : the super-operator (anti-commutator) for the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ in imaginary part of bath correlation function $C^{u=\textrm{I}}$.
  • γ : the coefficients $\gamma_i$ in imaginary part of bath correlation function $C^{u=\textrm{I}}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonImagMethod
bosonImag(op, η_imag, γ_imag)

Generate bosonic bath for the imaginary part of correlation function $C^{u=\textrm{I}}$

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η_imag::Vector{Ti<:Number} : the coefficients $\eta_i$ in imaginary part of bath correlation functions $C^{u=\textrm{I}}$.
  • γ_imag::Vector{Tj<:Number} : the coefficients $\gamma_i$ in imaginary part of bath correlation functions $C^{u=\textrm{I}}$.
source
HierarchicalEOM.bosonRealImagType
struct bosonRealImag <: AbstractBosonBath

A bosonic bath which the real part and imaginary part of the bath correlation function are combined

Fields

  • Comm : the super-operator (commutator) for the coupling operator.
  • anComm : the super-operator (anti-commutator) for the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η_real : the real part of coefficients $\eta_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • η_imag : the imaginary part of coefficients $\eta_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • γ : the coefficients $\gamma_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonRealImagMethod
bosonRealImag(op, η_real, η_imag, γ)

Generate bosonic bath which the real part and imaginary part of the bath correlation function are combined

Parameters

  • op::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • η_real::Vector{Ti<:Number} : the real part of coefficients $\eta_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • η_imag::Vector{Tj<:Number} : the imaginary part of coefficients $\eta_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
  • γ::Vector{Tk<:Number} : the coefficients $\gamma_i$ in bath correlation function $\sum_i \eta_i \exp(-\gamma_i t)$.
source
HierarchicalEOM.BosonBathRWAFunction
BosonBathRWA(op, η_absorb, γ_absorb, η_emit, γ_emit, δ=0.0)

A function for generating BosonBath object where the interaction between system and bosonic bath applies the rotating wave approximation (RWA).

\[\begin{aligned} C^{\nu=+}(\tau) &=\frac{1}{2\pi}\int_{0}^{\infty} d\omega J(\omega) n(\omega) e^{i\omega \tau}\\ &=\sum_i \eta_i^{\nu=+} \exp(-\gamma_i^{\nu=+} \tau),\\ C^{\nu=-}(\tau) &=\frac{1}{2\pi}\int_{0}^{\infty} d\omega J(\omega) (1+n(\omega)) e^{-i\omega \tau}\\ &=\sum_i \eta_i^{\nu=-} \exp(-\gamma_i^{\nu=-} \tau), -\end{aligned}\]

where $\nu=+$ ($\nu=-$) represents absorption (emission) process, $J(\omega)$ is the spectral density of the bath and $n(\omega)$ is the Bose-Einstein distribution.

Parameters

  • op::QuantumObject : The system annihilation operator according to the system-bosonic-bath interaction.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}(\tau)$.
  • γ_absorb::Vector{Tj<:Number} : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}(\tau)$.
  • η_emit::Vector{Tk<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}(\tau)$.
  • γ_emit::Vector{Tl<:Number} : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}(\tau)$.
  • δ::Number : The approximation discrepancy (Defaults to 0.0) which is used for adding the terminator to HEOMLS matrix (see function: addTerminator)
source
HierarchicalEOM.bosonAbsorbType
struct bosonAbsorb <: AbstractBosonBath

An bath object which describes the absorption process of the bosonic system by a correlation function $C^{\nu=+}$

Fields

  • spre : the super-operator (left side operator multiplication) for the coupling operator.
  • spost : the super-operator (right side operator multiplication) for the coupling operator.
  • CommD : the super-operator (commutator) for the adjoint of the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • γ : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}$.
  • η_emit : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonAbsorbMethod
bosonAbsorb(op, η_absorb, γ_absorb, η_emit)

Generate bosonic bath which describes the absorption process of the bosonic system by a correlation function $C^{\nu=+}$

Parameters

  • op::QuantumObject : The system creation operator according to the system-fermionic-bath interaction.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • γ_absorb::Vector{Tj<:Number} : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}$.
  • η_emit::Vector{Tk<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
source
HierarchicalEOM.bosonEmitType
struct bosonEmit <: AbstractBosonBath

An bath object which describes the emission process of the bosonic system by a correlation function $C^{\nu=-}$

Fields

  • spre : the super-operator (left side operator multiplication) for the coupling operator.
  • spost : the super-operator (right side operator multiplication) for the coupling operator.
  • CommD : the super-operator (commutator) for the adjoint of the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • γ : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}$.
  • η_absorb : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonEmitMethod
bosonEmit(op, η_emit, γ_emit, η_absorb)

Generate bosonic bath which describes the emission process of the bosonic system by a correlation function $C^{\nu=-}$

Parameters

  • op::QuantumObject : The system annihilation operator according to the system-bosonic-bath interaction.
  • η_emit::Vector{Ti<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • γ_emit::Vector{Ti<:Number} : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}$.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
source
HierarchicalEOM.FermionBathType
struct FermionBath <: AbstractBath

An object which describes the interaction between system and fermionic bath

Fields

  • bath : the different fermion-bath-type objects which describes the interaction
  • op : The system "emission" operator according to the system-fermionic-bath interaction.
  • Nterm : the number of exponential-expansion term of correlation functions
  • δ : The approximation discrepancy which is used for adding the terminator to HEOM matrix (see function: addTerminator)

Methods

One can obtain the $k$-th exponent (exponential-expansion term) from bath::FermionBath by calling : bath[k]. HierarchicalEOM.jl also supports the following calls (methods) :

bath[1:k];   # returns a vector which contains the exponents from the `1`-st to the `k`-th term.
+\end{aligned}\]

where $\nu=+$ ($\nu=-$) represents absorption (emission) process, $J(\omega)$ is the spectral density of the bath and $n(\omega)$ is the Bose-Einstein distribution.

Parameters

  • op::QuantumObject : The system annihilation operator according to the system-bosonic-bath interaction.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}(\tau)$.
  • γ_absorb::Vector{Tj<:Number} : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}(\tau)$.
  • η_emit::Vector{Tk<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}(\tau)$.
  • γ_emit::Vector{Tl<:Number} : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}(\tau)$.
  • δ::Number : The approximation discrepancy (Defaults to 0.0) which is used for adding the terminator to HEOMLS matrix (see function: addTerminator)
source
HierarchicalEOM.bosonAbsorbType
struct bosonAbsorb <: AbstractBosonBath

An bath object which describes the absorption process of the bosonic system by a correlation function $C^{\nu=+}$

Fields

  • spre : the super-operator (left side operator multiplication) for the coupling operator.
  • spost : the super-operator (right side operator multiplication) for the coupling operator.
  • CommD : the super-operator (commutator) for the adjoint of the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • γ : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}$.
  • η_emit : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonAbsorbMethod
bosonAbsorb(op, η_absorb, γ_absorb, η_emit)

Generate bosonic bath which describes the absorption process of the bosonic system by a correlation function $C^{\nu=+}$

Parameters

  • op::QuantumObject : The system creation operator according to the system-fermionic-bath interaction.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • γ_absorb::Vector{Tj<:Number} : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}$.
  • η_emit::Vector{Tk<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
source
HierarchicalEOM.bosonEmitType
struct bosonEmit <: AbstractBosonBath

An bath object which describes the emission process of the bosonic system by a correlation function $C^{\nu=-}$

Fields

  • spre : the super-operator (left side operator multiplication) for the coupling operator.
  • spost : the super-operator (right side operator multiplication) for the coupling operator.
  • CommD : the super-operator (commutator) for the adjoint of the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • γ : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}$.
  • η_absorb : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.bosonEmitMethod
bosonEmit(op, η_emit, γ_emit, η_absorb)

Generate bosonic bath which describes the emission process of the bosonic system by a correlation function $C^{\nu=-}$

Parameters

  • op::QuantumObject : The system annihilation operator according to the system-bosonic-bath interaction.
  • η_emit::Vector{Ti<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • γ_emit::Vector{Ti<:Number} : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}$.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
source
HierarchicalEOM.FermionBathType
struct FermionBath <: AbstractBath

An object which describes the interaction between system and fermionic bath

Fields

  • bath : the different fermion-bath-type objects which describes the interaction
  • op : The system "emission" operator according to the system-fermionic-bath interaction.
  • Nterm : the number of exponential-expansion term of correlation functions
  • δ : The approximation discrepancy which is used for adding the terminator to HEOM matrix (see function: addTerminator)

Methods

One can obtain the $k$-th exponent (exponential-expansion term) from bath::FermionBath by calling : bath[k]. HierarchicalEOM.jl also supports the following calls (methods) :

bath[1:k];   # returns a vector which contains the exponents from the `1`-st to the `k`-th term.
 bath[1:end]; # returns a vector which contains all the exponential-expansion terms
 bath[:];     # returns a vector which contains all the exponential-expansion terms
 from b in bath
     # do something
-end
source
HierarchicalEOM.FermionBathMethod
FermionBath(op, η_absorb, γ_absorb, η_emit, γ_emit, δ=0.0)

Generate FermionBath object

\[\begin{aligned} C^{\nu=+}(\tau) &=\frac{1}{2\pi}\int_{-\infty}^{\infty} d\omega J(\omega) n(\omega) e^{i\omega \tau}\\ &=\sum_i \eta_i^{\nu=+} \exp(-\gamma_i^{\nu=+} \tau),\\ C^{\nu=-}(\tau) &=\frac{1}{2\pi}\int_{-\infty}^{\infty} d\omega J(\omega) (1-n(\omega)) e^{-i\omega \tau}\\ &=\sum_i \eta_i^{\nu=-} \exp(-\gamma_i^{\nu=-} \tau), -\end{aligned}\]

where $\nu=+$ ($\nu=-$) represents absorption (emission) process, $J(\omega)$ is the spectral density of the bath and $n(\omega)$ is the Fermi-Dirac distribution.

Parameters

  • op::QuantumObject : The system annihilation operator according to the system-fermionic-bath interaction.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}(\tau)$.
  • γ_absorb::Vector{Tj<:Number} : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}(\tau)$.
  • η_emit::Vector{Tk<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}(\tau)$.
  • γ_emit::Vector{Tl<:Number} : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}(\tau)$.
  • δ::Number : The approximation discrepancy (Defaults to 0.0) which is used for adding the terminator to HEOMLS matrix (see function: addTerminator)
source
HierarchicalEOM.fermionAbsorbType
struct fermionAbsorb <: AbstractFermionBath

An bath object which describes the absorption process of the fermionic system by a correlation function $C^{\nu=+}$

Fields

  • spre : the super-operator (left side operator multiplication) for the coupling operator.
  • spost : the super-operator (right side operator multiplication) for the coupling operator.
  • spreD : the super-operator (left side operator multiplication) for the adjoint of the coupling operator.
  • spostD : the super-operator (right side operator multiplication) for the adjoint of the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • γ : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}$.
  • η_emit : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.fermionAbsorbMethod
fermionAbsorb(op, η_absorb, γ_absorb, η_emit)

Generate fermionic bath which describes the absorption process of the fermionic system by a correlation function $C^{\nu=+}$

Parameters

  • op::QuantumObject : The system creation operator according to the system-fermionic-bath interaction.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • γ_absorb::Vector{Tj<:Number} : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}$.
  • η_emit::Vector{Tk<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
source
HierarchicalEOM.fermionEmitType
struct fermionEmit <: AbstractFermionBath

An bath object which describes the emission process of the fermionic system by a correlation function $C^{\nu=-}$

Fields

  • spre : the super-operator (left side operator multiplication) for the coupling operator.
  • spost : the super-operator (right side operator multiplication) for the coupling operator.
  • spreD : the super-operator (left side operator multiplication) for the adjoint of the coupling operator.
  • spostD : the super-operator (right side operator multiplication) for the adjoint of the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • γ : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}$.
  • η_absorb : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.fermionEmitMethod
fermionEmit(op, η_emit, γ_emit, η_absorb)

Generate fermionic bath which describes the emission process of the fermionic system by a correlation function $C^{\nu=-}$

Parameters

  • op::QuantumObject : The system annihilation operator according to the system-fermionic-bath interaction.
  • η_emit::Vector{Ti<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • γ_emit::Vector{Ti<:Number} : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}$.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
source

Bath Correlation Functions

HierarchicalEOM.Boson_DrudeLorentz_MatsubaraFunction
Boson_DrudeLorentz_Matsubara(op, λ, W, kT, N)

Constructing Drude-Lorentz bosonic bath with Matsubara expansion

Parameters

  • op : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • λ::Real: The coupling strength between the system and the bath.
  • W::Real: The reorganization energy (band-width) of the bath.
  • kT::Real: The product of the Boltzmann constant $k$ and the absolute temperature $T$ of the bath.
  • N::Int: (N+1)-terms of exponential terms are used to approximate the bath correlation function.

Returns

  • bath::BosonBath : a bosonic bath object with describes the interaction between system and bosonic bath
source
HierarchicalEOM.Boson_DrudeLorentz_PadeFunction
Boson_DrudeLorentz_Pade(op, λ, W, kT, N)

Constructing Drude-Lorentz bosonic bath with Padé expansion

A Padé approximant is a sum-over-poles expansion (see here for more details).

The application of the Padé method to spectrum decompoisitions is described in Ref. [1].

[1] J. Chem. Phys. 134, 244106 (2011)

Parameters

  • op : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • λ::Real: The coupling strength between the system and the bath.
  • W::Real: The reorganization energy (band-width) of the bath.
  • kT::Real: The product of the Boltzmann constant $k$ and the absolute temperature $T$ of the bath.
  • N::Int: (N+1)-terms of exponential terms are used to approximate the bath correlation function.

Returns

  • bath::BosonBath : a bosonic bath object with describes the interaction between system and bosonic bath
source
HierarchicalEOM.Fermion_Lorentz_MatsubaraFunction
Fermion_Lorentz_Matsubara(op, λ, μ, W, kT, N)

Constructing Lorentzian fermionic bath with Matsubara expansion

Parameters

  • op : The system annihilation operator according to the system-fermionic-bath interaction.
  • λ::Real: The coupling strength between the system and the bath.
  • μ::Real: The chemical potential of the bath.
  • W::Real: The reorganization energy (band-width) of the bath.
  • kT::Real: The product of the Boltzmann constant $k$ and the absolute temperature $T$ of the bath.
  • N::Int: (N+1)-terms of exponential terms are used to approximate each correlation functions ($C^{\nu=\pm}$).

Returns

  • bath::FermionBath : a fermionic bath object with describes the interaction between system and fermionic bath
source
HierarchicalEOM.Fermion_Lorentz_PadeFunction
Fermion_Lorentz_Pade(op, λ, μ, W, kT, N)

Constructing Lorentzian fermionic bath with Padé expansion

A Padé approximant is a sum-over-poles expansion (see here for more details).

The application of the Padé method to spectrum decompoisitions is described in Ref. [1].

[1] J. Chem. Phys. 134, 244106 (2011)

Parameters

  • op : The system annihilation operator according to the system-fermionic-bath interaction.
  • λ::Real: The coupling strength between the system and the bath.
  • μ::Real: The chemical potential of the bath.
  • W::Real: The reorganization energy (band-width) of the bath.
  • kT::Real: The product of the Boltzmann constant $k$ and the absolute temperature $T$ of the bath.
  • N::Int: (N+1)-terms of exponential terms are used to approximate each correlation functions ($C^{\nu=\pm}$).

Returns

  • bath::FermionBath : a fermionic bath object with describes the interaction between system and fermionic bath
source

Parity

HEOM Liouvillian superoperator matrices

HierarchicalEOM.HEOMSuperOpType
struct HEOMSuperOp

General HEOM superoperator matrix.

Fields

  • data<:AbstractSparseMatrix : the HEOM superoperator matrix
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of auxiliary density operators
  • parity: the parity label (EVEN or ODD).
source
HierarchicalEOM.HEOMSuperOpType
HEOMSuperOp(op, opParity, refHEOMLS, mul_basis="L"; Id_cache=I(refHEOMLS.N))

Construct the HEOM superoperator matrix corresponding to the given system operator which acts on all ADOs.

During the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.

Parameters

  • op : The system operator which will act on all ADOs.
  • opParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.
  • refHEOMLS::AbstractHEOMLSMatrix : copy the system dims and number of ADOs (N) from this reference HEOMLS matrix
  • mul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs. Defaults to "L".

if mul_basis is specified as

  • "L" : the matrix op has same dimension with the system and acts on left-hand side.
  • "R" : the matrix op has same dimension with the system and acts on right-hand side.
  • "LR" : the matrix op is a superoperator of the system.
source
HierarchicalEOM.HEOMSuperOpType
HEOMSuperOp(op, opParity, refADOs, mul_basis="L"; Id_cache=I(refADOs.N))

Construct the HEOMLS matrix corresponding to the given system operator which multiplies on the "L"eft-hand ("R"ight-hand) side basis of all ADOs.

During the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.

Parameters

  • op : The system operator which will act on all ADOs.
  • opParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.
  • refADOs::ADOs : copy the system dims and number of ADOs (N) from this reference ADOs
  • mul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs. Defaults to "L".

if mul_basis is specified as

  • "L" : the matrix op has same dimension with the system and acts on left-hand side.
  • "R" : the matrix op has same dimension with the system and acts on right-hand side.
  • "LR" : the matrix op is a superoperator of the system.
source
HierarchicalEOM.HEOMSuperOpMethod
HEOMSuperOp(op, opParity, dims, N, mul_basis; Id_cache=I(N))

Construct the HEOM superoperator matrix corresponding to the given system operator which acts on all ADOs.

During the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.

Parameters

  • op : The system operator which will act on all ADOs.
  • opParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.
  • dims::SVector : the dimension list of the coupling operator (should be equal to the system dims).
  • N::Int : the number of ADOs.
  • mul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs.

if mul_basis is specified as

  • "L" : the matrix op has same dimension with the system and acts on left-hand side.
  • "R" : the matrix op has same dimension with the system and acts on right-hand side.
  • "LR" : the matrix op is a SuperOperator of the system.
source
HierarchicalEOM.M_SType
struct M_S <: AbstractHEOMLSMatrix

HEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0. This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely

\[M[\cdot]=-i \left[H_{sys}, \cdot \right]_-,\]

where $[\cdot, \cdot]_-$ stands for commutator.

Fields

  • data<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator
  • tier : the tier (cutoff level) for the hierarchy, which equals to 0 in this case
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of total ADOs, which equals to 1 (only the reduced density operator) in this case
  • sup_dim : the dimension of system superoperator
  • parity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
source
HierarchicalEOM.M_SType
M_S(Hsys, parity=EVEN; verbose=true)

Generate HEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0. This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely

\[M[\cdot]=-i \left[H_{sys}, \cdot \right]_-,\]

where $[\cdot, \cdot]_-$ stands for commutator.

Parameters

  • Hsys : The time-independent system Hamiltonian
  • parity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • verbose::Bool : To display verbose output during the process or not. Defaults to true.

Note that the parity only need to be set as ODD when the system contains fermionic systems and you need to calculate the spectrum (density of states) of it.

source
HierarchicalEOM.M_BosonType
struct M_Boson <: AbstractHEOMLSMatrix

HEOM Liouvillian superoperator matrix for bosonic bath

Fields

  • data<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator
  • tier : the tier (cutoff level) for the bosonic hierarchy
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of total ADOs
  • sup_dim : the dimension of system superoperator
  • parity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • bath::Vector{BosonBath} : the vector which stores all BosonBath objects
  • hierarchy::HierarchyDict: the object which contains all dictionaries for boson-bath-ADOs hierarchy.
source
HierarchicalEOM.M_BosonType
M_Boson(Hsys, tier, Bath, parity=EVEN; threshold=0.0, verbose=true)

Generate the boson-type HEOM Liouvillian superoperator matrix

Parameters

  • Hsys : The time-independent system Hamiltonian
  • tier::Int : the tier (cutoff level) for the bosonic bath
  • Bath::Vector{BosonBath} : objects for different bosonic baths
  • parity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • threshold::Real : The threshold of the importance value (see Ref. [1]). Defaults to 0.0.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.

Note that the parity only need to be set as ODD when the system contains fermionic systems and you need to calculate the spectrum (density of states) of it.

[1] Phys. Rev. B 88, 235426 (2013)

source
HierarchicalEOM.M_FermionType
struct M_Fermion <: AbstractHEOMLSMatrix

HEOM Liouvillian superoperator matrix for fermionic bath

Fields

  • data<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator
  • tier : the tier (cutoff level) for the fermionic hierarchy
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of total ADOs
  • sup_dim : the dimension of system superoperator
  • parity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • bath::Vector{FermionBath} : the vector which stores all FermionBath objects
  • hierarchy::HierarchyDict: the object which contains all dictionaries for fermion-bath-ADOs hierarchy.
source
HierarchicalEOM.M_FermionType
M_Fermion(Hsys, tier, Bath, parity=EVEN; threshold=0.0, verbose=true)

Generate the fermion-type HEOM Liouvillian superoperator matrix

Parameters

  • Hsys : The time-independent system Hamiltonian
  • tier::Int : the tier (cutoff level) for the fermionic bath
  • Bath::Vector{FermionBath} : objects for different fermionic baths
  • parity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • threshold::Real : The threshold of the importance value (see Ref. [1]). Defaults to 0.0.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.

[1] Phys. Rev. B 88, 235426 (2013)

source
HierarchicalEOM.M_Boson_FermionType
struct M_Boson_Fermion <: AbstractHEOMLSMatrix

HEOM Liouvillian superoperator matrix for mixtured (bosonic and fermionic) bath

Fields

  • data<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator
  • Btier : the tier (cutoff level) for bosonic hierarchy
  • Ftier : the tier (cutoff level) for fermionic hierarchy
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of total ADOs
  • sup_dim : the dimension of system superoperator
  • parity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • Bbath::Vector{BosonBath} : the vector which stores all BosonBath objects
  • Fbath::Vector{FermionBath} : the vector which stores all FermionBath objects
  • hierarchy::MixHierarchyDict: the object which contains all dictionaries for mixed-bath-ADOs hierarchy.
source
HierarchicalEOM.M_Boson_FermionType
M_Boson_Fermion(Hsys, Btier, Ftier, Bbath, Fbath, parity=EVEN; threshold=0.0, verbose=true)

Generate the boson-fermion-type HEOM Liouvillian superoperator matrix

Parameters

  • Hsys : The time-independent system Hamiltonian
  • Btier::Int : the tier (cutoff level) for the bosonic bath
  • Ftier::Int : the tier (cutoff level) for the fermionic bath
  • Bbath::Vector{BosonBath} : objects for different bosonic baths
  • Fbath::Vector{FermionBath} : objects for different fermionic baths
  • parity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • threshold::Real : The threshold of the importance value (see Ref. [1, 2]). Defaults to 0.0.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.

Note that the parity only need to be set as ODD when the system contains fermion systems and you need to calculate the spectrum of it.

[1] Phys. Rev. B 88, 235426 (2013) [2] Phys. Rev. B 103, 235413 (2021)

source
Base.sizeMethod
size(M::HEOMSuperOp)

Returns the size of the HEOM superoperator matrix

source
Base.sizeMethod
size(M::HEOMSuperOp, dim::Int)

Returns the specified dimension of the HEOM superoperator matrix

source
Base.sizeMethod
size(M::AbstractHEOMLSMatrix)

Returns the size of the HEOM Liouvillian superoperator matrix

source
Base.sizeMethod
size(M::AbstractHEOMLSMatrix, dim::Int)

Returns the specified dimension of the HEOM Liouvillian superoperator matrix

source
Base.eltypeMethod
eltype(M::HEOMSuperOp)

Returns the elements' type of the HEOM superoperator matrix

source
Base.eltypeMethod
eltype(M::AbstractHEOMLSMatrix)

Returns the elements' type of the HEOM Liouvillian superoperator matrix

source
HierarchicalEOM.PropagatorFunction
Propagator(M, Δt; threshold, nonzero_tol)

Use FastExpm.jl to calculate the propagator matrix from a given HEOM Liouvillian superoperator matrix $M$ with a specific time step $\Delta t$. That is, $\exp(M * \Delta t)$.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • Δt::Real : A specific time step (time interval).
  • threshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.
  • nonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.

For more details, please refer to FastExpm.jl

Returns

  • ::SparseMatrixCSC{ComplexF64, Int64} : the propagator matrix
source
HierarchicalEOM.addBosonDissipatorFunction
addBosonDissipator(M, jumpOP)

Adding bosonic dissipator to a given HEOMLS matrix which describes how the system dissipatively interacts with an extra bosonic environment. The dissipator is defined as follows

\[D[J](\cdot) = J(\cdot) J^\dagger - \frac{1}{2}\left(J^\dagger J (\cdot) + (\cdot) J^\dagger J \right),\]

where $J\equiv \sqrt{\gamma}V$ is the jump operator, $V$ describes the dissipative part (operator) of the dynamics, $\gamma$ represents a non-negative damping rate and $[\cdot, \cdot]_+$ stands for anti-commutator.

Note that if $V$ is acting on fermionic systems, it should be even-parity to be compatible with charge conservation.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • jumpOP::AbstractVector : The list of collapse (jump) operators $\{J_i\}_i$ to add. Defaults to empty vector [].

Return

  • M_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix
source
HierarchicalEOM.addFermionDissipatorFunction
addFermionDissipator(M, jumpOP)

Adding fermionic dissipator to a given HEOMLS matrix which describes how the system dissipatively interacts with an extra fermionic environment. The dissipator with EVEN parity is defined as follows

\[D_{\textrm{even}}[J](\cdot) = J(\cdot) J^\dagger - \frac{1}{2}\left(J^\dagger J (\cdot) + (\cdot) J^\dagger J \right),\]

where $J\equiv \sqrt{\gamma}V$ is the jump operator, $V$ describes the dissipative part (operator) of the dynamics, $\gamma$ represents a non-negative damping rate and $[\cdot, \cdot]_+$ stands for anti-commutator.

Similary, the dissipator with ODD parity is defined as follows

\[D_{\textrm{odd}}[J](\cdot) = - J(\cdot) J^\dagger - \frac{1}{2}\left(J^\dagger J (\cdot) + (\cdot) J^\dagger J \right),\]

Note that the parity of the dissipator will be determined by the parity of the given HEOMLS matrix M.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • jumpOP::AbstractVector : The list of collapse (jump) operators to add. Defaults to empty vector [].

Return

  • M_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix
source
HierarchicalEOM.addTerminatorFunction
addTerminator(M, Bath)

Adding terminator to a given HEOMLS matrix.

The terminator is a Liouvillian term representing the contribution to the system-bath dynamics of all exponential-expansion terms beyond Bath.Nterm

The difference between the true correlation function and the sum of the Bath.Nterm-exponential terms is approximately 2 * δ * dirac(t). Here, δ is the approximation discrepancy and dirac(t) denotes the Dirac-delta function.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • Bath::Union{BosonBath, FermionBath} : The bath object which contains the approximation discrepancy δ

Return

  • M_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix
source

Auxiliary Density Operators (ADOs)

HierarchicalEOM.ADOsType
struct ADOs

The Auxiliary Density Operators for HEOM model.

Fields

  • data : the vectorized auxiliary density operators
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of auxiliary density operators
  • parity: the parity label (EVEN or ODD).

Methods

One can obtain the density matrix for specific index (idx) by calling : ados[idx]. HierarchicalEOM.jl also supports the following calls (methods) :

length(ados);  # returns the total number of `ADOs`
+\end{aligned}\]

where $\nu=+$ ($\nu=-$) represents absorption (emission) process, $J(\omega)$ is the spectral density of the bath and $n(\omega)$ is the Fermi-Dirac distribution.

Parameters

  • op::QuantumObject : The system annihilation operator according to the system-fermionic-bath interaction.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}(\tau)$.
  • γ_absorb::Vector{Tj<:Number} : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}(\tau)$.
  • η_emit::Vector{Tk<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}(\tau)$.
  • γ_emit::Vector{Tl<:Number} : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}(\tau)$.
  • δ::Number : The approximation discrepancy (Defaults to 0.0) which is used for adding the terminator to HEOMLS matrix (see function: addTerminator)
source
HierarchicalEOM.fermionAbsorbType
struct fermionAbsorb <: AbstractFermionBath

An bath object which describes the absorption process of the fermionic system by a correlation function $C^{\nu=+}$

Fields

  • spre : the super-operator (left side operator multiplication) for the coupling operator.
  • spost : the super-operator (right side operator multiplication) for the coupling operator.
  • spreD : the super-operator (left side operator multiplication) for the adjoint of the coupling operator.
  • spostD : the super-operator (right side operator multiplication) for the adjoint of the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • γ : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}$.
  • η_emit : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.fermionAbsorbMethod
fermionAbsorb(op, η_absorb, γ_absorb, η_emit)

Generate fermionic bath which describes the absorption process of the fermionic system by a correlation function $C^{\nu=+}$

Parameters

  • op::QuantumObject : The system creation operator according to the system-fermionic-bath interaction.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • γ_absorb::Vector{Tj<:Number} : the coefficients $\gamma_i$ of absorption bath correlation function $C^{\nu=+}$.
  • η_emit::Vector{Tk<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
source
HierarchicalEOM.fermionEmitType
struct fermionEmit <: AbstractFermionBath

An bath object which describes the emission process of the fermionic system by a correlation function $C^{\nu=-}$

Fields

  • spre : the super-operator (left side operator multiplication) for the coupling operator.
  • spost : the super-operator (right side operator multiplication) for the coupling operator.
  • spreD : the super-operator (left side operator multiplication) for the adjoint of the coupling operator.
  • spostD : the super-operator (right side operator multiplication) for the adjoint of the coupling operator.
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • η : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • γ : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}$.
  • η_absorb : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
  • Nterm : the number of exponential-expansion term of correlation function
source
HierarchicalEOM.fermionEmitMethod
fermionEmit(op, η_emit, γ_emit, η_absorb)

Generate fermionic bath which describes the emission process of the fermionic system by a correlation function $C^{\nu=-}$

Parameters

  • op::QuantumObject : The system annihilation operator according to the system-fermionic-bath interaction.
  • η_emit::Vector{Ti<:Number} : the coefficients $\eta_i$ of emission bath correlation function $C^{\nu=-}$.
  • γ_emit::Vector{Ti<:Number} : the coefficients $\gamma_i$ of emission bath correlation function $C^{\nu=-}$.
  • η_absorb::Vector{Ti<:Number} : the coefficients $\eta_i$ of absorption bath correlation function $C^{\nu=+}$.
source

Bath Correlation Functions

HierarchicalEOM.Boson_DrudeLorentz_MatsubaraFunction
Boson_DrudeLorentz_Matsubara(op, λ, W, kT, N)

Constructing Drude-Lorentz bosonic bath with Matsubara expansion

Parameters

  • op : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • λ::Real: The coupling strength between the system and the bath.
  • W::Real: The reorganization energy (band-width) of the bath.
  • kT::Real: The product of the Boltzmann constant $k$ and the absolute temperature $T$ of the bath.
  • N::Int: (N+1)-terms of exponential terms are used to approximate the bath correlation function.

Returns

  • bath::BosonBath : a bosonic bath object with describes the interaction between system and bosonic bath
source
HierarchicalEOM.Boson_DrudeLorentz_PadeFunction
Boson_DrudeLorentz_Pade(op, λ, W, kT, N)

Constructing Drude-Lorentz bosonic bath with Padé expansion

A Padé approximant is a sum-over-poles expansion (see here for more details).

The application of the Padé method to spectrum decompoisitions is described in Ref. [1].

[1] J. Chem. Phys. 134, 244106 (2011)

Parameters

  • op : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.
  • λ::Real: The coupling strength between the system and the bath.
  • W::Real: The reorganization energy (band-width) of the bath.
  • kT::Real: The product of the Boltzmann constant $k$ and the absolute temperature $T$ of the bath.
  • N::Int: (N+1)-terms of exponential terms are used to approximate the bath correlation function.

Returns

  • bath::BosonBath : a bosonic bath object with describes the interaction between system and bosonic bath
source
HierarchicalEOM.Fermion_Lorentz_MatsubaraFunction
Fermion_Lorentz_Matsubara(op, λ, μ, W, kT, N)

Constructing Lorentzian fermionic bath with Matsubara expansion

Parameters

  • op : The system annihilation operator according to the system-fermionic-bath interaction.
  • λ::Real: The coupling strength between the system and the bath.
  • μ::Real: The chemical potential of the bath.
  • W::Real: The reorganization energy (band-width) of the bath.
  • kT::Real: The product of the Boltzmann constant $k$ and the absolute temperature $T$ of the bath.
  • N::Int: (N+1)-terms of exponential terms are used to approximate each correlation functions ($C^{\nu=\pm}$).

Returns

  • bath::FermionBath : a fermionic bath object with describes the interaction between system and fermionic bath
source
HierarchicalEOM.Fermion_Lorentz_PadeFunction
Fermion_Lorentz_Pade(op, λ, μ, W, kT, N)

Constructing Lorentzian fermionic bath with Padé expansion

A Padé approximant is a sum-over-poles expansion (see here for more details).

The application of the Padé method to spectrum decompoisitions is described in Ref. [1].

[1] J. Chem. Phys. 134, 244106 (2011)

Parameters

  • op : The system annihilation operator according to the system-fermionic-bath interaction.
  • λ::Real: The coupling strength between the system and the bath.
  • μ::Real: The chemical potential of the bath.
  • W::Real: The reorganization energy (band-width) of the bath.
  • kT::Real: The product of the Boltzmann constant $k$ and the absolute temperature $T$ of the bath.
  • N::Int: (N+1)-terms of exponential terms are used to approximate each correlation functions ($C^{\nu=\pm}$).

Returns

  • bath::FermionBath : a fermionic bath object with describes the interaction between system and fermionic bath
source

Parity

HEOM Liouvillian superoperator matrices

HierarchicalEOM.HEOMSuperOpType
struct HEOMSuperOp

General HEOM superoperator matrix.

Fields

  • data<:AbstractSparseMatrix : the HEOM superoperator matrix
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of auxiliary density operators
  • parity: the parity label (EVEN or ODD).
source
HierarchicalEOM.HEOMSuperOpType
HEOMSuperOp(op, opParity, refHEOMLS, mul_basis="L"; Id_cache=I(refHEOMLS.N))

Construct the HEOM superoperator matrix corresponding to the given system operator which acts on all ADOs.

During the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.

Parameters

  • op : The system operator which will act on all ADOs.
  • opParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.
  • refHEOMLS::AbstractHEOMLSMatrix : copy the system dims and number of ADOs (N) from this reference HEOMLS matrix
  • mul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs. Defaults to "L".

if mul_basis is specified as

  • "L" : the matrix op has same dimension with the system and acts on left-hand side.
  • "R" : the matrix op has same dimension with the system and acts on right-hand side.
  • "LR" : the matrix op is a superoperator of the system.
source
HierarchicalEOM.HEOMSuperOpType
HEOMSuperOp(op, opParity, refADOs, mul_basis="L"; Id_cache=I(refADOs.N))

Construct the HEOMLS matrix corresponding to the given system operator which multiplies on the "L"eft-hand ("R"ight-hand) side basis of all ADOs.

During the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.

Parameters

  • op : The system operator which will act on all ADOs.
  • opParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.
  • refADOs::ADOs : copy the system dims and number of ADOs (N) from this reference ADOs
  • mul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs. Defaults to "L".

if mul_basis is specified as

  • "L" : the matrix op has same dimension with the system and acts on left-hand side.
  • "R" : the matrix op has same dimension with the system and acts on right-hand side.
  • "LR" : the matrix op is a superoperator of the system.
source
HierarchicalEOM.HEOMSuperOpMethod
HEOMSuperOp(op, opParity, dims, N, mul_basis; Id_cache=I(N))

Construct the HEOM superoperator matrix corresponding to the given system operator which acts on all ADOs.

During the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.

Parameters

  • op : The system operator which will act on all ADOs.
  • opParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.
  • dims::SVector : the dimension list of the coupling operator (should be equal to the system dims).
  • N::Int : the number of ADOs.
  • mul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs.

if mul_basis is specified as

  • "L" : the matrix op has same dimension with the system and acts on left-hand side.
  • "R" : the matrix op has same dimension with the system and acts on right-hand side.
  • "LR" : the matrix op is a SuperOperator of the system.
source
HierarchicalEOM.M_SType
struct M_S <: AbstractHEOMLSMatrix

HEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0. This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely

\[M[\cdot]=-i \left[H_{sys}, \cdot \right]_-,\]

where $[\cdot, \cdot]_-$ stands for commutator.

Fields

  • data<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator
  • tier : the tier (cutoff level) for the hierarchy, which equals to 0 in this case
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of total ADOs, which equals to 1 (only the reduced density operator) in this case
  • sup_dim : the dimension of system superoperator
  • parity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
source
HierarchicalEOM.M_SType
M_S(Hsys, parity=EVEN; verbose=true)

Generate HEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0. This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely

\[M[\cdot]=-i \left[H_{sys}, \cdot \right]_-,\]

where $[\cdot, \cdot]_-$ stands for commutator.

Parameters

  • Hsys : The time-independent system Hamiltonian
  • parity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • verbose::Bool : To display verbose output during the process or not. Defaults to true.

Note that the parity only need to be set as ODD when the system contains fermionic systems and you need to calculate the spectrum (density of states) of it.

source
HierarchicalEOM.M_BosonType
struct M_Boson <: AbstractHEOMLSMatrix

HEOM Liouvillian superoperator matrix for bosonic bath

Fields

  • data<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator
  • tier : the tier (cutoff level) for the bosonic hierarchy
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of total ADOs
  • sup_dim : the dimension of system superoperator
  • parity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • bath::Vector{BosonBath} : the vector which stores all BosonBath objects
  • hierarchy::HierarchyDict: the object which contains all dictionaries for boson-bath-ADOs hierarchy.
source
HierarchicalEOM.M_BosonType
M_Boson(Hsys, tier, Bath, parity=EVEN; threshold=0.0, verbose=true)

Generate the boson-type HEOM Liouvillian superoperator matrix

Parameters

  • Hsys : The time-independent system Hamiltonian
  • tier::Int : the tier (cutoff level) for the bosonic bath
  • Bath::Vector{BosonBath} : objects for different bosonic baths
  • parity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • threshold::Real : The threshold of the importance value (see Ref. [1]). Defaults to 0.0.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.

Note that the parity only need to be set as ODD when the system contains fermionic systems and you need to calculate the spectrum (density of states) of it.

[1] Phys. Rev. B 88, 235426 (2013)

source
HierarchicalEOM.M_FermionType
struct M_Fermion <: AbstractHEOMLSMatrix

HEOM Liouvillian superoperator matrix for fermionic bath

Fields

  • data<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator
  • tier : the tier (cutoff level) for the fermionic hierarchy
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of total ADOs
  • sup_dim : the dimension of system superoperator
  • parity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • bath::Vector{FermionBath} : the vector which stores all FermionBath objects
  • hierarchy::HierarchyDict: the object which contains all dictionaries for fermion-bath-ADOs hierarchy.
source
HierarchicalEOM.M_FermionType
M_Fermion(Hsys, tier, Bath, parity=EVEN; threshold=0.0, verbose=true)

Generate the fermion-type HEOM Liouvillian superoperator matrix

Parameters

  • Hsys : The time-independent system Hamiltonian
  • tier::Int : the tier (cutoff level) for the fermionic bath
  • Bath::Vector{FermionBath} : objects for different fermionic baths
  • parity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • threshold::Real : The threshold of the importance value (see Ref. [1]). Defaults to 0.0.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.

[1] Phys. Rev. B 88, 235426 (2013)

source
HierarchicalEOM.M_Boson_FermionType
struct M_Boson_Fermion <: AbstractHEOMLSMatrix

HEOM Liouvillian superoperator matrix for mixtured (bosonic and fermionic) bath

Fields

  • data<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator
  • Btier : the tier (cutoff level) for bosonic hierarchy
  • Ftier : the tier (cutoff level) for fermionic hierarchy
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of total ADOs
  • sup_dim : the dimension of system superoperator
  • parity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • Bbath::Vector{BosonBath} : the vector which stores all BosonBath objects
  • Fbath::Vector{FermionBath} : the vector which stores all FermionBath objects
  • hierarchy::MixHierarchyDict: the object which contains all dictionaries for mixed-bath-ADOs hierarchy.
source
HierarchicalEOM.M_Boson_FermionType
M_Boson_Fermion(Hsys, Btier, Ftier, Bbath, Fbath, parity=EVEN; threshold=0.0, verbose=true)

Generate the boson-fermion-type HEOM Liouvillian superoperator matrix

Parameters

  • Hsys : The time-independent system Hamiltonian
  • Btier::Int : the tier (cutoff level) for the bosonic bath
  • Ftier::Int : the tier (cutoff level) for the fermionic bath
  • Bbath::Vector{BosonBath} : objects for different bosonic baths
  • Fbath::Vector{FermionBath} : objects for different fermionic baths
  • parity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).
  • threshold::Real : The threshold of the importance value (see Ref. [1, 2]). Defaults to 0.0.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.

Note that the parity only need to be set as ODD when the system contains fermion systems and you need to calculate the spectrum of it.

[1] Phys. Rev. B 88, 235426 (2013) [2] Phys. Rev. B 103, 235413 (2021)

source
Base.sizeMethod
size(M::HEOMSuperOp)

Returns the size of the HEOM superoperator matrix

source
Base.sizeMethod
size(M::HEOMSuperOp, dim::Int)

Returns the specified dimension of the HEOM superoperator matrix

source
Base.sizeMethod
size(M::AbstractHEOMLSMatrix)

Returns the size of the HEOM Liouvillian superoperator matrix

source
Base.sizeMethod
size(M::AbstractHEOMLSMatrix, dim::Int)

Returns the specified dimension of the HEOM Liouvillian superoperator matrix

source
Base.eltypeMethod
eltype(M::HEOMSuperOp)

Returns the elements' type of the HEOM superoperator matrix

source
Base.eltypeMethod
eltype(M::AbstractHEOMLSMatrix)

Returns the elements' type of the HEOM Liouvillian superoperator matrix

source
HierarchicalEOM.PropagatorFunction
Propagator(M, Δt; threshold, nonzero_tol)

Use FastExpm.jl to calculate the propagator matrix from a given HEOM Liouvillian superoperator matrix $M$ with a specific time step $\Delta t$. That is, $\exp(M * \Delta t)$.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • Δt::Real : A specific time step (time interval).
  • threshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.
  • nonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.

For more details, please refer to FastExpm.jl

Returns

  • ::SparseMatrixCSC{ComplexF64, Int64} : the propagator matrix
source
HierarchicalEOM.addBosonDissipatorFunction
addBosonDissipator(M, jumpOP)

Adding bosonic dissipator to a given HEOMLS matrix which describes how the system dissipatively interacts with an extra bosonic environment. The dissipator is defined as follows

\[D[J](\cdot) = J(\cdot) J^\dagger - \frac{1}{2}\left(J^\dagger J (\cdot) + (\cdot) J^\dagger J \right),\]

where $J\equiv \sqrt{\gamma}V$ is the jump operator, $V$ describes the dissipative part (operator) of the dynamics, $\gamma$ represents a non-negative damping rate and $[\cdot, \cdot]_+$ stands for anti-commutator.

Note that if $V$ is acting on fermionic systems, it should be even-parity to be compatible with charge conservation.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • jumpOP::AbstractVector : The list of collapse (jump) operators $\{J_i\}_i$ to add. Defaults to empty vector [].

Return

  • M_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix
source
HierarchicalEOM.addFermionDissipatorFunction
addFermionDissipator(M, jumpOP)

Adding fermionic dissipator to a given HEOMLS matrix which describes how the system dissipatively interacts with an extra fermionic environment. The dissipator with EVEN parity is defined as follows

\[D_{\textrm{even}}[J](\cdot) = J(\cdot) J^\dagger - \frac{1}{2}\left(J^\dagger J (\cdot) + (\cdot) J^\dagger J \right),\]

where $J\equiv \sqrt{\gamma}V$ is the jump operator, $V$ describes the dissipative part (operator) of the dynamics, $\gamma$ represents a non-negative damping rate and $[\cdot, \cdot]_+$ stands for anti-commutator.

Similarly, the dissipator with ODD parity is defined as follows

\[D_{\textrm{odd}}[J](\cdot) = - J(\cdot) J^\dagger - \frac{1}{2}\left(J^\dagger J (\cdot) + (\cdot) J^\dagger J \right),\]

Note that the parity of the dissipator will be determined by the parity of the given HEOMLS matrix M.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • jumpOP::AbstractVector : The list of collapse (jump) operators to add. Defaults to empty vector [].

Return

  • M_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix
source
HierarchicalEOM.addTerminatorFunction
addTerminator(M, Bath)

Adding terminator to a given HEOMLS matrix.

The terminator is a Liouvillian term representing the contribution to the system-bath dynamics of all exponential-expansion terms beyond Bath.Nterm

The difference between the true correlation function and the sum of the Bath.Nterm-exponential terms is approximately 2 * δ * dirac(t). Here, δ is the approximation discrepancy and dirac(t) denotes the Dirac-delta function.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • Bath::Union{BosonBath, FermionBath} : The bath object which contains the approximation discrepancy δ

Return

  • M_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix
source

Auxiliary Density Operators (ADOs)

HierarchicalEOM.ADOsType
struct ADOs

The Auxiliary Density Operators for HEOM model.

Fields

  • data : the vectorized auxiliary density operators
  • dims : the dimension list of the coupling operator (should be equal to the system dims).
  • N : the number of auxiliary density operators
  • parity: the parity label (EVEN or ODD).

Methods

One can obtain the density matrix for specific index (idx) by calling : ados[idx]. HierarchicalEOM.jl also supports the following calls (methods) :

length(ados);  # returns the total number of `ADOs`
 ados[1:idx];   # returns a vector which contains the `ADO` (in matrix form) from index `1` to `idx`
 ados[1:end];   # returns a vector which contains all the `ADO` (in matrix form)
 ados[:];       # returns a vector which contains all the `ADO` (in matrix form)
 for rho in ados  # iteration
     # do something
-end
source
HierarchicalEOM.ADOsMethod
ADOs(V, N, parity)

Gernerate the object of auxiliary density operators for HEOM model.

Parameters

  • V::AbstractVector : the vectorized auxiliary density operators
  • N::Int : the number of auxiliary density operators.
  • parity::AbstractParity : the parity label (EVEN or ODD). Default to EVEN.
source
Base.lengthMethod
length(A::ADOs)

Returns the total number of the Auxiliary Density Operators (ADOs)

source
Base.eltypeMethod
eltype(A::ADOs)

Returns the elements' type of the Auxiliary Density Operators (ADOs)

source
HierarchicalEOM.getRhoFunction
getRho(ados)

Return the density matrix of the reduced state (system) from a given auxiliary density operators

Parameters

  • ados::ADOs : the auxiliary density operators for HEOM model

Returns

  • ρ::QuantumObject : The density matrix of the reduced state
source
HierarchicalEOM.getADOFunction
getADO(ados, idx)

Return the auxiliary density operator with a specific index from auxiliary density operators

This function equals to calling : ados[idx].

Parameters

  • ados::ADOs : the auxiliary density operators for HEOM model
  • idx::Int : the index of the auxiliary density operator

Returns

  • ρ_idx::QuantumObject : The auxiliary density operator
source
QuantumToolbox.expectFunction
expect(op, ados; take_real=true)

Return the expectation value of the operator op for the reduced density operator in the given ados, namely

\[\textrm{Tr}\left[ O \rho \right],\]

where $O$ is the operator and $\rho$ is the reduced density operator in the given ADOs.

Parameters

  • op : the operator $O$ to take the expectation value
  • ados::ADOs : the auxiliary density operators for HEOM model
  • take_real::Bool : whether to automatically take the real part of the trace or not. Default to true

Returns

  • exp_val : The expectation value
source
expect(op, ados_list; take_real=true)

Return a list of expectation values of the operator op corresponds to the reduced density operators in the given ados_list, namely

\[\textrm{Tr}\left[ O \rho \right],\]

where $O$ is the operator and $\rho$ is the reduced density operator in one of the ADOs from ados_list.

Parameters

  • op : the operator $O$ to take the expectation value
  • ados_list::Vector{ADOs} : the list of auxiliary density operators for HEOM model
  • take_real::Bool : whether to automatically take the real part of the trace or not. Default to true

Returns

  • exp_val : The expectation value
source

Hierarchy Dictionary

HierarchicalEOM.NvecType
struct Nvec

An object which describes the repetition number of each multi-index ensembles in auxiliary density operators.

The n_vector ($\vec{n}$) denotes a set of integers:

\[\{ n_{1,1}, ..., n_{\alpha, k}, ... \}\]

associated with the $k$-th exponential-expansion term in the $\alpha$-th bath. If $n_{\alpha, k} = 3$ means that the multi-index ensemble $\{\alpha, k\}$ appears three times in the multi-index vector of ADOs (see the notations in our paper).

The hierarchy level ($L$) for an n_vector is given by $L=\sum_{\alpha, k} n_{\alpha, k}$

Fields

  • data : the n_vector
  • level : The level L for the n_vector

Methods

One can obtain the repetition number for specific index (idx) by calling : n_vector[idx]. To obtain the corresponding tuple $(\alpha, k)$ for a given index idx, see bathPtr in HierarchyDict for more details.

HierarchicalEOM.jl also supports the following calls (methods) :

length(n_vector);  # returns the length of `Nvec`
+end
source
HierarchicalEOM.ADOsMethod
ADOs(V, N, parity)

Generate the object of auxiliary density operators for HEOM model.

Parameters

  • V::AbstractVector : the vectorized auxiliary density operators
  • N::Int : the number of auxiliary density operators.
  • parity::AbstractParity : the parity label (EVEN or ODD). Default to EVEN.
source
Base.lengthMethod
length(A::ADOs)

Returns the total number of the Auxiliary Density Operators (ADOs)

source
Base.eltypeMethod
eltype(A::ADOs)

Returns the elements' type of the Auxiliary Density Operators (ADOs)

source
HierarchicalEOM.getRhoFunction
getRho(ados)

Return the density matrix of the reduced state (system) from a given auxiliary density operators

Parameters

  • ados::ADOs : the auxiliary density operators for HEOM model

Returns

  • ρ::QuantumObject : The density matrix of the reduced state
source
HierarchicalEOM.getADOFunction
getADO(ados, idx)

Return the auxiliary density operator with a specific index from auxiliary density operators

This function equals to calling : ados[idx].

Parameters

  • ados::ADOs : the auxiliary density operators for HEOM model
  • idx::Int : the index of the auxiliary density operator

Returns

  • ρ_idx::QuantumObject : The auxiliary density operator
source
QuantumToolbox.expectFunction
expect(op, ados; take_real=true)

Return the expectation value of the operator op for the reduced density operator in the given ados, namely

\[\textrm{Tr}\left[ O \rho \right],\]

where $O$ is the operator and $\rho$ is the reduced density operator in the given ADOs.

Parameters

  • op : the operator $O$ to take the expectation value
  • ados::ADOs : the auxiliary density operators for HEOM model
  • take_real::Bool : whether to automatically take the real part of the trace or not. Default to true

Returns

  • exp_val : The expectation value
source
expect(op, ados_list; take_real=true)

Return a list of expectation values of the operator op corresponds to the reduced density operators in the given ados_list, namely

\[\textrm{Tr}\left[ O \rho \right],\]

where $O$ is the operator and $\rho$ is the reduced density operator in one of the ADOs from ados_list.

Parameters

  • op : the operator $O$ to take the expectation value
  • ados_list::Vector{ADOs} : the list of auxiliary density operators for HEOM model
  • take_real::Bool : whether to automatically take the real part of the trace or not. Default to true

Returns

  • exp_val : The expectation value
source

Hierarchy Dictionary

HierarchicalEOM.NvecType
struct Nvec

An object which describes the repetition number of each multi-index ensembles in auxiliary density operators.

The n_vector ($\vec{n}$) denotes a set of integers:

\[\{ n_{1,1}, ..., n_{\alpha, k}, ... \}\]

associated with the $k$-th exponential-expansion term in the $\alpha$-th bath. If $n_{\alpha, k} = 3$ means that the multi-index ensemble $\{\alpha, k\}$ appears three times in the multi-index vector of ADOs (see the notations in our paper).

The hierarchy level ($L$) for an n_vector is given by $L=\sum_{\alpha, k} n_{\alpha, k}$

Fields

  • data : the n_vector
  • level : The level L for the n_vector

Methods

One can obtain the repetition number for specific index (idx) by calling : n_vector[idx]. To obtain the corresponding tuple $(\alpha, k)$ for a given index idx, see bathPtr in HierarchyDict for more details.

HierarchicalEOM.jl also supports the following calls (methods) :

length(n_vector);  # returns the length of `Nvec`
 n_vector[1:idx];   # returns a vector which contains the excitation number of `n_vector` from index `1` to `idx`
 n_vector[1:end];   # returns a vector which contains all the excitation number of `n_vector`
 n_vector[:];       # returns a vector which contains all the excitation number of `n_vector`
 from n in n_vector  # iteration
     # do something
-end
source
HierarchicalEOM.HierarchyDictType
struct HierarchyDict <: AbstractHierarchyDict

An object which contains all dictionaries for pure (bosonic or fermionic) bath-ADOs hierarchy.

Fields

  • idx2nvec : Return the Nvec from a given index of ADO
  • nvec2idx : Return the index of ADO from a given Nvec
  • lvl2idx : Return the list of ADO-indices from a given hierarchy level
  • bathPtr : Records the tuple $(\alpha, k)$ for each position in Nvec, where $\alpha$ and $k$ represents the $k$-th exponential-expansion term of the $\alpha$-th bath.
source
HierarchicalEOM.MixHierarchyDictType
struct MixHierarchyDict <: AbstractHierarchyDict

An object which contains all dictionaries for mixed (bosonic and fermionic) bath-ADOs hierarchy.

Fields

  • idx2nvec : Return the tuple (Nvec_b, Nvec_f) from a given index of ADO, where b represents boson and f represents fermion
  • nvec2idx : Return the index from a given tuple (Nvec_b, Nvec_f), where b represents boson and f represents fermion
  • Blvl2idx : Return the list of ADO-indices from a given bosonic-hierarchy level
  • Flvl2idx : Return the list of ADO-indices from a given fermionic-hierarchy level
  • bosonPtr : Records the tuple $(\alpha, k)$ for each position in Nvec_b, where $\alpha$ and $k$ represents the $k$-th exponential-expansion term of the $\alpha$-th bosonic bath.
  • fermionPtr : Records the tuple $(\alpha, k)$ for each position in Nvec_f, where $\alpha$ and $k$ represents the $k$-th exponential-expansion term of the $\alpha$-th fermionic bath.
source
HierarchicalEOM.getIndexEnsembleFunction
getIndexEnsemble(nvec, bathPtr)

Search for all the multi-index ensemble $(\alpha, k)$ where $\alpha$ and $k$ represents the $k$-th exponential-expansion term in the $\alpha$-th bath.

Parameters

Returns

  • Vector{Tuple{Int, Int, Int}}: a vector (list) of the tuples $(\alpha, k, n)$.

Example

Here is an example to use Bath, Exponent, HierarchyDict, and getIndexEnsemble together:

L::M_Fermion;          # suppose this is a fermion type of HEOM Liouvillian superoperator matrix you create
+end
source
HierarchicalEOM.HierarchyDictType
struct HierarchyDict <: AbstractHierarchyDict

An object which contains all dictionaries for pure (bosonic or fermionic) bath-ADOs hierarchy.

Fields

  • idx2nvec : Return the Nvec from a given index of ADO
  • nvec2idx : Return the index of ADO from a given Nvec
  • lvl2idx : Return the list of ADO-indices from a given hierarchy level
  • bathPtr : Records the tuple $(\alpha, k)$ for each position in Nvec, where $\alpha$ and $k$ represents the $k$-th exponential-expansion term of the $\alpha$-th bath.
source
HierarchicalEOM.MixHierarchyDictType
struct MixHierarchyDict <: AbstractHierarchyDict

An object which contains all dictionaries for mixed (bosonic and fermionic) bath-ADOs hierarchy.

Fields

  • idx2nvec : Return the tuple (Nvec_b, Nvec_f) from a given index of ADO, where b represents boson and f represents fermion
  • nvec2idx : Return the index from a given tuple (Nvec_b, Nvec_f), where b represents boson and f represents fermion
  • Blvl2idx : Return the list of ADO-indices from a given bosonic-hierarchy level
  • Flvl2idx : Return the list of ADO-indices from a given fermionic-hierarchy level
  • bosonPtr : Records the tuple $(\alpha, k)$ for each position in Nvec_b, where $\alpha$ and $k$ represents the $k$-th exponential-expansion term of the $\alpha$-th bosonic bath.
  • fermionPtr : Records the tuple $(\alpha, k)$ for each position in Nvec_f, where $\alpha$ and $k$ represents the $k$-th exponential-expansion term of the $\alpha$-th fermionic bath.
source
HierarchicalEOM.getIndexEnsembleFunction
getIndexEnsemble(nvec, bathPtr)

Search for all the multi-index ensemble $(\alpha, k)$ where $\alpha$ and $k$ represents the $k$-th exponential-expansion term in the $\alpha$-th bath.

Parameters

Returns

  • Vector{Tuple{Int, Int, Int}}: a vector (list) of the tuples $(\alpha, k, n)$.

Example

Here is an example to use Bath, Exponent, HierarchyDict, and getIndexEnsemble together:

L::M_Fermion;          # suppose this is a fermion type of HEOM Liouvillian superoperator matrix you create
 HDict = L.hierarchy;   # the hierarchy dictionary
 ados = SteadyState(L); # the stationary state (ADOs) for L 
 
@@ -62,7 +62,7 @@
 
         # do some calculations you want
     end
-end
source

Time Evolution

There are two function definitions of HEOMsolve, which depend on different methods to solve the time evolution:

HierarchicalEOM.HEOMsolveFunction
HEOMsolve(M, ρ0, Δt, steps; e_ops, threshold, nonzero_tol, verbose, filename)

Solve the time evolution for auxiliary density operators based on propagator (generated by FastExpm.jl).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • Δt::Real : A specific time step (time interval).
  • steps::Int : The number of time steps
  • e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.
  • threshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.
  • nonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file "filename.jld2" after the solving process.

Notes

  • The ADOs will be saved depend on the keyword argument e_ops.
  • If e_ops is specified, the solution will only save the final ADOs, otherwise, it will save all the ADOs corresponding to tlist = 0:Δt:(Δt * steps).
  • For more details of the propagator, please refer to FastExpm.jl

Returns

source
HEOMsolve(M, ρ0, tlist; e_ops, solver, H_t, params, verbose, filename, SOLVEROptions...)

Solve the time evolution for auxiliary density operators based on ordinary differential equations.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tlist::AbstractVector : Denote the specific time points to save the solution at, during the solving process.
  • e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.
  • solver::OrdinaryDiffEqAlgorithm : solver in package DifferentialEquations.jl. Default to DP5().
  • H_t::Union{Nothing,Function}=nothing: The time-dependent Hamiltonian or Liouvillian. It will be called by H_t(t, params).
  • params::NamedTuple=NamedTuple(): The parameters of the time evolution.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file "filename.jld2" after the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • The ADOs will be saved depend on the keyword argument saveat in kwargs.
  • If e_ops is specified, the default value of saveat=[tlist[end]] (only save the final ADOs), otherwise, saveat=tlist (saving the ADOs corresponding to tlist). You can also specify e_ops and saveat separately.
  • The default tolerances in kwargs are given as reltol=1e-6 and abstol=1e-8.
  • For more details about solver please refer to DifferentialEquations.jl (ODE Solvers)
  • For more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)

Returns

source
HierarchicalEOM.TimeEvolutionHEOMSolType
struct TimeEvolutionHEOMSol

A structure storing the results and some information from solving time evolution of hierarchical equations of motion (HEOM).

Fields (Attributes)

  • Btier : The tier (cutoff level) for bosonic hierarchy
  • Ftier : The tier (cutoff level) for fermionic hierarchy
  • times::AbstractVector: The time list of the evolution.
  • ados::Vector{ADOs}: The list of result ADOs at each time point.
  • expect::Matrix: The expectation values corresponding to each time point in times.
  • retcode: The return code from the solver.
  • alg: The algorithm which is used during the solving process.
  • abstol::Real: The absolute tolerance which is used during the solving process.
  • reltol::Real: The relative tolerance which is used during the solving process.
source

Stationary State

There are two function definitions of steadystate, which depend on different methods to solve the stationary state:

QuantumToolbox.steadystateFunction
steadystate(M::AbstractHEOMLSMatrix; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on LinearSolve.jl (i.e., solving $x$ where $A \times x = b$).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source
steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tspan::Number : the time limit to find stationary state. Default to Inf
  • solver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source

Spectrum

HierarchicalEOM.PowerSpectrumFunction
PowerSpectrum(M, ρ, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)

Calculate power spectrum for the system in frequency domain where P_op will be automatically set as the adjoint of Q_op.

This function is equivalent to: PowerSpectrum(M, ρ, Q_op', Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)

source
PowerSpectrum(M, ρ, P_op, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)

Calculate power spectrum for the system in frequency domain.

\[\pi S(\omega)=\textrm{Re}\left\{\int_0^\infty dt \langle P(t) Q(0)\rangle e^{-i\omega t}\right\},\]

To calculate spectrum when input operator Q_op has EVEN-parity:

remember to set the parameters:

  • M::AbstractHEOMLSMatrix: should be EVEN parity

To calculate spectrum when input operator Q_op has ODD-parity:

remember to set the parameters:

  • M::AbstractHEOMLSMatrix: should be ODD parity

Parameters

  • M::AbstractHEOMLSMatrix : the HEOMLS matrix.
  • ρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.
  • P_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) $P$ acting on the system.
  • Q_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) $Q$ acting on the system.
  • ωlist::AbstractVector : the specific frequency points to solve.
  • reverse::Bool : If true, calculate $\langle P(-t)Q(0) \rangle = \langle P(0)Q(t) \rangle = \langle P(t)Q(0) \rangle^*$ instead of $\langle P(t) Q(0) \rangle$. Default to false.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the value of spectrum for each ω will be saved into the file "filename.txt" during the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • spec::AbstractVector : the spectrum list corresponds to the specified ωlist
source
HierarchicalEOM.DensityOfStatesFunction
DensityOfStates(M, ρ, d_op, ωlist; solver, verbose, filename, SOLVEROptions...)

Calculate density of states for the fermionic system in frequency domain.

\[ \pi A(\omega)=\textrm{Re}\left\{\int_0^\infty dt \left[\langle d(t) d^\dagger(0)\rangle^* + \langle d^\dagger(t) d(0)\rangle \right] e^{-i\omega t}\right\},\]

Parameters

  • M::AbstractHEOMLSMatrix : the HEOMLS matrix which acts on ODD-parity operators.
  • ρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.
  • d_op::QuantumObject : The annihilation operator ($d$ as shown above) acting on the fermionic system.
  • ωlist::AbstractVector : the specific frequency points to solve.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the value of spectrum for each ω will be saved into the file "filename.txt" during the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • dos::AbstractVector : the list of density of states corresponds to the specified ωlist
source

Misc.

HierarchicalEOM.versioninfoMethod
HierarchicalEOM.versioninfo(io::IO=stdout)

Command line output of information on HierarchicalEOM, dependencies, and system information.

source

The outputs will be something like the following:

using HierarchicalEOM
+end
source

Time Evolution

There are two function definitions of HEOMsolve, which depend on different methods to solve the time evolution:

HierarchicalEOM.HEOMsolveFunction
HEOMsolve(M, ρ0, Δt, steps; e_ops, threshold, nonzero_tol, verbose, filename)

Solve the time evolution for auxiliary density operators based on propagator (generated by FastExpm.jl).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • Δt::Real : A specific time step (time interval).
  • steps::Int : The number of time steps
  • e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.
  • threshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.
  • nonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file "filename.jld2" after the solving process.

Notes

  • The ADOs will be saved depend on the keyword argument e_ops.
  • If e_ops is specified, the solution will only save the final ADOs, otherwise, it will save all the ADOs corresponding to tlist = 0:Δt:(Δt * steps).
  • For more details of the propagator, please refer to FastExpm.jl

Returns

source
HEOMsolve(M, ρ0, tlist; e_ops, solver, H_t, params, verbose, filename, SOLVEROptions...)

Solve the time evolution for auxiliary density operators based on ordinary differential equations.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tlist::AbstractVector : Denote the specific time points to save the solution at, during the solving process.
  • e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.
  • solver::OrdinaryDiffEqAlgorithm : solver in package DifferentialEquations.jl. Default to DP5().
  • H_t::Union{Nothing,Function}=nothing: The time-dependent Hamiltonian or Liouvillian. It will be called by H_t(t, params).
  • params::NamedTuple=NamedTuple(): The parameters of the time evolution.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file "filename.jld2" after the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • The ADOs will be saved depend on the keyword argument saveat in kwargs.
  • If e_ops is specified, the default value of saveat=[tlist[end]] (only save the final ADOs), otherwise, saveat=tlist (saving the ADOs corresponding to tlist). You can also specify e_ops and saveat separately.
  • The default tolerances in kwargs are given as reltol=1e-6 and abstol=1e-8.
  • For more details about solver please refer to DifferentialEquations.jl (ODE Solvers)
  • For more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)

Returns

source
HierarchicalEOM.TimeEvolutionHEOMSolType
struct TimeEvolutionHEOMSol

A structure storing the results and some information from solving time evolution of hierarchical equations of motion (HEOM).

Fields (Attributes)

  • Btier : The tier (cutoff level) for bosonic hierarchy
  • Ftier : The tier (cutoff level) for fermionic hierarchy
  • times::AbstractVector: The time list of the evolution.
  • ados::Vector{ADOs}: The list of result ADOs at each time point.
  • expect::Matrix: The expectation values corresponding to each time point in times.
  • retcode: The return code from the solver.
  • alg: The algorithm which is used during the solving process.
  • abstol::Real: The absolute tolerance which is used during the solving process.
  • reltol::Real: The relative tolerance which is used during the solving process.
source

Stationary State

There are two function definitions of steadystate, which depend on different methods to solve the stationary state:

QuantumToolbox.steadystateFunction
steadystate(M::AbstractHEOMLSMatrix; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on LinearSolve.jl (i.e., solving $x$ where $A \times x = b$).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source
steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tspan::Number : the time limit to find stationary state. Default to Inf
  • solver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source

Spectrum

HierarchicalEOM.PowerSpectrumFunction
PowerSpectrum(M, ρ, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)

Calculate power spectrum for the system in frequency domain where P_op will be automatically set as the adjoint of Q_op.

This function is equivalent to: PowerSpectrum(M, ρ, Q_op', Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)

source
PowerSpectrum(M, ρ, P_op, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)

Calculate power spectrum for the system in frequency domain.

\[\pi S(\omega)=\textrm{Re}\left\{\int_0^\infty dt \langle P(t) Q(0)\rangle e^{-i\omega t}\right\},\]

To calculate spectrum when input operator Q_op has EVEN-parity:

remember to set the parameters:

  • M::AbstractHEOMLSMatrix: should be EVEN parity

To calculate spectrum when input operator Q_op has ODD-parity:

remember to set the parameters:

  • M::AbstractHEOMLSMatrix: should be ODD parity

Parameters

  • M::AbstractHEOMLSMatrix : the HEOMLS matrix.
  • ρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.
  • P_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) $P$ acting on the system.
  • Q_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) $Q$ acting on the system.
  • ωlist::AbstractVector : the specific frequency points to solve.
  • reverse::Bool : If true, calculate $\langle P(-t)Q(0) \rangle = \langle P(0)Q(t) \rangle = \langle P(t)Q(0) \rangle^*$ instead of $\langle P(t) Q(0) \rangle$. Default to false.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the value of spectrum for each ω will be saved into the file "filename.txt" during the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • spec::AbstractVector : the spectrum list corresponds to the specified ωlist
source
HierarchicalEOM.DensityOfStatesFunction
DensityOfStates(M, ρ, d_op, ωlist; solver, verbose, filename, SOLVEROptions...)

Calculate density of states for the fermionic system in frequency domain.

\[ \pi A(\omega)=\textrm{Re}\left\{\int_0^\infty dt \left[\langle d(t) d^\dagger(0)\rangle^* + \langle d^\dagger(t) d(0)\rangle \right] e^{-i\omega t}\right\},\]

Parameters

  • M::AbstractHEOMLSMatrix : the HEOMLS matrix which acts on ODD-parity operators.
  • ρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.
  • d_op::QuantumObject : The annihilation operator ($d$ as shown above) acting on the fermionic system.
  • ωlist::AbstractVector : the specific frequency points to solve.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the value of spectrum for each ω will be saved into the file "filename.txt" during the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • dos::AbstractVector : the list of density of states corresponds to the specified ωlist
source

Misc.

HierarchicalEOM.versioninfoMethod
HierarchicalEOM.versioninfo(io::IO=stdout)

Command line output of information on HierarchicalEOM, dependencies, and system information.

source

The outputs will be something like the following:

using HierarchicalEOM
 HierarchicalEOM.versioninfo()

                                    __
                                   /  \
@@ -100,7 +100,7 @@
 LIBM     : libopenlibm
 LLVM     : libLLVM-16.0.6 (ORCJIT, znver3)
 BLAS     : libopenblas64_.so (ilp64)
-Threads  : 1 (on 4 virtual cores)

The output will be something like the following:

using HierarchicalEOM
+Threads  : 1 (on 4 virtual cores)

The output will be something like the following:

using HierarchicalEOM
 HierarchicalEOM.print_logo()
                                   __
                                   /  \
  __     __                     __ \__/ __
@@ -110,4 +110,4 @@
 |   ___   |  |__)  |  /  \  |    _     _   |
 |  |   |  |   ____/| (    ) |   / \   / \  |
 |  |   |  |  |____ |  \__/  |  |   | |   | |
-|__|   |__|\______) \______/|__|   |_|   |_|
+|__| |__|\______) \______/|__| |_| |_| diff --git a/dev/search_index.js b/dev/search_index.js index e64cbefe..e5bf7850 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"EditURL = \"../../../examples/electronic_current.jl\"","category":"page"},{"location":"examples/electronic_current/#Electronic-Current","page":"Electronic Current","title":"Electronic Current","text":"","category":"section"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"In this example, we demonstrate how to compute an environmental observable: the electronic current.","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"import QuantumToolbox\nusing HierarchicalEOM\nusing LaTeXStrings\nimport Plots","category":"page"},{"location":"examples/electronic_current/#Hamiltonian","page":"Electronic Current","title":"Hamiltonian","text":"","category":"section"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"We consider a single-level charge system coupled to two [left (L) and right (R)] fermionic reservoirs (textrmf). The total Hamiltonian is given by H_textrmT=H_textrms+H_textrmf+H_textrmsf, where each terms takes the form","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"beginaligned\nH_textrms = epsilon d^dagger d\nH_textrmf =sum_alpha=textrmLtextrmRsum_kepsilon_alphakc_alphak^daggerc_alphak\nH_textrmsf =sum_alpha=textrmLtextrmRsum_kg_alphakc_alphak^daggerd + g_alphak^* d^daggerc_alphak\nendaligned","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"Here, d (d^dagger) annihilates (creates) an electron in the system and epsilon is the energy of the electron. Furthermore, c_alphak (c_alphak^dagger) annihilates (creates) an electron in the state k (with energy epsilon_alphak) of the alpha-th reservoir.","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"Now, we need to build the system Hamiltonian and initial state with the package QuantumToolbox.jl to construct the operators.","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"d = destroy(2) ## annihilation operator of the system electron\n\n# The system Hamiltonian\nϵ = 1.0 # site energy\nHsys = ϵ * d' * d\n\n# System initial state\nψ0 = basis(2, 0);\nnothing #hide","category":"page"},{"location":"examples/electronic_current/#Construct-bath-objects","page":"Electronic Current","title":"Construct bath objects","text":"","category":"section"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"We assume the fermionic reservoir to have a Lorentzian-shaped spectral density, and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters:","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"the coupling strength Gamma between system and reservoirs\nthe band-width W\nthe product of the Boltzmann constant k and the absolute temperature T : kT\nthe chemical potential mu\nthe total number of exponentials for the reservoir 2(N + 1)","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"Γ = 0.01\nW = 1\nkT = 0.025851991\nμL = 1.0 # Left bath\nμR = -1.0 # Right bath\nN = 2\nbath_L = Fermion_Lorentz_Pade(d, Γ, μL, W, kT, N)\nbath_R = Fermion_Lorentz_Pade(d, Γ, μR, W, kT, N)\nbaths = [bath_L, bath_R]","category":"page"},{"location":"examples/electronic_current/#Construct-HEOMLS-matrix","page":"Electronic Current","title":"Construct HEOMLS matrix","text":"","category":"section"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"(see also HEOMLS Matrix for Fermionic Baths)","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"tier = 5\nM = M_Fermion(Hsys, tier, baths)","category":"page"},{"location":"examples/electronic_current/#Solve-time-evolution-of-ADOs","page":"Electronic Current","title":"Solve time evolution of ADOs","text":"","category":"section"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"(see also Time Evolution)","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"tlist = 0:0.5:100\nados_evolution = HEOMsolve(M, ψ0, tlist).ados;\nnothing #hide","category":"page"},{"location":"examples/electronic_current/#Solve-stationary-state-of-ADOs","page":"Electronic Current","title":"Solve stationary state of ADOs","text":"","category":"section"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"(see also Stationary State)","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"ados_steady = steadystate(M);\nnothing #hide","category":"page"},{"location":"examples/electronic_current/#Calculate-current","page":"Electronic Current","title":"Calculate current","text":"","category":"section"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"Within the influence functional approach, the expectation value of the electronic current from the alpha-fermionic bath into the system can be written in terms of the first-level-fermionic (n=1) auxiliary density operators, namely","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"langle I_alpha(t) rangle =(-e) fracdlangle mathcalN_alpharangledt=i e sum_qintextbfq(-1)^delta_nu- textrmTrleftd^barnurho^(01+)_vert textbfq(t)right","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"where e represents the value of the elementary charge, and mathcalN_alpha=sum_k c^dagger_alphakc_alphak is the occupation number operator for the alpha-fermionic bath.","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"Given an ADOs, we provide a function which calculates the current from the alpha-fermionic bath into the system with the help of Hierarchy Dictionary.","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"bathIdx:","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"1 means 1st bath (bath_L)\n2 means 2nd bath (bath_R)","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"function Ic(ados, M::M_Fermion, bathIdx::Int)\n # the hierarchy dictionary\n HDict = M.hierarchy\n\n # we need all the indices of ADOs for the first level\n idx_list = HDict.lvl2idx[1]\n I = 0.0im\n for idx in idx_list\n ρ1 = ados[idx] ## 1st-level ADO\n\n # find the corresponding bath index (α) and exponent term index (k)\n nvec = HDict.idx2nvec[idx]\n for (α, k, _) in getIndexEnsemble(nvec, HDict.bathPtr)\n if α == bathIdx\n exponent = M.bath[α][k]\n if exponent.types == \"fA\" ## fermion-absorption\n I += tr(exponent.op' * ρ1)\n elseif exponent.types == \"fE\" ## fermion-emission\n I -= tr(exponent.op' * ρ1)\n end\n break\n end\n end\n end\n\n eV_to_Joule = 1.60218E-19 # unit conversion\n\n # (e / ħ) * I [change unit to μA]\n return 1.519270639695384E15 * real(1im * I) * eV_to_Joule * 1E6\nend\n\n# steady current\nIs_L = ones(length(tlist)) .* Ic(ados_steady, M, 1)\nIs_R = ones(length(tlist)) .* Ic(ados_steady, M, 2)\n\n# time evolution current\nIe_L = []\nIe_R = []\nfor ados in ados_evolution\n push!(Ie_L, Ic(ados, M, 1))\n push!(Ie_R, Ic(ados, M, 2))\nend\n\nPlots.plot(\n tlist,\n [Ie_L, Ie_R, Is_L, Is_R],\n label = [\"Bath L\" \"Bath R\" \"Bath L (Steady State)\" \"Bath R (Steady State)\"],\n linecolor = [:blue :red :blue :red],\n linestyle = [:solid :solid :dash :dash],\n linewidth = 3,\n xlabel = \"time\",\n ylabel = \"Current\",\n grid = false,\n)","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"Note that this example can also be found in qutip documentation","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"","category":"page"},{"location":"examples/electronic_current/","page":"Electronic Current","title":"Electronic Current","text":"This page was generated using Literate.jl.","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/#doc-Bosonic-Bath-RWA","page":"Introduction","title":"Bosonic Bath (under rotating wave approximation)","text":"","category":"section"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/#Bosonic-Bath-RWA-Overview","page":"Introduction","title":"Overview","text":"","category":"section"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"This describes the interaction between the system (s) and a exterior bosonic environment (b) under the rotating wave approximation (RWA), which can be modeled by","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"H_sb=sum_k g_k b_k^dagger a_s + g_k^* b_k a_s^dagger","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"where g_k is the coupling strength and b_k (b_k^dagger) is the annihilation (creation) operator for the k-th mode of the bosonic environment. Here, a_s refers to the system annihilation operator.","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"The effects of a bosonic environment (initially in thermal equilibrium, linearly coupled to the system, and under the rotating wave approximation) are completely encoded in the two-time correlation functions, namely","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"C^nu(t_1t_2)\n=frac12piint_0^infty domega \nJ(omega)leftdelta_nu-1+ n(omega)\nrighte^nu iomega (t_1-t_2)","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"where J(omega)=2piSigma_k g_k^2 delta(omega-omega_k) is the spectral density of the bath and n(omega)=expomegak_B T-1^-1 represents the Bose-Einstein distribution. Here, nu=+ and nu=- denotes the absorption and emission process of the bosonic system, respectively.","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"C^nu(t_1 t_2)=sum_i eta_i^nu e^-gamma_i^nu (t_1-t_2)","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/#Construct-BosonBath-(RWA)","page":"Introduction","title":"Construct BosonBath (RWA)","text":"","category":"section"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"One can construct the BosonBath object under RWA by calling the function BosonBathRWA together with the following parameters: system annihilation operator a_s::QuantumObject and the four lists η_absorb::AbstractVector, γ_absorb::AbstractVector, η_emit::AbstractVector and γ_emit::AbstractVector which correspond to the exponential terms eta_i^+_i, gamma_i^+_i, eta_i^-_i and gamma_i^-_i, respectively. ","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"bath = BosonBathRWA(a_s, η_absorb, γ_absorb, η_emit, γ_emit)","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"warning: Warning\nHere, the length of the four lists (η_absorb, γ_absorb, η_emit and γ_emit) should all be the same. Also, all the elements in γ_absorb should be complex conjugate of the corresponding elements in γ_emit.","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/#Print-Bosonic-Bath","page":"Introduction","title":"Print Bosonic Bath","text":"","category":"section"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"One can check the information of the BosonBath by the print function, for example:","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"print(bath)","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"BosonBath object with 4 exponential-expansion terms","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"Note that BosonBath under RWA always have even number of exponential terms (half for C^nu=+ and half for C^nu=-)","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/#Calculate-the-correlation-function","page":"Introduction","title":"Calculate the correlation function","text":"","category":"section"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"To check whether the exponential terms in the FermionBath is correct or not, one can call C(bath::BosonBath, tlist::AbstractVector) to calculate the correlation function C(t), where t=t_1-t_2:","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"cp_list, cm_list = C(bath, tlist)","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"Here, cp_list and cm_list are the lists which contain the value of C^nu=+(t) and C^nu=-(t) correspond to the given time series tlist, respectively.","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/#Exponent","page":"Introduction","title":"Exponent","text":"","category":"section"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"HierarchicalEOM.jl also supports users to access the specific exponential term with brakets []. This returns an Exponent object, which contains the corresponding value of eta_i^nu and gamma_i^nu:","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"e = bath[2] # the 2nd-term\nprint(e)","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"bA\", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 - 0.005im.","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"The different types of the (bosonic-bath under RWA) Exponent:","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"\"bA\" : from absorption bosonic correlation function C^nu=+(t_1 t_2)\n\"bE\" : from emission bosonic correlation function C^nu=-(t_1 t_2)","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"One can even obtain the Exponent with iterative method:","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"for e in bath\n println(e)\nend","category":"page"},{"location":"bath_boson_RWA/bosonic_bath_RWA_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"bA\", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 - 0.005im.\n\nBath Exponent with types = \"bA\", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 - 0.005im.\n\nBath Exponent with types = \"bE\", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 + 0.005im.\n\nBath Exponent with types = \"bE\", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 + 0.005im.","category":"page"},{"location":"install/#Installation","page":"Installation","title":"Installation","text":"","category":"section"},{"location":"install/#HierarchicalEOM.jl","page":"Installation","title":"HierarchicalEOM.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"To install HierarchicalEOM.jl, run the following commands inside Julia's interactive session (also known as REPL):","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"using Pkg\nPkg.add(\"HierarchicalEOM\")","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"Alternatively, this can also be done in Julia's Pkg REPL by pressing the key ] in the REPL to use the package mode, and then type the following command:","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"(1.10) pkg> add HierarchicalEOM","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"More information about Julia's package manager can be found at Pkg.jl. ","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"note: Julia 1.10\nHierarchicalEOM.jl requires Julia 1.10 or higher (we dropped Julia 1.9 since ver.2.1.0)","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"To load the package and check the version information, use either HierarchicalEOM.versioninfo() or HierarchicalEOM.about(), namely","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"using HierarchicalEOM\nHierarchicalEOM.versioninfo()\nHierarchicalEOM.about()","category":"page"},{"location":"install/#[QuantumToolbox.jl](https://github.com/qutip/QuantumToolbox.jl)","page":"Installation","title":"QuantumToolbox.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"HierarchicalEOM.jl is built upon QuantumToolbox.jl, which is a cutting-edge Julia package designed for quantum physics simulations, closely emulating the popular Python QuTiP package. It provides many useful functions to create arbitrary quantum states and operators which can be combined in all the expected ways. It uniquely combines the simplicity and power of Julia with advanced features like GPU acceleration and distributed computing, making simulation of quantum systems more accessible and efficient.","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"note: Note\nStart from HierarchicalEOM v2.0.0+, the inputs states and operators must be in the type of QuantumObject (defined in QuantumToolbox)","category":"page"},{"location":"install/#Other-Useful-Packages","page":"Installation","title":"Other Useful Packages","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"In order to get a better experience and take full advantage of HierarchicalEOM, we recommend to install the following external packages:","category":"page"},{"location":"install/#[DifferentialEquations.jl](https://diffeq.sciml.ai/stable/)","page":"Installation","title":"DifferentialEquations.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"DifferentialEquations is needed to provide the low-level ODE solvers especially for solving time evolution. For low dependency usage, users can use OrdinaryDiffEq.jl instead.","category":"page"},{"location":"install/#[LinearSolve.jl](http://linearsolve.sciml.ai/stable/)","page":"Installation","title":"LinearSolve.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"LinearSolve is a unified interface for the linear solving packages of Julia. It interfaces with other packages of the Julia ecosystem to make it easier to test alternative solver packages and pass small types to control algorithm swapping. It is needed to provide the solvers especially for solving stationary state and spectra for both bosonic and fermionic systems.","category":"page"},{"location":"install/#[JLD2.jl](https://juliaio.github.io/JLD2.jl/stable/)","page":"Installation","title":"JLD2.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"JLD2 saves and loads Julia data structures in a format comprising a subset of HDF5. Because the size of matrix in HierarchicalEOM is usually super large and leads to long time calculation, we support the functionality for saving and loading the HierarchicalEOM-type objects into files by JLD2 >= 0.4.23.","category":"page"},{"location":"install/#[PyPlot.jl](https://github.com/JuliaPy/PyPlot.jl)","page":"Installation","title":"PyPlot.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"PyPlot.jl provides a Julia interface to the Matplotlib plotting library from Python, and specifically to the matplotlib.pyplot module.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#doc-Fermionic-Bath","page":"Introduction","title":"Fermionic Bath","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/#Fermionic-Bath-Overview","page":"Introduction","title":"Overview","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"The FermionBath object describes the interaction between the system (s) and a exterior fermionic environment (f), which can be modeled by","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"H_sf=sum_k g_k c_k^dagger d_s + g_k^* c_k d_s^dagger","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"where g_k is the coupling strength and c_k (c_k^dagger) annihilates (creates) a fermion in the k-th state of the fermionic environment. Here, d_s refers to the system-interaction operator and should be an odd-parity operator destroying a fermion in the system.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"The effects of a fermionic environment (initially in thermal equilibrium and linearly coupled to the system) are completely encoded in the two-time correlation functions, namely","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"C^nu(t_1t_2)\n=frac12piint_-infty^infty domega \nJ(omega)leftfrac1-nu2+nu n(omega)\nrighte^nu iomega (t_1-t_2)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"where J(omega)=2piSigma_k g_k^2 delta(omega-omega_k) is the spectral density of the bath and n(omega)=exp(omega-mu)k_B T+1^-1 represents the Fermi-Dirac distribution (with chemical potential mu). Here, nu=+ and nu=- denotes the absorption and emission process of the fermionic system, respectively.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"C^nu(t_1 t_2)=sum_i eta_i^nu e^-gamma_i^nu (t_1-t_2)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#Construct-FermionBath","page":"Introduction","title":"Construct FermionBath","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can construct the FermionBath object with the system annihilation operator ds::QuantumObject and the four lists η_absorb::AbstractVector, γ_absorb::AbstractVector, η_emit::AbstractVector and γ_emit::AbstractVector which correspond to the exponential terms eta_i^+_i, gamma_i^+_i, eta_i^-_i and gamma_i^-_i, respectively. ","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"bath = FermionBath(ds, η_absorb, γ_absorb, η_emit, γ_emit)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"warning: Warning\nHere, the length of the four lists (η_absorb, γ_absorb, η_emit and γ_emit) should all be the same. Also, all the elements in γ_absorb should be complex conjugate of the corresponding elements in γ_emit.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"note: Note\nInstead of analytically solving the correlation function C^nu=pm(t_1 t_2) to obtain a sum of exponential terms, one can also use the built-in functions (for different spectral densities J(omega) and spectral decomposition methods, which have been analytically solved by the developers already). See the other categories of the Fermionic Bath in the sidebar for more details.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#Print-Fermionic-Bath","page":"Introduction","title":"Print Fermionic Bath","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can check the information of the FermionBath by the print function, for example:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"print(bath)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"FermionBath object with 4 exponential-expansion terms","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"Note that FermionBath always have even number of exponential terms (half for C^nu=+ and half for C^nu=-)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#Calculate-the-correlation-function","page":"Introduction","title":"Calculate the correlation function","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"To check whether the exponential terms in the FermionBath is correct or not, one can call C(bath::FermionBath, tlist::AbstractVector) to calculate the correlation function C(t), where t=t_1-t_2:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"cp_list, cm_list = C(bath, tlist)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"Here, cp_list and cm_list are the lists which contain the value of C^nu=+(t) and C^nu=-(t) correspond to the given time series tlist, respectively.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#Exponent","page":"Introduction","title":"Exponent","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"HierarchicalEOM.jl also supports users to access the specific exponential term with brakets []. This returns an Exponent object, which contains the corresponding value of eta_i^nu and gamma_i^nu:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"e = bath[2] # the 2nd-term\nprint(e)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"fA\", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 - 0.005im.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"The different types of the (fermionic-bath) Exponent:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"\"fA\" : from absorption fermionic correlation function C^nu=+(t_1 t_2)\n\"fE\" : from emission fermionic correlation function C^nu=-(t_1 t_2)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can even obtain the Exponent with iterative method:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"for e in bath\n println(e)\nend","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"fA\", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 - 0.005im.\n\nBath Exponent with types = \"fA\", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 - 0.005im.\n\nBath Exponent with types = \"fE\", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 + 0.005im.\n\nBath Exponent with types = \"fE\", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 + 0.005im.","category":"page"},{"location":"heom_matrix/M_Boson/#doc-M_Boson","page":"HEOMLS for Bosonic Bath","title":"HEOMLS Matrix for Bosonic Baths","text":"","category":"section"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"The HEOM Liouvillian superoperator matrix struct M_Boson <: AbstractHEOMLSMatrix which describes the interactions between the system and multiple Bosonic baths.","category":"page"},{"location":"heom_matrix/M_Boson/#Construct-Matrix","page":"HEOMLS for Bosonic Bath","title":"Construct Matrix","text":"","category":"section"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"To construct the HEOM matrix in this case, one can call ","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"M_Boson(Hsys, tier, Bath, parity) with the following parameters:","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"args (Arguments)","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"Hsys : The time-independent system Hamiltonian\ntier::Int : the tier (cutoff level) for the bosonic bath\nBath::Vector{BosonBath} : objects for different bosonic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on. Defaults to EVEN.","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"kwargs (Keyword Arguments)","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"threshold::Real : The threshold of the importance value. Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"For example:","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"Hs::QuantumObject # system Hamiltonian\ntier = 3\nBath::BosonBath\n\n# create HEOMLS matrix in both EVEN and ODD parity\nM_even = M_Boson(Hs, tier, Bath) \nM_odd = M_Boson(Hs, tier, Bath, ODD) ","category":"page"},{"location":"heom_matrix/M_Boson/#Fields","page":"HEOMLS for Bosonic Bath","title":"Fields","text":"","category":"section"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"The fields of the structure M_Boson are as follows:","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"data : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the bosonic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on.\nbath::Vector{BosonBath} : the vector which stores all BosonBath objects\nhierarchy::HierarchyDict: the object which contains all dictionaries for boson-bath-ADOs hierarchy.","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"One can obtain the value of each fields as follows:","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"M::M_Boson\n\nM.data\nM.tier\nM.dims\nM.N\nM.sup_dim\nM.parity\nM.bath\nM.hierarchy","category":"page"},{"location":"Parity/#doc-Parity","page":"Parity Support","title":"Parity Support","text":"","category":"section"},{"location":"Parity/#Introduction","page":"Parity Support","title":"Introduction","text":"","category":"section"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"When the system Hamiltonian contains fermionic systems, the HEOMLS matrix hatmathcalM might be constructed into a different one depend on the parity of the input operator which hatmathcalM is acting on. This dependence intuitively originates from the properties of partial traces over composite fermionic spaces, where operators do not necessarily commute. ","category":"page"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"As an example, for an environment made out of a single fermion, the reduced matrix elements langleirho_textrms^pjrangle (in a basis labeled by langle i and jrangle) involve the perturbative sum of expressions of the form langle i (c tilderho_textrme tilderho_textrms^p c^dagger+tilderho_textrme tilderho_textrms^p)jrangle (in terms of environmental operators tilderho_textrme, system operators tilderho_textrms^p with parity p, and the environment-annihilation operator c). These quantities depend on the commutator between tilderho_textrms^p and c, which is trivial only for EVEN-parity (p=+). In the ODD-parity (p=-) case, the partial trace over the environment requires further anti-commutations, ultimately resulting in extra minus signs in the expression for the effective propagator describing the reduced dynamics. ","category":"page"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"It is important to explicitly note that, here, by parity we do not refer to the presence of an odd or even number of fermions in the system but, rather, to the number of fermionic (annihilation or creation) operators needed to represent rho_textrms^p. The reduced density matrix of the system should be an EVEN-parity operator and can be expressed as rho_textrms^p=+(t). However, there are some situations (for example, calculating density of states for fermionic systems) where hatmathcalM is acting on ODD-parity ADOs, e.g., rho_textrms^p=-(t)=d_textrmsrho_textrms^+(t) or rho_textrms^p=-(t)=d_textrms^daggerrho_textrms^+(t), where d_textrms is an annihilation operator acting on fermionic systems.","category":"page"},{"location":"Parity/#Parity-support-for-HEOMLS","page":"Parity Support","title":"Parity support for HEOMLS","text":"","category":"section"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"One can specify the parameter parity::AbstractParity in the function of constructing hatmathcalM which describes the dynamics of EVEN- or ODD-parity auxiliary density operators (ADOs). The default value of the parameter is parity=EVEN.","category":"page"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"Hs::QuantumObject # system Hamiltonian\nBbath::BosonBath # bosonic bath object\nFbath::FermionBath # fermionic bath object\nBtier::Int # bosonic truncation level \nFtier::Int # fermionic truncation level \n\n# create HEOMLS matrix in EVEN or ODD parity\nM_even = M_S(Hs, EVEN)\nM_odd = M_S(Hs, ODD)\n\nM_even = M_Boson(Hs, Btier, Bbath, EVEN) \nM_odd = M_Boson(Hs, Btier, Bbath, ODD) \n\nM_even = M_Fermion(Hs, Ftier, Fbath, EVEN) \nM_odd = M_Fermion(Hs, Ftier, Fbath, ODD)\n\nM_even = M_Boson_Fermion(Hs, Btier, Ftier, Bbath, Fbath, EVEN) \nM_odd = M_Boson_Fermion(Hs, Btier, Ftier, Bbath, Fbath, ODD) ","category":"page"},{"location":"Parity/#Base-functions-support","page":"Parity Support","title":"Base functions support","text":"","category":"section"},{"location":"Parity/#Multiplication-between-Parity-labels","page":"Parity Support","title":"Multiplication between Parity labels","text":"","category":"section"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"EVEN * EVEN # gives EVEN\nEVEN * ODD # gives ODD\nODD * EVEN # gives ODD\nODD * ODD # gives EVEN\n!EVEN # gives ODD\n!ODD # gives EVEN","category":"page"},{"location":"time_evolution/#doc-Time-Evolution","page":"Time Evolution","title":"Time Evolution","text":"","category":"section"},{"location":"time_evolution/#Introduction","page":"Time Evolution","title":"Introduction","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"HierarchicalEOM.jl implements various methods and solvers to simulate the open quantum system dynamics. The HEOM Liouvillian superoperator (HEOMLS) matrix hatmathcalM characterizes the dynamics of the reduce state and in the full extended space of all auxiliary density operators (ADOs) rho^(mnp)_textbfj vert textbfq(t), namely","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"beginequation\npartial_trho^(mnp)_textbfj vert textbfq(t)=hatmathcalMrho^(mnp)_textbfj vert textbfq(t)\nendequation","category":"page"},{"location":"time_evolution/#HEOMsolve-and-TimeEvolutionHEOMSol","page":"Time Evolution","title":"HEOMsolve and TimeEvolutionHEOMSol","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To solve the dynamics of the reduced state and also all the ADOs, you only need to call HEOMsolve. Different methods (see the contents below) are implemented with different input parameters of the function which makes it easy to switch between different methods. The output of the function HEOMsolve for each methods will always be in the type TimeEvolutionHEOMSol, which contains the results (including ADOs and expectation values at each time point) and some information from the solver. One can obtain the value of each fields in TimeEvolutionHEOMSol as follows:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"sol::TimeEvolutionHEOMSol\n\nsol.Btier # the tier (cutoff level) for bosonic hierarchy\nsol.Ftier # the tier (cutoff level) for fermionic hierarchy\nsol.times # The time list of the evolution.\nsol.ados # The list of result ADOs at each time point.\nsol.expect # The expectation values corresponding to each time point in `times`.\nsol.retcode # The return code from the solver.\nsol.alg # The algorithm which is used during the solving process.\nsol.abstol # The absolute tolerance which is used during the solving process.\nsol.reltol # The relative tolerance which is used during the solving process.","category":"page"},{"location":"time_evolution/#Expectation-Values","page":"Time Evolution","title":"Expectation Values","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"Given an observable A and the ADOs rho^(mnp)_textbfj vert textbfq(t), one can calculate the expectation value by","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"langle A(t) rangle = textrmTrleftA rho^(00p)_ vert (t)right","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"where, m=n=0 represents the reduced density operator, see ADOs for more details.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"One can directly calculate the expectation value by specifying the keyword argument e_ops (a list of observables), and the expectation values corresponding to each time point and observables will be stored in TimeEvolutionHEOMSol:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"A1::QuantumObject # observable 1\nA2::QuantumObject # observable 2\nsol = HEOMsolve(...; e_ops = [A1, A2], ...) # the input parameters depend on the different methods you choose.\nsol.expect[1,:] # the expectation values of observable 1 (`A1`) corresponding to each time point in `sol.times`\nsol.expect[2,:] # the expectation values of observable 2 (`A2`) corresponding to each time point in `sol.times`","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"An alternative way for calculating the expectation values is to use the function QuantumToolbox.expect together with the list of ADOs stored in TimeEvolutionHEOMSol:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"A::QuantumObject # observable\nsol = HEOMsolve(...) # the input parameters depend on the different methods you choose.\nados_list = sol.ados\n\nElist = expect(A, ados_list)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"Here, Elist contains the expectation values corresponding to the ados_list (i.e., the reduced density operator in each time step).","category":"page"},{"location":"time_evolution/#Common-and-optional-parameters","page":"Time Evolution","title":"Common and optional parameters","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"There are three common optional parameters for all the methods provided below:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file after the solving process. Default to Empty String: \"\".","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"If the filename is specified, the function will automatically save the ADOs to the file (with .jld2 behind the filename) once the solving process is finished. The saving method is based on the package JLD2.jl, which saves and loads Julia data structures in a format comprising a subset of HDF5.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"tlist = 0:0.5:5\nados_list = HEOMsolve(..., tlist, ...; filename=\"test\", ...)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"The solution of the ADOs for each time step in tlist is saved in the file named test.jld2 with a key: \"ados\".","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To retrieve the solution the list of ADOs from a previously saved file \"text.jld2\", just read the file with the methods provided by JLD2.jl and specify the key: \"ados\", namely","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"using HierarchicalEOM, JLD2 # remember to import these before retrieving the solution\n\nfilename = \"test.jld2\"\njldopen(filename, \"r\") do file\n ados_list = file[\"ados\"]\nend","category":"page"},{"location":"time_evolution/#Ordinary-Differential-Equation-(ODE)-Method","page":"Time Evolution","title":"Ordinary Differential Equation (ODE) Method","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"The first method is implemented by solving the ordinary differential equation (ODE). HierarchicalEOM.jl wraps some of the functions in DifferentialEquations.jl, which is a very rich numerical library for solving the differential equations and provides many ODE solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to DifferentialEquations solvers and also the documentation of DifferentialEquations.jl.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"compat: Extension for CUDA.jl\nHierarchicalEOM.jl provides an extension to support GPU (CUDA.jl) acceleration for solving the time evolution (only for ODE method with time-independent system Hamiltonian). See here for more details.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"See the docstring of this method: ","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"HEOMsolve(M::AbstractHEOMLSMatrix, ρ0::T_state, tlist::AbstractVector; e_ops::Union{Nothing,AbstractVector} = nothing, solver::OrdinaryDiffEqAlgorithm = DP5(), H_t::Union{Nothing,Function} = nothing, params::NamedTuple = NamedTuple(), verbose::Bool = true, filename::String = \"\", SOLVEROptions...,) where {T_state<:Union{QuantumObject,ADOs}}","category":"page"},{"location":"time_evolution/#HierarchicalEOM.HEOMsolve-Union{Tuple{T_state}, Tuple{AbstractHEOMLSMatrix, T_state, AbstractVector}} where T_state<:Union{ADOs, QuantumObject}","page":"Time Evolution","title":"HierarchicalEOM.HEOMsolve","text":"HEOMsolve(M, ρ0, tlist; e_ops, solver, H_t, params, verbose, filename, SOLVEROptions...)\n\nSolve the time evolution for auxiliary density operators based on ordinary differential equations.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntlist::AbstractVector : Denote the specific time points to save the solution at, during the solving process.\ne_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nsolver::OrdinaryDiffEqAlgorithm : solver in package DifferentialEquations.jl. Default to DP5().\nH_t::Union{Nothing,Function}=nothing: The time-dependent Hamiltonian or Liouvillian. It will be called by H_t(t, params).\nparams::NamedTuple=NamedTuple(): The parameters of the time evolution.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file \"filename.jld2\" after the solving process.\nSOLVEROptions : extra options for solver\n\nNotes\n\nThe ADOs will be saved depend on the keyword argument saveat in kwargs.\nIf e_ops is specified, the default value of saveat=[tlist[end]] (only save the final ADOs), otherwise, saveat=tlist (saving the ADOs corresponding to tlist). You can also specify e_ops and saveat separately.\nThe default tolerances in kwargs are given as reltol=1e-6 and abstol=1e-8.\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\nsol::TimeEvolutionHEOMSol : The solution of the hierarchical EOM. See also TimeEvolutionHEOMSol\n\n\n\n\n\n","category":"method"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"# the time-independent HEOMLS matrix\nM::AbstractHEOMLSMatrix \n\n# the initial state can be either the system density operator or ADOs\nρ0::QuantumObject\nρ0::ADOs\n\n# specific time points to save the solution during the solving process. \ntlist = 0:0.5:2 # [0.0, 0.5, 1.0, 1.5, 2.0]\n\nsol = HEOMsolve(M, ρ0, tlist)","category":"page"},{"location":"time_evolution/#Time-Dependent-Problems","page":"Time Evolution","title":"Time Dependent Problems","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"In general, the time-dependent system Hamiltonian can be separated into the time-independent and time-dependent parts, namely","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"H_s (t) = H_0 + H_1(t)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"We again wrap some of the functions in DifferentialEquations.jl to solve the time-dependent problems here.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To deal with the time-dependent system Hamiltonian problem in HierarchicalEOM.jl, we first construct the HEOMLS matrices hatmathcalM with time-independent Hamiltonian H_0:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"M = M_S(H0, ...)\nM = M_Boson(H0, ...)\nM = M_Fermion(H0, ...)\nM = M_BosonFermion(H0, ...)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To solve the dynamics characterized by hatmathcalM together with the time-dependent part of system Hamiltonian H_1(t), you can specify keyword arguments H_t and params while calling HEOMsolve. Here, the definition of user-defined function H_1 must be in the form H_1(t, params::NamedTuple) and returns the time-dependent part of system Hamiltonian or Liouvillian (in QuantumObject type) at any given time point t. The parameters params should be a NamedTuple which contains all the extra parameters you need for the function H_1. For example:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"# in this case, p should be passed in as a NamedTuple: (p0 = p0, p1 = p1, p2 = p2)\nfunction H_1(t, p::NamedTuple) \n σx = [0 1; 1 0] # Pauli-X matrix\n return (sin(p.p0 * t) + sin(p.p1 * t) + sin(p.p2 * t)) * σx\nend","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"The p will be passed to your function H_1 directly from the keyword argument in HEOMsolve called params:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"M::AbstractHEOMLSMatrix\nρ0::QuantumObject\ntlist = 0:0.1:10\np = (p0 = 0.1, p1 = 1, p2 = 10)\n\nsol = HEOMsolve(M, ρ0, tlist; H_t = H_1, params = p)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"warning: Warning\nIf you don't need any extra param in your case, you still need to put a redundant one in the definition of H_1, for example:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"function H_1(t, p::NamedTuple)\n σx = [0 1; 1 0] # Pauli-X matrix\n return sin(0.1 * t) * σx\nend\n\nM::AbstractHEOMLSMatrix\nρ0::QuantumObject\ntlist = 0:0.1:10\n\nsol = HEOMsolve(M, ρ0, tlist; H_t = H_1)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"note: Note\nThe default value for params in HEOMsolve is an empty NamedTuple().","category":"page"},{"location":"time_evolution/#Propagator-Method","page":"Time Evolution","title":"Propagator Method","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"The second method is implemented by directly construct the propagator of a given HEOMLS matrix hatmathcalM. Because hatmathcalM is time-independent, the equation above can be solved analytically as","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"rho^(mnp)_textbfj vert textbfq(t)=hatmathcalG(t)rho^(mnp)_textbfj vert textbfq(0)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"where hatmathcalG(t)equiv exp(hatmathcalMt) is the propagator for all ADOs corresponding to hatmathcalM.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To construct the propagator, we wrap the function in the package fastExpm.jl, which is optimized for the exponentiation of either large-dense or sparse matrices.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"See the docstring of this method: ","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"HEOMsolve(M::AbstractHEOMLSMatrix ,ρ0::T_state, Δt::Real, steps::Int; e_ops::Union{Nothing,AbstractVector} = nothing, threshold = 1.0e-6, nonzero_tol = 1.0e-14, verbose::Bool = true, filename::String = \"\",) where {T_state<:Union{QuantumObject,ADOs}}","category":"page"},{"location":"time_evolution/#HierarchicalEOM.HEOMsolve-Union{Tuple{T_state}, Tuple{AbstractHEOMLSMatrix, T_state, Real, Int64}} where T_state<:Union{ADOs, QuantumObject}","page":"Time Evolution","title":"HierarchicalEOM.HEOMsolve","text":"HEOMsolve(M, ρ0, Δt, steps; e_ops, threshold, nonzero_tol, verbose, filename)\n\nSolve the time evolution for auxiliary density operators based on propagator (generated by FastExpm.jl).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\nΔt::Real : A specific time step (time interval).\nsteps::Int : The number of time steps\ne_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nthreshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.\nnonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file \"filename.jld2\" after the solving process.\n\nNotes\n\nThe ADOs will be saved depend on the keyword argument e_ops.\nIf e_ops is specified, the solution will only save the final ADOs, otherwise, it will save all the ADOs corresponding to tlist = 0:Δt:(Δt * steps).\nFor more details of the propagator, please refer to FastExpm.jl\n\nReturns\n\nsol::TimeEvolutionHEOMSol : The solution of the hierarchical EOM. See also TimeEvolutionHEOMSol\n\n\n\n\n\n","category":"method"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"# the time-independent HEOMLS matrix\nM::AbstractHEOMLSMatrix \n\n# the initial state can be either the system density operator or ADOs\nρ0::QuantumObject\nρ0::ADOs\n\n# A specific time interval (time step)\nΔt = 0.5\n\n# The number of time steps for the propagator to apply\nsteps = 4\n\n# equivalent to tlist = 0 : Δt : (Δt * steps)\nsol = HEOMsolve(M, ρ0, Δt, steps) ","category":"page"},{"location":"heom_matrix/M_Fermion/#doc-M_Fermion","page":"HEOMLS for Fermionic Bath","title":"HEOMLS Matrix for Fermionic Baths","text":"","category":"section"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"The HEOM Liouvillian superoperator matrix struct M_Fermion <: AbstractHEOMLSMatrix which describes the interactions between the system and multiple Fermionic baths.","category":"page"},{"location":"heom_matrix/M_Fermion/#Construct-Matrix","page":"HEOMLS for Fermionic Bath","title":"Construct Matrix","text":"","category":"section"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"To construct the HEOM matrix in this case, one can call ","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"M_Fermion(Hsys, tier, Bath, parity) with the following parameters:","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"args (Arguments)","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"Hsys : The time-independent system Hamiltonian\ntier::Int : the tier (cutoff level) for the fermionic bath\nBath::Vector{FermionBath} : objects for different fermionic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on. Defaults to EVEN.","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"kwargs (Keyword Arguments)","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"threshold::Real : The threshold of the importance value. Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"For example:","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"Hs::QuantumObject # system Hamiltonian\ntier = 3\nBath::FermionBath\n\n# create HEOMLS matrix in both EVEN and ODD parity\nM_even = M_Fermion(Hs, tier, Bath) \nM_odd = M_Fermion(Hs, tier, Bath, ODD) ","category":"page"},{"location":"heom_matrix/M_Fermion/#Fields","page":"HEOMLS for Fermionic Bath","title":"Fields","text":"","category":"section"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"The fields of the structure M_Fermion are as follows:","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"data : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the fermionic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on.\nbath::Vector{FermionBath} : the vector which stores all FermionBath objects\nhierarchy::HierarchyDict: the object which contains all dictionaries for fermion-bath-ADOs hierarchy.","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"One can obtain the value of each fields as follows:","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"M::M_Fermion\n\nM.data\nM.tier\nM.dims\nM.N\nM.sup_dim\nM.parity\nM.bath\nM.hierarchy","category":"page"},{"location":"libraryAPI/#Library-API","page":"Library API","title":"Library API","text":"","category":"section"},{"location":"libraryAPI/#Contents","page":"Library API","title":"Contents","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"Pages = [\"libraryAPI.md\"]","category":"page"},{"location":"libraryAPI/#Index","page":"Library API","title":"Index","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"Pages = [\"libraryAPI.md\"]","category":"page"},{"location":"libraryAPI/#lib-Bath","page":"Library API","title":"Bath Module","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"C(bath::BosonBath, tlist::AbstractVector)\nC(bath::FermionBath, tlist::AbstractVector)\nExponent\nBosonBath\nBosonBath(op::QuantumObject, η::Vector{Ti}, γ::Vector{Tj}, δ::Number=0.0; combine::Bool=true) where {Ti, Tj <: Number}\nBosonBath(op::QuantumObject, η_real::Vector{Ti}, γ_real::Vector{Tj}, η_imag::Vector{Tk}, γ_imag::Vector{Tl}, δ::Tm=0.0; combine::Bool=true) where {Ti, Tj, Tk, Tl, Tm <: Number}\nbosonReal\nbosonReal(op::QuantumObject, η_real::Vector{Ti}, γ_real::Vector{Tj}) where {Ti, Tj <: Number}\nbosonImag\nbosonImag(op::QuantumObject, η_real::Vector{Ti}, γ_real::Vector{Tj}) where {Ti, Tj <: Number}\nbosonRealImag\nbosonRealImag(op::QuantumObject, η_real::Vector{Ti}, η_imag::Vector{Tj}, γ::Vector{Tk}) where {Ti, Tj, Tk <: Number}\nBosonBathRWA\nbosonAbsorb\nbosonAbsorb(op::QuantumObject, η_absorb::Vector{Ti}, γ_absorb::Vector{Tj}, η_emit::Vector{Tk}) where {Ti, Tj, Tk <: Number}\nbosonEmit\nbosonEmit(op::QuantumObject, η_emit::Vector{Ti}, γ_emit::Vector{Tj}, η_absorb::Vector{Tk}) where {Ti, Tj, Tk <: Number}\nFermionBath\nFermionBath(op::QuantumObject, η_absorb::Vector{Ti}, γ_absorb::Vector{Tj}, η_emit::Vector{Tk}, γ_emit::Vector{Tl}, δ::Tm=0.0) where {Ti, Tj, Tk, Tl, Tm <: Number}\nfermionAbsorb\nfermionAbsorb(op::QuantumObject, η_absorb::Vector{Ti}, γ_absorb::Vector{Tj}, η_emit::Vector{Tk}) where {Ti, Tj, Tk <: Number}\nfermionEmit\nfermionEmit(op::QuantumObject, η_emit::Vector{Ti}, γ_emit::Vector{Tj}, η_absorb::Vector{Tk}) where {Ti, Tj, Tk <: Number}","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.C-Tuple{BosonBath, AbstractVector}","page":"Library API","title":"HierarchicalEOM.C","text":"C(bath, tlist)\n\nCalculate the correlation function C(t) for a given bosonic bath and time list.\n\nif the input bosonic bath did not apply rotating wave approximation (RWA)\n\nC(t)=sum_u=textrmRtextrmI(delta_u textrmR + idelta_u textrmI)C^u(t)\n\nwhere\n\nC^u(t)=sum_i eta_i^u e^-gamma_i^u t\n\nif the input bosonic bath applies rotating wave approximation (RWA)\n\nC^nu=pm(t)=sum_i eta_i^nu e^-gamma_i^nu t\n\nParameters\n\nbath::BosonBath : The bath object which describes a certain bosonic bath.\ntlist::AbstractVector: The specific time.\n\nReturns (without RWA)\n\nclist::Vector{ComplexF64} : a list of the value of correlation function according to the given time list.\n\nReturns (with RWA)\n\ncplist::Vector{ComplexF64} : a list of the value of the absorption (nu=+) correlation function according to the given time list.\ncmlist::Vector{ComplexF64} : a list of the value of the emission (nu=-) correlation function according to the given time list.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.C-Tuple{FermionBath, AbstractVector}","page":"Library API","title":"HierarchicalEOM.C","text":"C(bath, tlist)\n\nCalculate the correlation function C^nu=+(t) and C^nu=-(t) for a given fermionic bath and time list. Here, nu=+ represents the absorption process and nu=- represents the emmision process.\n\nC^nu=pm(t)=sum_i eta_i^nu e^-gamma_i^nu t\n\nParameters\n\nbath::FermionBath : The bath object which describes a certain fermionic bath.\ntlist::AbstractVector: The specific time.\n\nReturns\n\ncplist::Vector{ComplexF64} : a list of the value of the absorption (nu=+) correlation function according to the given time list.\ncmlist::Vector{ComplexF64} : a list of the value of the emission (nu=-) correlation function according to the given time list.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.Exponent","page":"Library API","title":"HierarchicalEOM.Exponent","text":"struct Exponent\n\nAn object which describes a single exponential-expansion term (naively, an excitation mode) within the decomposition of the bath correlation functions.\n\nThe expansion of a bath correlation function can be expressed as : C(t) = sum_i eta_i exp(-gamma_i t).\n\nFields\n\nop::QuantumObject : The system coupling operator according to system-bath interaction.\nη::Number : the coefficient eta_i in bath correlation function.\nγ::Number : the coefficient gamma_i in bath correlation function.\ntypes::String : The type-tag of the exponent.\n\nThe different types of the Exponent:\n\n\"bR\" : from real part of bosonic correlation function C^u=textrmR(t)\n\"bI\" : from imaginary part of bosonic correlation function C^u=textrmI(t)\n\"bRI\" : from combined (real and imaginary part) bosonic bath correlation function C(t)\n\"bA\" : from absorption bosonic correlation function C^nu=+(t)\n\"bE\" : from emission bosonic correlation function C^nu=-(t)\n\"fA\" : from absorption fermionic correlation function C^nu=+(t)\n\"fE\" : from emission fermionic correlation function C^nu=-(t)\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.BosonBath","page":"Library API","title":"HierarchicalEOM.BosonBath","text":"struct BosonBath <: AbstractBath\n\nAn object which describes the interaction between system and bosonic bath\n\nFields\n\nbath : the different boson-bath-type objects which describes the interaction between system and bosonic bath\nop : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nNterm : the number of exponential-expansion term of correlation functions\nδ : The approximation discrepancy which is used for adding the terminator to HEOM matrix (see function: addTerminator)\n\nMethods\n\nOne can obtain the k-th exponent (exponential-expansion term) from bath::BosonBath by calling : bath[k]. HierarchicalEOM.jl also supports the following calls (methods) :\n\nbath[1:k]; # returns a vector which contains the exponents from the `1`-st to the `k`-th term.\nbath[1:end]; # returns a vector which contains all the exponential-expansion terms\nbath[:]; # returns a vector which contains all the exponential-expansion terms\nfrom b in bath\n # do something\nend\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.BosonBath-Union{Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Number}} where {Ti, Tj<:Number}","page":"Library API","title":"HierarchicalEOM.BosonBath","text":"BosonBath(op, η, γ, δ=0.0; combine=true)\n\nGenerate BosonBath object for the case where real part and imaginary part of the correlation function are combined.\n\nbeginaligned\nC(tau)\n=frac12piint_0^infty domega J(omega)leftn(omega)e^iomega tau+(n(omega)+1)e^-iomega tauright\n=sum_i eta_i exp(-gamma_i tau)\nendaligned\n\nwhere J(omega) is the spectral density of the bath and n(omega) represents the Bose-Einstein distribution.\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη::Vector{Ti<:Number} : the coefficients eta_i in bath correlation function C(tau).\nγ::Vector{Tj<:Number} : the coefficients gamma_i in bath correlation function C(tau).\nδ::Number : The approximation discrepancy (Default to 0.0) which is used for adding the terminator to HEOM matrix (see function: addTerminator)\ncombine::Bool : Whether to combine the exponential-expansion terms with the same frequency. Defaults to true.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.BosonBath-Union{Tuple{Tm}, Tuple{Tl}, Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}, Vector{Tl}}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}, Vector{Tl}, Tm}} where {Ti, Tj, Tk, Tl, Tm<:Number}","page":"Library API","title":"HierarchicalEOM.BosonBath","text":"BosonBath(op, η_real, γ_real, η_imag, γ_imag, δ=0.0; combine=true)\n\nGenerate BosonBath object for the case where the correlation function splits into real part and imaginary part.\n\nbeginaligned\nC(tau)\n=frac12piint_0^infty domega J(omega)leftn(omega)e^iomega tau+(n(omega)+1)e^-iomega tauright\n=sum_i eta_i exp(-gamma_i tau)\nendaligned\n\nwhere J(omega) is the spectral density of the bath and n(omega) represents the Bose-Einstein distribution.\n\nWhen gamma_i neq gamma_i^*, a closed form for the HEOM can be obtained by further decomposing C(tau) into its real (R) and imaginary (I) parts as\n\nC(tau)=sum_u=textrmRtextrmI(delta_u textrmR + idelta_u textrmI)C^u(tau)\n\nwhere delta is the Kronecker delta function and C^u(tau)=sum_i eta_i^u exp(-gamma_i^u tau)\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη_real::Vector{Ti<:Number} : the coefficients eta_i in real part of bath correlation function C^u=textrmR.\nγ_real::Vector{Tj<:Number} : the coefficients gamma_i in real part of bath correlation function C^u=textrmR.\nη_imag::Vector{Tk<:Number} : the coefficients eta_i in imaginary part of bath correlation function C^u=textrmI.\nγ_imag::Vector{Tl<:Number} : the coefficients gamma_i in imaginary part of bath correlation function C^u=textrmI.\nδ::Number : The approximation discrepancy (Default to 0.0) which is used for adding the terminator to HEOM matrix (see function: addTerminator)\ncombine::Bool : Whether to combine the exponential-expansion terms with the same frequency. Defaults to true.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.bosonReal","page":"Library API","title":"HierarchicalEOM.bosonReal","text":"struct bosonReal <: AbstractBosonBath\n\nA bosonic bath for the real part of bath correlation function C^u=textrmR\n\nFields\n\nComm : the super-operator (commutator) for the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i in real part of bath correlation function C^u=textrmR.\nγ : the coefficients gamma_i in real part of bath correlation function C^u=textrmR.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonReal-Union{Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}}} where {Ti, Tj<:Number}","page":"Library API","title":"HierarchicalEOM.bosonReal","text":"bosonReal(op, η_real, γ_real)\n\nGenerate bosonic bath for the real part of bath correlation function C^u=textrmR\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη_real::Vector{Ti<:Number} : the coefficients eta_i in real part of bath correlation function C^u=textrmR.\nγ_real::Vector{Tj<:Number} : the coefficients gamma_i in real part of bath correlation function C^u=textrmR.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.bosonImag","page":"Library API","title":"HierarchicalEOM.bosonImag","text":"struct bosonImag <: AbstractBosonBath\n\nA bosonic bath for the imaginary part of bath correlation function C^u=textrmI\n\nFields\n\nComm : the super-operator (commutator) for the coupling operator.\nanComm : the super-operator (anti-commutator) for the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i in imaginary part of bath correlation function C^u=textrmI.\nγ : the coefficients gamma_i in imaginary part of bath correlation function C^u=textrmI.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonImag-Union{Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}}} where {Ti, Tj<:Number}","page":"Library API","title":"HierarchicalEOM.bosonImag","text":"bosonImag(op, η_imag, γ_imag)\n\nGenerate bosonic bath for the imaginary part of correlation function C^u=textrmI\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη_imag::Vector{Ti<:Number} : the coefficients eta_i in imaginary part of bath correlation functions C^u=textrmI.\nγ_imag::Vector{Tj<:Number} : the coefficients gamma_i in imaginary part of bath correlation functions C^u=textrmI.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.bosonRealImag","page":"Library API","title":"HierarchicalEOM.bosonRealImag","text":"sturct bosonRealImag <: AbstractBosonBath\n\nA bosonic bath which the real part and imaginary part of the bath correlation function are combined \n\nFields\n\nComm : the super-operator (commutator) for the coupling operator.\nanComm : the super-operator (anti-commutator) for the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη_real : the real part of coefficients eta_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nη_imag : the imaginary part of coefficients eta_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nγ : the coefficients gamma_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonRealImag-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.bosonRealImag","text":"bosonRealImag(op, η_real, η_imag, γ)\n\nGenerate bosonic bath which the real part and imaginary part of the bath correlation function are combined\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη_real::Vector{Ti<:Number} : the real part of coefficients eta_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nη_imag::Vector{Tj<:Number} : the imaginary part of coefficients eta_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nγ::Vector{Tk<:Number} : the coefficients gamma_i in bath correlation function sum_i eta_i exp(-gamma_i t).\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.BosonBathRWA","page":"Library API","title":"HierarchicalEOM.BosonBathRWA","text":"BosonBathRWA(op, η_absorb, γ_absorb, η_emit, γ_emit, δ=0.0)\n\nA function for generating BosonBath object where the interaction between system and bosonic bath applies the rotating wave approximation (RWA).\n\nbeginaligned\nC^nu=+(tau)\n=frac12piint_0^infty domega J(omega) n(omega) e^iomega tau\n=sum_i eta_i^nu=+ exp(-gamma_i^nu=+ tau)\nC^nu=-(tau)\n=frac12piint_0^infty domega J(omega) (1+n(omega)) e^-iomega tau\n=sum_i eta_i^nu=- exp(-gamma_i^nu=- tau)\nendaligned\n\nwhere nu=+ (nu=-) represents absorption (emission) process, J(omega) is the spectral density of the bath and n(omega) is the Bose-Einstein distribution.\n\nParameters\n\nop::QuantumObject : The system annihilation operator according to the system-bosonic-bath interaction.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+(tau).\nγ_absorb::Vector{Tj<:Number} : the coefficients gamma_i of absorption bath correlation function C^nu=+(tau).\nη_emit::Vector{Tk<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-(tau).\nγ_emit::Vector{Tl<:Number} : the coefficients gamma_i of emission bath correlation function C^nu=-(tau).\nδ::Number : The approximation discrepancy (Defaults to 0.0) which is used for adding the terminator to HEOMLS matrix (see function: addTerminator)\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.bosonAbsorb","page":"Library API","title":"HierarchicalEOM.bosonAbsorb","text":"struct bosonAbsorb <: AbstractBosonBath\n\nAn bath object which describes the absorption process of the bosonic system by a correlation function C^nu=+\n\nFields\n\nspre : the super-operator (left side operator multiplication) for the coupling operator.\nspost : the super-operator (right side operator multiplication) for the coupling operator.\nCommD : the super-operator (commutator) for the adjoint of the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i of absorption bath correlation function C^nu=+.\nγ : the coefficients gamma_i of absorption bath correlation function C^nu=+.\nη_emit : the coefficients eta_i of emission bath correlation function C^nu=-.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonAbsorb-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.bosonAbsorb","text":"bosonAbsorb(op, η_absorb, γ_absorb, η_emit)\n\nGenerate bosonic bath which describes the absorption process of the bosonic system by a correlation function C^nu=+\n\nParameters\n\nop::QuantumObject : The system creation operator according to the system-fermionic-bath interaction.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+.\nγ_absorb::Vector{Tj<:Number} : the coefficients gamma_i of absorption bath correlation function C^nu=+.\nη_emit::Vector{Tk<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.bosonEmit","page":"Library API","title":"HierarchicalEOM.bosonEmit","text":"struct bosonEmit <: AbstractBosonBath\n\nAn bath object which describes the emission process of the bosonic system by a correlation function C^nu=-\n\nFields\n\nspre : the super-operator (left side operator multiplication) for the coupling operator.\nspost : the super-operator (right side operator multiplication) for the coupling operator.\nCommD : the super-operator (commutator) for the adjoint of the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i of emission bath correlation function C^nu=-.\nγ : the coefficients gamma_i of emission bath correlation function C^nu=-.\nη_absorb : the coefficients eta_i of absorption bath correlation function C^nu=+.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonEmit-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.bosonEmit","text":"bosonEmit(op, η_emit, γ_emit, η_absorb)\n\nGenerate bosonic bath which describes the emission process of the bosonic system by a correlation function C^nu=-\n\nParameters\n\nop::QuantumObject : The system annihilation operator according to the system-bosonic-bath interaction.\nη_emit::Vector{Ti<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-.\nγ_emit::Vector{Ti<:Number} : the coefficients gamma_i of emission bath correlation function C^nu=-.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.FermionBath","page":"Library API","title":"HierarchicalEOM.FermionBath","text":"struct FermionBath <: AbstractBath\n\nAn object which describes the interaction between system and fermionic bath\n\nFields\n\nbath : the different fermion-bath-type objects which describes the interaction\nop : The system \"emission\" operator according to the system-fermionic-bath interaction.\nNterm : the number of exponential-expansion term of correlation functions\nδ : The approximation discrepancy which is used for adding the terminator to HEOM matrix (see function: addTerminator)\n\nMethods\n\nOne can obtain the k-th exponent (exponential-expansion term) from bath::FermionBath by calling : bath[k]. HierarchicalEOM.jl also supports the following calls (methods) :\n\nbath[1:k]; # returns a vector which contains the exponents from the `1`-st to the `k`-th term.\nbath[1:end]; # returns a vector which contains all the exponential-expansion terms\nbath[:]; # returns a vector which contains all the exponential-expansion terms\nfrom b in bath\n # do something\nend\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.FermionBath-Union{Tuple{Tm}, Tuple{Tl}, Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}, Vector{Tl}}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}, Vector{Tl}, Tm}} where {Ti, Tj, Tk, Tl, Tm<:Number}","page":"Library API","title":"HierarchicalEOM.FermionBath","text":"FermionBath(op, η_absorb, γ_absorb, η_emit, γ_emit, δ=0.0)\n\nGenerate FermionBath object\n\nbeginaligned\nC^nu=+(tau)\n=frac12piint_-infty^infty domega J(omega) n(omega) e^iomega tau\n=sum_i eta_i^nu=+ exp(-gamma_i^nu=+ tau)\nC^nu=-(tau)\n=frac12piint_-infty^infty domega J(omega) (1-n(omega)) e^-iomega tau\n=sum_i eta_i^nu=- exp(-gamma_i^nu=- tau)\nendaligned\n\nwhere nu=+ (nu=-) represents absorption (emission) process, J(omega) is the spectral density of the bath and n(omega) is the Fermi-Dirac distribution.\n\nParameters\n\nop::QuantumObject : The system annihilation operator according to the system-fermionic-bath interaction.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+(tau).\nγ_absorb::Vector{Tj<:Number} : the coefficients gamma_i of absorption bath correlation function C^nu=+(tau).\nη_emit::Vector{Tk<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-(tau).\nγ_emit::Vector{Tl<:Number} : the coefficients gamma_i of emission bath correlation function C^nu=-(tau).\nδ::Number : The approximation discrepancy (Defaults to 0.0) which is used for adding the terminator to HEOMLS matrix (see function: addTerminator)\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.fermionAbsorb","page":"Library API","title":"HierarchicalEOM.fermionAbsorb","text":"struct fermionAbsorb <: AbstractFermionBath\n\nAn bath object which describes the absorption process of the fermionic system by a correlation function C^nu=+\n\nFields\n\nspre : the super-operator (left side operator multiplication) for the coupling operator.\nspost : the super-operator (right side operator multiplication) for the coupling operator.\nspreD : the super-operator (left side operator multiplication) for the adjoint of the coupling operator.\nspostD : the super-operator (right side operator multiplication) for the adjoint of the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i of absorption bath correlation function C^nu=+.\nγ : the coefficients gamma_i of absorption bath correlation function C^nu=+.\nη_emit : the coefficients eta_i of emission bath correlation function C^nu=-.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.fermionAbsorb-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.fermionAbsorb","text":"fermionAbsorb(op, η_absorb, γ_absorb, η_emit)\n\nGenerate fermionic bath which describes the absorption process of the fermionic system by a correlation function C^nu=+\n\nParameters\n\nop::QuantumObject : The system creation operator according to the system-fermionic-bath interaction.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+.\nγ_absorb::Vector{Tj<:Number} : the coefficients gamma_i of absorption bath correlation function C^nu=+.\nη_emit::Vector{Tk<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.fermionEmit","page":"Library API","title":"HierarchicalEOM.fermionEmit","text":"struct fermionEmit <: AbstractFermionBath\n\nAn bath object which describes the emission process of the fermionic system by a correlation function C^nu=-\n\nFields\n\nspre : the super-operator (left side operator multiplication) for the coupling operator.\nspost : the super-operator (right side operator multiplication) for the coupling operator.\nspreD : the super-operator (left side operator multiplication) for the adjoint of the coupling operator.\nspostD : the super-operator (right side operator multiplication) for the adjoint of the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i of emission bath correlation function C^nu=-.\nγ : the coefficients gamma_i of emission bath correlation function C^nu=-.\nη_absorb : the coefficients eta_i of absorption bath correlation function C^nu=+.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.fermionEmit-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.fermionEmit","text":"fermionEmit(op, η_emit, γ_emit, η_absorb)\n\nGenerate fermionic bath which describes the emission process of the fermionic system by a correlation function C^nu=-\n\nParameters\n\nop::QuantumObject : The system annihilation operator according to the system-fermionic-bath interaction.\nη_emit::Vector{Ti<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-.\nγ_emit::Vector{Ti<:Number} : the coefficients gamma_i of emission bath correlation function C^nu=-.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Bath-Correlation-Functions","page":"Library API","title":"Bath Correlation Functions","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"Boson_DrudeLorentz_Matsubara\nBoson_DrudeLorentz_Pade\nFermion_Lorentz_Matsubara\nFermion_Lorentz_Pade","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.Boson_DrudeLorentz_Matsubara","page":"Library API","title":"HierarchicalEOM.Boson_DrudeLorentz_Matsubara","text":"Boson_DrudeLorentz_Matsubara(op, λ, W, kT, N)\n\nConstructing Drude-Lorentz bosonic bath with Matsubara expansion\n\nParameters\n\nop : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nλ::Real: The coupling strength between the system and the bath.\nW::Real: The reorganization energy (band-width) of the bath.\nkT::Real: The product of the Boltzmann constant k and the absolute temperature T of the bath.\nN::Int: (N+1)-terms of exponential terms are used to approximate the bath correlation function.\n\nReturns\n\nbath::BosonBath : a bosonic bath object with describes the interaction between system and bosonic bath\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.Boson_DrudeLorentz_Pade","page":"Library API","title":"HierarchicalEOM.Boson_DrudeLorentz_Pade","text":"Boson_DrudeLorentz_Pade(op, λ, W, kT, N)\n\nConstructing Drude-Lorentz bosonic bath with Padé expansion\n\nA Padé approximant is a sum-over-poles expansion (see here for more details).\n\nThe application of the Padé method to spectrum decompoisitions is described in Ref. [1].\n\n[1] J. Chem. Phys. 134, 244106 (2011)\n\nParameters\n\nop : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nλ::Real: The coupling strength between the system and the bath.\nW::Real: The reorganization energy (band-width) of the bath.\nkT::Real: The product of the Boltzmann constant k and the absolute temperature T of the bath.\nN::Int: (N+1)-terms of exponential terms are used to approximate the bath correlation function.\n\nReturns\n\nbath::BosonBath : a bosonic bath object with describes the interaction between system and bosonic bath\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.Fermion_Lorentz_Matsubara","page":"Library API","title":"HierarchicalEOM.Fermion_Lorentz_Matsubara","text":"Fermion_Lorentz_Matsubara(op, λ, μ, W, kT, N)\n\nConstructing Lorentzian fermionic bath with Matsubara expansion\n\nParameters\n\nop : The system annihilation operator according to the system-fermionic-bath interaction.\nλ::Real: The coupling strength between the system and the bath.\nμ::Real: The chemical potential of the bath.\nW::Real: The reorganization energy (band-width) of the bath.\nkT::Real: The product of the Boltzmann constant k and the absolute temperature T of the bath.\nN::Int: (N+1)-terms of exponential terms are used to approximate each correlation functions (C^nu=pm).\n\nReturns\n\nbath::FermionBath : a fermionic bath object with describes the interaction between system and fermionic bath\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.Fermion_Lorentz_Pade","page":"Library API","title":"HierarchicalEOM.Fermion_Lorentz_Pade","text":"Fermion_Lorentz_Pade(op, λ, μ, W, kT, N)\n\nConstructing Lorentzian fermionic bath with Padé expansion\n\nA Padé approximant is a sum-over-poles expansion (see here for more details).\n\nThe application of the Padé method to spectrum decompoisitions is described in Ref. [1].\n\n[1] J. Chem. Phys. 134, 244106 (2011)\n\nParameters\n\nop : The system annihilation operator according to the system-fermionic-bath interaction.\nλ::Real: The coupling strength between the system and the bath.\nμ::Real: The chemical potential of the bath.\nW::Real: The reorganization energy (band-width) of the bath.\nkT::Real: The product of the Boltzmann constant k and the absolute temperature T of the bath.\nN::Int: (N+1)-terms of exponential terms are used to approximate each correlation functions (C^nu=pm).\n\nReturns\n\nbath::FermionBath : a fermionic bath object with describes the interaction between system and fermionic bath\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#Parity","page":"Library API","title":"Parity","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"EvenParity\nOddParity\nEVEN\nODD","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.EvenParity","page":"Library API","title":"HierarchicalEOM.EvenParity","text":"struct EvenParity <: AbstractParity\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.OddParity","page":"Library API","title":"HierarchicalEOM.OddParity","text":"struct OddParity <: AbstractParity\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.EVEN","page":"Library API","title":"HierarchicalEOM.EVEN","text":"const EVEN = EvenParity()\n\nLabel of even-parity\n\n\n\n\n\n","category":"constant"},{"location":"libraryAPI/#HierarchicalEOM.ODD","page":"Library API","title":"HierarchicalEOM.ODD","text":"const ODD = OddParity()\n\nLabel of odd-parity\n\n\n\n\n\n","category":"constant"},{"location":"libraryAPI/#HEOM-Liouvillian-superoperator-matrices","page":"Library API","title":"HEOM Liouvillian superoperator matrices","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"HEOMSuperOp\nHEOMSuperOp(op, opParity::AbstractParity, refHEOMLS::AbstractHEOMLSMatrix, mul_basis::AbstractString=\"L\")\nHEOMSuperOp(op, opParity::AbstractParity, refADOs::ADOs, mul_basis::AbstractString=\"L\")\nHEOMSuperOp(op, opParity::AbstractParity, dims::SVector, N::Int, mul_basis::AbstractString)\nM_S\nM_S(Hsys::QuantumObject, parity::AbstractParity=EVEN; verbose::Bool=true)\nM_Boson\nM_Boson(Hsys::QuantumObject, tier::Int, Bath::Vector{BosonBath}, parity::AbstractParity=EVEN; threshold::Real=0.0, verbose::Bool=true)\nM_Fermion\nM_Fermion(Hsys::QuantumObject, tier::Int, Bath::Vector{FermionBath}, parity::AbstractParity=EVEN; threshold::Real=0.0, verbose::Bool=true)\nM_Boson_Fermion\nM_Boson_Fermion(Hsys::QuantumObject, tier_b::Int, tier_f::Int, Bath_b::Vector{BosonBath}, Bath_f::Vector{FermionBath}, parity::AbstractParity=EVEN; threshold::Real=0.0, verbose::Bool=true)\nsize(M::HEOMSuperOp)\nsize(M::HEOMSuperOp, dim::Int)\nsize(M::AbstractHEOMLSMatrix)\nsize(M::AbstractHEOMLSMatrix, dim::Int)\neltype(M::HEOMSuperOp)\neltype(M::AbstractHEOMLSMatrix)\nPropagator\naddBosonDissipator\naddFermionDissipator\naddTerminator","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.HEOMSuperOp","page":"Library API","title":"HierarchicalEOM.HEOMSuperOp","text":"struct HEOMSuperOp\n\nGeneral HEOM superoperator matrix. \n\nFields\n\ndata<:AbstractSparseMatrix : the HEOM superoperator matrix\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of auxiliary density operators\nparity: the parity label (EVEN or ODD).\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.HEOMSuperOp-2","page":"Library API","title":"HierarchicalEOM.HEOMSuperOp","text":"HEOMSuperOp(op, opParity, refHEOMLS, mul_basis=\"L\"; Id_cache=I(refHEOMLS.N))\n\nConstruct the HEOM superoperator matrix corresponding to the given system operator which acts on all ADOs. \n\nDuring the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.\n\nParameters\n\nop : The system operator which will act on all ADOs.\nopParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.\nrefHEOMLS::AbstractHEOMLSMatrix : copy the system dims and number of ADOs (N) from this reference HEOMLS matrix\nmul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs. Defaults to \"L\".\n\nif mul_basis is specified as\n\n\"L\" : the matrix op has same dimension with the system and acts on left-hand side.\n\"R\" : the matrix op has same dimension with the system and acts on right-hand side.\n\"LR\" : the matrix op is a superoperator of the system.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.HEOMSuperOp-3","page":"Library API","title":"HierarchicalEOM.HEOMSuperOp","text":"HEOMSuperOp(op, opParity, refADOs, mul_basis=\"L\"; Id_cache=I(refADOs.N))\n\nConstruct the HEOMLS matrix corresponding to the given system operator which multiplies on the \"L\"eft-hand (\"R\"ight-hand) side basis of all ADOs. \n\nDuring the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.\n\nParameters\n\nop : The system operator which will act on all ADOs.\nopParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.\nrefADOs::ADOs : copy the system dims and number of ADOs (N) from this reference ADOs \nmul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs. Defaults to \"L\".\n\nif mul_basis is specified as\n\n\"L\" : the matrix op has same dimension with the system and acts on left-hand side.\n\"R\" : the matrix op has same dimension with the system and acts on right-hand side.\n\"LR\" : the matrix op is a superoperator of the system.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.HEOMSuperOp-Tuple{Any, AbstractParity, SVector, Int64, AbstractString}","page":"Library API","title":"HierarchicalEOM.HEOMSuperOp","text":"HEOMSuperOp(op, opParity, dims, N, mul_basis; Id_cache=I(N))\n\nConstruct the HEOM superoperator matrix corresponding to the given system operator which acts on all ADOs. \n\nDuring the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.\n\nParameters\n\nop : The system operator which will act on all ADOs.\nopParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.\ndims::SVector : the dimension list of the coupling operator (should be equal to the system dims).\nN::Int : the number of ADOs.\nmul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs.\n\nif mul_basis is specified as\n\n\"L\" : the matrix op has same dimension with the system and acts on left-hand side.\n\"R\" : the matrix op has same dimension with the system and acts on right-hand side.\n\"LR\" : the matrix op is a SuperOperator of the system.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.M_S","page":"Library API","title":"HierarchicalEOM.M_S","text":"struct M_S <: AbstractHEOMLSMatrix\n\nHEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0. This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely\n\nMcdot=-i leftH_sys cdot right_-\n\nwhere cdot cdot_- stands for commutator.\n\nFields\n\ndata<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the hierarchy, which equals to 0 in this case\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs, which equals to 1 (only the reduced density operator) in this case\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_S-2","page":"Library API","title":"HierarchicalEOM.M_S","text":"M_S(Hsys, parity=EVEN; verbose=true)\n\nGenerate HEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0. This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely\n\nMcdot=-i leftH_sys cdot right_-\n\nwhere cdot cdot_- stands for commutator.\n\nParameters\n\nHsys : The time-independent system Hamiltonian\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nverbose::Bool : To display verbose output during the process or not. Defaults to true.\n\nNote that the parity only need to be set as ODD when the system contains fermionic systems and you need to calculate the spectrum (density of states) of it.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Boson","page":"Library API","title":"HierarchicalEOM.M_Boson","text":"struct M_Boson <: AbstractHEOMLSMatrix\n\nHEOM Liouvillian superoperator matrix for bosonic bath\n\nFields\n\ndata<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the bosonic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nbath::Vector{BosonBath} : the vector which stores all BosonBath objects\nhierarchy::HierarchyDict: the object which contains all dictionaries for boson-bath-ADOs hierarchy.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Boson-2","page":"Library API","title":"HierarchicalEOM.M_Boson","text":"M_Boson(Hsys, tier, Bath, parity=EVEN; threshold=0.0, verbose=true)\n\nGenerate the boson-type HEOM Liouvillian superoperator matrix\n\nParameters\n\nHsys : The time-independent system Hamiltonian\ntier::Int : the tier (cutoff level) for the bosonic bath\nBath::Vector{BosonBath} : objects for different bosonic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nthreshold::Real : The threshold of the importance value (see Ref. [1]). Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\n\nNote that the parity only need to be set as ODD when the system contains fermionic systems and you need to calculate the spectrum (density of states) of it.\n\n[1] Phys. Rev. B 88, 235426 (2013)\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Fermion","page":"Library API","title":"HierarchicalEOM.M_Fermion","text":"struct M_Fermion <: AbstractHEOMLSMatrix\n\nHEOM Liouvillian superoperator matrix for fermionic bath\n\nFields\n\ndata<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the fermionic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nbath::Vector{FermionBath} : the vector which stores all FermionBath objects\nhierarchy::HierarchyDict: the object which contains all dictionaries for fermion-bath-ADOs hierarchy.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Fermion-2","page":"Library API","title":"HierarchicalEOM.M_Fermion","text":"M_Fermion(Hsys, tier, Bath, parity=EVEN; threshold=0.0, verbose=true)\n\nGenerate the fermion-type HEOM Liouvillian superoperator matrix\n\nParameters\n\nHsys : The time-independent system Hamiltonian\ntier::Int : the tier (cutoff level) for the fermionic bath\nBath::Vector{FermionBath} : objects for different fermionic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nthreshold::Real : The threshold of the importance value (see Ref. [1]). Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\n\n[1] Phys. Rev. B 88, 235426 (2013)\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Boson_Fermion","page":"Library API","title":"HierarchicalEOM.M_Boson_Fermion","text":"struct M_Boson_Fermion <: AbstractHEOMLSMatrix\n\nHEOM Liouvillian superoperator matrix for mixtured (bosonic and fermionic) bath \n\nFields\n\ndata<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator\nBtier : the tier (cutoff level) for bosonic hierarchy\nFtier : the tier (cutoff level) for fermionic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nBbath::Vector{BosonBath} : the vector which stores all BosonBath objects\nFbath::Vector{FermionBath} : the vector which stores all FermionBath objects\nhierarchy::MixHierarchyDict: the object which contains all dictionaries for mixed-bath-ADOs hierarchy.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Boson_Fermion-2","page":"Library API","title":"HierarchicalEOM.M_Boson_Fermion","text":"M_Boson_Fermion(Hsys, Btier, Ftier, Bbath, Fbath, parity=EVEN; threshold=0.0, verbose=true)\n\nGenerate the boson-fermion-type HEOM Liouvillian superoperator matrix\n\nParameters\n\nHsys : The time-independent system Hamiltonian\nBtier::Int : the tier (cutoff level) for the bosonic bath\nFtier::Int : the tier (cutoff level) for the fermionic bath\nBbath::Vector{BosonBath} : objects for different bosonic baths\nFbath::Vector{FermionBath} : objects for different fermionic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nthreshold::Real : The threshold of the importance value (see Ref. [1, 2]). Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\n\nNote that the parity only need to be set as ODD when the system contains fermion systems and you need to calculate the spectrum of it.\n\n[1] Phys. Rev. B 88, 235426 (2013) [2] Phys. Rev. B 103, 235413 (2021)\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#Base.size-Tuple{HEOMSuperOp}","page":"Library API","title":"Base.size","text":"size(M::HEOMSuperOp)\n\nReturns the size of the HEOM superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.size-Tuple{HEOMSuperOp, Int64}","page":"Library API","title":"Base.size","text":"size(M::HEOMSuperOp, dim::Int)\n\nReturns the specified dimension of the HEOM superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.size-Tuple{AbstractHEOMLSMatrix}","page":"Library API","title":"Base.size","text":"size(M::AbstractHEOMLSMatrix)\n\nReturns the size of the HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.size-Tuple{AbstractHEOMLSMatrix, Int64}","page":"Library API","title":"Base.size","text":"size(M::AbstractHEOMLSMatrix, dim::Int)\n\nReturns the specified dimension of the HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.eltype-Tuple{HEOMSuperOp}","page":"Library API","title":"Base.eltype","text":"eltype(M::HEOMSuperOp)\n\nReturns the elements' type of the HEOM superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.eltype-Tuple{AbstractHEOMLSMatrix}","page":"Library API","title":"Base.eltype","text":"eltype(M::AbstractHEOMLSMatrix)\n\nReturns the elements' type of the HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.Propagator","page":"Library API","title":"HierarchicalEOM.Propagator","text":"Propagator(M, Δt; threshold, nonzero_tol)\n\nUse FastExpm.jl to calculate the propagator matrix from a given HEOM Liouvillian superoperator matrix M with a specific time step Delta t. That is, exp(M * Delta t).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nΔt::Real : A specific time step (time interval).\nthreshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.\nnonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.\n\nFor more details, please refer to FastExpm.jl\n\nReturns\n\n::SparseMatrixCSC{ComplexF64, Int64} : the propagator matrix\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.addBosonDissipator","page":"Library API","title":"HierarchicalEOM.addBosonDissipator","text":"addBosonDissipator(M, jumpOP)\n\nAdding bosonic dissipator to a given HEOMLS matrix which describes how the system dissipatively interacts with an extra bosonic environment. The dissipator is defined as follows\n\nDJ(cdot) = J(cdot) J^dagger - frac12left(J^dagger J (cdot) + (cdot) J^dagger J right)\n\nwhere Jequiv sqrtgammaV is the jump operator, V describes the dissipative part (operator) of the dynamics, gamma represents a non-negative damping rate and cdot cdot_+ stands for anti-commutator.\n\nNote that if V is acting on fermionic systems, it should be even-parity to be compatible with charge conservation.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\njumpOP::AbstractVector : The list of collapse (jump) operators J_i_i to add. Defaults to empty vector [].\n\nReturn\n\nM_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.addFermionDissipator","page":"Library API","title":"HierarchicalEOM.addFermionDissipator","text":"addFermionDissipator(M, jumpOP)\n\nAdding fermionic dissipator to a given HEOMLS matrix which describes how the system dissipatively interacts with an extra fermionic environment. The dissipator with EVEN parity is defined as follows\n\nD_textrmevenJ(cdot) = J(cdot) J^dagger - frac12left(J^dagger J (cdot) + (cdot) J^dagger J right)\n\nwhere Jequiv sqrtgammaV is the jump operator, V describes the dissipative part (operator) of the dynamics, gamma represents a non-negative damping rate and cdot cdot_+ stands for anti-commutator.\n\nSimilary, the dissipator with ODD parity is defined as follows\n\nD_textrmoddJ(cdot) = - J(cdot) J^dagger - frac12left(J^dagger J (cdot) + (cdot) J^dagger J right)\n\nNote that the parity of the dissipator will be determined by the parity of the given HEOMLS matrix M.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\njumpOP::AbstractVector : The list of collapse (jump) operators to add. Defaults to empty vector [].\n\nReturn\n\nM_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.addTerminator","page":"Library API","title":"HierarchicalEOM.addTerminator","text":"addTerminator(M, Bath)\n\nAdding terminator to a given HEOMLS matrix.\n\nThe terminator is a Liouvillian term representing the contribution to the system-bath dynamics of all exponential-expansion terms beyond Bath.Nterm\n\nThe difference between the true correlation function and the sum of the Bath.Nterm-exponential terms is approximately 2 * δ * dirac(t). Here, δ is the approximation discrepancy and dirac(t) denotes the Dirac-delta function.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nBath::Union{BosonBath, FermionBath} : The bath object which contains the approximation discrepancy δ\n\nReturn\n\nM_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#Auxiliary-Density-Operators-(ADOs)","page":"Library API","title":"Auxiliary Density Operators (ADOs)","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"ADOs\nADOs(V::AbstractVector, N::Int)\nlength(A::ADOs)\neltype(A::ADOs)\ngetRho\ngetADO\nQuantumToolbox.expect","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.ADOs","page":"Library API","title":"HierarchicalEOM.ADOs","text":"struct ADOs\n\nThe Auxiliary Density Operators for HEOM model.\n\nFields\n\ndata : the vectorized auxiliary density operators\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of auxiliary density operators\nparity: the parity label (EVEN or ODD).\n\nMethods\n\nOne can obtain the density matrix for specific index (idx) by calling : ados[idx]. HierarchicalEOM.jl also supports the following calls (methods) :\n\nlength(ados); # returns the total number of `ADOs`\nados[1:idx]; # returns a vector which contains the `ADO` (in matrix form) from index `1` to `idx`\nados[1:end]; # returns a vector which contains all the `ADO` (in matrix form)\nados[:]; # returns a vector which contains all the `ADO` (in matrix form)\nfor rho in ados # iteration\n # do something\nend\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.ADOs-Tuple{AbstractVector, Int64}","page":"Library API","title":"HierarchicalEOM.ADOs","text":"ADOs(V, N, parity)\n\nGernerate the object of auxiliary density operators for HEOM model.\n\nParameters\n\nV::AbstractVector : the vectorized auxiliary density operators\nN::Int : the number of auxiliary density operators.\nparity::AbstractParity : the parity label (EVEN or ODD). Default to EVEN.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.length-Tuple{ADOs}","page":"Library API","title":"Base.length","text":"length(A::ADOs)\n\nReturns the total number of the Auxiliary Density Operators (ADOs)\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.eltype-Tuple{ADOs}","page":"Library API","title":"Base.eltype","text":"eltype(A::ADOs)\n\nReturns the elements' type of the Auxiliary Density Operators (ADOs)\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.getRho","page":"Library API","title":"HierarchicalEOM.getRho","text":"getRho(ados)\n\nReturn the density matrix of the reduced state (system) from a given auxiliary density operators\n\nParameters\n\nados::ADOs : the auxiliary density operators for HEOM model\n\nReturns\n\nρ::QuantumObject : The density matrix of the reduced state\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.getADO","page":"Library API","title":"HierarchicalEOM.getADO","text":"getADO(ados, idx)\n\nReturn the auxiliary density operator with a specific index from auxiliary density operators\n\nThis function equals to calling : ados[idx].\n\nParameters\n\nados::ADOs : the auxiliary density operators for HEOM model\nidx::Int : the index of the auxiliary density operator\n\nReturns\n\nρ_idx::QuantumObject : The auxiliary density operator\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#QuantumToolbox.expect","page":"Library API","title":"QuantumToolbox.expect","text":"expect(op, ados; take_real=true)\n\nReturn the expectation value of the operator op for the reduced density operator in the given ados, namely\n\ntextrmTrleft O rho right\n\nwhere O is the operator and rho is the reduced density operator in the given ADOs.\n\nParameters\n\nop : the operator O to take the expectation value\nados::ADOs : the auxiliary density operators for HEOM model\ntake_real::Bool : whether to automatically take the real part of the trace or not. Default to true\n\nReturns\n\nexp_val : The expectation value\n\n\n\n\n\nexpect(op, ados_list; take_real=true)\n\nReturn a list of expectation values of the operator op corresponds to the reduced density operators in the given ados_list, namely\n\ntextrmTrleft O rho right\n\nwhere O is the operator and rho is the reduced density operator in one of the ADOs from ados_list.\n\nParameters\n\nop : the operator O to take the expectation value\nados_list::Vector{ADOs} : the list of auxiliary density operators for HEOM model\ntake_real::Bool : whether to automatically take the real part of the trace or not. Default to true\n\nReturns\n\nexp_val : The expectation value\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#lib-Hierarchy-Dictionary","page":"Library API","title":"Hierarchy Dictionary","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"Nvec\nHierarchyDict\nMixHierarchyDict\ngetIndexEnsemble","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.Nvec","page":"Library API","title":"HierarchicalEOM.Nvec","text":"struct Nvec\n\nAn object which describes the repetition number of each multi-index ensembles in auxiliary density operators.\n\nThe n_vector (vecn) denotes a set of integers:\n\n n_11 n_alpha k \n\nassociated with the k-th exponential-expansion term in the alpha-th bath. If n_alpha k = 3 means that the multi-index ensemble alpha k appears three times in the multi-index vector of ADOs (see the notations in our paper).\n\nThe hierarchy level (L) for an n_vector is given by L=sum_alpha k n_alpha k\n\nFields\n\ndata : the n_vector\nlevel : The level L for the n_vector\n\nMethods\n\nOne can obtain the repetition number for specific index (idx) by calling : n_vector[idx]. To obtain the corresponding tuple (alpha k) for a given index idx, see bathPtr in HierarchyDict for more details.\n\nHierarchicalEOM.jl also supports the following calls (methods) :\n\nlength(n_vector); # returns the length of `Nvec`\nn_vector[1:idx]; # returns a vector which contains the excitation number of `n_vector` from index `1` to `idx`\nn_vector[1:end]; # returns a vector which contains all the excitation number of `n_vector`\nn_vector[:]; # returns a vector which contains all the excitation number of `n_vector`\nfrom n in n_vector # iteration\n # do something\nend\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.HierarchyDict","page":"Library API","title":"HierarchicalEOM.HierarchyDict","text":"struct HierarchyDict <: AbstractHierarchyDict\n\nAn object which contains all dictionaries for pure (bosonic or fermionic) bath-ADOs hierarchy.\n\nFields\n\nidx2nvec : Return the Nvec from a given index of ADO\nnvec2idx : Return the index of ADO from a given Nvec\nlvl2idx : Return the list of ADO-indices from a given hierarchy level\nbathPtr : Records the tuple (alpha k) for each position in Nvec, where alpha and k represents the k-th exponential-expansion term of the alpha-th bath.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.MixHierarchyDict","page":"Library API","title":"HierarchicalEOM.MixHierarchyDict","text":"struct MixHierarchyDict <: AbstractHierarchyDict\n\nAn object which contains all dictionaries for mixed (bosonic and fermionic) bath-ADOs hierarchy.\n\nFields\n\nidx2nvec : Return the tuple (Nvec_b, Nvec_f) from a given index of ADO, where b represents boson and f represents fermion\nnvec2idx : Return the index from a given tuple (Nvec_b, Nvec_f), where b represents boson and f represents fermion\nBlvl2idx : Return the list of ADO-indices from a given bosonic-hierarchy level\nFlvl2idx : Return the list of ADO-indices from a given fermionic-hierarchy level\nbosonPtr : Records the tuple (alpha k) for each position in Nvec_b, where alpha and k represents the k-th exponential-expansion term of the alpha-th bosonic bath.\nfermionPtr : Records the tuple (alpha k) for each position in Nvec_f, where alpha and k represents the k-th exponential-expansion term of the alpha-th fermionic bath.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.getIndexEnsemble","page":"Library API","title":"HierarchicalEOM.getIndexEnsemble","text":"getIndexEnsemble(nvec, bathPtr)\n\nSearch for all the multi-index ensemble (alpha k) where alpha and k represents the k-th exponential-expansion term in the alpha-th bath.\n\nParameters\n\nnvec::Nvec : An object which records the repetition number of each multi-index ensembles in ADOs.\nbathPtr::Vector{Tuple{Int, Int}}: This can be obtained from HierarchyDict.bathPtr, MixHierarchyDict.bosonPtr, or MixHierarchyDict.fermionPtr.\n\nReturns\n\nVector{Tuple{Int, Int, Int}}: a vector (list) of the tuples (alpha k n).\n\nExample\n\nHere is an example to use Bath, Exponent, HierarchyDict, and getIndexEnsemble together:\n\nL::M_Fermion; # suppose this is a fermion type of HEOM Liouvillian superoperator matrix you create\nHDict = L.hierarchy; # the hierarchy dictionary\nados = SteadyState(L); # the stationary state (ADOs) for L \n\n# Let's consider all the ADOs for first level\nidx_list = HDict.lvl2idx[1];\n\nfor idx in idx_list\n ρ1 = ados[idx] # one of the 1st-level ADO\n nvec = HDict.idx2nvec[idx] # the nvec corresponding to ρ1\n \n for (α, k, n) in getIndexEnsemble(nvec, HDict.bathPtr)\n α # index of the bath\n k # the index of the exponential-expansion term in α-th bath\n n # the repetition number of the ensemble {α, k} in ADOs\n exponent = L.bath[α][k] # the k-th exponential-expansion term in α-th bath\n\n # do some calculations you want\n end\nend\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#lib-Time-Evolution","page":"Library API","title":"Time Evolution","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"There are two function definitions of HEOMsolve, which depend on different methods to solve the time evolution:","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"HEOMsolve\nTimeEvolutionHEOMSol","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.HEOMsolve","page":"Library API","title":"HierarchicalEOM.HEOMsolve","text":"HEOMsolve(M, ρ0, Δt, steps; e_ops, threshold, nonzero_tol, verbose, filename)\n\nSolve the time evolution for auxiliary density operators based on propagator (generated by FastExpm.jl).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\nΔt::Real : A specific time step (time interval).\nsteps::Int : The number of time steps\ne_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nthreshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.\nnonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file \"filename.jld2\" after the solving process.\n\nNotes\n\nThe ADOs will be saved depend on the keyword argument e_ops.\nIf e_ops is specified, the solution will only save the final ADOs, otherwise, it will save all the ADOs corresponding to tlist = 0:Δt:(Δt * steps).\nFor more details of the propagator, please refer to FastExpm.jl\n\nReturns\n\nsol::TimeEvolutionHEOMSol : The solution of the hierarchical EOM. See also TimeEvolutionHEOMSol\n\n\n\n\n\nHEOMsolve(M, ρ0, tlist; e_ops, solver, H_t, params, verbose, filename, SOLVEROptions...)\n\nSolve the time evolution for auxiliary density operators based on ordinary differential equations.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntlist::AbstractVector : Denote the specific time points to save the solution at, during the solving process.\ne_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nsolver::OrdinaryDiffEqAlgorithm : solver in package DifferentialEquations.jl. Default to DP5().\nH_t::Union{Nothing,Function}=nothing: The time-dependent Hamiltonian or Liouvillian. It will be called by H_t(t, params).\nparams::NamedTuple=NamedTuple(): The parameters of the time evolution.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file \"filename.jld2\" after the solving process.\nSOLVEROptions : extra options for solver\n\nNotes\n\nThe ADOs will be saved depend on the keyword argument saveat in kwargs.\nIf e_ops is specified, the default value of saveat=[tlist[end]] (only save the final ADOs), otherwise, saveat=tlist (saving the ADOs corresponding to tlist). You can also specify e_ops and saveat separately.\nThe default tolerances in kwargs are given as reltol=1e-6 and abstol=1e-8.\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\nsol::TimeEvolutionHEOMSol : The solution of the hierarchical EOM. See also TimeEvolutionHEOMSol\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.TimeEvolutionHEOMSol","page":"Library API","title":"HierarchicalEOM.TimeEvolutionHEOMSol","text":"struct TimeEvolutionHEOMSol\n\nA structure storing the results and some information from solving time evolution of hierarchical equations of motion (HEOM).\n\nFields (Attributes)\n\nBtier : The tier (cutoff level) for bosonic hierarchy\nFtier : The tier (cutoff level) for fermionic hierarchy\ntimes::AbstractVector: The time list of the evolution.\nados::Vector{ADOs}: The list of result ADOs at each time point.\nexpect::Matrix: The expectation values corresponding to each time point in times.\nretcode: The return code from the solver.\nalg: The algorithm which is used during the solving process.\nabstol::Real: The absolute tolerance which is used during the solving process.\nreltol::Real: The relative tolerance which is used during the solving process.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#Stationary-State","page":"Library API","title":"Stationary State","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"There are two function definitions of steadystate, which depend on different methods to solve the stationary state:","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"steadystate","category":"page"},{"location":"libraryAPI/#QuantumToolbox.steadystate","page":"Library API","title":"QuantumToolbox.steadystate","text":"steadystate(M::AbstractHEOMLSMatrix; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on LinearSolve.jl (i.e., solving x where A times x = b).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\nsteadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntspan::Number : the time limit to find stationary state. Default to Inf\nsolver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver\n\nNotes\n\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#Spectrum","page":"Library API","title":"Spectrum","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"PowerSpectrum\nDensityOfStates","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.PowerSpectrum","page":"Library API","title":"HierarchicalEOM.PowerSpectrum","text":"PowerSpectrum(M, ρ, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)\n\nCalculate power spectrum for the system in frequency domain where P_op will be automatically set as the adjoint of Q_op.\n\nThis function is equivalent to: PowerSpectrum(M, ρ, Q_op', Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)\n\n\n\n\n\nPowerSpectrum(M, ρ, P_op, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)\n\nCalculate power spectrum for the system in frequency domain.\n\npi S(omega)=textrmReleftint_0^infty dt langle P(t) Q(0)rangle e^-iomega tright\n\nTo calculate spectrum when input operator Q_op has EVEN-parity:\n\nremember to set the parameters: \n\nM::AbstractHEOMLSMatrix: should be EVEN parity\n\nTo calculate spectrum when input operator Q_op has ODD-parity:\n\nremember to set the parameters: \n\nM::AbstractHEOMLSMatrix: should be ODD parity\n\nParameters\n\nM::AbstractHEOMLSMatrix : the HEOMLS matrix.\nρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.\nP_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) P acting on the system.\nQ_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) Q acting on the system.\nωlist::AbstractVector : the specific frequency points to solve.\nreverse::Bool : If true, calculate langle P(-t)Q(0) rangle = langle P(0)Q(t) rangle = langle P(t)Q(0) rangle^* instead of langle P(t) Q(0) rangle. Default to false.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\nspec::AbstractVector : the spectrum list corresponds to the specified ωlist\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.DensityOfStates","page":"Library API","title":"HierarchicalEOM.DensityOfStates","text":"DensityOfStates(M, ρ, d_op, ωlist; solver, verbose, filename, SOLVEROptions...)\n\nCalculate density of states for the fermionic system in frequency domain.\n\n pi A(omega)=textrmReleftint_0^infty dt leftlangle d(t) d^dagger(0)rangle^* + langle d^dagger(t) d(0)rangle right e^-iomega tright\n\nParameters\n\nM::AbstractHEOMLSMatrix : the HEOMLS matrix which acts on ODD-parity operators.\nρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.\nd_op::QuantumObject : The annihilation operator (d as shown above) acting on the fermionic system.\nωlist::AbstractVector : the specific frequency points to solve.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\ndos::AbstractVector : the list of density of states corresponds to the specified ωlist\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#Misc.","page":"Library API","title":"Misc.","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"HierarchicalEOM.versioninfo()\nHierarchicalEOM.about()","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.versioninfo-Tuple{}","page":"Library API","title":"HierarchicalEOM.versioninfo","text":"HierarchicalEOM.versioninfo(io::IO=stdout)\n\nCommand line output of information on HierarchicalEOM, dependencies, and system information.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.about-Tuple{}","page":"Library API","title":"HierarchicalEOM.about","text":"QuantumToolbox.about(io::IO=stdout)\n\nCommand line output of information on HierarchicalEOM, dependencies, and system information, same as HierarchicalEOM.versioninfo.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"The outputs will be something like the following:","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"using HierarchicalEOM\nHierarchicalEOM.versioninfo()","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"HierarchicalEOM.print_logo(io::IO=stdout)","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.print_logo","page":"Library API","title":"HierarchicalEOM.print_logo","text":"HierarchicalEOM.print_logo(io::IO=stdout)\n\nPrint the Logo of HierarchicalEOM package\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"The output will be something like the following:","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"using HierarchicalEOM\nHierarchicalEOM.print_logo()","category":"page"},{"location":"heom_matrix/HEOMLS_intro/#doc-HEOMLS-Matrix","page":"Introduction","title":"Hierarchical Equations of Motion Liouvillian Superoperator (HEOMLS) Matrix","text":"","category":"section"},{"location":"heom_matrix/HEOMLS_intro/#Overview","page":"Introduction","title":"Overview","text":"","category":"section"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"The hierarchical equations of motion Liouvillian superoperator (HEOMLS) hatmathcalM characterizes the dynamics in the full auxiliary density operators (ADOs) space, namely ","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"partial_trho^(mnp)_textbfj vert textbfq(t)=hatmathcalMrho^(mnp)_textbfj vert textbfq(t)","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"and it can, numerically, be expressed as a matrix. ","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"In HierarchicalEOM.jl, all different types of HEOMLS hatmathcalM are subtype of AbstractHEOMLSMatrix.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"The HEOMLS hatmathcalM not only characterizes the bare system dynamics (based on system Hamiltonian), but it also encodes the system-and-multiple-bosonic-baths and system-and-multiple-fermionic-baths interactions based on Bosonic Bath and Fermionic Bath, respectively. For a specific mth-level-bosonic-and-nth-level-fermionic auxiliary density operator rho^(mnp)_textbfj vert textbfq, it will be coupled to the following ADOs through hatmathcalM:","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"(m+1)th-level-bosonic-and-nth-level-fermionic ADOs\n(m-1)th-level-bosonic-and-nth-level-fermionic ADOs\nmth-level-bosonic-and-(n+1)th-level-fermionic ADOs\nmth-level-bosonic-and-(n-1)th-level-fermionic ADOs","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"and thus forms the two-fold hierarchy relations. See our paper for more details.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"In practice, the size of the matrix hatmathcalM must be finite and the hierarchical equations must be truncated at a suitable bosonic-level (m_textrmmax) and fermionic-level (n_textrmmax). These truncation levels (tiers) must be given when constructing hatmathcalM.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"Hs::QuantumObject # system Hamiltonian\nBbath::BosonBath # bosonic bath object\nFbath::FermionBath # fermionic bath object\nBtier::Int # bosonic truncation level \nFtier::Int # fermionic truncation level \n\nM = M_Boson(Hs, Btier, Bbath)\nM = M_Fermion(Hs, Ftier, Fbath)\nM = M_Boson_Fermion(Hs, Btier, Ftier, Bbath, Fbath)","category":"page"},{"location":"heom_matrix/HEOMLS_intro/#doc-Importance-Value-and-Threshold","page":"Introduction","title":"Importance Value and Threshold","text":"","category":"section"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"The main computational complexity can be quantified by the total number of auxiliary density operators (ADOs) because it directly affects the size of hatmathcalM. ","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"The computational effort can be further optimized by associating an importance value mathcalI to each ADO and then discarding all the ADOs (in the second and higher levels) whose importance value is smaller than a threshold value mathcalI_textrmth. The importance value for a given ADO : mathcalIleft(rho^(mnp)_textbfj vert textbfqright) is determined by its corresponding exponential terms of bath correlation function [see Phys. Rev. B 88, 235426 (2013) and Phys. Rev. B 103, 235413 (2021)]. This allows us to only consider the ADOs which affects the dynamics more, and thus, reduce the size of hatmathcalM. Also see our paper [ Commun. Phys. 6, 313 (2023) ] for more details.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"When you specify a threshold value mathcalI_textrmth with the parameter threshold to construct hatmathcalM, we will remain all the ADOs where their hierarchy levels (mn)in(00) (01) (10) (11), and all the other high-level ADOs may be neglected if mathcalIleft(rho^(mnp)_textbfj vert textbfqright) mathcalI_textrmth. ","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"Hs::QuantumObject # system Hamiltonian\nBbath::BosonBath # bosonic bath object\nFbath::FermionBath # fermionic bath object\nBtier::Int # bosonic truncation level \nFtier::Int # fermionic truncation level \n\nM = M_Boson(Hs, Btier, Bbath; threshold=1e-7)\nM = M_Fermion(Hs, Ftier, Fbath; threshold=1e-7)\nM = M_Boson_Fermion(Hs, Btier, Ftier, Bbath, Fbath; threshold=1e-7)","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"note: Default value of importance threshold\nThe full hierarchical equations can be recovered in the limiting case mathcalI_textrmthrightarrow 0, which is the default value of the parameter : threshold=0.0. This means that all of the ADOs will be taken into account by default.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/#Methods","page":"Introduction","title":"Methods","text":"","category":"section"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"All of the HEOMLS matrices supports the following two Base Functions :","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"size(M::AbstractHEOMLSMatrix) : Returns the size of the HEOMLS matrix.\nBracket operator [i,j] : Returns the (i, j)-element(s) in the HEOMLS matrix.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"M::AbstractHEOMLSMatrix\n\nm, n = size(M)\nM[10, 12]\nM[2:4, 2:4]\nM[1,:]\nM[:,2]","category":"page"},{"location":"heom_matrix/master_eq/#doc-Master-Equation","page":"HEOMLS for Master Equation","title":"HEOMLS Matrix for Master Equation","text":"","category":"section"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"HierarchicalEOM.jl allows users to further add the Lindbladian (superoperator) on any types (AbstractHEOMLSMatrix) of HEOM Liouvillian superoperator hatmathcalM. The Lindbladian describes the dissipative interaction between the system and extra environment.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"This method is more efficient than the full HEOM when some of the baths are weakly coupled to the system since it does not require any extra ADOs space to describe the dynamics and hence reduces the size of hatmathcalM.","category":"page"},{"location":"heom_matrix/master_eq/#Bosonic-Dissipative-Env.","page":"HEOMLS for Master Equation","title":"Bosonic Dissipative Env.","text":"","category":"section"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"If the system is weakly coupled to an extra bosonic environment, the explicit form of the Lindbladian is given by","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"hatmathcalD(J)BigcdotBig=JleftcdotrightJ^dagger-frac12BigJ^dagger J cdotBig_+","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"where Jequiv sqrtgammaV is the jump operator, V describes the dissipative part (operator) of the dynamics, gamma represents a non-negative damping rate and cdot cdot_+ stands for anti-commutator.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"note: Note\nThe system here can be either bosonic or fermionic. However, if V is acting on fermionic systems, it should be even-parity to be compatible with charge conservation.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"One can add the Lindbladian hatmathcalD of bosonic environment to the HEOM Liouvillian superoperator hatmathcalM by calling ","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"addBosonDissipator(M::AbstractHEOMLSMatrix, jumpOP) with the parameters:","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"M::AbstractHEOMLSMatrix : the matrix given from HEOM model\njumpOP::AbstractVector : The list of collapse (jump) operators J_i_i to add. Defaults to empty vector [].","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"Finally, the function returns a new hatmathcalM with the same type:","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"M0::AbstractHEOMLSMatrix\nJ = [J1, J2, ..., Jn] # jump operators\n\nM1 = addBosonDissipator(M0, J)","category":"page"},{"location":"heom_matrix/master_eq/#Fermionic-Dissipative-Env.","page":"HEOMLS for Master Equation","title":"Fermionic Dissipative Env.","text":"","category":"section"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"If the fermionic system is weakly coupled to an extra fermionic environment, the explicit form of the Lindbladian acting on EVEN-parity operators is given by","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"hatmathcalD_textrmeven(J)BigcdotBig=JleftcdotrightJ^dagger-frac12BigJ^dagger J cdotBig_+","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"where Jequiv sqrtgammaV is the jump operator, V describes the dissipative part (operator) of the dynamics, gamma represents a non-negative damping rate and cdot cdot_+ stands for anti-commutator.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"For acting on ODD-parity operators, the explicit form of the Lindbladian is given by","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"hatmathcalD_textrmodd(J)BigcdotBig=-JleftcdotrightJ^dagger-frac12BigJ^dagger J cdotBig_+","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"One can add the Lindbladian hatmathcalD of fermionic environment to the HEOM Liouvillian superoperator hatmathcalM by calling ","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"addFermionDissipator(M::AbstractHEOMLSMatrix, jumpOP) with the parameters:","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"M::AbstractHEOMLSMatrix : the matrix given from HEOM model\njumpOP::AbstractVector : The list of collapse (jump) operators J_i_i to add. Defaults to empty vector [].","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"note: Parity\nThe parity of the dissipator will be automatically determined by the parity of the given HEOMLS matrix M.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"Finally, the function returns a new hatmathcalM with the same type and parity:","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"M0_even::AbstractHEOMLSMatrix # constructed with EVEN-parity\nM0_odd::AbstractHEOMLSMatrix # constructed with ODD-parity\nJ = [J1, J2, ..., Jn] # jump operators\n\nM1_even = addFermionDissipator(M0_even, J)\nM1_odd = addFermionDissipator(M0_odd, J)","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/#doc-Fermion-Lorentz","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"","category":"section"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"J(omega)=fracGamma W^2(omega-mu)^2+W^2","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"Here, Gamma represents the coupling strength between system and the fermionic environment with chemical potential mu and band-width W.","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/#Matsubara-Expansion","page":"Lorentz Spectral Density","title":"Matsubara Expansion","text":"","category":"section"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"With Matsubara Expansion, the correlation function can be analytically solved and expressed as follows:","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"C^nu(t_1 t_2)=sum_l=1^infty eta_l^nu exp(-gamma_l^nu (t_1-t_2))","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"with","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"beginaligned\ngamma_1^nu = W-nu i mu\neta_1^nu = fracGamma W2 fleft(fraciWk_B Tright)\ngamma_lneq 1^nu = zeta_l k_B T - nu i mu\neta_lneq 1^nu = -i k_B T cdot fracGamma W^2-(zeta_l k_B T)^2+W^2\nf(x) = exp(x) + 1^-1\nendaligned","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"where zeta_l=(2 l - 1)pi. This can be constructed by the built-in function Fermion_Lorentz_Matsubara:","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"ds # coupling operator\nΓ # coupling strength\nμ # chemical potential of the environment\nW # band-width of the environment\nkT # the product of the Boltzmann constant k and the absolute temperature T\nN # Number of exponential terms for each correlation functions (C^{+} and C^{-})\nbath = Fermion_Lorentz_Matsubara(ds, Γ, μ, W, kT, N - 1)","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/#Padé-Expansion","page":"Lorentz Spectral Density","title":"Padé Expansion","text":"","category":"section"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"With Padé Expansion, the correlation function can be analytically solved and expressed as the following exponential terms:","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"C^nu(t_1 t_2)=sum_l=1^infty eta_l^nu exp(-gamma_l^nu (t_1-t_2))","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"with","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"beginaligned\ngamma_1^nu = W-nu i mu\neta_1^nu = fracGamma W2 fleft(fraciWk_B Tright)\ngamma_lneq 1^nu = zeta_l k_B T - nu i mu\neta_lneq 1^nu = -i kappa_l k_B T cdot fracGamma W^2-(zeta_l k_B T)^2+W^2\nf(x) = frac12-sum_l=2^N frac2kappa_l xx^2+zeta_l^2\nendaligned","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"where the parameters kappa_l and zeta_l are described in J. Chem. Phys. 134, 244106 (2011) and N represents the number of exponential terms for C^nu=pm. This can be constructed by the built-in function Fermion_Lorentz_Pade:","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"ds # coupling operator\nΓ # coupling strength\nμ # chemical potential of the environment\nW # band-width of the environment\nkT # the product of the Boltzmann constant k and the absolute temperature T\nN # Number of exponential terms for each correlation functions (C^{+} and C^{-})\nbath = Fermion_Lorentz_Pade(ds, Γ, μ, W, kT, N - 1)","category":"page"},{"location":"spectrum/#doc-Spectrum","page":"Spectrum","title":"Spectrum","text":"","category":"section"},{"location":"spectrum/#Introduction","page":"Spectrum","title":"Introduction","text":"","category":"section"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"We briefly summarize how to numerically compute the spectrum associated with the system degree of freedom. Phys. Rev. Lett. 109, 266403 (2012) showed that the spectrum can be evaluated either in time or frequency domain.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"HierarchicalEOM.jl provides the following listed functions which performs the calculation of spectrum in frequency domain.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Power Spectrum\nDensity of States","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"HierarchicalEOM.jl wraps some of the functions in LinearSolve.jl, which is a very rich numerical library for solving the linear problems and provides many solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to LinearSolve solvers and also the documentation of LinearSolve.jl.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"compat: Extension for CUDA.jl\nHierarchicalEOM.jl provides an extension to support GPU (CUDA.jl) acceleration for solving the spectrum, but this feature requires Julia 1.9+ and HierarchicalEOM 1.1+. See here for more details.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"The output of the above listed functions will always be in the type of Vector{Float64}, which contains the list of the spectrum values corresponding to the given ωlist.","category":"page"},{"location":"spectrum/#Common-and-optional-parameters","page":"Spectrum","title":"Common and optional parameters","text":"","category":"section"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Furthermore, there are two common optional parameters for all the functions provided below:","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"If the filename is specified, the function will automatically save (update) the value (together with a comma behind it) to a new line in the file (with \".txt\" behind the filename) once it obtains the solution of each specified omega. For example, if you specify filename=\"test\" and ωlist=0:1:5, you will obtain a file test.txt where each line in this file (as shown below) is the result of spectrum corresponding to the given ωlist:","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"# (the content inside test.txt) #\n0.4242990296334028,\n0.28617768129333854,\n0.21332961856387556,\n0.1751179183484055,\n0.15739257286986685,\n0.1518018484057393,\n","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"For your convenience, we add those commas (\",\") in the end of each line for the users to easily do \"copy-and-paste\" and load these results back into julia's kernel (construct a vector of the given results) again, namely","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"results = [\n0.4242990296334028,\n0.28617768129333854,\n0.21332961856387556,\n0.1751179183484055,\n0.15739257286986685,\n0.1518018484057393\n]","category":"page"},{"location":"spectrum/#doc-PS","page":"Spectrum","title":"Power Spectrum","text":"","category":"section"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Start from the power spectrum in the time-domain. We write the system two-time correlation function in terms of the propagator hatmathcalG(t)=exp(hatmathcalM t) for t0. The power spectrum pi S(omega) can be obtained as","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"beginaligned\npi S(omega) \n= textrmReleftint_0^infty dt langle P(t)Q(0)rangle e^-iomega tright\n= textrmReleftint_0^infty dt langle P e^hatmathcalM tQrangle e^-iomega tright\n= -textrmReleftlangle P (hatmathcalM -iomega)^-1 Qrangleright\n= -textrmRelefttextrmTrleft P (hatmathcalM -iomega)^-1 Qrho^(mn+)_textbfj vert textbfqrightright\nendaligned","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"where a half-Fourier transform has been introduced in the third line. We note that only the reduced density operator (m=n=0) is considered when taking the final trace operation.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"This function solves the linear problem textbfA x=textbfb at a fixed frequency omega where ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"textbfA=hatmathcalM-iomega\ntextbfb=Qrho^(mn+)_textbfj vert textbfq ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"using the package LinearSolve.jl.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Finially, one can obtain the value of the power spectrum for specific omega, namely","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"pi S(omega) = -textrmRelefttextrmTrleft P textbfxrightright","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"note: Odd-Parity for Power Spectrum\nWhen Q is an operator acting on fermionic systems and has ODD-parity, the HEOMLS matrix hatmathcalM is acting on the ODD-parity space because textbfb=Qrho^(mn+)_textbfj vert textbfq. Therefore, remember to construct hatmathcalM with ODD parity in this kind of cases.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"See also the docstring : ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"PowerSpectrum(M::AbstractHEOMLSMatrix, ρ::Union{QuantumObject,ADOs}, P_op::Union{QuantumObject,HEOMSuperOp}, Q_op::Union{QuantumObject,HEOMSuperOp}, ωlist::AbstractVector, reverse::Bool = false; solver = UMFPACKFactorization(), verbose::Bool = true, filename::String = \"\", SOLVEROptions...)","category":"page"},{"location":"spectrum/#HierarchicalEOM.PowerSpectrum","page":"Spectrum","title":"HierarchicalEOM.PowerSpectrum","text":"PowerSpectrum(M, ρ, P_op, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)\n\nCalculate power spectrum for the system in frequency domain.\n\npi S(omega)=textrmReleftint_0^infty dt langle P(t) Q(0)rangle e^-iomega tright\n\nTo calculate spectrum when input operator Q_op has EVEN-parity:\n\nremember to set the parameters: \n\nM::AbstractHEOMLSMatrix: should be EVEN parity\n\nTo calculate spectrum when input operator Q_op has ODD-parity:\n\nremember to set the parameters: \n\nM::AbstractHEOMLSMatrix: should be ODD parity\n\nParameters\n\nM::AbstractHEOMLSMatrix : the HEOMLS matrix.\nρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.\nP_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) P acting on the system.\nQ_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) Q acting on the system.\nωlist::AbstractVector : the specific frequency points to solve.\nreverse::Bool : If true, calculate langle P(-t)Q(0) rangle = langle P(0)Q(t) rangle = langle P(t)Q(0) rangle^* instead of langle P(t) Q(0) rangle. Default to false.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\nspec::AbstractVector : the spectrum list corresponds to the specified ωlist\n\n\n\n\n\n","category":"function"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"M::AbstractHEOMLSMatrix\n\n# the input state can be in either type (but usually ADOs):\nρ::QuantumObject # the reduced density operator\nρ::ADOs # the ADOs solved from \"evolution\" or \"steadystate\"\n\nP::QuantumObject \nQ::QuantumObject\n\n# the spectrum value for the specific frequency ω which need to be solved\nωlist = 0:0.5:2 # [0.0, 0.5, 1.0, 1.5, 2.0]\n\nπSω = spectrum(M, ρ, Q, ωlist) # P will automatically be considered as \"the adjoint of Q operator\"\nπSω = spectrum(M, ρ, P, Q, ωlist) # user specify both P and Q operator","category":"page"},{"location":"spectrum/#doc-DOS","page":"Spectrum","title":"Density of States","text":"","category":"section"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Start from the density of states for fermionic systems in the time-domain. We write the system two-time correlation function in terms of the propagator hatmathcalG(t)=exp(hatmathcalM t) for t0. The density of states pi A(omega) can be obtained as","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"beginaligned\npi A(omega) \n= textrmReleftint_0^infty dt langle d(t)d^dagger(0)rangle e^iomega tright + textrmReleftint_0^infty dt langle d^dagger(t)d(0)rangle e^-iomega tright\n= textrmReleftint_0^infty dt langle d e^hatmathcalM td^daggerrangle e^iomega tright+textrmReleftint_0^infty dt langle d^dagger e^hatmathcalM tdrangle e^-iomega tright\n= -textrmReleftlangle d (hatmathcalM +iomega)^-1 d^daggerrangle + langle d^dagger (hatmathcalM -iomega)^-1 drangleright\n= -textrmRelefttextrmTrleft d (hatmathcalM +iomega)^-1 d^daggerrho^(mn+)_textbfj vert textbfqright + textrmTrleft d^dagger (hatmathcalM -iomega)^-1 drho^(mn+)_textbfj vert textbfqrightright\nendaligned","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"where a half-Fourier transform has been introduced in the third line. We note that only the reduced density operator (m=n=0) is considered when taking the final trace operation.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"This functionsolves two linear problems textbfA_+ textbfx_+=textbfb_+ and textbfA_- textbfx_-=textbfb_- at a fixed frequency omega where ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"textbfA_+=hatmathcalM+iomega\ntextbfb_+=d^daggerrho^(mn+)_textbfj vert textbfq \ntextbfA_-=hatmathcalM-iomega\ntextbfb_-=drho^(mn+)_textbfj vert textbfq ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"using the package LinearSolve.jl.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Finially, one can obtain the density of states for specific omega, namely","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"pi A(omega) = -textrmRelefttextrmTrleft d textbfx_+right+textrmTrleft d^dagger textbfx_-rightright","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"note: Odd-Parity for Density of States\nAs shown above, the HEOMLS matrix hatmathcalM acts on the ODD-parity space, compatibly with the parity of both the operators textbfb_-=drho^(mn+)_textbfj vert textbfq and textbfb_+=d^daggerrho^(mn+)_textbfj vert textbfq. Therefore, remember to construct hatmathcalM with ODD parity for solving spectrum of fermionic systems.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"See also the docstring : ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"DensityOfStates(M::AbstractHEOMLSMatrix, ρ::QuantumObject, d_op::QuantumObject, ωlist::AbstractVector; solver=UMFPACKFactorization(), verbose::Bool = true, filename::String = \"\", SOLVEROptions...)","category":"page"},{"location":"spectrum/#HierarchicalEOM.DensityOfStates-Tuple{AbstractHEOMLSMatrix, QuantumObject, QuantumObject, AbstractVector}","page":"Spectrum","title":"HierarchicalEOM.DensityOfStates","text":"DensityOfStates(M, ρ, d_op, ωlist; solver, verbose, filename, SOLVEROptions...)\n\nCalculate density of states for the fermionic system in frequency domain.\n\n pi A(omega)=textrmReleftint_0^infty dt leftlangle d(t) d^dagger(0)rangle^* + langle d^dagger(t) d(0)rangle right e^-iomega tright\n\nParameters\n\nM::AbstractHEOMLSMatrix : the HEOMLS matrix which acts on ODD-parity operators.\nρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.\nd_op::QuantumObject : The annihilation operator (d as shown above) acting on the fermionic system.\nωlist::AbstractVector : the specific frequency points to solve.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\ndos::AbstractVector : the list of density of states corresponds to the specified ωlist\n\n\n\n\n\n","category":"method"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Hs::QuantumObject # system Hamiltonian\nbath::FermionBath # fermionic bath object\ntier::Int # fermionic truncation level \n\n# create HEOMLS matrix in both :even and ODD parity\nM_even = M_Fermion(Hs, tier, bath) \nM_odd = M_Fermion(Hs, tier, bath, ODD) \n\n# the input state can be in either type of density operator matrix or ADOs (but usually ADOs):\nados = steadystate(M_even)\n\n# the (usually annihilation) operator \"d\" as shown above\nd::QuantumObject \n\n# the spectrum value for the specific frequency ω which need to be solved\nω_list = 0:0.5:2 # [0.0, 0.5, 1.0, 1.5, 2.0]\n\nπAω = DensityOfStates(M_odd, ados, d, ω_list)","category":"page"},{"location":"extensions/CUDA/#doc-ext-CUDA","page":"CUDA.jl","title":"Extension for CUDA.jl","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"This is an extension to support GPU (CUDA.jl) acceleration for solving the time evolution and spectra. This improves the execution time and memory usage especially when the HEOMLS matrix is super large.","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"compat: Compat\nThe described feature requires Julia 1.9+.","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"The functions of calculating time evolution (only supports ODE method with time-independent system Hamiltonian) and spectra will automatically choose to solve on CPU or GPU depend on the type of the sparse matrix in M::AbstractHEOMLSMatrix objects (i.e., the type of the field M.data). ","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"typeof(M.data) <: SparseMatrixCSC # solve on CPU\ntypeof(M.data) <: CuSparseMatrixCSC # solve on GPU","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"Therefore, we wrapped several functions in CUDA and CUDA.CUSPARSE in order to return a new HEOMLS-matrix-type object with M.data is in the type of CuSparseMatrix, and also change the element type into ComplexF32 and Int32 (since GPU performs better in this type). The functions are listed as follows:","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"cu(M::AbstractHEOMLSMatrix) : Translate M.data into the type CuSparseMatrixCSC{ComplexF32, Int32}\nCuSparseMatrixCSC(M::AbstractHEOMLSMatrix) : Translate M.data into the type CuSparseMatrixCSC{ComplexF32, Int32}","category":"page"},{"location":"extensions/CUDA/#Demonstration","page":"CUDA.jl","title":"Demonstration","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"The extension will be automatically loaded if user imports the package CUDA.jl :","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"using HierarchicalEOM\nusing LinearSolve # to change the solver for better GPU performance\nusing CUDA\nCUDA.allowscalar(false) # Avoid unexpected scalar indexing","category":"page"},{"location":"extensions/CUDA/#Setup","page":"CUDA.jl","title":"Setup","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"Here, we demonstrate this extension by using the example of the single-impurity Anderson model. ","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"ϵ = -5\nU = 10\nΓ = 2\nμ = 0\nW = 10\nkT = 0.5\nN = 5\ntier = 3\n\ntlist = 0:0.1:10\nωlist = -10:1:10\n\nσm = [0 1; 0 0]\nσz = [1 0; 0 -1]\nII = [1 0; 0 1]\nd_up = kron( σm, II)\nd_dn = kron(-1 * σz, σm)\nρ0 = kron([1 0; 0 0], [1 0; 0 0])\nHsys = ϵ * (d_up' * d_up + d_dn' * d_dn) + U * (d_up' * d_up * d_dn' * d_dn)\n\nbath_up = Fermion_Lorentz_Pade(d_up, Γ, μ, W, kT, N)\nbath_dn = Fermion_Lorentz_Pade(d_dn, Γ, μ, W, kT, N)\nbath_list = [bath_up, bath_dn]\n\n# even HEOMLS matrix\nM_even_cpu = M_Fermion(Hsys, tier, bath_list)\nM_even_gpu = cu(M_even_cpu)\n\n# odd HEOMLS matrix\nM_odd_cpu = M_Fermion(Hsys, tier, bath_list, ODD)\nM_odd_gpu = cu(M_odd_cpu)\n\n# solve steady state with CPU\nados_ss = steadystate(M_even_cpu);","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"note: Note\nThis extension does not support for solving stationary state on GPU since it is not efficient and might get wrong solutions. If you really want to obtain the stationary state with GPU, you can repeatedly solve the time evolution until you find it.","category":"page"},{"location":"extensions/CUDA/#Solving-time-evolution-with-CPU","page":"CUDA.jl","title":"Solving time evolution with CPU","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"ados_list_cpu = HEOMsolve(M_even_cpu, ρ0, tlist)","category":"page"},{"location":"extensions/CUDA/#Solving-time-evolution-with-GPU","page":"CUDA.jl","title":"Solving time evolution with GPU","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"ados_list_gpu = HEOMsolve(M_even_gpu, ρ0, tlist)","category":"page"},{"location":"extensions/CUDA/#Solving-Spectrum-with-CPU","page":"CUDA.jl","title":"Solving Spectrum with CPU","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"dos_cpu = DensityOfStates(M_odd_cpu, ados_ss, d_up, ωlist)","category":"page"},{"location":"extensions/CUDA/#Solving-Spectrum-with-GPU","page":"CUDA.jl","title":"Solving Spectrum with GPU","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"dos_gpu = DensityOfStates(M_odd_gpu, ados_ss, d_up, ωlist; solver=KrylovJL_BICGSTAB(rtol=1f-10, atol=1f-12))","category":"page"},{"location":"ODE_solvers/#ODE-solvers","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"In this page, we list several recommended solvers provided by DifferentialEquations.jl for solving time evolution in hierarchical equations of motion approach. ","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Remember to import OrdinaryDiffEq.jl (or DifferentialEquations.jl)","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"using OrdinaryDiffEq ## or \"using DifferentialEquations\" ","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"(click here to see the full solver list provided by DifferentialEquations.jl)","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"For any extra solver options, we can add it in the function HEOMsolve with keyword arguments. These keyword arguments will be directly pass to the solvers in DifferentialEquations (click here to see the documentation for the common solver options)","category":"page"},{"location":"ODE_solvers/#DP5-(Default-solver)","page":"DifferentialEquations solvers","title":"DP5 (Default solver)","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Dormand-Prince's 5/4 Runge-Kutta method. (free 4th order interpolant)","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"DP5()","category":"page"},{"location":"ODE_solvers/#RK4","page":"DifferentialEquations solvers","title":"RK4","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"The canonical Runge-Kutta Order 4 method. Uses a defect control for adaptive stepping using maximum error over the whole interval.","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"RK4()","category":"page"},{"location":"ODE_solvers/#Tsit5","page":"DifferentialEquations solvers","title":"Tsit5","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Tsitouras 5/4 Runge-Kutta method. (free 4th order interpolant).","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Tsit5()","category":"page"},{"location":"ODE_solvers/#Vern7","page":"DifferentialEquations solvers","title":"Vern7","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Verner's “Most Efficient” 7/6 Runge-Kutta method. (lazy 7th order interpolant).","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Vern7()","category":"page"},{"location":"ODE_solvers/#Vern9","page":"DifferentialEquations solvers","title":"Vern9","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Verner's “Most Efficient” 9/8 Runge-Kutta method. (lazy 9th order interpolant)","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Vern9()","category":"page"},{"location":"LS_solvers/#LS-solvers","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"In this page, we list several recommended solvers provided by LinearSolve.jl for solving steadystate and spectrum in hierarchical equations of motion approach. ","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"Remember to import LinearSolve.jl","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"using LinearSolve","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"(click here to see the full solver list provided by LinearSolve.jl)","category":"page"},{"location":"LS_solvers/#UMFPACKFactorization-(Default-solver)","page":"LinearSolve solvers","title":"UMFPACKFactorization (Default solver)","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"This solver performs better when there is more structure to the sparsity pattern (depends on the complexity of your system and baths).","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"UMFPACKFactorization()","category":"page"},{"location":"LS_solvers/#KLUFactorization","page":"LinearSolve solvers","title":"KLUFactorization","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"This solver performs better when there is less structure to the sparsity pattern (depends on the complexity of your system and baths).","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"KLUFactorization()","category":"page"},{"location":"LS_solvers/#A-generic-BICGSTAB-implementation-from-Krylov","page":"LinearSolve solvers","title":"A generic BICGSTAB implementation from Krylov","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"KrylovJL_BICGSTAB()","category":"page"},{"location":"LS_solvers/#Pardiso","page":"LinearSolve solvers","title":"Pardiso","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"This solver is based on Intel openAPI Math Kernel Library (MKL) Pardiso","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"note: Note\nUsing this solver requires adding the package Pardiso.jl, i.e. using Pardiso","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"using Pardiso\nusing LinearSolve\nMKLPardisoFactorize()\nMKLPardisoIterate()","category":"page"},{"location":"hierarchy_dictionary/#doc-Hierarchy-Dictionary","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"","category":"section"},{"location":"hierarchy_dictionary/#Introduction","page":"Hierarchy Dictionary","title":"Introduction","text":"","category":"section"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"For hierarchical equations of motions, there are many indices the users have to deal with including the indices of the Exponent in bosonic baths, the Exponent in fermionic baths, and the ADOs formed by the hierarchy.","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"With the auxiliary density operators rho_textbfjverttextbfq^(mnp), we use the following keywords :","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"idx : the index of the auxiliary density operators\nlvl : the level m (n) of the bosonic (fermionic) hierarchy\nnvec : object Nvec which stores the number of existence for each multi-index ensemble j (q) in vector textbfj (textbfq).","category":"page"},{"location":"hierarchy_dictionary/#Dictionary-for-Pure-Bosonic-or-Fermionic-Baths","page":"Hierarchy Dictionary","title":"Dictionary for Pure Bosonic or Fermionic Baths","text":"","category":"section"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"An object which contains all dictionaries for pure (bosonic or fermionic) bath-ADOs hierarchy, defined as:","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"struct HierarchyDict <: AbstractHierarchyDict","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"HierarchyDict can be obtained from the field .hierarchy in M_Boson or M_Fermion, and it contains the following fields :","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"idx2nvec : Return the Nvec from a given index of ADO\nnvec2idx : Return the index of ADO from a given Nvec\nlvl2idx : Return the list of ADO-indices from a given hierarchy level\nbathPtr : Records the tuple (alpha k) for each position in Nvec, where alpha and k represents the k-th exponential-expansion term of the alpha-th bath.","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"# HEOMLS for bosonic baths\nM::M_Boson\nHDict = M.hierarchy\n\n# HEOMLS for fermionic baths\nM::M_Fermion\nHDict = M.hierarchy\n\n# obtain the nvec corresponds to 10-th ADO\nnvec = HDict.idx2nvec[10]\n\n# obtain the index of the ADO corresponds to the given nvec\nnvec::Nvec\nidx = HDict.nvec2idx[nvec]\n\n# obtain a list of indices which corresponds to all ADOs in 3rd-level of hierarchy\nidx_list = HDict.lvl2idx[3] ","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"HierarchicalEOM.jl also provides a function getIndexEnsemble(nvec, bathPtr) to obtain the index of the Exponent and it's corresponding index of bath:","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"# HEOMLS\nM::M_Boson\nM::Fermion\n\nHDict = M.hierarchy\n\n# auxiliary density operators\nados::ADOs\n\nfor (idx, ado) in enumerate(ados)\n ado # the corresponding auxiliary density operator for idx\n\n # obtain the nvec corresponds to ado\n nvec = HDict.idx2nvec[idx]\n\n for (α, k, n) in getIndexEnsemble(nvec, HDict.bathPtr)\n α # index of the bath\n k # the index of the exponential-expansion term in α-th bath\n n # the repetition number of the ensemble {α, k} in vector j (or q) in ADOs\n exponent = M.bath[α][k] # the k-th exponential-expansion term in α-th bath\n\n # do some calculations you want\n end\nend","category":"page"},{"location":"hierarchy_dictionary/#Dictionary-for-Mixed-Bosonic-and-Fermionic-Baths","page":"Hierarchy Dictionary","title":"Dictionary for Mixed Bosonic and Fermionic Baths","text":"","category":"section"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"An object which contains all dictionaries for mixed (bosonic and fermionic) bath-ADOs hierarchy, defined as:","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"struct MixHierarchyDict <: AbstractHierarchyDict","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"MixHierarchyDict can be obtained from the field .hierarchy in M_Boson_Fermion, and it contains the following fields :","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"idx2nvec : Return the tuple (Nvec_b, Nvec_f) from a given index of ADO, where b represents boson and f represents fermion\nnvec2idx : Return the index from a given tuple (Nvec_b, Nvec_f), where b represents boson and f represents fermion\nBlvl2idx : Return the list of ADO-indices from a given bosonic-hierarchy level\nFlvl2idx : Return the list of ADO-indices from a given fermionic-hierarchy level\nbosonPtr : Records the tuple (alpha k) for each position in Nvec_b, where alpha and k represents the k-th exponential-expansion term of the alpha-th bosonic bath.\nfermionPtr : Records the tuple (alpha k) for each position in Nvec_f, where alpha and k represents the k-th exponential-expansion term of the alpha-th fermionic bath.","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"# HEOMLS \nM::M_Boson_Fermion\nHDict = M.hierarchy\n\n# obtain the nvec(s) correspond to 10-th ADO\nnvec_b, nvec_f = HDict.idx2nvec[10]\n\n# obtain the index of the ADO corresponds to the given nvec\nnvec_b::Nvec\nnvec_f::Nvec\nidx = HDict.nvec2idx[(nvec_b, nvec_f)]\n\n# obtain a list of indices which corresponds to all ADOs in 3rd-bosonic-level of hierarchy\nidx_list = HDict.Blvl2idx[3] \n\n# obtain a list of indices which corresponds to all ADOs in 4rd-fermionic-level of hierarchy\nidx_list = HDict.Flvl2idx[4] ","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"HierarchicalEOM.jl also provides a function getIndexEnsemble(nvec, bathPtr) to obtain the index of the Exponent and it's corresponding index of bath:","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"# HEOMLS\nM::M_Boson_Fermion\n\nHDict = M.hierarchy\n\n# auxiliary density operators\nados::ADOs\n\nfor (idx, ado) in enumerate(ados)\n ado # the corresponding auxiliary density operator for idx\n\n # obtain the nvec(s) correspond to ado\n nvec_b, nvec_f = HDict.idx2nvec[idx]\n\n # bosonic bath indices\n for (β, k, n) in getIndexEnsemble(nvec_b, HDict.bosonPtr)\n β # index of the bosonic bath\n k # the index of the exponential-expansion term in β-th bosonic bath\n nb # the repetition number of the ensemble {β, k} in vector j in ADOs\n exponent = M.Bbath[β][k] # the k-th exponential-expansion term in β-th bosonic bath\n\n # do some calculations you want\n end\n\n # fermionic bath indices\n for (α, h, n) in getIndexEnsemble(nvec_f, HDict.fermionPtr)\n α # index of the fermionic bath\n h # the index of the exponential-expansion term in α-th fermionic bath\n nf # the repetition number of the ensemble {α, h} in vector q in ADOs\n exponent = M.Fbath[α][h] # the h-th exponential-expansion term in α-th fermionic bath\n\n # do some calculations you want\n end\nend","category":"page"},{"location":"stationary_state/#doc-Stationary-State","page":"Stationary State","title":"Stationary State","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"HierarchicalEOM.jl implements two different ways to calculate stationary states of all Auxiliary Density Operators (ADOs).","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"To solve the stationary state of the reduced state and also all the ADOs, you only need to call steadystate. Different methods are implemented with different input parameters of the function which makes it easy to switch between different methods. The output of the function steadystate for each methods will always be in the type of the auxiliary density operators ADOs.","category":"page"},{"location":"stationary_state/#Solve-with-[LinearSolve.jl](http://linearsolve.sciml.ai/stable/)","page":"Stationary State","title":"Solve with LinearSolve.jl","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"The first method is implemented by solving the linear problem","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"0=hatmathcalMrho^(mnp)_textbfj vert textbfq(t)","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"HierarchicalEOM.jl wraps some of the functions in LinearSolve.jl, which is a very rich numerical library for solving the linear problems and provides many solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to LinearSolve solvers and also the documentation of LinearSolve.jl.","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"See the docstring of this method: ","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"steadystate(M::AbstractHEOMLSMatrix; solver=UMFPACKFactorization(), verbose::Bool=true, SOLVEROptions...)","category":"page"},{"location":"stationary_state/#QuantumToolbox.steadystate-Tuple{AbstractHEOMLSMatrix}","page":"Stationary State","title":"QuantumToolbox.steadystate","text":"steadystate(M::AbstractHEOMLSMatrix; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on LinearSolve.jl (i.e., solving x where A times x = b).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\n","category":"method"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"# the HEOMLS matrix\nM::AbstractHEOMLSMatrix \nados_steady = steadystate(M)","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"warning: Unphysical solution\nThis method does not require an initial condition rho^(mnp)_textbfj vert textbfq(0). Although this method works for most of the cases, it does not guarantee that one can obtain a physical (or unique) solution. If there is any problem within the solution, please try the second method which solves with an initial condition, as shown below.","category":"page"},{"location":"stationary_state/#Solve-with-[DifferentialEquations.jl](https://diffeq.sciml.ai/stable/)","page":"Stationary State","title":"Solve with DifferentialEquations.jl","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"The second method is implemented by solving the ordinary differential equation (ODE) method :","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"partial_trho^(mnp)_textbfj vert textbfq(t)=hatmathcalMrho^(mnp)_textbfj vert textbfq(t)","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"until finding a stationary solution.","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"HierarchicalEOM.jl wraps some of the functions in DifferentialEquations.jl, which is a very rich numerical library for solving the differential equations and provides many ODE solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to the documentation of DifferentialEquations.jl.","category":"page"},{"location":"stationary_state/#Given-the-initial-state-as-Density-Operator-(QuantumObject-type)","page":"Stationary State","title":"Given the initial state as Density Operator (QuantumObject type)","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"See the docstring of this method: ","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"steadystate(M::AbstractHEOMLSMatrix, ρ0::QuantumObject, tspan::Number = Inf; solver = DP5(), termination_condition = NormTerminationMode(), verbose::Bool = true, SOLVEROptions...)","category":"page"},{"location":"stationary_state/#QuantumToolbox.steadystate","page":"Stationary State","title":"QuantumToolbox.steadystate","text":"steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntspan::Number : the time limit to find stationary state. Default to Inf\nsolver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver\n\nNotes\n\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\n","category":"function"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"# the HEOMLS matrix\nM::AbstractHEOMLSMatrix \n\n# the initial state of the system density operator\nρ0::QuantumObject\n\nados_steady = steadystate(M, ρ0)","category":"page"},{"location":"stationary_state/#Given-the-initial-state-as-Auxiliary-Density-Operators","page":"Stationary State","title":"Given the initial state as Auxiliary Density Operators","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"See the docstring of this method: ","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"steadystate(M::AbstractHEOMLSMatrix, ados::ADOs, tspan::Number = Inf; solver = DP5(), termination_condition = NormTerminationMode(), verbose::Bool = true, SOLVEROptions...)","category":"page"},{"location":"stationary_state/#QuantumToolbox.steadystate-2","page":"Stationary State","title":"QuantumToolbox.steadystate","text":"steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntspan::Number : the time limit to find stationary state. Default to Inf\nsolver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver\n\nNotes\n\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\n","category":"function"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"# the HEOMLS matrix\nM::AbstractHEOMLSMatrix \n\n# the initial state of the ADOs\nados::ADOs\n\nados_steady = steadystate(M, ados)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"EditURL = \"../../../examples/SIAM.jl\"","category":"page"},{"location":"examples/SIAM/#exp-SIAM","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"The investigation of the Kondo effect in single-impurity Anderson model is crucial as it serves both as a valuable testing ground for the theories of the Kondo effect and has the potential to lead to a better understanding of this intrinsic many-body phenomena.","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"import QuantumToolbox\nusing HierarchicalEOM\nimport Plots","category":"page"},{"location":"examples/SIAM/#Hamiltonian","page":"The single-impurity Anderson model","title":"Hamiltonian","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"We consider a single-level electronic system [which can be populated by a spin-up (uparrow) or spin-down (downarrow) electron] coupled to a fermionic reservoir (textrmf). The total Hamiltonian is given by H_textrmT=H_textrms+H_textrmf+H_textrmsf, where each terms takes the form","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"beginaligned\nH_textrms = epsilon left(d^dagger_uparrow d_uparrow + d^dagger_downarrow d_downarrow right) + Uleft(d^dagger_uparrow d_uparrow d^dagger_downarrow d_downarrowright)\nH_textrmf =sum_sigma=uparrowdownarrowsum_kepsilon_sigmakc_sigmak^daggerc_sigmak\nH_textrmsf =sum_sigma=uparrowdownarrowsum_kg_kc_sigmak^daggerd_sigma + g_k^*d_sigma^daggerc_sigmak\nendaligned","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"Here, d_uparrow (d_downarrow) annihilates a spin-up (spin-down) electron in the system, epsilon is the energy of the electron, and U is the Coulomb repulsion energy for double occupation. Furthermore, c_sigmak (c_sigmak^dagger) annihilates (creates) an electron in the state k (with energy epsilon_sigmak) of the reservoir.","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"Now, we need to build the system Hamiltonian and initial state with the package QuantumToolbox.jl to construct the operators.","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"ϵ = -5\nU = 10\nσm = sigmam() ## σ-\nσz = sigmaz() ## σz\nII = qeye(2) ## identity matrix\n\n# construct the annihilation operator for both spin-up and spin-down\n# (utilize Jordan–Wigner transformation)\nd_up = tensor(σm, II)\nd_dn = tensor(-1 * σz, σm)\nHsys = ϵ * (d_up' * d_up + d_dn' * d_dn) + U * (d_up' * d_up * d_dn' * d_dn)","category":"page"},{"location":"examples/SIAM/#Construct-bath-objects","page":"The single-impurity Anderson model","title":"Construct bath objects","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"We assume the fermionic reservoir to have a Lorentzian-shaped spectral density, and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters:","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"the coupling strength Gamma between system and reservoirs\nthe band-width W\nthe product of the Boltzmann constant k and the absolute temperature T : kT\nthe chemical potential mu\nthe total number of exponentials for the reservoir 2(N + 1)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"Γ = 2\nμ = 0\nW = 10\nkT = 0.5\nN = 5\nbath_up = Fermion_Lorentz_Pade(d_up, Γ, μ, W, kT, N)\nbath_dn = Fermion_Lorentz_Pade(d_dn, Γ, μ, W, kT, N)\nbath_list = [bath_up, bath_dn]","category":"page"},{"location":"examples/SIAM/#Construct-HEOMLS-matrix","page":"The single-impurity Anderson model","title":"Construct HEOMLS matrix","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"(see also HEOMLS Matrix for Fermionic Baths)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"tier = 3\nM_even = M_Fermion(Hsys, tier, bath_list)\nM_odd = M_Fermion(Hsys, tier, bath_list, ODD)","category":"page"},{"location":"examples/SIAM/#Solve-stationary-state-of-ADOs","page":"The single-impurity Anderson model","title":"Solve stationary state of ADOs","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"(see also Stationary State)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"ados_s = steadystate(M_even)","category":"page"},{"location":"examples/SIAM/#Calculate-density-of-states-(DOS)","page":"The single-impurity Anderson model","title":"Calculate density of states (DOS)","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"(see also Spectrum)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"ωlist = -10:1:10\ndos = DensityOfStates(M_odd, ados_s, d_up, ωlist)\n\nPlots.plot(ωlist, dos)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"This page was generated using Literate.jl.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"EditURL = \"../../../examples/cavityQED.jl\"","category":"page"},{"location":"examples/cavityQED/#Cavity-QED-system","page":"Cavity QED system","title":"Cavity QED system","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Cavity quantum electrodynamics (cavity QED) is an important topic for studying the interaction between atoms (or other particles) and light confined in a reflective cavity, under conditions where the quantum nature of photons is significant.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"import QuantumToolbox\nusing HierarchicalEOM\nusing LaTeXStrings\nimport Plots","category":"page"},{"location":"examples/cavityQED/#Hamiltonian","page":"Cavity QED system","title":"Hamiltonian","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"The Jaynes-Cummings model is a standard model in the realm of cavity QED. It illustrates the interaction between a two-level atom (textrmA) and a quantized single-mode within a cavity (textrmc).","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"beginaligned\nH_textrms=H_textrmA+H_textrmc+H_textrmint\nH_textrmA=fracomega_A2sigma_z\nH_textrmc=omega_textrmc a^dagger a\nH_textrmint=g (a^daggersigma^-+asigma^+)\nendaligned","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"where sigma^- (sigma^+) is the annihilation (creation) operator of the atom, and a (a^dagger) is the annihilation (creation) operator of the cavity.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Furthermore, we consider the system is coupled to a bosonic reservoir (textrmb). The total Hamiltonian is given by H_textrmTotal=H_textrms+H_textrmb+H_textrmsb, where H_textrmb and H_textrmsb takes the form","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"beginaligned\nH_textrmb =sum_komega_kb_k^daggerb_k\nH_textrmsb =(a+a^dagger)sum_kg_k(b_k + b_k^dagger)\nendaligned","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Here, H_textrmb describes a bosonic reservoir where b_k (b_k^dagger) is the bosonic annihilation (creation) operator associated to the kth mode (with frequency omega_k). Also, H_textrmsb illustrates the interaction between the cavity and the bosonic reservoir.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Now, we need to build the system Hamiltonian and initial state with the package QuantumToolbox.jl to construct the operators.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"N = 3 ## system cavity Hilbert space cutoff\nωA = 2\nωc = 2\ng = 0.1\n\n# operators\na_c = destroy(N)\nI_c = qeye(N)\nσz_A = sigmaz()\nσm_A = sigmam()\nI_A = qeye(2)\n\n# operators in tensor-space\na = tensor(a_c, I_A)\nσz = tensor(I_c, σz_A)\nσm = tensor(I_c, σm_A)\n\n# Hamiltonian\nH_A = 0.5 * ωA * σz\nH_c = ωc * a' * a\nH_int = g * (a' * σm + a * σm')\n\nH_s = H_A + H_c + H_int\n\n# initial state\nψ0 = tensor(basis(N, 0), basis(2, 0))","category":"page"},{"location":"examples/cavityQED/#Construct-bath-objects","page":"Cavity QED system","title":"Construct bath objects","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"We assume the bosonic reservoir to have a Drude-Lorentz Spectral Density, and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters:","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"the coupling strength Gamma between system and reservoir\nthe band-width W\nthe product of the Boltzmann constant k and the absolute temperature T : kT\nthe total number of exponentials for the reservoir (N + 1)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Γ = 0.01\nW = 1\nkT = 0.025\nN = 20\nBath = Boson_DrudeLorentz_Pade(a + a', Γ, W, kT, N)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Before incorporating the correlation function into the HEOMLS matrix, it is essential to verify if the total number of exponentials for the reservoir sufficiently describes the practical situation.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"tlist_test = 0:0.1:10;\n\nBath_test = Boson_DrudeLorentz_Pade(a + a', Γ, W, kT, 1000);\nCt = C(Bath, tlist_test);\nCt2 = C(Bath_test, tlist_test);\n\nPlots.plot(tlist_test, real(Ct), label = \"N=20 (real part )\", linestyle = :dash, linewidth = 3)\nPlots.plot!(tlist_test, real(Ct2), label = \"N=1000 (real part)\", linestyle = :solid, linewidth = 3)\nPlots.plot!(tlist_test, imag(Ct), label = \"N=20 (imag part)\", linestyle = :dash, linewidth = 3)\nPlots.plot!(tlist_test, imag(Ct2), label = \"N=1000 (imag part)\", linestyle = :solid, linewidth = 3)\n\nPlots.xaxis!(\"t\")\nPlots.yaxis!(\"C(t)\")","category":"page"},{"location":"examples/cavityQED/#Construct-HEOMLS-matrix","page":"Cavity QED system","title":"Construct HEOMLS matrix","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also HEOMLS Matrix for Bosonic Baths) Here, we consider an incoherent pumping to the atom, which can be described by an Lindblad dissipator (see here for more details).","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Furthermore, we set the important threshold to be 1e-6.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"pump = 0.01\nJ_pump = sqrt(pump) * σm'\n\ntier = 2\nM_Heom = M_Boson(H_s, tier, threshold = 1e-6, Bath)\nM_Heom = addBosonDissipator(M_Heom, J_pump)","category":"page"},{"location":"examples/cavityQED/#Solve-time-evolution-of-ADOs","page":"Cavity QED system","title":"Solve time evolution of ADOs","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also Time Evolution)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"t_list = 0:1:500\nsol_H = HEOMsolve(M_Heom, ψ0, t_list; e_ops = [σz, a' * a])","category":"page"},{"location":"examples/cavityQED/#Solve-stationary-state-of-ADOs","page":"Cavity QED system","title":"Solve stationary state of ADOs","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also Stationary State)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"steady_H = steadystate(M_Heom);\nnothing #hide","category":"page"},{"location":"examples/cavityQED/#Expectation-values","page":"Cavity QED system","title":"Expectation values","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"observable of atom: sigma_z","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"σz_evo_H = real(sol_H.expect[1, :])\nσz_steady_H = expect(σz, steady_H)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"observable of cavity: a^dagger a (average photon number)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"np_evo_H = real(sol_H.expect[2, :])\nnp_steady_H = expect(a' * a, steady_H)\n\np1 = Plots.plot(\n t_list,\n [σz_evo_H, ones(length(t_list)) .* σz_steady_H],\n label = [L\"\\langle \\sigma_z \\rangle\" L\"\\langle \\sigma_z \\rangle ~~(\\textrm{steady})\"],\n linewidth = 3,\n linestyle = [:solid :dash],\n)\np2 = Plots.plot(\n t_list,\n [np_evo_H, ones(length(t_list)) .* np_steady_H],\n label = [L\"\\langle a^\\dagger a \\rangle\" L\"\\langle a^\\dagger a \\rangle ~~(\\textrm{steady})\"],\n linewidth = 3,\n linestyle = [:solid :dash],\n)\nPlots.plot(p1, p2, layout = [1, 1])\nPlots.xaxis!(\"t\")","category":"page"},{"location":"examples/cavityQED/#Power-spectrum","page":"Cavity QED system","title":"Power spectrum","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also Spectrum)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"ω_list = 1:0.01:3\npsd_H = PowerSpectrum(M_Heom, steady_H, a, ω_list)\n\nPlots.plot(ω_list, psd_H, linewidth = 3)\nPlots.xaxis!(L\"\\omega\")","category":"page"},{"location":"examples/cavityQED/#Compare-with-Master-Eq.-approach","page":"Cavity QED system","title":"Compare with Master Eq. approach","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also HEOMLS for Master Equations)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"The Lindblad master equations which describs the cavity couples to an extra bosonic reservoir with Drude-Lorentzian spectral density is given by","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"# Drude_Lorentzian spectral density\nDrude_Lorentz(ω, Γ, W) = 4 * Γ * W * ω / ((ω)^2 + (W)^2)\n\n# Bose-Einstein distribution\nn_b(ω, kT) = 1 / (exp(ω / kT) - 1)\n\n# build the jump operators\njump_op =\n [sqrt(Drude_Lorentz(ωc, Γ, W) * (n_b(ωc, kT) + 1)) * a, sqrt(Drude_Lorentz(ωc, Γ, W) * (n_b(ωc, kT))) * a', J_pump];\n\n# construct the HEOMLS matrix for master equation\nM_master = M_S(H_s)\nM_master = addBosonDissipator(M_master, jump_op)\n\n# time evolution\nsol_M = HEOMsolve(M_master, ψ0, t_list; e_ops = [σz, a' * a]);\n\n# steady state\nsteady_M = steadystate(M_master);\n\n# expectation value of σz\nσz_evo_M = real(sol_M.expect[1, :])\nσz_steady_M = expect(σz, steady_M)\n\n# average photon number\nnp_evo_M = real(sol_M.expect[2, :])\nnp_steady_M = expect(a' * a, steady_M)\n\np1 = Plots.plot(\n t_list,\n [σz_evo_M, ones(length(t_list)) .* σz_steady_M],\n label = [L\"\\langle \\sigma_z \\rangle\" L\"\\langle \\sigma_z \\rangle ~~(\\textrm{steady})\"],\n linewidth = 3,\n linestyle = [:solid :dash],\n)\np2 = Plots.plot(\n t_list,\n [np_evo_M, ones(length(t_list)) .* np_steady_M],\n label = [L\"\\langle a^\\dagger a \\rangle\" L\"\\langle a^\\dagger a \\rangle ~~(\\textrm{steady})\"],\n linewidth = 3,\n linestyle = [:solid :dash],\n)\nPlots.plot(p1, p2, layout = [1, 1])\nPlots.xaxis!(\"t\")","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"We can also calculate the power spectrum","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"ω_list = 1:0.01:3\npsd_M = PowerSpectrum(M_master, steady_M, a, ω_list)\n\nPlots.plot(ω_list, psd_M, linewidth = 3)\nPlots.xaxis!(L\"\\omega\")","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Due to the weak coupling between the system and an extra bosonic environment, the Master equation's outcome is expected to be similar to the results obtained from the HEOM method.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"This page was generated using Literate.jl.","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"EditURL = \"../../../examples/dynamical_decoupling.jl\"","category":"page"},{"location":"examples/dynamical_decoupling/#exp-dynamical-decoupling","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"In this page, we show how to solve the time evolution with time-dependent Hamiltonian problems in hierarchical equations of motion approach.","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"using QuantumToolbox\nusing HierarchicalEOM\nusing LaTeXStrings\nimport Plots","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Here, we study dynamical decoupling which is a common tool used to undo the dephasing effect from the environment even for finite pulse duration.","category":"page"},{"location":"examples/dynamical_decoupling/#Hamiltonian","page":"Driven Systems and Dynamical Decoupling","title":"Hamiltonian","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"We consider a two-level system coupled to a bosonic reservoir (textrmb). The total Hamiltonian is given by H_textrmT=H_textrms+H_textrmb+H_textrmsb, where each terms takes the form","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"beginaligned\nH_textrms(t) = H_0 + H_textrmD(t)\nH_0 = fracomega_02 sigma_z\nH_textrmb =sum_komega_kb_k^daggerb_k\nH_textrmsb =sigma_zsum_kg_alphak(b_k + b_k^dagger)\nendaligned","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Here, H_textrmb describes a bosonic reservoir where b_k (b_k^dagger) is the bosonic annihilation (creation) operator associated to the kth mode (with frequency omega_k).","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Furthermore, to observe the time evolution of the coherence, we consider the initial state to be","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"ψ(t=0)=frac1sqrt2left(0rangle+1rangleright)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Now, we need to build the system Hamiltonian and initial state with the package QuantumToolbox.jl to construct the operators.","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"ω0 = 0.0\nσz = sigmaz()\nσx = sigmax()\nH0 = 0.5 * ω0 * σz\n\n# Define the operator that measures the 0, 1 element of density matrix\nρ01 = Qobj([0 1; 0 0])\n\nψ0 = (basis(2, 0) + basis(2, 1)) / √2;\nnothing #hide","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"The time-dependent driving term H_textrmD(t) has the form","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"H_textrmD(t) = sum_n=1^N f_n(t) sigma_x","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"where the pulse is chosen to have duration tau together with a delay Delta between each pulses, namely","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"f_n(t)\n= begincases\n V textrmif(n-1)tau + nDelta leq t leq n (tau + Delta)\n 0 textrmotherwise\n endcases","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Here, we set the period of the pulses to be tau V = pi2. Therefore, we consider two scenarios with fast and slow pulses:","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"# a function which returns the amplitude of the pulse at time t\nfunction pulse(V, Δ, t)\n τ = 0.5 * π / V\n period = τ + Δ\n\n if (t % period) < τ\n return V\n else\n return 0\n end\nend\n\ntlist = 0:0.4:400\namp_fast = 0.50\namp_slow = 0.01\ndelay = 20\n\nPlots.plot(\n tlist,\n [[pulse(amp_fast, delay, t) for t in tlist], [pulse(amp_slow, delay, t) for t in tlist]],\n label = [\"Fast Pulse\" \"Slow Pulse\"],\n linestyle = [:solid :dash],\n)","category":"page"},{"location":"examples/dynamical_decoupling/#Construct-bath-objects","page":"Driven Systems and Dynamical Decoupling","title":"Construct bath objects","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"We assume the bosonic reservoir to have a Drude-Lorentz Spectral Density, and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters:","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"the coupling strength Gamma between system and reservoir\nthe band-width W\nthe product of the Boltzmann constant k and the absolute temperature T : kT\nthe total number of exponentials for the reservoir (N + 1)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Γ = 0.0005\nW = 0.005\nkT = 0.05\nN = 3\nbath = Boson_DrudeLorentz_Pade(σz, Γ, W, kT, N)","category":"page"},{"location":"examples/dynamical_decoupling/#Construct-HEOMLS-matrix","page":"Driven Systems and Dynamical Decoupling","title":"Construct HEOMLS matrix","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"(see also HEOMLS Matrix for Bosonic Baths)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"note: Note\nOnly provide the time-independent part of system Hamiltonian when constructing HEOMLS matrices (the time-dependent part H_t should be given when solving the time evolution).","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"tier = 6\nM = M_Boson(H0, tier, bath)","category":"page"},{"location":"examples/dynamical_decoupling/#time-evolution-with-time-independent-Hamiltonian","page":"Driven Systems and Dynamical Decoupling","title":"time evolution with time-independent Hamiltonian","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"(see also Time Evolution)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"noPulseSol = HEOMsolve(M, ψ0, tlist; e_ops = [ρ01]);\nnothing #hide","category":"page"},{"location":"examples/dynamical_decoupling/#Solve-time-evolution-with-time-dependent-Hamiltonian","page":"Driven Systems and Dynamical Decoupling","title":"Solve time evolution with time-dependent Hamiltonian","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"(see also Time Evolution)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"We need to provide a user-defined function (named as H_D in this case), which must be in the form H_D(t, p::NamedTuple) and returns the time-dependent part of system Hamiltonian (in QuantumObject type) at any given time point t. The parameter p should be a NamedTuple which contains all the extra parameters [V (amplitude), Δ (delay), and σx (operator) in this case] for the function H_D:","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"H_D(t, p::NamedTuple) = pulse(p.V, p.Δ, t) * p.σx;\nnothing #hide","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"The parameter p will be passed to your function H_D directly from the last required parameter in HEOMsolve:","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"fastTuple = (V = amp_fast, Δ = delay, σx = σx)\nslowTuple = (V = amp_slow, Δ = delay, σx = σx)\n\nfastPulseSol = HEOMsolve(M, ψ0, tlist; e_ops = [ρ01], H_t = H_D, params = fastTuple)\nslowPulseSol = HEOMsolve(M, ψ0, tlist; e_ops = [ρ01], H_t = H_D, params = slowTuple)","category":"page"},{"location":"examples/dynamical_decoupling/#Plot-the-coherence","page":"Driven Systems and Dynamical Decoupling","title":"Plot the coherence","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Plots.plot(\n tlist,\n [real(fastPulseSol.expect[1, :]), real(slowPulseSol.expect[1, :]), real(noPulseSol.expect[1, :])],\n label = [\"Fast Pulse\" \"Slow Pulse\" \"no Pulse\"],\n linestyle = [:solid :dot :dash],\n linewidth = 3,\n xlabel = L\"t\",\n ylabel = L\"\\rho_{01}\",\n grid = false,\n)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"This example is from QuTiP-BoFiN paper : Phys. Rev. Research 5, 013181 (2023).","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"This page was generated using Literate.jl.","category":"page"},{"location":"heom_matrix/schrodinger_eq/#doc-M_S","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS Matrix for Schrödinger Equation","text":"","category":"section"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"The HEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0: struct M_S <: AbstractHEOMLSMatrix ","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"hatmathcalMcdot=-i leftH_s cdot right_-","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"where cdot cdot_- stands for commutator.","category":"page"},{"location":"heom_matrix/schrodinger_eq/#Construct-Matrix","page":"HEOMLS for Schrödinger Equation","title":"Construct Matrix","text":"","category":"section"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"To construct the HEOM matrix for Schrödinger Equation, one can call ","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"M_S(Hsys, parity) with the following parameters:","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"args (Arguments)","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"Hsys : The time-independent system Hamiltonian\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on. Defaults to EVEN.","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"kwargs (Keyword Arguments)","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"verbose::Bool : To display verbose output during the process or not. Defaults to true.","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"For example:","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"Hs::QuantumObject # system Hamiltonian\n\n# create HEOMLS matrix in both EVEN and ODD parity\nM_even = M_S(Hs) \nM_odd = M_S(Hs, ODD) ","category":"page"},{"location":"heom_matrix/schrodinger_eq/#Fields","page":"HEOMLS for Schrödinger Equation","title":"Fields","text":"","category":"section"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"The fields of the structure M_S are as follows:","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"data : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the hierarchy, which equals to 0 in this case\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs, which equals to 1 (only the reduced density operator) in this case\nsup_dim : the dimension of system superoperator\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on.","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"One can obtain the value of each fields as follows:","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"M::M_S\n\nM.data\nM.tier\nM.dims\nM.N\nM.sup_dim\nM.parity","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/#doc-M_Boson_Fermion","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS Matrix for Hybrid (Bosonic and Fermionic) Baths","text":"","category":"section"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"The HEOM Liouvillian superoperator matrix struct M_Boson_Fermion <: AbstractHEOMLSMatrix which describes the system simultaneously interacts with multiple Bosonic baths and Fermionic baths. ","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/#Construct-Matrix","page":"HEOMLS for Bosonic and Fermionic Bath","title":"Construct Matrix","text":"","category":"section"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"To construct the HEOM matrix in this case, one can call ","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"M_Boson_Fermion(Hsys, Btier, Ftier, Bbath, Fbath, parity) with the following parameters:","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"args (Arguments)","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"Hsys : The time-independent system Hamiltonian\nBtier::Int : the tier (cutoff level) for the bosonic bath\nFtier::Int : the tier (cutoff level) for the fermionic bath\nBbath::Vector{BosonBath} : objects for different bosonic baths\nFbath::Vector{FermionBath} : objects for different fermionic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on. Defaults to EVEN.","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"kwargs (Keyword Arguments)","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"threshold::Real : The threshold of the importance value. Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"For example:","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"Hs::QuantumObject # system Hamiltonian\nBtier = 3\nFtier = 4\nBbath::BosonBath\nFbath::FermionBath\n\n# create HEOMLS matrix in both EVEN and ODD parity\nM_even = M_Fermion(Hs, Btier, Ftier, Bbath, Fbath) \nM_odd = M_Fermion(Hs, Btier, Ftier, Bbath, Fbath, ODD) ","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/#Fields","page":"HEOMLS for Bosonic and Fermionic Bath","title":"Fields","text":"","category":"section"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"The fields of the structure M_Boson_Fermion are as follows:","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"data : the sparse matrix of HEOM Liouvillian superoperator\nBtier : the tier (cutoff level) for bosonic hierarchy\nFtier : the tier (cutoff level) for fermionic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on. \nBbath::Vector{BosonBath} : the vector which stores all BosonBath objects\nFbath::Vector{FermionBath} : the vector which stores all FermionBath objects\nhierarchy::MixHierarchyDict: the object which contains all dictionaries for mixed-bath-ADOs hierarchy.","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"One can obtain the value of each fields as follows:","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"M::M_Boson_Fermion\n\nM.data\nM.Btier\nM.Ftier\nM.dims\nM.N\nM.sup_dim\nM.parity\nM.Bbath\nM.Fbath\nM.hierarchy","category":"page"},{"location":"cite/#doc-Cite","page":"Cite HierarchicalEOM.jl","title":"Cite HierarchicalEOM.jl","text":"","category":"section"},{"location":"cite/#BibTex-for-[Commun.-Phys.-6,-313-(2023)](https://doi.org/10.1038/s42005-023-01427-2)","page":"Cite HierarchicalEOM.jl","title":"BibTex for Commun. Phys. 6, 313 (2023)","text":"","category":"section"},{"location":"cite/","page":"Cite HierarchicalEOM.jl","title":"Cite HierarchicalEOM.jl","text":"@article{HierarchicalEOM-jl2023,\n doi = {10.1038/s42005-023-01427-2},\n url = {https://doi.org/10.1038/s42005-023-01427-2},\n year = {2023},\n month = {Oct},\n publisher = {Nature Portfolio},\n volume = {6},\n number = {1},\n pages = {313},\n author = {Huang, Yi-Te and Kuo, Po-Chen and Lambert, Neill and Cirio, Mauro and Cross, Simon and Yang, Shen-Liang and Nori, Franco and Chen, Yueh-Nan},\n title = {An efficient {J}ulia framework for hierarchical equations of motion in open quantum systems},\n journal = {Communications Physics}\n}","category":"page"},{"location":"cite/#BibTex-for-[arXiv:2306.07522-(2023)](https://doi.org/10.48550/arXiv.2306.07522)","page":"Cite HierarchicalEOM.jl","title":"BibTex for arXiv:2306.07522 (2023)","text":"","category":"section"},{"location":"cite/","page":"Cite HierarchicalEOM.jl","title":"Cite HierarchicalEOM.jl","text":"@article{HierarchicalEOM-jl2023,\n title={{HierarchicalEOM.jl}: {A}n efficient {J}ulia framework for hierarchical equations of motion in open quantum systems},\n author={Huang, Yi-Te and Kuo, Po-Chen and Lambert, Neill and Cirio, Mauro and Cross, Simon and Yang, Shen-Liang and Nori, Franco and Chen, Yueh-Nan},\n journal={arXiv preprint arXiv:2306.07522},\n year={2023}\n}","category":"page"},{"location":"ADOs/#doc-ADOs","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"","category":"section"},{"location":"ADOs/#Introduction","page":"Auxiliary Density Operators","title":"Introduction","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"The auxiliary density operators (ADOs) rho_textbfjverttextbfq^(mnp)(t) encode environmental effects related to different exponential terms (Exponent) present in the Bosonic Bath and Fermionic Bath correlation functions and provide an iterative description of high-order system-baths memory effects.","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"In rho_textbfjverttextbfq^(mnp)(t), the tuple (m n p) represents the mth-level-bosonic-and-nth-level-fermionic ADO with parity p, and textbfj (textbfq) denotes a vector j_mcdotsj_1 (q_ncdotsq_1) where each j (q) represents a specific multi-index ensemble beta l (alpha h) with","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"beta : denotes the index of bosonic bath\nalpha : denotes the index of fermionic bath\nl : denotes the index of exponent in the bosonic bath\nh : denotes the index of exponent in the fermionic bath","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"note: Reduced Density Operator\nThe system reduced density operator refers to m=n=0, namely rho_vert^(00p)(t).","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"In HierarchicalEOM.jl, we express all the auxiliary density operators into a single column vector and store it in the object defined as : ","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"struct ADOs, ","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"which is usually obtained after solving the time evolution or stationary state by a given HEOM Liouvillian superoperator Matrix.","category":"page"},{"location":"ADOs/#Fields","page":"Auxiliary Density Operators","title":"Fields","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"The fields of the structure ADOs are as follows:","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"data : the vectorized auxiliary density operators\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of auxiliary density operators\nparity: the parity label","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"One obtain the value of each fields as follows:","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"# usually obtained after solving time evolution or stationary state\nados::ADOs\n\nados.data\nados.dims\nados.N\nados.parity","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"warning: Warning\nWe express all the auxiliary density operators in only a single column vector ADOs.data. To obtain each auxiliary density operators in matrix form, please use the following methods and functions.","category":"page"},{"location":"ADOs/#Reduced-Density-Operator","page":"Auxiliary Density Operators","title":"Reduced Density Operator","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"In order to obtain the system reduced density operator in the type of QuantumObject, just simply call getRho","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\nρ = getRho(ados)","category":"page"},{"location":"ADOs/#High-Level-Auxiliary-Density-Operators","page":"Auxiliary Density Operators","title":"High-Level Auxiliary Density Operators","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Although we express all the auxiliary density operators in the vector ADOs.data, we still make the ADOs like a list where accessing each element would return a specific auxiliary density operator in matrix type. ","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"In order to obtain the auxiliary density operator in the type of QuantumObject with a specific index i, just simply call getADO","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\ni::Int\n\nρ = getADO(ados, 1) # the first element will always be the reduced density operator\nado = getADO(ados, i) # the i-th auxiliary density operator","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Also, ADOs supports all the element-wise methods (functions) :","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Supports length(::ADOs) which returns the total number of auxiliary density operators (same as ADOs.N) :","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\nlength(ados)","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Supports bracket operation [] which is similar to access the element of a list :","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\n\n# all the following returned ADO will be in matrix form\nados[1] # returns the first auxiliary density operator (which is always the reduced density operator)\nados[10] # returns the 10-th auxiliary density operator\nados[3:10] # returns a list of auxiliary density operators from index 3 to 10\nados[end] # returns the last auxiliary density operator","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Supports iteration (for-loop) process :","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\n\nfor ado in ados # iteration\n ado # each auxiliary density operator in matrix form\nend","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"note: Work on high-level auxiliary density operators with Hierarchy Dictionary\nTo find the index of the auxiliary density operator and it's corresponding bath Exponent, please refer to Hierarchy Dictionary for more details.","category":"page"},{"location":"ADOs/#Expectation-Value","page":"Auxiliary Density Operators","title":"Expectation Value","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Given an observable A and ADOs rho^(mnp)_textbfj vert textbfq, one can calculate the expectation value by","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"langle A rangle = textrmTrleftA rho^(00p)_ vert right","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"where, m=n=0 represents the reduced density operator.","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"One can directly calculate the expectation values using the function QuantumToolbox.expect:","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"A::QuantumObject # observable\n\n# with a single ADOs\nados::ADOs\nE = expect(A, ados)\n\n# with a list contains many ADOs\nados_list::Vector{ADOs}\nElist = expect(A, ados_list)","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Here, Elist contains the expectation values corresponding to the ados_list.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#doc-Bosonic-Bath","page":"Introduction","title":"Bosonic Bath","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/#Bosonic-Bath-Overview","page":"Introduction","title":"Overview","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"The BosonBath object describes the interaction between the system (s) and a exterior bosonic environment (b), which can be modeled by","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"H_sb=V_ssum_k g_k (b_k + b_k^dagger)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"in terms of the coupling strength g_k and the annihilation (creation) operator b_k (b_k^dagger) associated to the k-th mode of the bosonic environment. Here, V_s refers to the system-interaction operator. In particular, V_s must be a Hermitian operator which can act on both bosonic and fermionic systems degree of freedom. In the fermionic system case, V_s must have even parity to be compatible with charge conservation.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"The effects of a bosonic environment (initially in thermal equilibrium and linearly coupled to the system) are completely encoded in the two-time correlation functions, namely","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"C(t_1 t_2)\n=frac12piint_0^infty domega J(omega)leftn(omega)e^iomega (t_1-t_2)+(n(omega)+1)e^-iomega (t_1-t_2)right","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"where J(omega)=2piSigma_k g_k^2 delta(omega-omega_k) is the spectral density of the bath and n(omega)=exp(omegak_B T)-1^-1 represents the Bose-Einstein distribution.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"C(t_1 t_2)=sum_i eta_i e^-gamma_i (t_1-t_2)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Construct-BosonBath-(with-real-and-imaginary-parts-are-combined)","page":"Introduction","title":"Construct BosonBath (with real and imaginary parts are combined)","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can construct the BosonBath object with the coupling operator Vs::QuantumObject and the two lists η::AbstractVector and γ::AbstractVector which corresponds to the exponential terms eta_i_i and gamma_i_i, respectively.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"bath = BosonBath(Vs, η, γ)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"warning: Warning\nHere, the length of η and γ should be the same.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Construct-BosonBath-(with-real-and-imaginary-parts-are-separated)","page":"Introduction","title":"Construct BosonBath (with real and imaginary parts are separated)","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"When gamma_i neq gamma_i^*, a closed form for the HEOM can be obtained by further decomposing C(t_1 t_2) into its real (R) and imaginary (I) parts as","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"C(t_1 t_2)=sum_u=textrmRtextrmI(delta_u textrmR + idelta_u textrmI)C^u(t_1 t_2)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"where delta is the Kronecker delta function and C^u(t_1 t_2)=sum_i eta_i^u exp(-gamma_i^u (t_1-t_2))","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"In this case, the BosonBath object can be constructed by the following method:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"bath = BosonBath(Vs, η_real, γ_real, η_imag, γ_imag)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"warning: Warning\nHere, the length of η_real and γ_real should be the same. Also, the length of η_imag and γ_imag should be the same.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"Here, η_real::AbstractVector, γ_real::AbstractVector, η_imag::AbstractVector and γ_imag::AbstractVector correspond to the exponential terms eta_i^textrmR_i, gamma_i^textrmR_i, eta_i^textrmI_i and gamma_i^textrmI_i, respectively.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"note: Note\nInstead of analytically solving the correlation function C(t_1 t_2) to obtain a sum of exponential terms, one can also use the built-in functions (for different spectral densities J(omega) and spectral decomposition methods, which have been analytically solved by the developers already). See the other categories of the Bosonic Bath in the sidebar for more details.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Print-Bosonic-Bath","page":"Introduction","title":"Print Bosonic Bath","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can check the information of the BosonBath by the print function, for example:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"print(bath)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"BosonBath object with 4 exponential-expansion terms","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Calculate-the-correlation-function","page":"Introduction","title":"Calculate the correlation function","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"To check whether the exponential terms in the BosonBath is correct or not, one can call C(bath::BosonBath, tlist::AbstractVector) to calculate the correlation function C(t), where t=t_1-t_2:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"c_list = C(bath, tlist)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"Here, c_list is a list which contains the value of C(t) corresponds to the given time series tlist.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Exponent","page":"Introduction","title":"Exponent","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"HierarchicalEOM.jl also supports users to access the specific exponential term with brakets []. This returns an Exponent object, which contains the corresponding value of eta_i and gamma_i:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"e = bath[2] # the 2nd-term\nprint(e)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"bRI\", η = 1.5922874021206546e-6 + 0.0im, γ = 0.3141645167860635 + 0.0im.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"The different types of the (bosonic-bath) Exponent:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"\"bR\" : from real part of bosonic correlation function C^u=textrmR(t_1 t_2)\n\"bI\" : from imaginary part of bosonic correlation function C^u=textrmI(t_1 t_2)\n\"bRI\" : from combined (real and imaginary part) bosonic bath correlation function C(t_1 t_2)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can even obtain the Exponent with iterative method:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"for e in bath\n println(e)\nend","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"bRI\", η = 4.995832638723504e-5 - 2.5e-6im, γ = 0.005 + 0.0im.\n\nBath Exponent with types = \"bRI\", η = 1.5922874021206546e-6 + 0.0im, γ = 0.3141645167860635 + 0.0im.\n\nBath Exponent with types = \"bRI\", η = 1.0039844180003819e-6 + 0.0im, γ = 0.6479143347831898 + 0.0im.\n\nBath Exponent with types = \"bRI\", η = 3.1005439801387293e-6 + 0.0im, γ = 1.8059644711829272 + 0.0im.","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"EditURL = \"../../../examples/quick_start.jl\"","category":"page"},{"location":"examples/quick_start/#Quick-Start","page":"Quick Start","title":"Quick Start","text":"","category":"section"},{"location":"examples/quick_start/#Content","page":"Quick Start","title":"Content","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Import HierarchicalEOM.jl\nSystem and Bath\nHEOM Liouvillian superoperator\nTime Evolution\nStationary State\nReduced Density Operator\nExpectation Value\nMultiple Baths","category":"page"},{"location":"examples/quick_start/#Import-HierarchicalEOM.jl","page":"Quick Start","title":"Import HierarchicalEOM.jl","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Here are the functions in HierarchicalEOM.jl that we will use in this tutorial (Quick Start):","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"import HierarchicalEOM\nimport HierarchicalEOM: Boson_DrudeLorentz_Pade, M_Boson, HEOMsolve, getRho, BosonBath","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Note that you can also type using HierarchicalEOM to import everything you need in HierarchicalEOM.jl. To check the versions of dependencies of HierarchicalEOM.jl, run the following function","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"HierarchicalEOM.versioninfo()","category":"page"},{"location":"examples/quick_start/#System-and-Bath","page":"Quick Start","title":"System and Bath","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Let us consider a simple two-level system coupled to a Drude-Lorentz bosonic bath. The system Hamiltonian, H_sys, and the bath spectral density, J_D, are","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"H_sys=fracepsilon sigma_z2 + fracDelta sigma_x2 textand","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"J_D(omega)=frac2lambda WomegaW^2+omega^2","category":"page"},{"location":"examples/quick_start/#System-Hamiltonian-and-initial-state","page":"Quick Start","title":"System Hamiltonian and initial state","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"You must construct system hamiltonian, initial state, and coupling operators by QuantumToolbox framework. It provides many useful functions to create arbitrary quantum states and operators which can be combined in all the expected ways.","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"import QuantumToolbox: Qobj, sigmaz, sigmax, basis, ket2dm, expect, steadystate\n\n# The system Hamiltonian\nϵ = 0.5 # energy of 2-level system\nΔ = 1.0 # tunneling term\n\nHsys = 0.5 * ϵ * sigmaz() + 0.5 * Δ * sigmax()\n\n# System initial state\nρ0 = ket2dm(basis(2, 0));\n\n# Define the operators that measure the populations of the two system states:\nP00 = ket2dm(basis(2, 0))\nP11 = ket2dm(basis(2, 1))\n\n# Define the operator that measures the 0, 1 element of density matrix\n# (corresponding to coherence):\nP01 = basis(2, 0) * basis(2, 1)'","category":"page"},{"location":"examples/quick_start/#Bath-Properties","page":"Quick Start","title":"Bath Properties","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Now, we demonstrate how to describe the bath using the built-in implementation of J_D(omega) under Pade expansion by calling Boson_DrudeLorentz_Pade","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"λ = 0.1 # coupling strength\nW = 0.5 # band-width (cut-off frequency)\nkT = 0.5 # the product of the Boltzmann constant k and the absolute temperature T\n\nQ = sigmaz() # system-bath coupling operator\n\nN = 2 # Number of expansion terms to retain:\n\n# Padé expansion:\nbath = Boson_DrudeLorentz_Pade(Q, λ, W, kT, N)","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"For other different expansions of the different spectral density correlation functions, please refer to Bosonic Bath and Fermionic Bath.","category":"page"},{"location":"examples/quick_start/#HEOM-Liouvillian-superoperator","page":"Quick Start","title":"HEOM Liouvillian superoperator","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"For bosonic bath, we can construct the HEOM Liouvillian superoperator matrix by calling M_Boson","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"tier = 5 # maximum tier of hierarchy\nL = M_Boson(Hsys, tier, bath)","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"To learn more about the HEOM Liouvillian superoperator matrix (including other types: M_Fermion, M_Boson_Fermion), please refer to HEOMLS Matrices.","category":"page"},{"location":"examples/quick_start/#Time-Evolution","page":"Quick Start","title":"Time Evolution","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Next, we can calculate the time evolution for the entire auxiliary density operators (ADOs) by calling HEOMsolve","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"tlist = 0:0.2:50\nsol = HEOMsolve(L, ρ0, tlist; e_ops = [P00, P11, P01])","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"To learn more about HEOMsolve, please refer to Time Evolution.","category":"page"},{"location":"examples/quick_start/#Stationary-State","page":"Quick Start","title":"Stationary State","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"We can also solve the stationary state of the auxiliary density operators (ADOs) by calling steadystate.","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"ados_steady = steadystate(L)","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"To learn more about steadystate, please refer to Stationary State.","category":"page"},{"location":"examples/quick_start/#Reduced-Density-Operator","page":"Quick Start","title":"Reduced Density Operator","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"To obtain the reduced density operator, one can either access the first element of auxiliary density operator (ADOs) or call getRho:","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"# reduce density operator in the final time (`end`) of the evolution\nados_list = sol.ados\nρ = ados_list[end][1] # index `1` represents the reduced density operator\nρ = getRho(ados_list[end])\n\n# reduce density operator in stationary state\nρ = ados_steady[1]\nρ = getRho(ados_steady)","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"One of the great features of HierarchicalEOM.jl is that we allow users to not only considering the density operator of the reduced state but also easily take high-order terms into account without struggling in finding the indices (see Auxiliary Density Operators and Hierarchy Dictionary for more details).","category":"page"},{"location":"examples/quick_start/#Expectation-Value","page":"Quick Start","title":"Expectation Value","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"We can now compare the results obtained from HEOMsolve and steadystate:","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"# for time evolution\np00_e = real(sol.expect[1, :]) # P00 is the 1st element in e_ops\np01_e = real(sol.expect[3, :]); # P01 is the 3rd element in e_ops\n\n# for steady state\np00_s = expect(P00, ados_steady)\np01_s = expect(P01, ados_steady);\nnothing #hide","category":"page"},{"location":"examples/quick_start/#Plot-the-results","page":"Quick Start","title":"Plot the results","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"using Plots, LaTeXStrings\n\nplot(tlist, p00_e, label = L\"\\textrm{P}_{00}\", linecolor = :blue, linestyle = :solid, linewidth = 3, grid = false)\nplot!(tlist, p01_e, label = L\"\\textrm{P}_{01}\", linecolor = :red, linestyle = :solid, linewidth = 3)\nplot!(\n tlist,\n ones(length(tlist)) .* p00_s,\n label = L\"\\textrm{P}_{00} \\textrm{(Steady State)}\",\n linecolor = :blue,\n linestyle = :dash,\n linewidth = 3,\n)\nplot!(\n tlist,\n ones(length(tlist)) .* p01_s,\n label = L\"\\textrm{P}_{01} \\textrm{(Steady State)}\",\n linecolor = :red,\n linestyle = :dash,\n linewidth = 3,\n)\n\nxlabel!(\"time\")\nylabel!(\"Population\")","category":"page"},{"location":"examples/quick_start/#Multiple-Baths","page":"Quick Start","title":"Multiple Baths","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"HierarchicalEOM.jl also supports for system to interact with multiple baths.","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"All you need to do is to provide a list of baths instead of a single bath","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"# The system Hamiltonian\nHsys = Qobj([\n 0.25 1.50 2.50\n 1.50 0.75 3.50\n 2.50 3.50 1.25\n])\n\n# System initial state\nρ0 = ket2dm(basis(3, 0));\n\n# Projector for each system state:\nP00 = ket2dm(basis(3, 0))\nP11 = ket2dm(basis(3, 1))\nP22 = ket2dm(basis(3, 2));\n\n# Construct one bath for each system state:\n# note that `BosonBath[]` make the list created in type: Vector{BosonBath}\nbaths = BosonBath[]\nfor i in 0:2\n # system-bath coupling operator: |i> add HierarchicalEOM","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"More information about Julia's package manager can be found at Pkg.jl. ","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"note: Julia 1.10\nHierarchicalEOM.jl requires Julia 1.10 or higher (we dropped Julia 1.9 since ver.2.1.0)","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"To load the package and check the version information, use either HierarchicalEOM.versioninfo() or HierarchicalEOM.about(), namely","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"using HierarchicalEOM\nHierarchicalEOM.versioninfo()\nHierarchicalEOM.about()","category":"page"},{"location":"install/#[QuantumToolbox.jl](https://github.com/qutip/QuantumToolbox.jl)","page":"Installation","title":"QuantumToolbox.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"HierarchicalEOM.jl is built upon QuantumToolbox.jl, which is a cutting-edge Julia package designed for quantum physics simulations, closely emulating the popular Python QuTiP package. It provides many useful functions to create arbitrary quantum states and operators which can be combined in all the expected ways. It uniquely combines the simplicity and power of Julia with advanced features like GPU acceleration and distributed computing, making simulation of quantum systems more accessible and efficient.","category":"page"},{"location":"install/","page":"Installation","title":"Installation","text":"note: Note\nStart from HierarchicalEOM v2.0.0+, the inputs states and operators must be in the type of QuantumObject (defined in QuantumToolbox)","category":"page"},{"location":"install/#Other-Useful-Packages","page":"Installation","title":"Other Useful Packages","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"In order to get a better experience and take full advantage of HierarchicalEOM, we recommend to install the following external packages:","category":"page"},{"location":"install/#[DifferentialEquations.jl](https://diffeq.sciml.ai/stable/)","page":"Installation","title":"DifferentialEquations.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"DifferentialEquations is needed to provide the low-level ODE solvers especially for solving time evolution. For low dependency usage, users can use OrdinaryDiffEq.jl instead.","category":"page"},{"location":"install/#[LinearSolve.jl](http://linearsolve.sciml.ai/stable/)","page":"Installation","title":"LinearSolve.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"LinearSolve is a unified interface for the linear solving packages of Julia. It interfaces with other packages of the Julia ecosystem to make it easier to test alternative solver packages and pass small types to control algorithm swapping. It is needed to provide the solvers especially for solving stationary state and spectra for both bosonic and fermionic systems.","category":"page"},{"location":"install/#[JLD2.jl](https://juliaio.github.io/JLD2.jl/stable/)","page":"Installation","title":"JLD2.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"JLD2 saves and loads Julia data structures in a format comprising a subset of HDF5. Because the size of matrix in HierarchicalEOM is usually super large and leads to long time calculation, we support the functionality for saving and loading the HierarchicalEOM-type objects into files by JLD2 >= 0.4.23.","category":"page"},{"location":"install/#[PyPlot.jl](https://github.com/JuliaPy/PyPlot.jl)","page":"Installation","title":"PyPlot.jl","text":"","category":"section"},{"location":"install/","page":"Installation","title":"Installation","text":"PyPlot.jl provides a Julia interface to the Matplotlib plotting library from Python, and specifically to the matplotlib.pyplot module.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#doc-Fermionic-Bath","page":"Introduction","title":"Fermionic Bath","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/#Fermionic-Bath-Overview","page":"Introduction","title":"Overview","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"The FermionBath object describes the interaction between the system (s) and a exterior fermionic environment (f), which can be modeled by","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"H_sf=sum_k g_k c_k^dagger d_s + g_k^* c_k d_s^dagger","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"where g_k is the coupling strength and c_k (c_k^dagger) annihilates (creates) a fermion in the k-th state of the fermionic environment. Here, d_s refers to the system-interaction operator and should be an odd-parity operator destroying a fermion in the system.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"The effects of a fermionic environment (initially in thermal equilibrium and linearly coupled to the system) are completely encoded in the two-time correlation functions, namely","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"C^nu(t_1t_2)\n=frac12piint_-infty^infty domega \nJ(omega)leftfrac1-nu2+nu n(omega)\nrighte^nu iomega (t_1-t_2)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"where J(omega)=2piSigma_k g_k^2 delta(omega-omega_k) is the spectral density of the bath and n(omega)=exp(omega-mu)k_B T+1^-1 represents the Fermi-Dirac distribution (with chemical potential mu). Here, nu=+ and nu=- denotes the absorption and emission process of the fermionic system, respectively.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"C^nu(t_1 t_2)=sum_i eta_i^nu e^-gamma_i^nu (t_1-t_2)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#Construct-FermionBath","page":"Introduction","title":"Construct FermionBath","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can construct the FermionBath object with the system annihilation operator ds::QuantumObject and the four lists η_absorb::AbstractVector, γ_absorb::AbstractVector, η_emit::AbstractVector and γ_emit::AbstractVector which correspond to the exponential terms eta_i^+_i, gamma_i^+_i, eta_i^-_i and gamma_i^-_i, respectively. ","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"bath = FermionBath(ds, η_absorb, γ_absorb, η_emit, γ_emit)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"warning: Warning\nHere, the length of the four lists (η_absorb, γ_absorb, η_emit and γ_emit) should all be the same. Also, all the elements in γ_absorb should be complex conjugate of the corresponding elements in γ_emit.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"note: Note\nInstead of analytically solving the correlation function C^nu=pm(t_1 t_2) to obtain a sum of exponential terms, one can also use the built-in functions (for different spectral densities J(omega) and spectral decomposition methods, which have been analytically solved by the developers already). See the other categories of the Fermionic Bath in the sidebar for more details.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#Print-Fermionic-Bath","page":"Introduction","title":"Print Fermionic Bath","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can check the information of the FermionBath by the print function, for example:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"print(bath)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"FermionBath object with 4 exponential-expansion terms","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"Note that FermionBath always have even number of exponential terms (half for C^nu=+ and half for C^nu=-)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#Calculate-the-correlation-function","page":"Introduction","title":"Calculate the correlation function","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"To check whether the exponential terms in the FermionBath is correct or not, one can call C(bath::FermionBath, tlist::AbstractVector) to calculate the correlation function C(t), where t=t_1-t_2:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"cp_list, cm_list = C(bath, tlist)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"Here, cp_list and cm_list are the lists which contain the value of C^nu=+(t) and C^nu=-(t) correspond to the given time series tlist, respectively.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/#Exponent","page":"Introduction","title":"Exponent","text":"","category":"section"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"HierarchicalEOM.jl also supports users to access the specific exponential term with brackets []. This returns an Exponent object, which contains the corresponding value of eta_i^nu and gamma_i^nu:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"e = bath[2] # the 2nd-term\nprint(e)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"fA\", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 - 0.005im.","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"The different types of the (fermionic-bath) Exponent:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"\"fA\" : from absorption fermionic correlation function C^nu=+(t_1 t_2)\n\"fE\" : from emission fermionic correlation function C^nu=-(t_1 t_2)","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can even obtain the Exponent with iterative method:","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"for e in bath\n println(e)\nend","category":"page"},{"location":"bath_fermion/fermionic_bath_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"fA\", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 - 0.005im.\n\nBath Exponent with types = \"fA\", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 - 0.005im.\n\nBath Exponent with types = \"fE\", η = 6.25e-6 - 3.4090909090909113e-6im, γ = 0.05 + 0.005im.\n\nBath Exponent with types = \"fE\", η = 0.0 + 3.4090909090909113e-6im, γ = 0.1732050807568877 + 0.005im.","category":"page"},{"location":"heom_matrix/M_Boson/#doc-M_Boson","page":"HEOMLS for Bosonic Bath","title":"HEOMLS Matrix for Bosonic Baths","text":"","category":"section"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"The HEOM Liouvillian superoperator matrix struct M_Boson <: AbstractHEOMLSMatrix which describes the interactions between the system and multiple Bosonic baths.","category":"page"},{"location":"heom_matrix/M_Boson/#Construct-Matrix","page":"HEOMLS for Bosonic Bath","title":"Construct Matrix","text":"","category":"section"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"To construct the HEOM matrix in this case, one can call ","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"M_Boson(Hsys, tier, Bath, parity) with the following parameters:","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"args (Arguments)","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"Hsys : The time-independent system Hamiltonian\ntier::Int : the tier (cutoff level) for the bosonic bath\nBath::Vector{BosonBath} : objects for different bosonic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on. Defaults to EVEN.","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"kwargs (Keyword Arguments)","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"threshold::Real : The threshold of the importance value. Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"For example:","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"Hs::QuantumObject # system Hamiltonian\ntier = 3\nBath::BosonBath\n\n# create HEOMLS matrix in both EVEN and ODD parity\nM_even = M_Boson(Hs, tier, Bath) \nM_odd = M_Boson(Hs, tier, Bath, ODD) ","category":"page"},{"location":"heom_matrix/M_Boson/#Fields","page":"HEOMLS for Bosonic Bath","title":"Fields","text":"","category":"section"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"The fields of the structure M_Boson are as follows:","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"data : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the bosonic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on.\nbath::Vector{BosonBath} : the vector which stores all BosonBath objects\nhierarchy::HierarchyDict: the object which contains all dictionaries for boson-bath-ADOs hierarchy.","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"One can obtain the value of each fields as follows:","category":"page"},{"location":"heom_matrix/M_Boson/","page":"HEOMLS for Bosonic Bath","title":"HEOMLS for Bosonic Bath","text":"M::M_Boson\n\nM.data\nM.tier\nM.dims\nM.N\nM.sup_dim\nM.parity\nM.bath\nM.hierarchy","category":"page"},{"location":"Parity/#doc-Parity","page":"Parity Support","title":"Parity Support","text":"","category":"section"},{"location":"Parity/#Introduction","page":"Parity Support","title":"Introduction","text":"","category":"section"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"When the system Hamiltonian contains fermionic systems, the HEOMLS matrix hatmathcalM might be constructed into a different one depend on the parity of the input operator which hatmathcalM is acting on. This dependence intuitively originates from the properties of partial traces over composite fermionic spaces, where operators do not necessarily commute. ","category":"page"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"As an example, for an environment made out of a single fermion, the reduced matrix elements langleirho_textrms^pjrangle (in a basis labeled by langle i and jrangle) involve the perturbative sum of expressions of the form langle i (c tilderho_textrme tilderho_textrms^p c^dagger+tilderho_textrme tilderho_textrms^p)jrangle (in terms of environmental operators tilderho_textrme, system operators tilderho_textrms^p with parity p, and the environment-annihilation operator c). These quantities depend on the commutator between tilderho_textrms^p and c, which is trivial only for EVEN-parity (p=+). In the ODD-parity (p=-) case, the partial trace over the environment requires further anti-commutations, ultimately resulting in extra minus signs in the expression for the effective propagator describing the reduced dynamics. ","category":"page"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"It is important to explicitly note that, here, by parity we do not refer to the presence of an odd or even number of fermions in the system but, rather, to the number of fermionic (annihilation or creation) operators needed to represent rho_textrms^p. The reduced density matrix of the system should be an EVEN-parity operator and can be expressed as rho_textrms^p=+(t). However, there are some situations (for example, calculating density of states for fermionic systems) where hatmathcalM is acting on ODD-parity ADOs, e.g., rho_textrms^p=-(t)=d_textrmsrho_textrms^+(t) or rho_textrms^p=-(t)=d_textrms^daggerrho_textrms^+(t), where d_textrms is an annihilation operator acting on fermionic systems.","category":"page"},{"location":"Parity/#Parity-support-for-HEOMLS","page":"Parity Support","title":"Parity support for HEOMLS","text":"","category":"section"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"One can specify the parameter parity::AbstractParity in the function of constructing hatmathcalM which describes the dynamics of EVEN- or ODD-parity auxiliary density operators (ADOs). The default value of the parameter is parity=EVEN.","category":"page"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"Hs::QuantumObject # system Hamiltonian\nBbath::BosonBath # bosonic bath object\nFbath::FermionBath # fermionic bath object\nBtier::Int # bosonic truncation level \nFtier::Int # fermionic truncation level \n\n# create HEOMLS matrix in EVEN or ODD parity\nM_even = M_S(Hs, EVEN)\nM_odd = M_S(Hs, ODD)\n\nM_even = M_Boson(Hs, Btier, Bbath, EVEN) \nM_odd = M_Boson(Hs, Btier, Bbath, ODD) \n\nM_even = M_Fermion(Hs, Ftier, Fbath, EVEN) \nM_odd = M_Fermion(Hs, Ftier, Fbath, ODD)\n\nM_even = M_Boson_Fermion(Hs, Btier, Ftier, Bbath, Fbath, EVEN) \nM_odd = M_Boson_Fermion(Hs, Btier, Ftier, Bbath, Fbath, ODD) ","category":"page"},{"location":"Parity/#Base-functions-support","page":"Parity Support","title":"Base functions support","text":"","category":"section"},{"location":"Parity/#Multiplication-between-Parity-labels","page":"Parity Support","title":"Multiplication between Parity labels","text":"","category":"section"},{"location":"Parity/","page":"Parity Support","title":"Parity Support","text":"EVEN * EVEN # gives EVEN\nEVEN * ODD # gives ODD\nODD * EVEN # gives ODD\nODD * ODD # gives EVEN\n!EVEN # gives ODD\n!ODD # gives EVEN","category":"page"},{"location":"time_evolution/#doc-Time-Evolution","page":"Time Evolution","title":"Time Evolution","text":"","category":"section"},{"location":"time_evolution/#Introduction","page":"Time Evolution","title":"Introduction","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"HierarchicalEOM.jl implements various methods and solvers to simulate the open quantum system dynamics. The HEOM Liouvillian superoperator (HEOMLS) matrix hatmathcalM characterizes the dynamics of the reduce state and in the full extended space of all auxiliary density operators (ADOs) rho^(mnp)_textbfj vert textbfq(t), namely","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"beginequation\npartial_trho^(mnp)_textbfj vert textbfq(t)=hatmathcalMrho^(mnp)_textbfj vert textbfq(t)\nendequation","category":"page"},{"location":"time_evolution/#HEOMsolve-and-TimeEvolutionHEOMSol","page":"Time Evolution","title":"HEOMsolve and TimeEvolutionHEOMSol","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To solve the dynamics of the reduced state and also all the ADOs, you only need to call HEOMsolve. Different methods (see the contents below) are implemented with different input parameters of the function which makes it easy to switch between different methods. The output of the function HEOMsolve for each methods will always be in the type TimeEvolutionHEOMSol, which contains the results (including ADOs and expectation values at each time point) and some information from the solver. One can obtain the value of each fields in TimeEvolutionHEOMSol as follows:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"sol::TimeEvolutionHEOMSol\n\nsol.Btier # the tier (cutoff level) for bosonic hierarchy\nsol.Ftier # the tier (cutoff level) for fermionic hierarchy\nsol.times # The time list of the evolution.\nsol.ados # The list of result ADOs at each time point.\nsol.expect # The expectation values corresponding to each time point in `times`.\nsol.retcode # The return code from the solver.\nsol.alg # The algorithm which is used during the solving process.\nsol.abstol # The absolute tolerance which is used during the solving process.\nsol.reltol # The relative tolerance which is used during the solving process.","category":"page"},{"location":"time_evolution/#Expectation-Values","page":"Time Evolution","title":"Expectation Values","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"Given an observable A and the ADOs rho^(mnp)_textbfj vert textbfq(t), one can calculate the expectation value by","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"langle A(t) rangle = textrmTrleftA rho^(00p)_ vert (t)right","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"where, m=n=0 represents the reduced density operator, see ADOs for more details.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"One can directly calculate the expectation value by specifying the keyword argument e_ops (a list of observables), and the expectation values corresponding to each time point and observables will be stored in TimeEvolutionHEOMSol:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"A1::QuantumObject # observable 1\nA2::QuantumObject # observable 2\nsol = HEOMsolve(...; e_ops = [A1, A2], ...) # the input parameters depend on the different methods you choose.\nsol.expect[1,:] # the expectation values of observable 1 (`A1`) corresponding to each time point in `sol.times`\nsol.expect[2,:] # the expectation values of observable 2 (`A2`) corresponding to each time point in `sol.times`","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"An alternative way for calculating the expectation values is to use the function QuantumToolbox.expect together with the list of ADOs stored in TimeEvolutionHEOMSol:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"A::QuantumObject # observable\nsol = HEOMsolve(...) # the input parameters depend on the different methods you choose.\nados_list = sol.ados\n\nElist = expect(A, ados_list)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"Here, Elist contains the expectation values corresponding to the ados_list (i.e., the reduced density operator in each time step).","category":"page"},{"location":"time_evolution/#Common-and-optional-parameters","page":"Time Evolution","title":"Common and optional parameters","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"There are three common optional parameters for all the methods provided below:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file after the solving process. Default to Empty String: \"\".","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"If the filename is specified, the function will automatically save the ADOs to the file (with .jld2 behind the filename) once the solving process is finished. The saving method is based on the package JLD2.jl, which saves and loads Julia data structures in a format comprising a subset of HDF5.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"tlist = 0:0.5:5\nados_list = HEOMsolve(..., tlist, ...; filename=\"test\", ...)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"The solution of the ADOs for each time step in tlist is saved in the file named test.jld2 with a key: \"ados\".","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To retrieve the solution the list of ADOs from a previously saved file \"text.jld2\", just read the file with the methods provided by JLD2.jl and specify the key: \"ados\", namely","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"using HierarchicalEOM, JLD2 # remember to import these before retrieving the solution\n\nfilename = \"test.jld2\"\njldopen(filename, \"r\") do file\n ados_list = file[\"ados\"]\nend","category":"page"},{"location":"time_evolution/#Ordinary-Differential-Equation-(ODE)-Method","page":"Time Evolution","title":"Ordinary Differential Equation (ODE) Method","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"The first method is implemented by solving the ordinary differential equation (ODE). HierarchicalEOM.jl wraps some of the functions in DifferentialEquations.jl, which is a very rich numerical library for solving the differential equations and provides many ODE solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to DifferentialEquations solvers and also the documentation of DifferentialEquations.jl.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"compat: Extension for CUDA.jl\nHierarchicalEOM.jl provides an extension to support GPU (CUDA.jl) acceleration for solving the time evolution (only for ODE method with time-independent system Hamiltonian). See here for more details.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"See the docstring of this method: ","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"HEOMsolve(M::AbstractHEOMLSMatrix, ρ0::T_state, tlist::AbstractVector; e_ops::Union{Nothing,AbstractVector} = nothing, solver::OrdinaryDiffEqAlgorithm = DP5(), H_t::Union{Nothing,Function} = nothing, params::NamedTuple = NamedTuple(), verbose::Bool = true, filename::String = \"\", SOLVEROptions...,) where {T_state<:Union{QuantumObject,ADOs}}","category":"page"},{"location":"time_evolution/#HierarchicalEOM.HEOMsolve-Union{Tuple{T_state}, Tuple{AbstractHEOMLSMatrix, T_state, AbstractVector}} where T_state<:Union{ADOs, QuantumObject}","page":"Time Evolution","title":"HierarchicalEOM.HEOMsolve","text":"HEOMsolve(M, ρ0, tlist; e_ops, solver, H_t, params, verbose, filename, SOLVEROptions...)\n\nSolve the time evolution for auxiliary density operators based on ordinary differential equations.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntlist::AbstractVector : Denote the specific time points to save the solution at, during the solving process.\ne_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nsolver::OrdinaryDiffEqAlgorithm : solver in package DifferentialEquations.jl. Default to DP5().\nH_t::Union{Nothing,Function}=nothing: The time-dependent Hamiltonian or Liouvillian. It will be called by H_t(t, params).\nparams::NamedTuple=NamedTuple(): The parameters of the time evolution.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file \"filename.jld2\" after the solving process.\nSOLVEROptions : extra options for solver\n\nNotes\n\nThe ADOs will be saved depend on the keyword argument saveat in kwargs.\nIf e_ops is specified, the default value of saveat=[tlist[end]] (only save the final ADOs), otherwise, saveat=tlist (saving the ADOs corresponding to tlist). You can also specify e_ops and saveat separately.\nThe default tolerances in kwargs are given as reltol=1e-6 and abstol=1e-8.\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\nsol::TimeEvolutionHEOMSol : The solution of the hierarchical EOM. See also TimeEvolutionHEOMSol\n\n\n\n\n\n","category":"method"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"# the time-independent HEOMLS matrix\nM::AbstractHEOMLSMatrix \n\n# the initial state can be either the system density operator or ADOs\nρ0::QuantumObject\nρ0::ADOs\n\n# specific time points to save the solution during the solving process. \ntlist = 0:0.5:2 # [0.0, 0.5, 1.0, 1.5, 2.0]\n\nsol = HEOMsolve(M, ρ0, tlist)","category":"page"},{"location":"time_evolution/#Time-Dependent-Problems","page":"Time Evolution","title":"Time Dependent Problems","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"In general, the time-dependent system Hamiltonian can be separated into the time-independent and time-dependent parts, namely","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"H_s (t) = H_0 + H_1(t)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"We again wrap some of the functions in DifferentialEquations.jl to solve the time-dependent problems here.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To deal with the time-dependent system Hamiltonian problem in HierarchicalEOM.jl, we first construct the HEOMLS matrices hatmathcalM with time-independent Hamiltonian H_0:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"M = M_S(H0, ...)\nM = M_Boson(H0, ...)\nM = M_Fermion(H0, ...)\nM = M_BosonFermion(H0, ...)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To solve the dynamics characterized by hatmathcalM together with the time-dependent part of system Hamiltonian H_1(t), you can specify keyword arguments H_t and params while calling HEOMsolve. Here, the definition of user-defined function H_1 must be in the form H_1(t, params::NamedTuple) and returns the time-dependent part of system Hamiltonian or Liouvillian (in QuantumObject type) at any given time point t. The parameters params should be a NamedTuple which contains all the extra parameters you need for the function H_1. For example:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"# in this case, p should be passed in as a NamedTuple: (p0 = p0, p1 = p1, p2 = p2)\nfunction H_1(t, p::NamedTuple) \n σx = [0 1; 1 0] # Pauli-X matrix\n return (sin(p.p0 * t) + sin(p.p1 * t) + sin(p.p2 * t)) * σx\nend","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"The p will be passed to your function H_1 directly from the keyword argument in HEOMsolve called params:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"M::AbstractHEOMLSMatrix\nρ0::QuantumObject\ntlist = 0:0.1:10\np = (p0 = 0.1, p1 = 1, p2 = 10)\n\nsol = HEOMsolve(M, ρ0, tlist; H_t = H_1, params = p)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"warning: Warning\nIf you don't need any extra param in your case, you still need to put a redundant one in the definition of H_1, for example:","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"function H_1(t, p::NamedTuple)\n σx = [0 1; 1 0] # Pauli-X matrix\n return sin(0.1 * t) * σx\nend\n\nM::AbstractHEOMLSMatrix\nρ0::QuantumObject\ntlist = 0:0.1:10\n\nsol = HEOMsolve(M, ρ0, tlist; H_t = H_1)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"note: Note\nThe default value for params in HEOMsolve is an empty NamedTuple().","category":"page"},{"location":"time_evolution/#Propagator-Method","page":"Time Evolution","title":"Propagator Method","text":"","category":"section"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"The second method is implemented by directly construct the propagator of a given HEOMLS matrix hatmathcalM. Because hatmathcalM is time-independent, the equation above can be solved analytically as","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"rho^(mnp)_textbfj vert textbfq(t)=hatmathcalG(t)rho^(mnp)_textbfj vert textbfq(0)","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"where hatmathcalG(t)equiv exp(hatmathcalMt) is the propagator for all ADOs corresponding to hatmathcalM.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"To construct the propagator, we wrap the function in the package fastExpm.jl, which is optimized for the exponentiation of either large-dense or sparse matrices.","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"See the docstring of this method: ","category":"page"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"HEOMsolve(M::AbstractHEOMLSMatrix ,ρ0::T_state, Δt::Real, steps::Int; e_ops::Union{Nothing,AbstractVector} = nothing, threshold = 1.0e-6, nonzero_tol = 1.0e-14, verbose::Bool = true, filename::String = \"\",) where {T_state<:Union{QuantumObject,ADOs}}","category":"page"},{"location":"time_evolution/#HierarchicalEOM.HEOMsolve-Union{Tuple{T_state}, Tuple{AbstractHEOMLSMatrix, T_state, Real, Int64}} where T_state<:Union{ADOs, QuantumObject}","page":"Time Evolution","title":"HierarchicalEOM.HEOMsolve","text":"HEOMsolve(M, ρ0, Δt, steps; e_ops, threshold, nonzero_tol, verbose, filename)\n\nSolve the time evolution for auxiliary density operators based on propagator (generated by FastExpm.jl).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\nΔt::Real : A specific time step (time interval).\nsteps::Int : The number of time steps\ne_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nthreshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.\nnonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file \"filename.jld2\" after the solving process.\n\nNotes\n\nThe ADOs will be saved depend on the keyword argument e_ops.\nIf e_ops is specified, the solution will only save the final ADOs, otherwise, it will save all the ADOs corresponding to tlist = 0:Δt:(Δt * steps).\nFor more details of the propagator, please refer to FastExpm.jl\n\nReturns\n\nsol::TimeEvolutionHEOMSol : The solution of the hierarchical EOM. See also TimeEvolutionHEOMSol\n\n\n\n\n\n","category":"method"},{"location":"time_evolution/","page":"Time Evolution","title":"Time Evolution","text":"# the time-independent HEOMLS matrix\nM::AbstractHEOMLSMatrix \n\n# the initial state can be either the system density operator or ADOs\nρ0::QuantumObject\nρ0::ADOs\n\n# A specific time interval (time step)\nΔt = 0.5\n\n# The number of time steps for the propagator to apply\nsteps = 4\n\n# equivalent to tlist = 0 : Δt : (Δt * steps)\nsol = HEOMsolve(M, ρ0, Δt, steps) ","category":"page"},{"location":"heom_matrix/M_Fermion/#doc-M_Fermion","page":"HEOMLS for Fermionic Bath","title":"HEOMLS Matrix for Fermionic Baths","text":"","category":"section"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"The HEOM Liouvillian superoperator matrix struct M_Fermion <: AbstractHEOMLSMatrix which describes the interactions between the system and multiple Fermionic baths.","category":"page"},{"location":"heom_matrix/M_Fermion/#Construct-Matrix","page":"HEOMLS for Fermionic Bath","title":"Construct Matrix","text":"","category":"section"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"To construct the HEOM matrix in this case, one can call ","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"M_Fermion(Hsys, tier, Bath, parity) with the following parameters:","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"args (Arguments)","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"Hsys : The time-independent system Hamiltonian\ntier::Int : the tier (cutoff level) for the fermionic bath\nBath::Vector{FermionBath} : objects for different fermionic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on. Defaults to EVEN.","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"kwargs (Keyword Arguments)","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"threshold::Real : The threshold of the importance value. Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"For example:","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"Hs::QuantumObject # system Hamiltonian\ntier = 3\nBath::FermionBath\n\n# create HEOMLS matrix in both EVEN and ODD parity\nM_even = M_Fermion(Hs, tier, Bath) \nM_odd = M_Fermion(Hs, tier, Bath, ODD) ","category":"page"},{"location":"heom_matrix/M_Fermion/#Fields","page":"HEOMLS for Fermionic Bath","title":"Fields","text":"","category":"section"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"The fields of the structure M_Fermion are as follows:","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"data : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the fermionic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on.\nbath::Vector{FermionBath} : the vector which stores all FermionBath objects\nhierarchy::HierarchyDict: the object which contains all dictionaries for fermion-bath-ADOs hierarchy.","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"One can obtain the value of each fields as follows:","category":"page"},{"location":"heom_matrix/M_Fermion/","page":"HEOMLS for Fermionic Bath","title":"HEOMLS for Fermionic Bath","text":"M::M_Fermion\n\nM.data\nM.tier\nM.dims\nM.N\nM.sup_dim\nM.parity\nM.bath\nM.hierarchy","category":"page"},{"location":"libraryAPI/#Library-API","page":"Library API","title":"Library API","text":"","category":"section"},{"location":"libraryAPI/#Contents","page":"Library API","title":"Contents","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"Pages = [\"libraryAPI.md\"]","category":"page"},{"location":"libraryAPI/#Index","page":"Library API","title":"Index","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"Pages = [\"libraryAPI.md\"]","category":"page"},{"location":"libraryAPI/#lib-Bath","page":"Library API","title":"Bath Module","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"C(bath::BosonBath, tlist::AbstractVector)\nC(bath::FermionBath, tlist::AbstractVector)\nExponent\nBosonBath\nBosonBath(op::QuantumObject, η::Vector{Ti}, γ::Vector{Tj}, δ::Number=0.0; combine::Bool=true) where {Ti, Tj <: Number}\nBosonBath(op::QuantumObject, η_real::Vector{Ti}, γ_real::Vector{Tj}, η_imag::Vector{Tk}, γ_imag::Vector{Tl}, δ::Tm=0.0; combine::Bool=true) where {Ti, Tj, Tk, Tl, Tm <: Number}\nbosonReal\nbosonReal(op::QuantumObject, η_real::Vector{Ti}, γ_real::Vector{Tj}) where {Ti, Tj <: Number}\nbosonImag\nbosonImag(op::QuantumObject, η_real::Vector{Ti}, γ_real::Vector{Tj}) where {Ti, Tj <: Number}\nbosonRealImag\nbosonRealImag(op::QuantumObject, η_real::Vector{Ti}, η_imag::Vector{Tj}, γ::Vector{Tk}) where {Ti, Tj, Tk <: Number}\nBosonBathRWA\nbosonAbsorb\nbosonAbsorb(op::QuantumObject, η_absorb::Vector{Ti}, γ_absorb::Vector{Tj}, η_emit::Vector{Tk}) where {Ti, Tj, Tk <: Number}\nbosonEmit\nbosonEmit(op::QuantumObject, η_emit::Vector{Ti}, γ_emit::Vector{Tj}, η_absorb::Vector{Tk}) where {Ti, Tj, Tk <: Number}\nFermionBath\nFermionBath(op::QuantumObject, η_absorb::Vector{Ti}, γ_absorb::Vector{Tj}, η_emit::Vector{Tk}, γ_emit::Vector{Tl}, δ::Tm=0.0) where {Ti, Tj, Tk, Tl, Tm <: Number}\nfermionAbsorb\nfermionAbsorb(op::QuantumObject, η_absorb::Vector{Ti}, γ_absorb::Vector{Tj}, η_emit::Vector{Tk}) where {Ti, Tj, Tk <: Number}\nfermionEmit\nfermionEmit(op::QuantumObject, η_emit::Vector{Ti}, γ_emit::Vector{Tj}, η_absorb::Vector{Tk}) where {Ti, Tj, Tk <: Number}","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.C-Tuple{BosonBath, AbstractVector}","page":"Library API","title":"HierarchicalEOM.C","text":"C(bath, tlist)\n\nCalculate the correlation function C(t) for a given bosonic bath and time list.\n\nif the input bosonic bath did not apply rotating wave approximation (RWA)\n\nC(t)=sum_u=textrmRtextrmI(delta_u textrmR + idelta_u textrmI)C^u(t)\n\nwhere\n\nC^u(t)=sum_i eta_i^u e^-gamma_i^u t\n\nif the input bosonic bath applies rotating wave approximation (RWA)\n\nC^nu=pm(t)=sum_i eta_i^nu e^-gamma_i^nu t\n\nParameters\n\nbath::BosonBath : The bath object which describes a certain bosonic bath.\ntlist::AbstractVector: The specific time.\n\nReturns (without RWA)\n\nclist::Vector{ComplexF64} : a list of the value of correlation function according to the given time list.\n\nReturns (with RWA)\n\ncplist::Vector{ComplexF64} : a list of the value of the absorption (nu=+) correlation function according to the given time list.\ncmlist::Vector{ComplexF64} : a list of the value of the emission (nu=-) correlation function according to the given time list.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.C-Tuple{FermionBath, AbstractVector}","page":"Library API","title":"HierarchicalEOM.C","text":"C(bath, tlist)\n\nCalculate the correlation function C^nu=+(t) and C^nu=-(t) for a given fermionic bath and time list. Here, nu=+ represents the absorption process and nu=- represents the emission process.\n\nC^nu=pm(t)=sum_i eta_i^nu e^-gamma_i^nu t\n\nParameters\n\nbath::FermionBath : The bath object which describes a certain fermionic bath.\ntlist::AbstractVector: The specific time.\n\nReturns\n\ncplist::Vector{ComplexF64} : a list of the value of the absorption (nu=+) correlation function according to the given time list.\ncmlist::Vector{ComplexF64} : a list of the value of the emission (nu=-) correlation function according to the given time list.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.Exponent","page":"Library API","title":"HierarchicalEOM.Exponent","text":"struct Exponent\n\nAn object which describes a single exponential-expansion term (naively, an excitation mode) within the decomposition of the bath correlation functions.\n\nThe expansion of a bath correlation function can be expressed as : C(t) = sum_i eta_i exp(-gamma_i t).\n\nFields\n\nop::QuantumObject : The system coupling operator according to system-bath interaction.\nη::Number : the coefficient eta_i in bath correlation function.\nγ::Number : the coefficient gamma_i in bath correlation function.\ntypes::String : The type-tag of the exponent.\n\nThe different types of the Exponent:\n\n\"bR\" : from real part of bosonic correlation function C^u=textrmR(t)\n\"bI\" : from imaginary part of bosonic correlation function C^u=textrmI(t)\n\"bRI\" : from combined (real and imaginary part) bosonic bath correlation function C(t)\n\"bA\" : from absorption bosonic correlation function C^nu=+(t)\n\"bE\" : from emission bosonic correlation function C^nu=-(t)\n\"fA\" : from absorption fermionic correlation function C^nu=+(t)\n\"fE\" : from emission fermionic correlation function C^nu=-(t)\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.BosonBath","page":"Library API","title":"HierarchicalEOM.BosonBath","text":"struct BosonBath <: AbstractBath\n\nAn object which describes the interaction between system and bosonic bath\n\nFields\n\nbath : the different boson-bath-type objects which describes the interaction between system and bosonic bath\nop : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nNterm : the number of exponential-expansion term of correlation functions\nδ : The approximation discrepancy which is used for adding the terminator to HEOM matrix (see function: addTerminator)\n\nMethods\n\nOne can obtain the k-th exponent (exponential-expansion term) from bath::BosonBath by calling : bath[k]. HierarchicalEOM.jl also supports the following calls (methods) :\n\nbath[1:k]; # returns a vector which contains the exponents from the `1`-st to the `k`-th term.\nbath[1:end]; # returns a vector which contains all the exponential-expansion terms\nbath[:]; # returns a vector which contains all the exponential-expansion terms\nfrom b in bath\n # do something\nend\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.BosonBath-Union{Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Number}} where {Ti, Tj<:Number}","page":"Library API","title":"HierarchicalEOM.BosonBath","text":"BosonBath(op, η, γ, δ=0.0; combine=true)\n\nGenerate BosonBath object for the case where real part and imaginary part of the correlation function are combined.\n\nbeginaligned\nC(tau)\n=frac12piint_0^infty domega J(omega)leftn(omega)e^iomega tau+(n(omega)+1)e^-iomega tauright\n=sum_i eta_i exp(-gamma_i tau)\nendaligned\n\nwhere J(omega) is the spectral density of the bath and n(omega) represents the Bose-Einstein distribution.\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη::Vector{Ti<:Number} : the coefficients eta_i in bath correlation function C(tau).\nγ::Vector{Tj<:Number} : the coefficients gamma_i in bath correlation function C(tau).\nδ::Number : The approximation discrepancy (Default to 0.0) which is used for adding the terminator to HEOM matrix (see function: addTerminator)\ncombine::Bool : Whether to combine the exponential-expansion terms with the same frequency. Defaults to true.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.BosonBath-Union{Tuple{Tm}, Tuple{Tl}, Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}, Vector{Tl}}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}, Vector{Tl}, Tm}} where {Ti, Tj, Tk, Tl, Tm<:Number}","page":"Library API","title":"HierarchicalEOM.BosonBath","text":"BosonBath(op, η_real, γ_real, η_imag, γ_imag, δ=0.0; combine=true)\n\nGenerate BosonBath object for the case where the correlation function splits into real part and imaginary part.\n\nbeginaligned\nC(tau)\n=frac12piint_0^infty domega J(omega)leftn(omega)e^iomega tau+(n(omega)+1)e^-iomega tauright\n=sum_i eta_i exp(-gamma_i tau)\nendaligned\n\nwhere J(omega) is the spectral density of the bath and n(omega) represents the Bose-Einstein distribution.\n\nWhen gamma_i neq gamma_i^*, a closed form for the HEOM can be obtained by further decomposing C(tau) into its real (R) and imaginary (I) parts as\n\nC(tau)=sum_u=textrmRtextrmI(delta_u textrmR + idelta_u textrmI)C^u(tau)\n\nwhere delta is the Kronecker delta function and C^u(tau)=sum_i eta_i^u exp(-gamma_i^u tau)\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη_real::Vector{Ti<:Number} : the coefficients eta_i in real part of bath correlation function C^u=textrmR.\nγ_real::Vector{Tj<:Number} : the coefficients gamma_i in real part of bath correlation function C^u=textrmR.\nη_imag::Vector{Tk<:Number} : the coefficients eta_i in imaginary part of bath correlation function C^u=textrmI.\nγ_imag::Vector{Tl<:Number} : the coefficients gamma_i in imaginary part of bath correlation function C^u=textrmI.\nδ::Number : The approximation discrepancy (Default to 0.0) which is used for adding the terminator to HEOM matrix (see function: addTerminator)\ncombine::Bool : Whether to combine the exponential-expansion terms with the same frequency. Defaults to true.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.bosonReal","page":"Library API","title":"HierarchicalEOM.bosonReal","text":"struct bosonReal <: AbstractBosonBath\n\nA bosonic bath for the real part of bath correlation function C^u=textrmR\n\nFields\n\nComm : the super-operator (commutator) for the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i in real part of bath correlation function C^u=textrmR.\nγ : the coefficients gamma_i in real part of bath correlation function C^u=textrmR.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonReal-Union{Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}}} where {Ti, Tj<:Number}","page":"Library API","title":"HierarchicalEOM.bosonReal","text":"bosonReal(op, η_real, γ_real)\n\nGenerate bosonic bath for the real part of bath correlation function C^u=textrmR\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη_real::Vector{Ti<:Number} : the coefficients eta_i in real part of bath correlation function C^u=textrmR.\nγ_real::Vector{Tj<:Number} : the coefficients gamma_i in real part of bath correlation function C^u=textrmR.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.bosonImag","page":"Library API","title":"HierarchicalEOM.bosonImag","text":"struct bosonImag <: AbstractBosonBath\n\nA bosonic bath for the imaginary part of bath correlation function C^u=textrmI\n\nFields\n\nComm : the super-operator (commutator) for the coupling operator.\nanComm : the super-operator (anti-commutator) for the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i in imaginary part of bath correlation function C^u=textrmI.\nγ : the coefficients gamma_i in imaginary part of bath correlation function C^u=textrmI.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonImag-Union{Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}}} where {Ti, Tj<:Number}","page":"Library API","title":"HierarchicalEOM.bosonImag","text":"bosonImag(op, η_imag, γ_imag)\n\nGenerate bosonic bath for the imaginary part of correlation function C^u=textrmI\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη_imag::Vector{Ti<:Number} : the coefficients eta_i in imaginary part of bath correlation functions C^u=textrmI.\nγ_imag::Vector{Tj<:Number} : the coefficients gamma_i in imaginary part of bath correlation functions C^u=textrmI.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.bosonRealImag","page":"Library API","title":"HierarchicalEOM.bosonRealImag","text":"struct bosonRealImag <: AbstractBosonBath\n\nA bosonic bath which the real part and imaginary part of the bath correlation function are combined \n\nFields\n\nComm : the super-operator (commutator) for the coupling operator.\nanComm : the super-operator (anti-commutator) for the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη_real : the real part of coefficients eta_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nη_imag : the imaginary part of coefficients eta_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nγ : the coefficients gamma_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonRealImag-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.bosonRealImag","text":"bosonRealImag(op, η_real, η_imag, γ)\n\nGenerate bosonic bath which the real part and imaginary part of the bath correlation function are combined\n\nParameters\n\nop::QuantumObject : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nη_real::Vector{Ti<:Number} : the real part of coefficients eta_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nη_imag::Vector{Tj<:Number} : the imaginary part of coefficients eta_i in bath correlation function sum_i eta_i exp(-gamma_i t).\nγ::Vector{Tk<:Number} : the coefficients gamma_i in bath correlation function sum_i eta_i exp(-gamma_i t).\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.BosonBathRWA","page":"Library API","title":"HierarchicalEOM.BosonBathRWA","text":"BosonBathRWA(op, η_absorb, γ_absorb, η_emit, γ_emit, δ=0.0)\n\nA function for generating BosonBath object where the interaction between system and bosonic bath applies the rotating wave approximation (RWA).\n\nbeginaligned\nC^nu=+(tau)\n=frac12piint_0^infty domega J(omega) n(omega) e^iomega tau\n=sum_i eta_i^nu=+ exp(-gamma_i^nu=+ tau)\nC^nu=-(tau)\n=frac12piint_0^infty domega J(omega) (1+n(omega)) e^-iomega tau\n=sum_i eta_i^nu=- exp(-gamma_i^nu=- tau)\nendaligned\n\nwhere nu=+ (nu=-) represents absorption (emission) process, J(omega) is the spectral density of the bath and n(omega) is the Bose-Einstein distribution.\n\nParameters\n\nop::QuantumObject : The system annihilation operator according to the system-bosonic-bath interaction.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+(tau).\nγ_absorb::Vector{Tj<:Number} : the coefficients gamma_i of absorption bath correlation function C^nu=+(tau).\nη_emit::Vector{Tk<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-(tau).\nγ_emit::Vector{Tl<:Number} : the coefficients gamma_i of emission bath correlation function C^nu=-(tau).\nδ::Number : The approximation discrepancy (Defaults to 0.0) which is used for adding the terminator to HEOMLS matrix (see function: addTerminator)\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.bosonAbsorb","page":"Library API","title":"HierarchicalEOM.bosonAbsorb","text":"struct bosonAbsorb <: AbstractBosonBath\n\nAn bath object which describes the absorption process of the bosonic system by a correlation function C^nu=+\n\nFields\n\nspre : the super-operator (left side operator multiplication) for the coupling operator.\nspost : the super-operator (right side operator multiplication) for the coupling operator.\nCommD : the super-operator (commutator) for the adjoint of the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i of absorption bath correlation function C^nu=+.\nγ : the coefficients gamma_i of absorption bath correlation function C^nu=+.\nη_emit : the coefficients eta_i of emission bath correlation function C^nu=-.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonAbsorb-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.bosonAbsorb","text":"bosonAbsorb(op, η_absorb, γ_absorb, η_emit)\n\nGenerate bosonic bath which describes the absorption process of the bosonic system by a correlation function C^nu=+\n\nParameters\n\nop::QuantumObject : The system creation operator according to the system-fermionic-bath interaction.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+.\nγ_absorb::Vector{Tj<:Number} : the coefficients gamma_i of absorption bath correlation function C^nu=+.\nη_emit::Vector{Tk<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.bosonEmit","page":"Library API","title":"HierarchicalEOM.bosonEmit","text":"struct bosonEmit <: AbstractBosonBath\n\nAn bath object which describes the emission process of the bosonic system by a correlation function C^nu=-\n\nFields\n\nspre : the super-operator (left side operator multiplication) for the coupling operator.\nspost : the super-operator (right side operator multiplication) for the coupling operator.\nCommD : the super-operator (commutator) for the adjoint of the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i of emission bath correlation function C^nu=-.\nγ : the coefficients gamma_i of emission bath correlation function C^nu=-.\nη_absorb : the coefficients eta_i of absorption bath correlation function C^nu=+.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.bosonEmit-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.bosonEmit","text":"bosonEmit(op, η_emit, γ_emit, η_absorb)\n\nGenerate bosonic bath which describes the emission process of the bosonic system by a correlation function C^nu=-\n\nParameters\n\nop::QuantumObject : The system annihilation operator according to the system-bosonic-bath interaction.\nη_emit::Vector{Ti<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-.\nγ_emit::Vector{Ti<:Number} : the coefficients gamma_i of emission bath correlation function C^nu=-.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.FermionBath","page":"Library API","title":"HierarchicalEOM.FermionBath","text":"struct FermionBath <: AbstractBath\n\nAn object which describes the interaction between system and fermionic bath\n\nFields\n\nbath : the different fermion-bath-type objects which describes the interaction\nop : The system \"emission\" operator according to the system-fermionic-bath interaction.\nNterm : the number of exponential-expansion term of correlation functions\nδ : The approximation discrepancy which is used for adding the terminator to HEOM matrix (see function: addTerminator)\n\nMethods\n\nOne can obtain the k-th exponent (exponential-expansion term) from bath::FermionBath by calling : bath[k]. HierarchicalEOM.jl also supports the following calls (methods) :\n\nbath[1:k]; # returns a vector which contains the exponents from the `1`-st to the `k`-th term.\nbath[1:end]; # returns a vector which contains all the exponential-expansion terms\nbath[:]; # returns a vector which contains all the exponential-expansion terms\nfrom b in bath\n # do something\nend\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.FermionBath-Union{Tuple{Tm}, Tuple{Tl}, Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}, Vector{Tl}}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}, Vector{Tl}, Tm}} where {Ti, Tj, Tk, Tl, Tm<:Number}","page":"Library API","title":"HierarchicalEOM.FermionBath","text":"FermionBath(op, η_absorb, γ_absorb, η_emit, γ_emit, δ=0.0)\n\nGenerate FermionBath object\n\nbeginaligned\nC^nu=+(tau)\n=frac12piint_-infty^infty domega J(omega) n(omega) e^iomega tau\n=sum_i eta_i^nu=+ exp(-gamma_i^nu=+ tau)\nC^nu=-(tau)\n=frac12piint_-infty^infty domega J(omega) (1-n(omega)) e^-iomega tau\n=sum_i eta_i^nu=- exp(-gamma_i^nu=- tau)\nendaligned\n\nwhere nu=+ (nu=-) represents absorption (emission) process, J(omega) is the spectral density of the bath and n(omega) is the Fermi-Dirac distribution.\n\nParameters\n\nop::QuantumObject : The system annihilation operator according to the system-fermionic-bath interaction.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+(tau).\nγ_absorb::Vector{Tj<:Number} : the coefficients gamma_i of absorption bath correlation function C^nu=+(tau).\nη_emit::Vector{Tk<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-(tau).\nγ_emit::Vector{Tl<:Number} : the coefficients gamma_i of emission bath correlation function C^nu=-(tau).\nδ::Number : The approximation discrepancy (Defaults to 0.0) which is used for adding the terminator to HEOMLS matrix (see function: addTerminator)\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.fermionAbsorb","page":"Library API","title":"HierarchicalEOM.fermionAbsorb","text":"struct fermionAbsorb <: AbstractFermionBath\n\nAn bath object which describes the absorption process of the fermionic system by a correlation function C^nu=+\n\nFields\n\nspre : the super-operator (left side operator multiplication) for the coupling operator.\nspost : the super-operator (right side operator multiplication) for the coupling operator.\nspreD : the super-operator (left side operator multiplication) for the adjoint of the coupling operator.\nspostD : the super-operator (right side operator multiplication) for the adjoint of the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i of absorption bath correlation function C^nu=+.\nγ : the coefficients gamma_i of absorption bath correlation function C^nu=+.\nη_emit : the coefficients eta_i of emission bath correlation function C^nu=-.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.fermionAbsorb-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.fermionAbsorb","text":"fermionAbsorb(op, η_absorb, γ_absorb, η_emit)\n\nGenerate fermionic bath which describes the absorption process of the fermionic system by a correlation function C^nu=+\n\nParameters\n\nop::QuantumObject : The system creation operator according to the system-fermionic-bath interaction.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+.\nγ_absorb::Vector{Tj<:Number} : the coefficients gamma_i of absorption bath correlation function C^nu=+.\nη_emit::Vector{Tk<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.fermionEmit","page":"Library API","title":"HierarchicalEOM.fermionEmit","text":"struct fermionEmit <: AbstractFermionBath\n\nAn bath object which describes the emission process of the fermionic system by a correlation function C^nu=-\n\nFields\n\nspre : the super-operator (left side operator multiplication) for the coupling operator.\nspost : the super-operator (right side operator multiplication) for the coupling operator.\nspreD : the super-operator (left side operator multiplication) for the adjoint of the coupling operator.\nspostD : the super-operator (right side operator multiplication) for the adjoint of the coupling operator.\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nη : the coefficients eta_i of emission bath correlation function C^nu=-.\nγ : the coefficients gamma_i of emission bath correlation function C^nu=-.\nη_absorb : the coefficients eta_i of absorption bath correlation function C^nu=+.\nNterm : the number of exponential-expansion term of correlation function\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.fermionEmit-Union{Tuple{Tk}, Tuple{Tj}, Tuple{Ti}, Tuple{QuantumObject, Vector{Ti}, Vector{Tj}, Vector{Tk}}} where {Ti, Tj, Tk<:Number}","page":"Library API","title":"HierarchicalEOM.fermionEmit","text":"fermionEmit(op, η_emit, γ_emit, η_absorb)\n\nGenerate fermionic bath which describes the emission process of the fermionic system by a correlation function C^nu=-\n\nParameters\n\nop::QuantumObject : The system annihilation operator according to the system-fermionic-bath interaction.\nη_emit::Vector{Ti<:Number} : the coefficients eta_i of emission bath correlation function C^nu=-.\nγ_emit::Vector{Ti<:Number} : the coefficients gamma_i of emission bath correlation function C^nu=-.\nη_absorb::Vector{Ti<:Number} : the coefficients eta_i of absorption bath correlation function C^nu=+.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Bath-Correlation-Functions","page":"Library API","title":"Bath Correlation Functions","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"Boson_DrudeLorentz_Matsubara\nBoson_DrudeLorentz_Pade\nFermion_Lorentz_Matsubara\nFermion_Lorentz_Pade","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.Boson_DrudeLorentz_Matsubara","page":"Library API","title":"HierarchicalEOM.Boson_DrudeLorentz_Matsubara","text":"Boson_DrudeLorentz_Matsubara(op, λ, W, kT, N)\n\nConstructing Drude-Lorentz bosonic bath with Matsubara expansion\n\nParameters\n\nop : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nλ::Real: The coupling strength between the system and the bath.\nW::Real: The reorganization energy (band-width) of the bath.\nkT::Real: The product of the Boltzmann constant k and the absolute temperature T of the bath.\nN::Int: (N+1)-terms of exponential terms are used to approximate the bath correlation function.\n\nReturns\n\nbath::BosonBath : a bosonic bath object with describes the interaction between system and bosonic bath\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.Boson_DrudeLorentz_Pade","page":"Library API","title":"HierarchicalEOM.Boson_DrudeLorentz_Pade","text":"Boson_DrudeLorentz_Pade(op, λ, W, kT, N)\n\nConstructing Drude-Lorentz bosonic bath with Padé expansion\n\nA Padé approximant is a sum-over-poles expansion (see here for more details).\n\nThe application of the Padé method to spectrum decompoisitions is described in Ref. [1].\n\n[1] J. Chem. Phys. 134, 244106 (2011)\n\nParameters\n\nop : The system coupling operator, must be Hermitian and, for fermionic systems, even-parity to be compatible with charge conservation.\nλ::Real: The coupling strength between the system and the bath.\nW::Real: The reorganization energy (band-width) of the bath.\nkT::Real: The product of the Boltzmann constant k and the absolute temperature T of the bath.\nN::Int: (N+1)-terms of exponential terms are used to approximate the bath correlation function.\n\nReturns\n\nbath::BosonBath : a bosonic bath object with describes the interaction between system and bosonic bath\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.Fermion_Lorentz_Matsubara","page":"Library API","title":"HierarchicalEOM.Fermion_Lorentz_Matsubara","text":"Fermion_Lorentz_Matsubara(op, λ, μ, W, kT, N)\n\nConstructing Lorentzian fermionic bath with Matsubara expansion\n\nParameters\n\nop : The system annihilation operator according to the system-fermionic-bath interaction.\nλ::Real: The coupling strength between the system and the bath.\nμ::Real: The chemical potential of the bath.\nW::Real: The reorganization energy (band-width) of the bath.\nkT::Real: The product of the Boltzmann constant k and the absolute temperature T of the bath.\nN::Int: (N+1)-terms of exponential terms are used to approximate each correlation functions (C^nu=pm).\n\nReturns\n\nbath::FermionBath : a fermionic bath object with describes the interaction between system and fermionic bath\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.Fermion_Lorentz_Pade","page":"Library API","title":"HierarchicalEOM.Fermion_Lorentz_Pade","text":"Fermion_Lorentz_Pade(op, λ, μ, W, kT, N)\n\nConstructing Lorentzian fermionic bath with Padé expansion\n\nA Padé approximant is a sum-over-poles expansion (see here for more details).\n\nThe application of the Padé method to spectrum decompoisitions is described in Ref. [1].\n\n[1] J. Chem. Phys. 134, 244106 (2011)\n\nParameters\n\nop : The system annihilation operator according to the system-fermionic-bath interaction.\nλ::Real: The coupling strength between the system and the bath.\nμ::Real: The chemical potential of the bath.\nW::Real: The reorganization energy (band-width) of the bath.\nkT::Real: The product of the Boltzmann constant k and the absolute temperature T of the bath.\nN::Int: (N+1)-terms of exponential terms are used to approximate each correlation functions (C^nu=pm).\n\nReturns\n\nbath::FermionBath : a fermionic bath object with describes the interaction between system and fermionic bath\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#Parity","page":"Library API","title":"Parity","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"EvenParity\nOddParity\nEVEN\nODD","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.EvenParity","page":"Library API","title":"HierarchicalEOM.EvenParity","text":"struct EvenParity <: AbstractParity\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.OddParity","page":"Library API","title":"HierarchicalEOM.OddParity","text":"struct OddParity <: AbstractParity\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.EVEN","page":"Library API","title":"HierarchicalEOM.EVEN","text":"const EVEN = EvenParity()\n\nLabel of even-parity\n\n\n\n\n\n","category":"constant"},{"location":"libraryAPI/#HierarchicalEOM.ODD","page":"Library API","title":"HierarchicalEOM.ODD","text":"const ODD = OddParity()\n\nLabel of odd-parity\n\n\n\n\n\n","category":"constant"},{"location":"libraryAPI/#HEOM-Liouvillian-superoperator-matrices","page":"Library API","title":"HEOM Liouvillian superoperator matrices","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"HEOMSuperOp\nHEOMSuperOp(op, opParity::AbstractParity, refHEOMLS::AbstractHEOMLSMatrix, mul_basis::AbstractString=\"L\")\nHEOMSuperOp(op, opParity::AbstractParity, refADOs::ADOs, mul_basis::AbstractString=\"L\")\nHEOMSuperOp(op, opParity::AbstractParity, dims::SVector, N::Int, mul_basis::AbstractString)\nM_S\nM_S(Hsys::QuantumObject, parity::AbstractParity=EVEN; verbose::Bool=true)\nM_Boson\nM_Boson(Hsys::QuantumObject, tier::Int, Bath::Vector{BosonBath}, parity::AbstractParity=EVEN; threshold::Real=0.0, verbose::Bool=true)\nM_Fermion\nM_Fermion(Hsys::QuantumObject, tier::Int, Bath::Vector{FermionBath}, parity::AbstractParity=EVEN; threshold::Real=0.0, verbose::Bool=true)\nM_Boson_Fermion\nM_Boson_Fermion(Hsys::QuantumObject, tier_b::Int, tier_f::Int, Bath_b::Vector{BosonBath}, Bath_f::Vector{FermionBath}, parity::AbstractParity=EVEN; threshold::Real=0.0, verbose::Bool=true)\nsize(M::HEOMSuperOp)\nsize(M::HEOMSuperOp, dim::Int)\nsize(M::AbstractHEOMLSMatrix)\nsize(M::AbstractHEOMLSMatrix, dim::Int)\neltype(M::HEOMSuperOp)\neltype(M::AbstractHEOMLSMatrix)\nPropagator\naddBosonDissipator\naddFermionDissipator\naddTerminator","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.HEOMSuperOp","page":"Library API","title":"HierarchicalEOM.HEOMSuperOp","text":"struct HEOMSuperOp\n\nGeneral HEOM superoperator matrix. \n\nFields\n\ndata<:AbstractSparseMatrix : the HEOM superoperator matrix\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of auxiliary density operators\nparity: the parity label (EVEN or ODD).\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.HEOMSuperOp-2","page":"Library API","title":"HierarchicalEOM.HEOMSuperOp","text":"HEOMSuperOp(op, opParity, refHEOMLS, mul_basis=\"L\"; Id_cache=I(refHEOMLS.N))\n\nConstruct the HEOM superoperator matrix corresponding to the given system operator which acts on all ADOs. \n\nDuring the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.\n\nParameters\n\nop : The system operator which will act on all ADOs.\nopParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.\nrefHEOMLS::AbstractHEOMLSMatrix : copy the system dims and number of ADOs (N) from this reference HEOMLS matrix\nmul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs. Defaults to \"L\".\n\nif mul_basis is specified as\n\n\"L\" : the matrix op has same dimension with the system and acts on left-hand side.\n\"R\" : the matrix op has same dimension with the system and acts on right-hand side.\n\"LR\" : the matrix op is a superoperator of the system.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.HEOMSuperOp-3","page":"Library API","title":"HierarchicalEOM.HEOMSuperOp","text":"HEOMSuperOp(op, opParity, refADOs, mul_basis=\"L\"; Id_cache=I(refADOs.N))\n\nConstruct the HEOMLS matrix corresponding to the given system operator which multiplies on the \"L\"eft-hand (\"R\"ight-hand) side basis of all ADOs. \n\nDuring the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.\n\nParameters\n\nop : The system operator which will act on all ADOs.\nopParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.\nrefADOs::ADOs : copy the system dims and number of ADOs (N) from this reference ADOs \nmul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs. Defaults to \"L\".\n\nif mul_basis is specified as\n\n\"L\" : the matrix op has same dimension with the system and acts on left-hand side.\n\"R\" : the matrix op has same dimension with the system and acts on right-hand side.\n\"LR\" : the matrix op is a superoperator of the system.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.HEOMSuperOp-Tuple{Any, AbstractParity, SVector, Int64, AbstractString}","page":"Library API","title":"HierarchicalEOM.HEOMSuperOp","text":"HEOMSuperOp(op, opParity, dims, N, mul_basis; Id_cache=I(N))\n\nConstruct the HEOM superoperator matrix corresponding to the given system operator which acts on all ADOs. \n\nDuring the multiplication on all the ADOs, the parity of the output ADOs might change depend on the parity of this HEOM superoperator.\n\nParameters\n\nop : The system operator which will act on all ADOs.\nopParity::AbstractParity : the parity label of the given operator (op), should be EVEN or ODD.\ndims::SVector : the dimension list of the coupling operator (should be equal to the system dims).\nN::Int : the number of ADOs.\nmul_basis::AbstractString : this specifies the basis for op to multiply on all ADOs.\n\nif mul_basis is specified as\n\n\"L\" : the matrix op has same dimension with the system and acts on left-hand side.\n\"R\" : the matrix op has same dimension with the system and acts on right-hand side.\n\"LR\" : the matrix op is a SuperOperator of the system.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.M_S","page":"Library API","title":"HierarchicalEOM.M_S","text":"struct M_S <: AbstractHEOMLSMatrix\n\nHEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0. This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely\n\nMcdot=-i leftH_sys cdot right_-\n\nwhere cdot cdot_- stands for commutator.\n\nFields\n\ndata<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the hierarchy, which equals to 0 in this case\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs, which equals to 1 (only the reduced density operator) in this case\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_S-2","page":"Library API","title":"HierarchicalEOM.M_S","text":"M_S(Hsys, parity=EVEN; verbose=true)\n\nGenerate HEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0. This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely\n\nMcdot=-i leftH_sys cdot right_-\n\nwhere cdot cdot_- stands for commutator.\n\nParameters\n\nHsys : The time-independent system Hamiltonian\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nverbose::Bool : To display verbose output during the process or not. Defaults to true.\n\nNote that the parity only need to be set as ODD when the system contains fermionic systems and you need to calculate the spectrum (density of states) of it.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Boson","page":"Library API","title":"HierarchicalEOM.M_Boson","text":"struct M_Boson <: AbstractHEOMLSMatrix\n\nHEOM Liouvillian superoperator matrix for bosonic bath\n\nFields\n\ndata<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the bosonic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nbath::Vector{BosonBath} : the vector which stores all BosonBath objects\nhierarchy::HierarchyDict: the object which contains all dictionaries for boson-bath-ADOs hierarchy.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Boson-2","page":"Library API","title":"HierarchicalEOM.M_Boson","text":"M_Boson(Hsys, tier, Bath, parity=EVEN; threshold=0.0, verbose=true)\n\nGenerate the boson-type HEOM Liouvillian superoperator matrix\n\nParameters\n\nHsys : The time-independent system Hamiltonian\ntier::Int : the tier (cutoff level) for the bosonic bath\nBath::Vector{BosonBath} : objects for different bosonic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nthreshold::Real : The threshold of the importance value (see Ref. [1]). Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\n\nNote that the parity only need to be set as ODD when the system contains fermionic systems and you need to calculate the spectrum (density of states) of it.\n\n[1] Phys. Rev. B 88, 235426 (2013)\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Fermion","page":"Library API","title":"HierarchicalEOM.M_Fermion","text":"struct M_Fermion <: AbstractHEOMLSMatrix\n\nHEOM Liouvillian superoperator matrix for fermionic bath\n\nFields\n\ndata<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the fermionic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nbath::Vector{FermionBath} : the vector which stores all FermionBath objects\nhierarchy::HierarchyDict: the object which contains all dictionaries for fermion-bath-ADOs hierarchy.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Fermion-2","page":"Library API","title":"HierarchicalEOM.M_Fermion","text":"M_Fermion(Hsys, tier, Bath, parity=EVEN; threshold=0.0, verbose=true)\n\nGenerate the fermion-type HEOM Liouvillian superoperator matrix\n\nParameters\n\nHsys : The time-independent system Hamiltonian\ntier::Int : the tier (cutoff level) for the fermionic bath\nBath::Vector{FermionBath} : objects for different fermionic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nthreshold::Real : The threshold of the importance value (see Ref. [1]). Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\n\n[1] Phys. Rev. B 88, 235426 (2013)\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Boson_Fermion","page":"Library API","title":"HierarchicalEOM.M_Boson_Fermion","text":"struct M_Boson_Fermion <: AbstractHEOMLSMatrix\n\nHEOM Liouvillian superoperator matrix for mixtured (bosonic and fermionic) bath \n\nFields\n\ndata<:AbstractSparseMatrix : the sparse matrix of HEOM Liouvillian superoperator\nBtier : the tier (cutoff level) for bosonic hierarchy\nFtier : the tier (cutoff level) for fermionic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nBbath::Vector{BosonBath} : the vector which stores all BosonBath objects\nFbath::Vector{FermionBath} : the vector which stores all FermionBath objects\nhierarchy::MixHierarchyDict: the object which contains all dictionaries for mixed-bath-ADOs hierarchy.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.M_Boson_Fermion-2","page":"Library API","title":"HierarchicalEOM.M_Boson_Fermion","text":"M_Boson_Fermion(Hsys, Btier, Ftier, Bbath, Fbath, parity=EVEN; threshold=0.0, verbose=true)\n\nGenerate the boson-fermion-type HEOM Liouvillian superoperator matrix\n\nParameters\n\nHsys : The time-independent system Hamiltonian\nBtier::Int : the tier (cutoff level) for the bosonic bath\nFtier::Int : the tier (cutoff level) for the fermionic bath\nBbath::Vector{BosonBath} : objects for different bosonic baths\nFbath::Vector{FermionBath} : objects for different fermionic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on (usually EVEN, only set as ODD for calculating spectrum of fermionic system).\nthreshold::Real : The threshold of the importance value (see Ref. [1, 2]). Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\n\nNote that the parity only need to be set as ODD when the system contains fermion systems and you need to calculate the spectrum of it.\n\n[1] Phys. Rev. B 88, 235426 (2013) [2] Phys. Rev. B 103, 235413 (2021)\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#Base.size-Tuple{HEOMSuperOp}","page":"Library API","title":"Base.size","text":"size(M::HEOMSuperOp)\n\nReturns the size of the HEOM superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.size-Tuple{HEOMSuperOp, Int64}","page":"Library API","title":"Base.size","text":"size(M::HEOMSuperOp, dim::Int)\n\nReturns the specified dimension of the HEOM superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.size-Tuple{AbstractHEOMLSMatrix}","page":"Library API","title":"Base.size","text":"size(M::AbstractHEOMLSMatrix)\n\nReturns the size of the HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.size-Tuple{AbstractHEOMLSMatrix, Int64}","page":"Library API","title":"Base.size","text":"size(M::AbstractHEOMLSMatrix, dim::Int)\n\nReturns the specified dimension of the HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.eltype-Tuple{HEOMSuperOp}","page":"Library API","title":"Base.eltype","text":"eltype(M::HEOMSuperOp)\n\nReturns the elements' type of the HEOM superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.eltype-Tuple{AbstractHEOMLSMatrix}","page":"Library API","title":"Base.eltype","text":"eltype(M::AbstractHEOMLSMatrix)\n\nReturns the elements' type of the HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.Propagator","page":"Library API","title":"HierarchicalEOM.Propagator","text":"Propagator(M, Δt; threshold, nonzero_tol)\n\nUse FastExpm.jl to calculate the propagator matrix from a given HEOM Liouvillian superoperator matrix M with a specific time step Delta t. That is, exp(M * Delta t).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nΔt::Real : A specific time step (time interval).\nthreshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.\nnonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.\n\nFor more details, please refer to FastExpm.jl\n\nReturns\n\n::SparseMatrixCSC{ComplexF64, Int64} : the propagator matrix\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.addBosonDissipator","page":"Library API","title":"HierarchicalEOM.addBosonDissipator","text":"addBosonDissipator(M, jumpOP)\n\nAdding bosonic dissipator to a given HEOMLS matrix which describes how the system dissipatively interacts with an extra bosonic environment. The dissipator is defined as follows\n\nDJ(cdot) = J(cdot) J^dagger - frac12left(J^dagger J (cdot) + (cdot) J^dagger J right)\n\nwhere Jequiv sqrtgammaV is the jump operator, V describes the dissipative part (operator) of the dynamics, gamma represents a non-negative damping rate and cdot cdot_+ stands for anti-commutator.\n\nNote that if V is acting on fermionic systems, it should be even-parity to be compatible with charge conservation.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\njumpOP::AbstractVector : The list of collapse (jump) operators J_i_i to add. Defaults to empty vector [].\n\nReturn\n\nM_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.addFermionDissipator","page":"Library API","title":"HierarchicalEOM.addFermionDissipator","text":"addFermionDissipator(M, jumpOP)\n\nAdding fermionic dissipator to a given HEOMLS matrix which describes how the system dissipatively interacts with an extra fermionic environment. The dissipator with EVEN parity is defined as follows\n\nD_textrmevenJ(cdot) = J(cdot) J^dagger - frac12left(J^dagger J (cdot) + (cdot) J^dagger J right)\n\nwhere Jequiv sqrtgammaV is the jump operator, V describes the dissipative part (operator) of the dynamics, gamma represents a non-negative damping rate and cdot cdot_+ stands for anti-commutator.\n\nSimilarly, the dissipator with ODD parity is defined as follows\n\nD_textrmoddJ(cdot) = - J(cdot) J^dagger - frac12left(J^dagger J (cdot) + (cdot) J^dagger J right)\n\nNote that the parity of the dissipator will be determined by the parity of the given HEOMLS matrix M.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\njumpOP::AbstractVector : The list of collapse (jump) operators to add. Defaults to empty vector [].\n\nReturn\n\nM_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.addTerminator","page":"Library API","title":"HierarchicalEOM.addTerminator","text":"addTerminator(M, Bath)\n\nAdding terminator to a given HEOMLS matrix.\n\nThe terminator is a Liouvillian term representing the contribution to the system-bath dynamics of all exponential-expansion terms beyond Bath.Nterm\n\nThe difference between the true correlation function and the sum of the Bath.Nterm-exponential terms is approximately 2 * δ * dirac(t). Here, δ is the approximation discrepancy and dirac(t) denotes the Dirac-delta function.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nBath::Union{BosonBath, FermionBath} : The bath object which contains the approximation discrepancy δ\n\nReturn\n\nM_new::AbstractHEOMLSMatrix : the new HEOM Liouvillian superoperator matrix\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#Auxiliary-Density-Operators-(ADOs)","page":"Library API","title":"Auxiliary Density Operators (ADOs)","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"ADOs\nADOs(V::AbstractVector, N::Int)\nlength(A::ADOs)\neltype(A::ADOs)\ngetRho\ngetADO\nQuantumToolbox.expect","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.ADOs","page":"Library API","title":"HierarchicalEOM.ADOs","text":"struct ADOs\n\nThe Auxiliary Density Operators for HEOM model.\n\nFields\n\ndata : the vectorized auxiliary density operators\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of auxiliary density operators\nparity: the parity label (EVEN or ODD).\n\nMethods\n\nOne can obtain the density matrix for specific index (idx) by calling : ados[idx]. HierarchicalEOM.jl also supports the following calls (methods) :\n\nlength(ados); # returns the total number of `ADOs`\nados[1:idx]; # returns a vector which contains the `ADO` (in matrix form) from index `1` to `idx`\nados[1:end]; # returns a vector which contains all the `ADO` (in matrix form)\nados[:]; # returns a vector which contains all the `ADO` (in matrix form)\nfor rho in ados # iteration\n # do something\nend\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.ADOs-Tuple{AbstractVector, Int64}","page":"Library API","title":"HierarchicalEOM.ADOs","text":"ADOs(V, N, parity)\n\nGenerate the object of auxiliary density operators for HEOM model.\n\nParameters\n\nV::AbstractVector : the vectorized auxiliary density operators\nN::Int : the number of auxiliary density operators.\nparity::AbstractParity : the parity label (EVEN or ODD). Default to EVEN.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.length-Tuple{ADOs}","page":"Library API","title":"Base.length","text":"length(A::ADOs)\n\nReturns the total number of the Auxiliary Density Operators (ADOs)\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#Base.eltype-Tuple{ADOs}","page":"Library API","title":"Base.eltype","text":"eltype(A::ADOs)\n\nReturns the elements' type of the Auxiliary Density Operators (ADOs)\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.getRho","page":"Library API","title":"HierarchicalEOM.getRho","text":"getRho(ados)\n\nReturn the density matrix of the reduced state (system) from a given auxiliary density operators\n\nParameters\n\nados::ADOs : the auxiliary density operators for HEOM model\n\nReturns\n\nρ::QuantumObject : The density matrix of the reduced state\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.getADO","page":"Library API","title":"HierarchicalEOM.getADO","text":"getADO(ados, idx)\n\nReturn the auxiliary density operator with a specific index from auxiliary density operators\n\nThis function equals to calling : ados[idx].\n\nParameters\n\nados::ADOs : the auxiliary density operators for HEOM model\nidx::Int : the index of the auxiliary density operator\n\nReturns\n\nρ_idx::QuantumObject : The auxiliary density operator\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#QuantumToolbox.expect","page":"Library API","title":"QuantumToolbox.expect","text":"expect(op, ados; take_real=true)\n\nReturn the expectation value of the operator op for the reduced density operator in the given ados, namely\n\ntextrmTrleft O rho right\n\nwhere O is the operator and rho is the reduced density operator in the given ADOs.\n\nParameters\n\nop : the operator O to take the expectation value\nados::ADOs : the auxiliary density operators for HEOM model\ntake_real::Bool : whether to automatically take the real part of the trace or not. Default to true\n\nReturns\n\nexp_val : The expectation value\n\n\n\n\n\nexpect(op, ados_list; take_real=true)\n\nReturn a list of expectation values of the operator op corresponds to the reduced density operators in the given ados_list, namely\n\ntextrmTrleft O rho right\n\nwhere O is the operator and rho is the reduced density operator in one of the ADOs from ados_list.\n\nParameters\n\nop : the operator O to take the expectation value\nados_list::Vector{ADOs} : the list of auxiliary density operators for HEOM model\ntake_real::Bool : whether to automatically take the real part of the trace or not. Default to true\n\nReturns\n\nexp_val : The expectation value\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#lib-Hierarchy-Dictionary","page":"Library API","title":"Hierarchy Dictionary","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"Nvec\nHierarchyDict\nMixHierarchyDict\ngetIndexEnsemble","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.Nvec","page":"Library API","title":"HierarchicalEOM.Nvec","text":"struct Nvec\n\nAn object which describes the repetition number of each multi-index ensembles in auxiliary density operators.\n\nThe n_vector (vecn) denotes a set of integers:\n\n n_11 n_alpha k \n\nassociated with the k-th exponential-expansion term in the alpha-th bath. If n_alpha k = 3 means that the multi-index ensemble alpha k appears three times in the multi-index vector of ADOs (see the notations in our paper).\n\nThe hierarchy level (L) for an n_vector is given by L=sum_alpha k n_alpha k\n\nFields\n\ndata : the n_vector\nlevel : The level L for the n_vector\n\nMethods\n\nOne can obtain the repetition number for specific index (idx) by calling : n_vector[idx]. To obtain the corresponding tuple (alpha k) for a given index idx, see bathPtr in HierarchyDict for more details.\n\nHierarchicalEOM.jl also supports the following calls (methods) :\n\nlength(n_vector); # returns the length of `Nvec`\nn_vector[1:idx]; # returns a vector which contains the excitation number of `n_vector` from index `1` to `idx`\nn_vector[1:end]; # returns a vector which contains all the excitation number of `n_vector`\nn_vector[:]; # returns a vector which contains all the excitation number of `n_vector`\nfrom n in n_vector # iteration\n # do something\nend\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.HierarchyDict","page":"Library API","title":"HierarchicalEOM.HierarchyDict","text":"struct HierarchyDict <: AbstractHierarchyDict\n\nAn object which contains all dictionaries for pure (bosonic or fermionic) bath-ADOs hierarchy.\n\nFields\n\nidx2nvec : Return the Nvec from a given index of ADO\nnvec2idx : Return the index of ADO from a given Nvec\nlvl2idx : Return the list of ADO-indices from a given hierarchy level\nbathPtr : Records the tuple (alpha k) for each position in Nvec, where alpha and k represents the k-th exponential-expansion term of the alpha-th bath.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.MixHierarchyDict","page":"Library API","title":"HierarchicalEOM.MixHierarchyDict","text":"struct MixHierarchyDict <: AbstractHierarchyDict\n\nAn object which contains all dictionaries for mixed (bosonic and fermionic) bath-ADOs hierarchy.\n\nFields\n\nidx2nvec : Return the tuple (Nvec_b, Nvec_f) from a given index of ADO, where b represents boson and f represents fermion\nnvec2idx : Return the index from a given tuple (Nvec_b, Nvec_f), where b represents boson and f represents fermion\nBlvl2idx : Return the list of ADO-indices from a given bosonic-hierarchy level\nFlvl2idx : Return the list of ADO-indices from a given fermionic-hierarchy level\nbosonPtr : Records the tuple (alpha k) for each position in Nvec_b, where alpha and k represents the k-th exponential-expansion term of the alpha-th bosonic bath.\nfermionPtr : Records the tuple (alpha k) for each position in Nvec_f, where alpha and k represents the k-th exponential-expansion term of the alpha-th fermionic bath.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#HierarchicalEOM.getIndexEnsemble","page":"Library API","title":"HierarchicalEOM.getIndexEnsemble","text":"getIndexEnsemble(nvec, bathPtr)\n\nSearch for all the multi-index ensemble (alpha k) where alpha and k represents the k-th exponential-expansion term in the alpha-th bath.\n\nParameters\n\nnvec::Nvec : An object which records the repetition number of each multi-index ensembles in ADOs.\nbathPtr::Vector{Tuple{Int, Int}}: This can be obtained from HierarchyDict.bathPtr, MixHierarchyDict.bosonPtr, or MixHierarchyDict.fermionPtr.\n\nReturns\n\nVector{Tuple{Int, Int, Int}}: a vector (list) of the tuples (alpha k n).\n\nExample\n\nHere is an example to use Bath, Exponent, HierarchyDict, and getIndexEnsemble together:\n\nL::M_Fermion; # suppose this is a fermion type of HEOM Liouvillian superoperator matrix you create\nHDict = L.hierarchy; # the hierarchy dictionary\nados = SteadyState(L); # the stationary state (ADOs) for L \n\n# Let's consider all the ADOs for first level\nidx_list = HDict.lvl2idx[1];\n\nfor idx in idx_list\n ρ1 = ados[idx] # one of the 1st-level ADO\n nvec = HDict.idx2nvec[idx] # the nvec corresponding to ρ1\n \n for (α, k, n) in getIndexEnsemble(nvec, HDict.bathPtr)\n α # index of the bath\n k # the index of the exponential-expansion term in α-th bath\n n # the repetition number of the ensemble {α, k} in ADOs\n exponent = L.bath[α][k] # the k-th exponential-expansion term in α-th bath\n\n # do some calculations you want\n end\nend\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#lib-Time-Evolution","page":"Library API","title":"Time Evolution","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"There are two function definitions of HEOMsolve, which depend on different methods to solve the time evolution:","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"HEOMsolve\nTimeEvolutionHEOMSol","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.HEOMsolve","page":"Library API","title":"HierarchicalEOM.HEOMsolve","text":"HEOMsolve(M, ρ0, Δt, steps; e_ops, threshold, nonzero_tol, verbose, filename)\n\nSolve the time evolution for auxiliary density operators based on propagator (generated by FastExpm.jl).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\nΔt::Real : A specific time step (time interval).\nsteps::Int : The number of time steps\ne_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nthreshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.\nnonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file \"filename.jld2\" after the solving process.\n\nNotes\n\nThe ADOs will be saved depend on the keyword argument e_ops.\nIf e_ops is specified, the solution will only save the final ADOs, otherwise, it will save all the ADOs corresponding to tlist = 0:Δt:(Δt * steps).\nFor more details of the propagator, please refer to FastExpm.jl\n\nReturns\n\nsol::TimeEvolutionHEOMSol : The solution of the hierarchical EOM. See also TimeEvolutionHEOMSol\n\n\n\n\n\nHEOMsolve(M, ρ0, tlist; e_ops, solver, H_t, params, verbose, filename, SOLVEROptions...)\n\nSolve the time evolution for auxiliary density operators based on ordinary differential equations.\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntlist::AbstractVector : Denote the specific time points to save the solution at, during the solving process.\ne_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.\nsolver::OrdinaryDiffEqAlgorithm : solver in package DifferentialEquations.jl. Default to DP5().\nH_t::Union{Nothing,Function}=nothing: The time-dependent Hamiltonian or Liouvillian. It will be called by H_t(t, params).\nparams::NamedTuple=NamedTuple(): The parameters of the time evolution.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file \"filename.jld2\" after the solving process.\nSOLVEROptions : extra options for solver\n\nNotes\n\nThe ADOs will be saved depend on the keyword argument saveat in kwargs.\nIf e_ops is specified, the default value of saveat=[tlist[end]] (only save the final ADOs), otherwise, saveat=tlist (saving the ADOs corresponding to tlist). You can also specify e_ops and saveat separately.\nThe default tolerances in kwargs are given as reltol=1e-6 and abstol=1e-8.\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\nsol::TimeEvolutionHEOMSol : The solution of the hierarchical EOM. See also TimeEvolutionHEOMSol\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.TimeEvolutionHEOMSol","page":"Library API","title":"HierarchicalEOM.TimeEvolutionHEOMSol","text":"struct TimeEvolutionHEOMSol\n\nA structure storing the results and some information from solving time evolution of hierarchical equations of motion (HEOM).\n\nFields (Attributes)\n\nBtier : The tier (cutoff level) for bosonic hierarchy\nFtier : The tier (cutoff level) for fermionic hierarchy\ntimes::AbstractVector: The time list of the evolution.\nados::Vector{ADOs}: The list of result ADOs at each time point.\nexpect::Matrix: The expectation values corresponding to each time point in times.\nretcode: The return code from the solver.\nalg: The algorithm which is used during the solving process.\nabstol::Real: The absolute tolerance which is used during the solving process.\nreltol::Real: The relative tolerance which is used during the solving process.\n\n\n\n\n\n","category":"type"},{"location":"libraryAPI/#Stationary-State","page":"Library API","title":"Stationary State","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"There are two function definitions of steadystate, which depend on different methods to solve the stationary state:","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"steadystate","category":"page"},{"location":"libraryAPI/#QuantumToolbox.steadystate","page":"Library API","title":"QuantumToolbox.steadystate","text":"steadystate(M::AbstractHEOMLSMatrix; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on LinearSolve.jl (i.e., solving x where A times x = b).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\nsteadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntspan::Number : the time limit to find stationary state. Default to Inf\nsolver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver\n\nNotes\n\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#Spectrum","page":"Library API","title":"Spectrum","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"PowerSpectrum\nDensityOfStates","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.PowerSpectrum","page":"Library API","title":"HierarchicalEOM.PowerSpectrum","text":"PowerSpectrum(M, ρ, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)\n\nCalculate power spectrum for the system in frequency domain where P_op will be automatically set as the adjoint of Q_op.\n\nThis function is equivalent to: PowerSpectrum(M, ρ, Q_op', Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)\n\n\n\n\n\nPowerSpectrum(M, ρ, P_op, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)\n\nCalculate power spectrum for the system in frequency domain.\n\npi S(omega)=textrmReleftint_0^infty dt langle P(t) Q(0)rangle e^-iomega tright\n\nTo calculate spectrum when input operator Q_op has EVEN-parity:\n\nremember to set the parameters: \n\nM::AbstractHEOMLSMatrix: should be EVEN parity\n\nTo calculate spectrum when input operator Q_op has ODD-parity:\n\nremember to set the parameters: \n\nM::AbstractHEOMLSMatrix: should be ODD parity\n\nParameters\n\nM::AbstractHEOMLSMatrix : the HEOMLS matrix.\nρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.\nP_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) P acting on the system.\nQ_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) Q acting on the system.\nωlist::AbstractVector : the specific frequency points to solve.\nreverse::Bool : If true, calculate langle P(-t)Q(0) rangle = langle P(0)Q(t) rangle = langle P(t)Q(0) rangle^* instead of langle P(t) Q(0) rangle. Default to false.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\nspec::AbstractVector : the spectrum list corresponds to the specified ωlist\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#HierarchicalEOM.DensityOfStates","page":"Library API","title":"HierarchicalEOM.DensityOfStates","text":"DensityOfStates(M, ρ, d_op, ωlist; solver, verbose, filename, SOLVEROptions...)\n\nCalculate density of states for the fermionic system in frequency domain.\n\n pi A(omega)=textrmReleftint_0^infty dt leftlangle d(t) d^dagger(0)rangle^* + langle d^dagger(t) d(0)rangle right e^-iomega tright\n\nParameters\n\nM::AbstractHEOMLSMatrix : the HEOMLS matrix which acts on ODD-parity operators.\nρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.\nd_op::QuantumObject : The annihilation operator (d as shown above) acting on the fermionic system.\nωlist::AbstractVector : the specific frequency points to solve.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\ndos::AbstractVector : the list of density of states corresponds to the specified ωlist\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/#Misc.","page":"Library API","title":"Misc.","text":"","category":"section"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"HierarchicalEOM.versioninfo()\nHierarchicalEOM.about()","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.versioninfo-Tuple{}","page":"Library API","title":"HierarchicalEOM.versioninfo","text":"HierarchicalEOM.versioninfo(io::IO=stdout)\n\nCommand line output of information on HierarchicalEOM, dependencies, and system information.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/#HierarchicalEOM.about-Tuple{}","page":"Library API","title":"HierarchicalEOM.about","text":"QuantumToolbox.about(io::IO=stdout)\n\nCommand line output of information on HierarchicalEOM, dependencies, and system information, same as HierarchicalEOM.versioninfo.\n\n\n\n\n\n","category":"method"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"The outputs will be something like the following:","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"using HierarchicalEOM\nHierarchicalEOM.versioninfo()","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"HierarchicalEOM.print_logo(io::IO=stdout)","category":"page"},{"location":"libraryAPI/#HierarchicalEOM.print_logo","page":"Library API","title":"HierarchicalEOM.print_logo","text":"HierarchicalEOM.print_logo(io::IO=stdout)\n\nPrint the Logo of HierarchicalEOM package\n\n\n\n\n\n","category":"function"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"The output will be something like the following:","category":"page"},{"location":"libraryAPI/","page":"Library API","title":"Library API","text":"using HierarchicalEOM\nHierarchicalEOM.print_logo()","category":"page"},{"location":"heom_matrix/HEOMLS_intro/#doc-HEOMLS-Matrix","page":"Introduction","title":"Hierarchical Equations of Motion Liouvillian Superoperator (HEOMLS) Matrix","text":"","category":"section"},{"location":"heom_matrix/HEOMLS_intro/#Overview","page":"Introduction","title":"Overview","text":"","category":"section"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"The hierarchical equations of motion Liouvillian superoperator (HEOMLS) hatmathcalM characterizes the dynamics in the full auxiliary density operators (ADOs) space, namely ","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"partial_trho^(mnp)_textbfj vert textbfq(t)=hatmathcalMrho^(mnp)_textbfj vert textbfq(t)","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"and it can, numerically, be expressed as a matrix. ","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"In HierarchicalEOM.jl, all different types of HEOMLS hatmathcalM are subtype of AbstractHEOMLSMatrix.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"The HEOMLS hatmathcalM not only characterizes the bare system dynamics (based on system Hamiltonian), but it also encodes the system-and-multiple-bosonic-baths and system-and-multiple-fermionic-baths interactions based on Bosonic Bath and Fermionic Bath, respectively. For a specific mth-level-bosonic-and-nth-level-fermionic auxiliary density operator rho^(mnp)_textbfj vert textbfq, it will be coupled to the following ADOs through hatmathcalM:","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"(m+1)th-level-bosonic-and-nth-level-fermionic ADOs\n(m-1)th-level-bosonic-and-nth-level-fermionic ADOs\nmth-level-bosonic-and-(n+1)th-level-fermionic ADOs\nmth-level-bosonic-and-(n-1)th-level-fermionic ADOs","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"and thus forms the two-fold hierarchy relations. See our paper for more details.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"In practice, the size of the matrix hatmathcalM must be finite and the hierarchical equations must be truncated at a suitable bosonic-level (m_textrmmax) and fermionic-level (n_textrmmax). These truncation levels (tiers) must be given when constructing hatmathcalM.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"Hs::QuantumObject # system Hamiltonian\nBbath::BosonBath # bosonic bath object\nFbath::FermionBath # fermionic bath object\nBtier::Int # bosonic truncation level \nFtier::Int # fermionic truncation level \n\nM = M_Boson(Hs, Btier, Bbath)\nM = M_Fermion(Hs, Ftier, Fbath)\nM = M_Boson_Fermion(Hs, Btier, Ftier, Bbath, Fbath)","category":"page"},{"location":"heom_matrix/HEOMLS_intro/#doc-Importance-Value-and-Threshold","page":"Introduction","title":"Importance Value and Threshold","text":"","category":"section"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"The main computational complexity can be quantified by the total number of auxiliary density operators (ADOs) because it directly affects the size of hatmathcalM. ","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"The computational effort can be further optimized by associating an importance value mathcalI to each ADO and then discarding all the ADOs (in the second and higher levels) whose importance value is smaller than a threshold value mathcalI_textrmth. The importance value for a given ADO : mathcalIleft(rho^(mnp)_textbfj vert textbfqright) is determined by its corresponding exponential terms of bath correlation function [see Phys. Rev. B 88, 235426 (2013) and Phys. Rev. B 103, 235413 (2021)]. This allows us to only consider the ADOs which affects the dynamics more, and thus, reduce the size of hatmathcalM. Also see our paper [ Commun. Phys. 6, 313 (2023) ] for more details.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"When you specify a threshold value mathcalI_textrmth with the parameter threshold to construct hatmathcalM, we will remain all the ADOs where their hierarchy levels (mn)in(00) (01) (10) (11), and all the other high-level ADOs may be neglected if mathcalIleft(rho^(mnp)_textbfj vert textbfqright) mathcalI_textrmth. ","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"Hs::QuantumObject # system Hamiltonian\nBbath::BosonBath # bosonic bath object\nFbath::FermionBath # fermionic bath object\nBtier::Int # bosonic truncation level \nFtier::Int # fermionic truncation level \n\nM = M_Boson(Hs, Btier, Bbath; threshold=1e-7)\nM = M_Fermion(Hs, Ftier, Fbath; threshold=1e-7)\nM = M_Boson_Fermion(Hs, Btier, Ftier, Bbath, Fbath; threshold=1e-7)","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"note: Default value of importance threshold\nThe full hierarchical equations can be recovered in the limiting case mathcalI_textrmthrightarrow 0, which is the default value of the parameter : threshold=0.0. This means that all of the ADOs will be taken into account by default.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/#Methods","page":"Introduction","title":"Methods","text":"","category":"section"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"All of the HEOMLS matrices supports the following two Base Functions :","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"size(M::AbstractHEOMLSMatrix) : Returns the size of the HEOMLS matrix.\nBracket operator [i,j] : Returns the (i, j)-element(s) in the HEOMLS matrix.","category":"page"},{"location":"heom_matrix/HEOMLS_intro/","page":"Introduction","title":"Introduction","text":"M::AbstractHEOMLSMatrix\n\nm, n = size(M)\nM[10, 12]\nM[2:4, 2:4]\nM[1,:]\nM[:,2]","category":"page"},{"location":"heom_matrix/master_eq/#doc-Master-Equation","page":"HEOMLS for Master Equation","title":"HEOMLS Matrix for Master Equation","text":"","category":"section"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"HierarchicalEOM.jl allows users to further add the Lindbladian (superoperator) on any types (AbstractHEOMLSMatrix) of HEOM Liouvillian superoperator hatmathcalM. The Lindbladian describes the dissipative interaction between the system and extra environment.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"This method is more efficient than the full HEOM when some of the baths are weakly coupled to the system since it does not require any extra ADOs space to describe the dynamics and hence reduces the size of hatmathcalM.","category":"page"},{"location":"heom_matrix/master_eq/#Bosonic-Dissipative-Env.","page":"HEOMLS for Master Equation","title":"Bosonic Dissipative Env.","text":"","category":"section"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"If the system is weakly coupled to an extra bosonic environment, the explicit form of the Lindbladian is given by","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"hatmathcalD(J)BigcdotBig=JleftcdotrightJ^dagger-frac12BigJ^dagger J cdotBig_+","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"where Jequiv sqrtgammaV is the jump operator, V describes the dissipative part (operator) of the dynamics, gamma represents a non-negative damping rate and cdot cdot_+ stands for anti-commutator.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"note: Note\nThe system here can be either bosonic or fermionic. However, if V is acting on fermionic systems, it should be even-parity to be compatible with charge conservation.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"One can add the Lindbladian hatmathcalD of bosonic environment to the HEOM Liouvillian superoperator hatmathcalM by calling ","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"addBosonDissipator(M::AbstractHEOMLSMatrix, jumpOP) with the parameters:","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"M::AbstractHEOMLSMatrix : the matrix given from HEOM model\njumpOP::AbstractVector : The list of collapse (jump) operators J_i_i to add. Defaults to empty vector [].","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"Finally, the function returns a new hatmathcalM with the same type:","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"M0::AbstractHEOMLSMatrix\nJ = [J1, J2, ..., Jn] # jump operators\n\nM1 = addBosonDissipator(M0, J)","category":"page"},{"location":"heom_matrix/master_eq/#Fermionic-Dissipative-Env.","page":"HEOMLS for Master Equation","title":"Fermionic Dissipative Env.","text":"","category":"section"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"If the fermionic system is weakly coupled to an extra fermionic environment, the explicit form of the Lindbladian acting on EVEN-parity operators is given by","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"hatmathcalD_textrmeven(J)BigcdotBig=JleftcdotrightJ^dagger-frac12BigJ^dagger J cdotBig_+","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"where Jequiv sqrtgammaV is the jump operator, V describes the dissipative part (operator) of the dynamics, gamma represents a non-negative damping rate and cdot cdot_+ stands for anti-commutator.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"For acting on ODD-parity operators, the explicit form of the Lindbladian is given by","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"hatmathcalD_textrmodd(J)BigcdotBig=-JleftcdotrightJ^dagger-frac12BigJ^dagger J cdotBig_+","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"One can add the Lindbladian hatmathcalD of fermionic environment to the HEOM Liouvillian superoperator hatmathcalM by calling ","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"addFermionDissipator(M::AbstractHEOMLSMatrix, jumpOP) with the parameters:","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"M::AbstractHEOMLSMatrix : the matrix given from HEOM model\njumpOP::AbstractVector : The list of collapse (jump) operators J_i_i to add. Defaults to empty vector [].","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"note: Parity\nThe parity of the dissipator will be automatically determined by the parity of the given HEOMLS matrix M.","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"Finally, the function returns a new hatmathcalM with the same type and parity:","category":"page"},{"location":"heom_matrix/master_eq/","page":"HEOMLS for Master Equation","title":"HEOMLS for Master Equation","text":"M0_even::AbstractHEOMLSMatrix # constructed with EVEN-parity\nM0_odd::AbstractHEOMLSMatrix # constructed with ODD-parity\nJ = [J1, J2, ..., Jn] # jump operators\n\nM1_even = addFermionDissipator(M0_even, J)\nM1_odd = addFermionDissipator(M0_odd, J)","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/#doc-Fermion-Lorentz","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"","category":"section"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"J(omega)=fracGamma W^2(omega-mu)^2+W^2","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"Here, Gamma represents the coupling strength between system and the fermionic environment with chemical potential mu and band-width W.","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/#Matsubara-Expansion","page":"Lorentz Spectral Density","title":"Matsubara Expansion","text":"","category":"section"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"With Matsubara Expansion, the correlation function can be analytically solved and expressed as follows:","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"C^nu(t_1 t_2)=sum_l=1^infty eta_l^nu exp(-gamma_l^nu (t_1-t_2))","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"with","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"beginaligned\ngamma_1^nu = W-nu i mu\neta_1^nu = fracGamma W2 fleft(fraciWk_B Tright)\ngamma_lneq 1^nu = zeta_l k_B T - nu i mu\neta_lneq 1^nu = -i k_B T cdot fracGamma W^2-(zeta_l k_B T)^2+W^2\nf(x) = exp(x) + 1^-1\nendaligned","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"where zeta_l=(2 l - 1)pi. This can be constructed by the built-in function Fermion_Lorentz_Matsubara:","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"ds # coupling operator\nΓ # coupling strength\nμ # chemical potential of the environment\nW # band-width of the environment\nkT # the product of the Boltzmann constant k and the absolute temperature T\nN # Number of exponential terms for each correlation functions (C^{+} and C^{-})\nbath = Fermion_Lorentz_Matsubara(ds, Γ, μ, W, kT, N - 1)","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/#Padé-Expansion","page":"Lorentz Spectral Density","title":"Padé Expansion","text":"","category":"section"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"With Padé Expansion, the correlation function can be analytically solved and expressed as the following exponential terms:","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"C^nu(t_1 t_2)=sum_l=1^infty eta_l^nu exp(-gamma_l^nu (t_1-t_2))","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"with","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"beginaligned\ngamma_1^nu = W-nu i mu\neta_1^nu = fracGamma W2 fleft(fraciWk_B Tright)\ngamma_lneq 1^nu = zeta_l k_B T - nu i mu\neta_lneq 1^nu = -i kappa_l k_B T cdot fracGamma W^2-(zeta_l k_B T)^2+W^2\nf(x) = frac12-sum_l=2^N frac2kappa_l xx^2+zeta_l^2\nendaligned","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"where the parameters kappa_l and zeta_l are described in J. Chem. Phys. 134, 244106 (2011) and N represents the number of exponential terms for C^nu=pm. This can be constructed by the built-in function Fermion_Lorentz_Pade:","category":"page"},{"location":"bath_fermion/Fermion_Lorentz/","page":"Lorentz Spectral Density","title":"Lorentz Spectral Density","text":"ds # coupling operator\nΓ # coupling strength\nμ # chemical potential of the environment\nW # band-width of the environment\nkT # the product of the Boltzmann constant k and the absolute temperature T\nN # Number of exponential terms for each correlation functions (C^{+} and C^{-})\nbath = Fermion_Lorentz_Pade(ds, Γ, μ, W, kT, N - 1)","category":"page"},{"location":"spectrum/#doc-Spectrum","page":"Spectrum","title":"Spectrum","text":"","category":"section"},{"location":"spectrum/#Introduction","page":"Spectrum","title":"Introduction","text":"","category":"section"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"We briefly summarize how to numerically compute the spectrum associated with the system degree of freedom. Phys. Rev. Lett. 109, 266403 (2012) showed that the spectrum can be evaluated either in time or frequency domain.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"HierarchicalEOM.jl provides the following listed functions which performs the calculation of spectrum in frequency domain.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Power Spectrum\nDensity of States","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"HierarchicalEOM.jl wraps some of the functions in LinearSolve.jl, which is a very rich numerical library for solving the linear problems and provides many solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to LinearSolve solvers and also the documentation of LinearSolve.jl.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"compat: Extension for CUDA.jl\nHierarchicalEOM.jl provides an extension to support GPU (CUDA.jl) acceleration for solving the spectrum, but this feature requires Julia 1.9+ and HierarchicalEOM 1.1+. See here for more details.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"The output of the above listed functions will always be in the type of Vector{Float64}, which contains the list of the spectrum values corresponding to the given ωlist.","category":"page"},{"location":"spectrum/#Common-and-optional-parameters","page":"Spectrum","title":"Common and optional parameters","text":"","category":"section"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Furthermore, there are two common optional parameters for all the functions provided below:","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"If the filename is specified, the function will automatically save (update) the value (together with a comma behind it) to a new line in the file (with \".txt\" behind the filename) once it obtains the solution of each specified omega. For example, if you specify filename=\"test\" and ωlist=0:1:5, you will obtain a file test.txt where each line in this file (as shown below) is the result of spectrum corresponding to the given ωlist:","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"# (the content inside test.txt) #\n0.4242990296334028,\n0.28617768129333854,\n0.21332961856387556,\n0.1751179183484055,\n0.15739257286986685,\n0.1518018484057393,\n","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"For your convenience, we add those commas (\",\") in the end of each line for the users to easily do \"copy-and-paste\" and load these results back into julia's kernel (construct a vector of the given results) again, namely","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"results = [\n0.4242990296334028,\n0.28617768129333854,\n0.21332961856387556,\n0.1751179183484055,\n0.15739257286986685,\n0.1518018484057393\n]","category":"page"},{"location":"spectrum/#doc-PS","page":"Spectrum","title":"Power Spectrum","text":"","category":"section"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Start from the power spectrum in the time-domain. We write the system two-time correlation function in terms of the propagator hatmathcalG(t)=exp(hatmathcalM t) for t0. The power spectrum pi S(omega) can be obtained as","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"beginaligned\npi S(omega) \n= textrmReleftint_0^infty dt langle P(t)Q(0)rangle e^-iomega tright\n= textrmReleftint_0^infty dt langle P e^hatmathcalM tQrangle e^-iomega tright\n= -textrmReleftlangle P (hatmathcalM -iomega)^-1 Qrangleright\n= -textrmRelefttextrmTrleft P (hatmathcalM -iomega)^-1 Qrho^(mn+)_textbfj vert textbfqrightright\nendaligned","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"where a half-Fourier transform has been introduced in the third line. We note that only the reduced density operator (m=n=0) is considered when taking the final trace operation.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"This function solves the linear problem textbfA x=textbfb at a fixed frequency omega where ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"textbfA=hatmathcalM-iomega\ntextbfb=Qrho^(mn+)_textbfj vert textbfq ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"using the package LinearSolve.jl.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Finially, one can obtain the value of the power spectrum for specific omega, namely","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"pi S(omega) = -textrmRelefttextrmTrleft P textbfxrightright","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"note: Odd-Parity for Power Spectrum\nWhen Q is an operator acting on fermionic systems and has ODD-parity, the HEOMLS matrix hatmathcalM is acting on the ODD-parity space because textbfb=Qrho^(mn+)_textbfj vert textbfq. Therefore, remember to construct hatmathcalM with ODD parity in this kind of cases.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"See also the docstring : ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"PowerSpectrum(M::AbstractHEOMLSMatrix, ρ::Union{QuantumObject,ADOs}, P_op::Union{QuantumObject,HEOMSuperOp}, Q_op::Union{QuantumObject,HEOMSuperOp}, ωlist::AbstractVector, reverse::Bool = false; solver = UMFPACKFactorization(), verbose::Bool = true, filename::String = \"\", SOLVEROptions...)","category":"page"},{"location":"spectrum/#HierarchicalEOM.PowerSpectrum","page":"Spectrum","title":"HierarchicalEOM.PowerSpectrum","text":"PowerSpectrum(M, ρ, P_op, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)\n\nCalculate power spectrum for the system in frequency domain.\n\npi S(omega)=textrmReleftint_0^infty dt langle P(t) Q(0)rangle e^-iomega tright\n\nTo calculate spectrum when input operator Q_op has EVEN-parity:\n\nremember to set the parameters: \n\nM::AbstractHEOMLSMatrix: should be EVEN parity\n\nTo calculate spectrum when input operator Q_op has ODD-parity:\n\nremember to set the parameters: \n\nM::AbstractHEOMLSMatrix: should be ODD parity\n\nParameters\n\nM::AbstractHEOMLSMatrix : the HEOMLS matrix.\nρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.\nP_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) P acting on the system.\nQ_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) Q acting on the system.\nωlist::AbstractVector : the specific frequency points to solve.\nreverse::Bool : If true, calculate langle P(-t)Q(0) rangle = langle P(0)Q(t) rangle = langle P(t)Q(0) rangle^* instead of langle P(t) Q(0) rangle. Default to false.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\nspec::AbstractVector : the spectrum list corresponds to the specified ωlist\n\n\n\n\n\n","category":"function"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"M::AbstractHEOMLSMatrix\n\n# the input state can be in either type (but usually ADOs):\nρ::QuantumObject # the reduced density operator\nρ::ADOs # the ADOs solved from \"evolution\" or \"steadystate\"\n\nP::QuantumObject \nQ::QuantumObject\n\n# the spectrum value for the specific frequency ω which need to be solved\nωlist = 0:0.5:2 # [0.0, 0.5, 1.0, 1.5, 2.0]\n\nπSω = spectrum(M, ρ, Q, ωlist) # P will automatically be considered as \"the adjoint of Q operator\"\nπSω = spectrum(M, ρ, P, Q, ωlist) # user specify both P and Q operator","category":"page"},{"location":"spectrum/#doc-DOS","page":"Spectrum","title":"Density of States","text":"","category":"section"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Start from the density of states for fermionic systems in the time-domain. We write the system two-time correlation function in terms of the propagator hatmathcalG(t)=exp(hatmathcalM t) for t0. The density of states pi A(omega) can be obtained as","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"beginaligned\npi A(omega) \n= textrmReleftint_0^infty dt langle d(t)d^dagger(0)rangle e^iomega tright + textrmReleftint_0^infty dt langle d^dagger(t)d(0)rangle e^-iomega tright\n= textrmReleftint_0^infty dt langle d e^hatmathcalM td^daggerrangle e^iomega tright+textrmReleftint_0^infty dt langle d^dagger e^hatmathcalM tdrangle e^-iomega tright\n= -textrmReleftlangle d (hatmathcalM +iomega)^-1 d^daggerrangle + langle d^dagger (hatmathcalM -iomega)^-1 drangleright\n= -textrmRelefttextrmTrleft d (hatmathcalM +iomega)^-1 d^daggerrho^(mn+)_textbfj vert textbfqright + textrmTrleft d^dagger (hatmathcalM -iomega)^-1 drho^(mn+)_textbfj vert textbfqrightright\nendaligned","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"where a half-Fourier transform has been introduced in the third line. We note that only the reduced density operator (m=n=0) is considered when taking the final trace operation.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"This functionsolves two linear problems textbfA_+ textbfx_+=textbfb_+ and textbfA_- textbfx_-=textbfb_- at a fixed frequency omega where ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"textbfA_+=hatmathcalM+iomega\ntextbfb_+=d^daggerrho^(mn+)_textbfj vert textbfq \ntextbfA_-=hatmathcalM-iomega\ntextbfb_-=drho^(mn+)_textbfj vert textbfq ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"using the package LinearSolve.jl.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Finially, one can obtain the density of states for specific omega, namely","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"pi A(omega) = -textrmRelefttextrmTrleft d textbfx_+right+textrmTrleft d^dagger textbfx_-rightright","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"note: Odd-Parity for Density of States\nAs shown above, the HEOMLS matrix hatmathcalM acts on the ODD-parity space, compatibly with the parity of both the operators textbfb_-=drho^(mn+)_textbfj vert textbfq and textbfb_+=d^daggerrho^(mn+)_textbfj vert textbfq. Therefore, remember to construct hatmathcalM with ODD parity for solving spectrum of fermionic systems.","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"See also the docstring : ","category":"page"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"DensityOfStates(M::AbstractHEOMLSMatrix, ρ::QuantumObject, d_op::QuantumObject, ωlist::AbstractVector; solver=UMFPACKFactorization(), verbose::Bool = true, filename::String = \"\", SOLVEROptions...)","category":"page"},{"location":"spectrum/#HierarchicalEOM.DensityOfStates-Tuple{AbstractHEOMLSMatrix, QuantumObject, QuantumObject, AbstractVector}","page":"Spectrum","title":"HierarchicalEOM.DensityOfStates","text":"DensityOfStates(M, ρ, d_op, ωlist; solver, verbose, filename, SOLVEROptions...)\n\nCalculate density of states for the fermionic system in frequency domain.\n\n pi A(omega)=textrmReleftint_0^infty dt leftlangle d(t) d^dagger(0)rangle^* + langle d^dagger(t) d(0)rangle right e^-iomega tright\n\nParameters\n\nM::AbstractHEOMLSMatrix : the HEOMLS matrix which acts on ODD-parity operators.\nρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.\nd_op::QuantumObject : The annihilation operator (d as shown above) acting on the fermionic system.\nωlist::AbstractVector : the specific frequency points to solve.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nfilename::String : If filename was specified, the value of spectrum for each ω will be saved into the file \"filename.txt\" during the solving process.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\ndos::AbstractVector : the list of density of states corresponds to the specified ωlist\n\n\n\n\n\n","category":"method"},{"location":"spectrum/","page":"Spectrum","title":"Spectrum","text":"Hs::QuantumObject # system Hamiltonian\nbath::FermionBath # fermionic bath object\ntier::Int # fermionic truncation level \n\n# create HEOMLS matrix in both :even and ODD parity\nM_even = M_Fermion(Hs, tier, bath) \nM_odd = M_Fermion(Hs, tier, bath, ODD) \n\n# the input state can be in either type of density operator matrix or ADOs (but usually ADOs):\nados = steadystate(M_even)\n\n# the (usually annihilation) operator \"d\" as shown above\nd::QuantumObject \n\n# the spectrum value for the specific frequency ω which need to be solved\nω_list = 0:0.5:2 # [0.0, 0.5, 1.0, 1.5, 2.0]\n\nπAω = DensityOfStates(M_odd, ados, d, ω_list)","category":"page"},{"location":"extensions/CUDA/#doc-ext-CUDA","page":"CUDA.jl","title":"Extension for CUDA.jl","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"This is an extension to support GPU (CUDA.jl) acceleration for solving the time evolution and spectra. This improves the execution time and memory usage especially when the HEOMLS matrix is super large.","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"compat: Compat\nThe described feature requires Julia 1.9+.","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"The functions of calculating time evolution (only supports ODE method with time-independent system Hamiltonian) and spectra will automatically choose to solve on CPU or GPU depend on the type of the sparse matrix in M::AbstractHEOMLSMatrix objects (i.e., the type of the field M.data). ","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"typeof(M.data) <: SparseMatrixCSC # solve on CPU\ntypeof(M.data) <: CuSparseMatrixCSC # solve on GPU","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"Therefore, we wrapped several functions in CUDA and CUDA.CUSPARSE in order to return a new HEOMLS-matrix-type object with M.data is in the type of CuSparseMatrix, and also change the element type into ComplexF32 and Int32 (since GPU performs better in this type). The functions are listed as follows:","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"cu(M::AbstractHEOMLSMatrix) : Translate M.data into the type CuSparseMatrixCSC{ComplexF32, Int32}\nCuSparseMatrixCSC(M::AbstractHEOMLSMatrix) : Translate M.data into the type CuSparseMatrixCSC{ComplexF32, Int32}","category":"page"},{"location":"extensions/CUDA/#Demonstration","page":"CUDA.jl","title":"Demonstration","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"The extension will be automatically loaded if user imports the package CUDA.jl :","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"using HierarchicalEOM\nusing LinearSolve # to change the solver for better GPU performance\nusing CUDA\nCUDA.allowscalar(false) # Avoid unexpected scalar indexing","category":"page"},{"location":"extensions/CUDA/#Setup","page":"CUDA.jl","title":"Setup","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"Here, we demonstrate this extension by using the example of the single-impurity Anderson model. ","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"ϵ = -5\nU = 10\nΓ = 2\nμ = 0\nW = 10\nkT = 0.5\nN = 5\ntier = 3\n\ntlist = 0:0.1:10\nωlist = -10:1:10\n\nσm = [0 1; 0 0]\nσz = [1 0; 0 -1]\nII = [1 0; 0 1]\nd_up = kron( σm, II)\nd_dn = kron(-1 * σz, σm)\nρ0 = kron([1 0; 0 0], [1 0; 0 0])\nHsys = ϵ * (d_up' * d_up + d_dn' * d_dn) + U * (d_up' * d_up * d_dn' * d_dn)\n\nbath_up = Fermion_Lorentz_Pade(d_up, Γ, μ, W, kT, N)\nbath_dn = Fermion_Lorentz_Pade(d_dn, Γ, μ, W, kT, N)\nbath_list = [bath_up, bath_dn]\n\n# even HEOMLS matrix\nM_even_cpu = M_Fermion(Hsys, tier, bath_list)\nM_even_gpu = cu(M_even_cpu)\n\n# odd HEOMLS matrix\nM_odd_cpu = M_Fermion(Hsys, tier, bath_list, ODD)\nM_odd_gpu = cu(M_odd_cpu)\n\n# solve steady state with CPU\nados_ss = steadystate(M_even_cpu);","category":"page"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"note: Note\nThis extension does not support for solving stationary state on GPU since it is not efficient and might get wrong solutions. If you really want to obtain the stationary state with GPU, you can repeatedly solve the time evolution until you find it.","category":"page"},{"location":"extensions/CUDA/#Solving-time-evolution-with-CPU","page":"CUDA.jl","title":"Solving time evolution with CPU","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"ados_list_cpu = HEOMsolve(M_even_cpu, ρ0, tlist)","category":"page"},{"location":"extensions/CUDA/#Solving-time-evolution-with-GPU","page":"CUDA.jl","title":"Solving time evolution with GPU","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"ados_list_gpu = HEOMsolve(M_even_gpu, ρ0, tlist)","category":"page"},{"location":"extensions/CUDA/#Solving-Spectrum-with-CPU","page":"CUDA.jl","title":"Solving Spectrum with CPU","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"dos_cpu = DensityOfStates(M_odd_cpu, ados_ss, d_up, ωlist)","category":"page"},{"location":"extensions/CUDA/#Solving-Spectrum-with-GPU","page":"CUDA.jl","title":"Solving Spectrum with GPU","text":"","category":"section"},{"location":"extensions/CUDA/","page":"CUDA.jl","title":"CUDA.jl","text":"dos_gpu = DensityOfStates(M_odd_gpu, ados_ss, d_up, ωlist; solver=KrylovJL_BICGSTAB(rtol=1f-10, atol=1f-12))","category":"page"},{"location":"ODE_solvers/#ODE-solvers","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"In this page, we list several recommended solvers provided by DifferentialEquations.jl for solving time evolution in hierarchical equations of motion approach. ","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Remember to import OrdinaryDiffEq.jl (or DifferentialEquations.jl)","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"using OrdinaryDiffEq ## or \"using DifferentialEquations\" ","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"(click here to see the full solver list provided by DifferentialEquations.jl)","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"For any extra solver options, we can add it in the function HEOMsolve with keyword arguments. These keyword arguments will be directly pass to the solvers in DifferentialEquations (click here to see the documentation for the common solver options)","category":"page"},{"location":"ODE_solvers/#DP5-(Default-solver)","page":"DifferentialEquations solvers","title":"DP5 (Default solver)","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Dormand-Prince's 5/4 Runge-Kutta method. (free 4th order interpolant)","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"DP5()","category":"page"},{"location":"ODE_solvers/#RK4","page":"DifferentialEquations solvers","title":"RK4","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"The canonical Runge-Kutta Order 4 method. Uses a defect control for adaptive stepping using maximum error over the whole interval.","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"RK4()","category":"page"},{"location":"ODE_solvers/#Tsit5","page":"DifferentialEquations solvers","title":"Tsit5","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Tsitouras 5/4 Runge-Kutta method. (free 4th order interpolant).","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Tsit5()","category":"page"},{"location":"ODE_solvers/#Vern7","page":"DifferentialEquations solvers","title":"Vern7","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Verner's “Most Efficient” 7/6 Runge-Kutta method. (lazy 7th order interpolant).","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Vern7()","category":"page"},{"location":"ODE_solvers/#Vern9","page":"DifferentialEquations solvers","title":"Vern9","text":"","category":"section"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Verner's “Most Efficient” 9/8 Runge-Kutta method. (lazy 9th order interpolant)","category":"page"},{"location":"ODE_solvers/","page":"DifferentialEquations solvers","title":"DifferentialEquations solvers","text":"Vern9()","category":"page"},{"location":"LS_solvers/#LS-solvers","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"In this page, we list several recommended solvers provided by LinearSolve.jl for solving steadystate and spectrum in hierarchical equations of motion approach. ","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"Remember to import LinearSolve.jl","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"using LinearSolve","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"(click here to see the full solver list provided by LinearSolve.jl)","category":"page"},{"location":"LS_solvers/#UMFPACKFactorization-(Default-solver)","page":"LinearSolve solvers","title":"UMFPACKFactorization (Default solver)","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"This solver performs better when there is more structure to the sparsity pattern (depends on the complexity of your system and baths).","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"UMFPACKFactorization()","category":"page"},{"location":"LS_solvers/#KLUFactorization","page":"LinearSolve solvers","title":"KLUFactorization","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"This solver performs better when there is less structure to the sparsity pattern (depends on the complexity of your system and baths).","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"KLUFactorization()","category":"page"},{"location":"LS_solvers/#A-generic-BICGSTAB-implementation-from-Krylov","page":"LinearSolve solvers","title":"A generic BICGSTAB implementation from Krylov","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"KrylovJL_BICGSTAB()","category":"page"},{"location":"LS_solvers/#Pardiso","page":"LinearSolve solvers","title":"Pardiso","text":"","category":"section"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"This solver is based on Intel openAPI Math Kernel Library (MKL) Pardiso","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"note: Note\nUsing this solver requires adding the package Pardiso.jl, i.e. using Pardiso","category":"page"},{"location":"LS_solvers/","page":"LinearSolve solvers","title":"LinearSolve solvers","text":"using Pardiso\nusing LinearSolve\nMKLPardisoFactorize()\nMKLPardisoIterate()","category":"page"},{"location":"hierarchy_dictionary/#doc-Hierarchy-Dictionary","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"","category":"section"},{"location":"hierarchy_dictionary/#Introduction","page":"Hierarchy Dictionary","title":"Introduction","text":"","category":"section"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"For hierarchical equations of motions, there are many indices the users have to deal with including the indices of the Exponent in bosonic baths, the Exponent in fermionic baths, and the ADOs formed by the hierarchy.","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"With the auxiliary density operators rho_textbfjverttextbfq^(mnp), we use the following keywords :","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"idx : the index of the auxiliary density operators\nlvl : the level m (n) of the bosonic (fermionic) hierarchy\nnvec : object Nvec which stores the number of existence for each multi-index ensemble j (q) in vector textbfj (textbfq).","category":"page"},{"location":"hierarchy_dictionary/#Dictionary-for-Pure-Bosonic-or-Fermionic-Baths","page":"Hierarchy Dictionary","title":"Dictionary for Pure Bosonic or Fermionic Baths","text":"","category":"section"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"An object which contains all dictionaries for pure (bosonic or fermionic) bath-ADOs hierarchy, defined as:","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"struct HierarchyDict <: AbstractHierarchyDict","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"HierarchyDict can be obtained from the field .hierarchy in M_Boson or M_Fermion, and it contains the following fields :","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"idx2nvec : Return the Nvec from a given index of ADO\nnvec2idx : Return the index of ADO from a given Nvec\nlvl2idx : Return the list of ADO-indices from a given hierarchy level\nbathPtr : Records the tuple (alpha k) for each position in Nvec, where alpha and k represents the k-th exponential-expansion term of the alpha-th bath.","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"# HEOMLS for bosonic baths\nM::M_Boson\nHDict = M.hierarchy\n\n# HEOMLS for fermionic baths\nM::M_Fermion\nHDict = M.hierarchy\n\n# obtain the nvec corresponds to 10-th ADO\nnvec = HDict.idx2nvec[10]\n\n# obtain the index of the ADO corresponds to the given nvec\nnvec::Nvec\nidx = HDict.nvec2idx[nvec]\n\n# obtain a list of indices which corresponds to all ADOs in 3rd-level of hierarchy\nidx_list = HDict.lvl2idx[3] ","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"HierarchicalEOM.jl also provides a function getIndexEnsemble(nvec, bathPtr) to obtain the index of the Exponent and it's corresponding index of bath:","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"# HEOMLS\nM::M_Boson\nM::Fermion\n\nHDict = M.hierarchy\n\n# auxiliary density operators\nados::ADOs\n\nfor (idx, ado) in enumerate(ados)\n ado # the corresponding auxiliary density operator for idx\n\n # obtain the nvec corresponds to ado\n nvec = HDict.idx2nvec[idx]\n\n for (α, k, n) in getIndexEnsemble(nvec, HDict.bathPtr)\n α # index of the bath\n k # the index of the exponential-expansion term in α-th bath\n n # the repetition number of the ensemble {α, k} in vector j (or q) in ADOs\n exponent = M.bath[α][k] # the k-th exponential-expansion term in α-th bath\n\n # do some calculations you want\n end\nend","category":"page"},{"location":"hierarchy_dictionary/#Dictionary-for-Mixed-Bosonic-and-Fermionic-Baths","page":"Hierarchy Dictionary","title":"Dictionary for Mixed Bosonic and Fermionic Baths","text":"","category":"section"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"An object which contains all dictionaries for mixed (bosonic and fermionic) bath-ADOs hierarchy, defined as:","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"struct MixHierarchyDict <: AbstractHierarchyDict","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"MixHierarchyDict can be obtained from the field .hierarchy in M_Boson_Fermion, and it contains the following fields :","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"idx2nvec : Return the tuple (Nvec_b, Nvec_f) from a given index of ADO, where b represents boson and f represents fermion\nnvec2idx : Return the index from a given tuple (Nvec_b, Nvec_f), where b represents boson and f represents fermion\nBlvl2idx : Return the list of ADO-indices from a given bosonic-hierarchy level\nFlvl2idx : Return the list of ADO-indices from a given fermionic-hierarchy level\nbosonPtr : Records the tuple (alpha k) for each position in Nvec_b, where alpha and k represents the k-th exponential-expansion term of the alpha-th bosonic bath.\nfermionPtr : Records the tuple (alpha k) for each position in Nvec_f, where alpha and k represents the k-th exponential-expansion term of the alpha-th fermionic bath.","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"# HEOMLS \nM::M_Boson_Fermion\nHDict = M.hierarchy\n\n# obtain the nvec(s) correspond to 10-th ADO\nnvec_b, nvec_f = HDict.idx2nvec[10]\n\n# obtain the index of the ADO corresponds to the given nvec\nnvec_b::Nvec\nnvec_f::Nvec\nidx = HDict.nvec2idx[(nvec_b, nvec_f)]\n\n# obtain a list of indices which corresponds to all ADOs in 3rd-bosonic-level of hierarchy\nidx_list = HDict.Blvl2idx[3] \n\n# obtain a list of indices which corresponds to all ADOs in 4rd-fermionic-level of hierarchy\nidx_list = HDict.Flvl2idx[4] ","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"HierarchicalEOM.jl also provides a function getIndexEnsemble(nvec, bathPtr) to obtain the index of the Exponent and it's corresponding index of bath:","category":"page"},{"location":"hierarchy_dictionary/","page":"Hierarchy Dictionary","title":"Hierarchy Dictionary","text":"# HEOMLS\nM::M_Boson_Fermion\n\nHDict = M.hierarchy\n\n# auxiliary density operators\nados::ADOs\n\nfor (idx, ado) in enumerate(ados)\n ado # the corresponding auxiliary density operator for idx\n\n # obtain the nvec(s) correspond to ado\n nvec_b, nvec_f = HDict.idx2nvec[idx]\n\n # bosonic bath indices\n for (β, k, n) in getIndexEnsemble(nvec_b, HDict.bosonPtr)\n β # index of the bosonic bath\n k # the index of the exponential-expansion term in β-th bosonic bath\n nb # the repetition number of the ensemble {β, k} in vector j in ADOs\n exponent = M.Bbath[β][k] # the k-th exponential-expansion term in β-th bosonic bath\n\n # do some calculations you want\n end\n\n # fermionic bath indices\n for (α, h, n) in getIndexEnsemble(nvec_f, HDict.fermionPtr)\n α # index of the fermionic bath\n h # the index of the exponential-expansion term in α-th fermionic bath\n nf # the repetition number of the ensemble {α, h} in vector q in ADOs\n exponent = M.Fbath[α][h] # the h-th exponential-expansion term in α-th fermionic bath\n\n # do some calculations you want\n end\nend","category":"page"},{"location":"stationary_state/#doc-Stationary-State","page":"Stationary State","title":"Stationary State","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"HierarchicalEOM.jl implements two different ways to calculate stationary states of all Auxiliary Density Operators (ADOs).","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"To solve the stationary state of the reduced state and also all the ADOs, you only need to call steadystate. Different methods are implemented with different input parameters of the function which makes it easy to switch between different methods. The output of the function steadystate for each methods will always be in the type of the auxiliary density operators ADOs.","category":"page"},{"location":"stationary_state/#Solve-with-[LinearSolve.jl](http://linearsolve.sciml.ai/stable/)","page":"Stationary State","title":"Solve with LinearSolve.jl","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"The first method is implemented by solving the linear problem","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"0=hatmathcalMrho^(mnp)_textbfj vert textbfq(t)","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"HierarchicalEOM.jl wraps some of the functions in LinearSolve.jl, which is a very rich numerical library for solving the linear problems and provides many solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to LinearSolve solvers and also the documentation of LinearSolve.jl.","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"See the docstring of this method: ","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"steadystate(M::AbstractHEOMLSMatrix; solver=UMFPACKFactorization(), verbose::Bool=true, SOLVEROptions...)","category":"page"},{"location":"stationary_state/#QuantumToolbox.steadystate-Tuple{AbstractHEOMLSMatrix}","page":"Stationary State","title":"QuantumToolbox.steadystate","text":"steadystate(M::AbstractHEOMLSMatrix; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on LinearSolve.jl (i.e., solving x where A times x = b).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nsolver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver \n\nNotes\n\nFor more details about solver and SOLVEROptions, please refer to LinearSolve.jl\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\n","category":"method"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"# the HEOMLS matrix\nM::AbstractHEOMLSMatrix \nados_steady = steadystate(M)","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"warning: Unphysical solution\nThis method does not require an initial condition rho^(mnp)_textbfj vert textbfq(0). Although this method works for most of the cases, it does not guarantee that one can obtain a physical (or unique) solution. If there is any problem within the solution, please try the second method which solves with an initial condition, as shown below.","category":"page"},{"location":"stationary_state/#Solve-with-[DifferentialEquations.jl](https://diffeq.sciml.ai/stable/)","page":"Stationary State","title":"Solve with DifferentialEquations.jl","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"The second method is implemented by solving the ordinary differential equation (ODE) method :","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"partial_trho^(mnp)_textbfj vert textbfq(t)=hatmathcalMrho^(mnp)_textbfj vert textbfq(t)","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"until finding a stationary solution.","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"HierarchicalEOM.jl wraps some of the functions in DifferentialEquations.jl, which is a very rich numerical library for solving the differential equations and provides many ODE solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to the documentation of DifferentialEquations.jl.","category":"page"},{"location":"stationary_state/#Given-the-initial-state-as-Density-Operator-(QuantumObject-type)","page":"Stationary State","title":"Given the initial state as Density Operator (QuantumObject type)","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"See the docstring of this method: ","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"steadystate(M::AbstractHEOMLSMatrix, ρ0::QuantumObject, tspan::Number = Inf; solver = DP5(), termination_condition = NormTerminationMode(), verbose::Bool = true, SOLVEROptions...)","category":"page"},{"location":"stationary_state/#QuantumToolbox.steadystate","page":"Stationary State","title":"QuantumToolbox.steadystate","text":"steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntspan::Number : the time limit to find stationary state. Default to Inf\nsolver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver\n\nNotes\n\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\n","category":"function"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"# the HEOMLS matrix\nM::AbstractHEOMLSMatrix \n\n# the initial state of the system density operator\nρ0::QuantumObject\n\nados_steady = steadystate(M, ρ0)","category":"page"},{"location":"stationary_state/#Given-the-initial-state-as-Auxiliary-Density-Operators","page":"Stationary State","title":"Given the initial state as Auxiliary Density Operators","text":"","category":"section"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"See the docstring of this method: ","category":"page"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"steadystate(M::AbstractHEOMLSMatrix, ados::ADOs, tspan::Number = Inf; solver = DP5(), termination_condition = NormTerminationMode(), verbose::Bool = true, SOLVEROptions...)","category":"page"},{"location":"stationary_state/#QuantumToolbox.steadystate-2","page":"Stationary State","title":"QuantumToolbox.steadystate","text":"steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)\n\nSolve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).\n\nParameters\n\nM::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.\nρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)\ntspan::Number : the time limit to find stationary state. Default to Inf\nsolver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.\nSOLVEROptions : extra options for solver\n\nNotes\n\nFor more details about solver please refer to DifferentialEquations.jl (ODE Solvers)\nFor more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)\n\nReturns\n\n::ADOs : The steady state of auxiliary density operators.\n\n\n\n\n\n","category":"function"},{"location":"stationary_state/","page":"Stationary State","title":"Stationary State","text":"# the HEOMLS matrix\nM::AbstractHEOMLSMatrix \n\n# the initial state of the ADOs\nados::ADOs\n\nados_steady = steadystate(M, ados)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"EditURL = \"../../../examples/SIAM.jl\"","category":"page"},{"location":"examples/SIAM/#exp-SIAM","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"The investigation of the Kondo effect in single-impurity Anderson model is crucial as it serves both as a valuable testing ground for the theories of the Kondo effect and has the potential to lead to a better understanding of this intrinsic many-body phenomena.","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"import QuantumToolbox\nusing HierarchicalEOM\nimport Plots","category":"page"},{"location":"examples/SIAM/#Hamiltonian","page":"The single-impurity Anderson model","title":"Hamiltonian","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"We consider a single-level electronic system [which can be populated by a spin-up (uparrow) or spin-down (downarrow) electron] coupled to a fermionic reservoir (textrmf). The total Hamiltonian is given by H_textrmT=H_textrms+H_textrmf+H_textrmsf, where each terms takes the form","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"beginaligned\nH_textrms = epsilon left(d^dagger_uparrow d_uparrow + d^dagger_downarrow d_downarrow right) + Uleft(d^dagger_uparrow d_uparrow d^dagger_downarrow d_downarrowright)\nH_textrmf =sum_sigma=uparrowdownarrowsum_kepsilon_sigmakc_sigmak^daggerc_sigmak\nH_textrmsf =sum_sigma=uparrowdownarrowsum_kg_kc_sigmak^daggerd_sigma + g_k^*d_sigma^daggerc_sigmak\nendaligned","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"Here, d_uparrow (d_downarrow) annihilates a spin-up (spin-down) electron in the system, epsilon is the energy of the electron, and U is the Coulomb repulsion energy for double occupation. Furthermore, c_sigmak (c_sigmak^dagger) annihilates (creates) an electron in the state k (with energy epsilon_sigmak) of the reservoir.","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"Now, we need to build the system Hamiltonian and initial state with the package QuantumToolbox.jl to construct the operators.","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"ϵ = -5\nU = 10\nσm = sigmam() ## σ-\nσz = sigmaz() ## σz\nII = qeye(2) ## identity matrix\n\n# construct the annihilation operator for both spin-up and spin-down\n# (utilize Jordan–Wigner transformation)\nd_up = tensor(σm, II)\nd_dn = tensor(-1 * σz, σm)\nHsys = ϵ * (d_up' * d_up + d_dn' * d_dn) + U * (d_up' * d_up * d_dn' * d_dn)","category":"page"},{"location":"examples/SIAM/#Construct-bath-objects","page":"The single-impurity Anderson model","title":"Construct bath objects","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"We assume the fermionic reservoir to have a Lorentzian-shaped spectral density, and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters:","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"the coupling strength Gamma between system and reservoirs\nthe band-width W\nthe product of the Boltzmann constant k and the absolute temperature T : kT\nthe chemical potential mu\nthe total number of exponentials for the reservoir 2(N + 1)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"Γ = 2\nμ = 0\nW = 10\nkT = 0.5\nN = 5\nbath_up = Fermion_Lorentz_Pade(d_up, Γ, μ, W, kT, N)\nbath_dn = Fermion_Lorentz_Pade(d_dn, Γ, μ, W, kT, N)\nbath_list = [bath_up, bath_dn]","category":"page"},{"location":"examples/SIAM/#Construct-HEOMLS-matrix","page":"The single-impurity Anderson model","title":"Construct HEOMLS matrix","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"(see also HEOMLS Matrix for Fermionic Baths)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"tier = 3\nM_even = M_Fermion(Hsys, tier, bath_list)\nM_odd = M_Fermion(Hsys, tier, bath_list, ODD)","category":"page"},{"location":"examples/SIAM/#Solve-stationary-state-of-ADOs","page":"The single-impurity Anderson model","title":"Solve stationary state of ADOs","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"(see also Stationary State)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"ados_s = steadystate(M_even)","category":"page"},{"location":"examples/SIAM/#Calculate-density-of-states-(DOS)","page":"The single-impurity Anderson model","title":"Calculate density of states (DOS)","text":"","category":"section"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"(see also Spectrum)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"ωlist = -10:1:10\ndos = DensityOfStates(M_odd, ados_s, d_up, ωlist)\n\nPlots.plot(ωlist, dos)","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"","category":"page"},{"location":"examples/SIAM/","page":"The single-impurity Anderson model","title":"The single-impurity Anderson model","text":"This page was generated using Literate.jl.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"EditURL = \"../../../examples/cavityQED.jl\"","category":"page"},{"location":"examples/cavityQED/#Cavity-QED-system","page":"Cavity QED system","title":"Cavity QED system","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Cavity quantum electrodynamics (cavity QED) is an important topic for studying the interaction between atoms (or other particles) and light confined in a reflective cavity, under conditions where the quantum nature of photons is significant.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"import QuantumToolbox\nusing HierarchicalEOM\nusing LaTeXStrings\nimport Plots","category":"page"},{"location":"examples/cavityQED/#Hamiltonian","page":"Cavity QED system","title":"Hamiltonian","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"The Jaynes-Cummings model is a standard model in the realm of cavity QED. It illustrates the interaction between a two-level atom (textrmA) and a quantized single-mode within a cavity (textrmc).","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"beginaligned\nH_textrms=H_textrmA+H_textrmc+H_textrmint\nH_textrmA=fracomega_A2sigma_z\nH_textrmc=omega_textrmc a^dagger a\nH_textrmint=g (a^daggersigma^-+asigma^+)\nendaligned","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"where sigma^- (sigma^+) is the annihilation (creation) operator of the atom, and a (a^dagger) is the annihilation (creation) operator of the cavity.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Furthermore, we consider the system is coupled to a bosonic reservoir (textrmb). The total Hamiltonian is given by H_textrmTotal=H_textrms+H_textrmb+H_textrmsb, where H_textrmb and H_textrmsb takes the form","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"beginaligned\nH_textrmb =sum_komega_kb_k^daggerb_k\nH_textrmsb =(a+a^dagger)sum_kg_k(b_k + b_k^dagger)\nendaligned","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Here, H_textrmb describes a bosonic reservoir where b_k (b_k^dagger) is the bosonic annihilation (creation) operator associated to the kth mode (with frequency omega_k). Also, H_textrmsb illustrates the interaction between the cavity and the bosonic reservoir.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Now, we need to build the system Hamiltonian and initial state with the package QuantumToolbox.jl to construct the operators.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"N = 3 ## system cavity Hilbert space cutoff\nωA = 2\nωc = 2\ng = 0.1\n\n# operators\na_c = destroy(N)\nI_c = qeye(N)\nσz_A = sigmaz()\nσm_A = sigmam()\nI_A = qeye(2)\n\n# operators in tensor-space\na = tensor(a_c, I_A)\nσz = tensor(I_c, σz_A)\nσm = tensor(I_c, σm_A)\n\n# Hamiltonian\nH_A = 0.5 * ωA * σz\nH_c = ωc * a' * a\nH_int = g * (a' * σm + a * σm')\n\nH_s = H_A + H_c + H_int\n\n# initial state\nψ0 = tensor(basis(N, 0), basis(2, 0))","category":"page"},{"location":"examples/cavityQED/#Construct-bath-objects","page":"Cavity QED system","title":"Construct bath objects","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"We assume the bosonic reservoir to have a Drude-Lorentz Spectral Density, and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters:","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"the coupling strength Gamma between system and reservoir\nthe band-width W\nthe product of the Boltzmann constant k and the absolute temperature T : kT\nthe total number of exponentials for the reservoir (N + 1)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Γ = 0.01\nW = 1\nkT = 0.025\nN = 20\nBath = Boson_DrudeLorentz_Pade(a + a', Γ, W, kT, N)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Before incorporating the correlation function into the HEOMLS matrix, it is essential to verify if the total number of exponentials for the reservoir sufficiently describes the practical situation.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"tlist_test = 0:0.1:10;\n\nBath_test = Boson_DrudeLorentz_Pade(a + a', Γ, W, kT, 1000);\nCt = C(Bath, tlist_test);\nCt2 = C(Bath_test, tlist_test);\n\nPlots.plot(tlist_test, real(Ct), label = \"N=20 (real part )\", linestyle = :dash, linewidth = 3)\nPlots.plot!(tlist_test, real(Ct2), label = \"N=1000 (real part)\", linestyle = :solid, linewidth = 3)\nPlots.plot!(tlist_test, imag(Ct), label = \"N=20 (imag part)\", linestyle = :dash, linewidth = 3)\nPlots.plot!(tlist_test, imag(Ct2), label = \"N=1000 (imag part)\", linestyle = :solid, linewidth = 3)\n\nPlots.xaxis!(\"t\")\nPlots.yaxis!(\"C(t)\")","category":"page"},{"location":"examples/cavityQED/#Construct-HEOMLS-matrix","page":"Cavity QED system","title":"Construct HEOMLS matrix","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also HEOMLS Matrix for Bosonic Baths) Here, we consider an incoherent pumping to the atom, which can be described by an Lindblad dissipator (see here for more details).","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Furthermore, we set the important threshold to be 1e-6.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"pump = 0.01\nJ_pump = sqrt(pump) * σm'\n\ntier = 2\nM_Heom = M_Boson(H_s, tier, threshold = 1e-6, Bath)\nM_Heom = addBosonDissipator(M_Heom, J_pump)","category":"page"},{"location":"examples/cavityQED/#Solve-time-evolution-of-ADOs","page":"Cavity QED system","title":"Solve time evolution of ADOs","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also Time Evolution)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"t_list = 0:1:500\nsol_H = HEOMsolve(M_Heom, ψ0, t_list; e_ops = [σz, a' * a])","category":"page"},{"location":"examples/cavityQED/#Solve-stationary-state-of-ADOs","page":"Cavity QED system","title":"Solve stationary state of ADOs","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also Stationary State)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"steady_H = steadystate(M_Heom);\nnothing #hide","category":"page"},{"location":"examples/cavityQED/#Expectation-values","page":"Cavity QED system","title":"Expectation values","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"observable of atom: sigma_z","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"σz_evo_H = real(sol_H.expect[1, :])\nσz_steady_H = expect(σz, steady_H)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"observable of cavity: a^dagger a (average photon number)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"np_evo_H = real(sol_H.expect[2, :])\nnp_steady_H = expect(a' * a, steady_H)\n\np1 = Plots.plot(\n t_list,\n [σz_evo_H, ones(length(t_list)) .* σz_steady_H],\n label = [L\"\\langle \\sigma_z \\rangle\" L\"\\langle \\sigma_z \\rangle ~~(\\textrm{steady})\"],\n linewidth = 3,\n linestyle = [:solid :dash],\n)\np2 = Plots.plot(\n t_list,\n [np_evo_H, ones(length(t_list)) .* np_steady_H],\n label = [L\"\\langle a^\\dagger a \\rangle\" L\"\\langle a^\\dagger a \\rangle ~~(\\textrm{steady})\"],\n linewidth = 3,\n linestyle = [:solid :dash],\n)\nPlots.plot(p1, p2, layout = [1, 1])\nPlots.xaxis!(\"t\")","category":"page"},{"location":"examples/cavityQED/#Power-spectrum","page":"Cavity QED system","title":"Power spectrum","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also Spectrum)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"ω_list = 1:0.01:3\npsd_H = PowerSpectrum(M_Heom, steady_H, a, ω_list)\n\nPlots.plot(ω_list, psd_H, linewidth = 3)\nPlots.xaxis!(L\"\\omega\")","category":"page"},{"location":"examples/cavityQED/#Compare-with-Master-Eq.-approach","page":"Cavity QED system","title":"Compare with Master Eq. approach","text":"","category":"section"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"(see also HEOMLS for Master Equations)","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"The Lindblad master equations which describes the cavity couples to an extra bosonic reservoir with Drude-Lorentzian spectral density is given by","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"# Drude_Lorentzian spectral density\nDrude_Lorentz(ω, Γ, W) = 4 * Γ * W * ω / ((ω)^2 + (W)^2)\n\n# Bose-Einstein distribution\nn_b(ω, kT) = 1 / (exp(ω / kT) - 1)\n\n# build the jump operators\njump_op =\n [sqrt(Drude_Lorentz(ωc, Γ, W) * (n_b(ωc, kT) + 1)) * a, sqrt(Drude_Lorentz(ωc, Γ, W) * (n_b(ωc, kT))) * a', J_pump];\n\n# construct the HEOMLS matrix for master equation\nM_master = M_S(H_s)\nM_master = addBosonDissipator(M_master, jump_op)\n\n# time evolution\nsol_M = HEOMsolve(M_master, ψ0, t_list; e_ops = [σz, a' * a]);\n\n# steady state\nsteady_M = steadystate(M_master);\n\n# expectation value of σz\nσz_evo_M = real(sol_M.expect[1, :])\nσz_steady_M = expect(σz, steady_M)\n\n# average photon number\nnp_evo_M = real(sol_M.expect[2, :])\nnp_steady_M = expect(a' * a, steady_M)\n\np1 = Plots.plot(\n t_list,\n [σz_evo_M, ones(length(t_list)) .* σz_steady_M],\n label = [L\"\\langle \\sigma_z \\rangle\" L\"\\langle \\sigma_z \\rangle ~~(\\textrm{steady})\"],\n linewidth = 3,\n linestyle = [:solid :dash],\n)\np2 = Plots.plot(\n t_list,\n [np_evo_M, ones(length(t_list)) .* np_steady_M],\n label = [L\"\\langle a^\\dagger a \\rangle\" L\"\\langle a^\\dagger a \\rangle ~~(\\textrm{steady})\"],\n linewidth = 3,\n linestyle = [:solid :dash],\n)\nPlots.plot(p1, p2, layout = [1, 1])\nPlots.xaxis!(\"t\")","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"We can also calculate the power spectrum","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"ω_list = 1:0.01:3\npsd_M = PowerSpectrum(M_master, steady_M, a, ω_list)\n\nPlots.plot(ω_list, psd_M, linewidth = 3)\nPlots.xaxis!(L\"\\omega\")","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"Due to the weak coupling between the system and an extra bosonic environment, the Master equation's outcome is expected to be similar to the results obtained from the HEOM method.","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"","category":"page"},{"location":"examples/cavityQED/","page":"Cavity QED system","title":"Cavity QED system","text":"This page was generated using Literate.jl.","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"EditURL = \"../../../examples/dynamical_decoupling.jl\"","category":"page"},{"location":"examples/dynamical_decoupling/#exp-dynamical-decoupling","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"In this page, we show how to solve the time evolution with time-dependent Hamiltonian problems in hierarchical equations of motion approach.","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"using QuantumToolbox\nusing HierarchicalEOM\nusing LaTeXStrings\nimport Plots","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Here, we study dynamical decoupling which is a common tool used to undo the dephasing effect from the environment even for finite pulse duration.","category":"page"},{"location":"examples/dynamical_decoupling/#Hamiltonian","page":"Driven Systems and Dynamical Decoupling","title":"Hamiltonian","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"We consider a two-level system coupled to a bosonic reservoir (textrmb). The total Hamiltonian is given by H_textrmT=H_textrms+H_textrmb+H_textrmsb, where each terms takes the form","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"beginaligned\nH_textrms(t) = H_0 + H_textrmD(t)\nH_0 = fracomega_02 sigma_z\nH_textrmb =sum_komega_kb_k^daggerb_k\nH_textrmsb =sigma_zsum_kg_alphak(b_k + b_k^dagger)\nendaligned","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Here, H_textrmb describes a bosonic reservoir where b_k (b_k^dagger) is the bosonic annihilation (creation) operator associated to the kth mode (with frequency omega_k).","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Furthermore, to observe the time evolution of the coherence, we consider the initial state to be","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"ψ(t=0)=frac1sqrt2left(0rangle+1rangleright)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Now, we need to build the system Hamiltonian and initial state with the package QuantumToolbox.jl to construct the operators.","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"ω0 = 0.0\nσz = sigmaz()\nσx = sigmax()\nH0 = 0.5 * ω0 * σz\n\n# Define the operator that measures the 0, 1 element of density matrix\nρ01 = Qobj([0 1; 0 0])\n\nψ0 = (basis(2, 0) + basis(2, 1)) / √2;\nnothing #hide","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"The time-dependent driving term H_textrmD(t) has the form","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"H_textrmD(t) = sum_n=1^N f_n(t) sigma_x","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"where the pulse is chosen to have duration tau together with a delay Delta between each pulses, namely","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"f_n(t)\n= begincases\n V textrmif(n-1)tau + nDelta leq t leq n (tau + Delta)\n 0 textrmotherwise\n endcases","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Here, we set the period of the pulses to be tau V = pi2. Therefore, we consider two scenarios with fast and slow pulses:","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"# a function which returns the amplitude of the pulse at time t\nfunction pulse(V, Δ, t)\n τ = 0.5 * π / V\n period = τ + Δ\n\n if (t % period) < τ\n return V\n else\n return 0\n end\nend\n\ntlist = 0:0.4:400\namp_fast = 0.50\namp_slow = 0.01\ndelay = 20\n\nPlots.plot(\n tlist,\n [[pulse(amp_fast, delay, t) for t in tlist], [pulse(amp_slow, delay, t) for t in tlist]],\n label = [\"Fast Pulse\" \"Slow Pulse\"],\n linestyle = [:solid :dash],\n)","category":"page"},{"location":"examples/dynamical_decoupling/#Construct-bath-objects","page":"Driven Systems and Dynamical Decoupling","title":"Construct bath objects","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"We assume the bosonic reservoir to have a Drude-Lorentz Spectral Density, and we utilize the Padé decomposition. Furthermore, the spectral densities depend on the following physical parameters:","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"the coupling strength Gamma between system and reservoir\nthe band-width W\nthe product of the Boltzmann constant k and the absolute temperature T : kT\nthe total number of exponentials for the reservoir (N + 1)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Γ = 0.0005\nW = 0.005\nkT = 0.05\nN = 3\nbath = Boson_DrudeLorentz_Pade(σz, Γ, W, kT, N)","category":"page"},{"location":"examples/dynamical_decoupling/#Construct-HEOMLS-matrix","page":"Driven Systems and Dynamical Decoupling","title":"Construct HEOMLS matrix","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"(see also HEOMLS Matrix for Bosonic Baths)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"note: Note\nOnly provide the time-independent part of system Hamiltonian when constructing HEOMLS matrices (the time-dependent part H_t should be given when solving the time evolution).","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"tier = 6\nM = M_Boson(H0, tier, bath)","category":"page"},{"location":"examples/dynamical_decoupling/#time-evolution-with-time-independent-Hamiltonian","page":"Driven Systems and Dynamical Decoupling","title":"time evolution with time-independent Hamiltonian","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"(see also Time Evolution)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"noPulseSol = HEOMsolve(M, ψ0, tlist; e_ops = [ρ01]);\nnothing #hide","category":"page"},{"location":"examples/dynamical_decoupling/#Solve-time-evolution-with-time-dependent-Hamiltonian","page":"Driven Systems and Dynamical Decoupling","title":"Solve time evolution with time-dependent Hamiltonian","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"(see also Time Evolution)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"We need to provide a user-defined function (named as H_D in this case), which must be in the form H_D(t, p::NamedTuple) and returns the time-dependent part of system Hamiltonian (in QuantumObject type) at any given time point t. The parameter p should be a NamedTuple which contains all the extra parameters [V (amplitude), Δ (delay), and σx (operator) in this case] for the function H_D:","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"H_D(t, p::NamedTuple) = pulse(p.V, p.Δ, t) * p.σx;\nnothing #hide","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"The parameter p will be passed to your function H_D directly from the last required parameter in HEOMsolve:","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"fastTuple = (V = amp_fast, Δ = delay, σx = σx)\nslowTuple = (V = amp_slow, Δ = delay, σx = σx)\n\nfastPulseSol = HEOMsolve(M, ψ0, tlist; e_ops = [ρ01], H_t = H_D, params = fastTuple)\nslowPulseSol = HEOMsolve(M, ψ0, tlist; e_ops = [ρ01], H_t = H_D, params = slowTuple)","category":"page"},{"location":"examples/dynamical_decoupling/#Plot-the-coherence","page":"Driven Systems and Dynamical Decoupling","title":"Plot the coherence","text":"","category":"section"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"Plots.plot(\n tlist,\n [real(fastPulseSol.expect[1, :]), real(slowPulseSol.expect[1, :]), real(noPulseSol.expect[1, :])],\n label = [\"Fast Pulse\" \"Slow Pulse\" \"no Pulse\"],\n linestyle = [:solid :dot :dash],\n linewidth = 3,\n xlabel = L\"t\",\n ylabel = L\"\\rho_{01}\",\n grid = false,\n)","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"This example is from QuTiP-BoFiN paper : Phys. Rev. Research 5, 013181 (2023).","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"","category":"page"},{"location":"examples/dynamical_decoupling/","page":"Driven Systems and Dynamical Decoupling","title":"Driven Systems and Dynamical Decoupling","text":"This page was generated using Literate.jl.","category":"page"},{"location":"heom_matrix/schrodinger_eq/#doc-M_S","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS Matrix for Schrödinger Equation","text":"","category":"section"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"The HEOM Liouvillian superoperator matrix with cutoff level of the hierarchy equals to 0: struct M_S <: AbstractHEOMLSMatrix ","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"This corresponds to the standard Schrodinger (Liouville-von Neumann) equation, namely","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"hatmathcalMcdot=-i leftH_s cdot right_-","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"where cdot cdot_- stands for commutator.","category":"page"},{"location":"heom_matrix/schrodinger_eq/#Construct-Matrix","page":"HEOMLS for Schrödinger Equation","title":"Construct Matrix","text":"","category":"section"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"To construct the HEOM matrix for Schrödinger Equation, one can call ","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"M_S(Hsys, parity) with the following parameters:","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"args (Arguments)","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"Hsys : The time-independent system Hamiltonian\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on. Defaults to EVEN.","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"kwargs (Keyword Arguments)","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"verbose::Bool : To display verbose output during the process or not. Defaults to true.","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"For example:","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"Hs::QuantumObject # system Hamiltonian\n\n# create HEOMLS matrix in both EVEN and ODD parity\nM_even = M_S(Hs) \nM_odd = M_S(Hs, ODD) ","category":"page"},{"location":"heom_matrix/schrodinger_eq/#Fields","page":"HEOMLS for Schrödinger Equation","title":"Fields","text":"","category":"section"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"The fields of the structure M_S are as follows:","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"data : the sparse matrix of HEOM Liouvillian superoperator\ntier : the tier (cutoff level) for the hierarchy, which equals to 0 in this case\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs, which equals to 1 (only the reduced density operator) in this case\nsup_dim : the dimension of system superoperator\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on.","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"One can obtain the value of each fields as follows:","category":"page"},{"location":"heom_matrix/schrodinger_eq/","page":"HEOMLS for Schrödinger Equation","title":"HEOMLS for Schrödinger Equation","text":"M::M_S\n\nM.data\nM.tier\nM.dims\nM.N\nM.sup_dim\nM.parity","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/#doc-M_Boson_Fermion","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS Matrix for Hybrid (Bosonic and Fermionic) Baths","text":"","category":"section"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"The HEOM Liouvillian superoperator matrix struct M_Boson_Fermion <: AbstractHEOMLSMatrix which describes the system simultaneously interacts with multiple Bosonic baths and Fermionic baths. ","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/#Construct-Matrix","page":"HEOMLS for Bosonic and Fermionic Bath","title":"Construct Matrix","text":"","category":"section"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"To construct the HEOM matrix in this case, one can call ","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"M_Boson_Fermion(Hsys, Btier, Ftier, Bbath, Fbath, parity) with the following parameters:","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"args (Arguments)","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"Hsys : The time-independent system Hamiltonian\nBtier::Int : the tier (cutoff level) for the bosonic bath\nFtier::Int : the tier (cutoff level) for the fermionic bath\nBbath::Vector{BosonBath} : objects for different bosonic baths\nFbath::Vector{FermionBath} : objects for different fermionic baths\nparity::AbstractParity : the parity label of the operator which HEOMLS is acting on. Defaults to EVEN.","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"kwargs (Keyword Arguments)","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"threshold::Real : The threshold of the importance value. Defaults to 0.0.\nverbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"For example:","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"Hs::QuantumObject # system Hamiltonian\nBtier = 3\nFtier = 4\nBbath::BosonBath\nFbath::FermionBath\n\n# create HEOMLS matrix in both EVEN and ODD parity\nM_even = M_Fermion(Hs, Btier, Ftier, Bbath, Fbath) \nM_odd = M_Fermion(Hs, Btier, Ftier, Bbath, Fbath, ODD) ","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/#Fields","page":"HEOMLS for Bosonic and Fermionic Bath","title":"Fields","text":"","category":"section"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"The fields of the structure M_Boson_Fermion are as follows:","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"data : the sparse matrix of HEOM Liouvillian superoperator\nBtier : the tier (cutoff level) for bosonic hierarchy\nFtier : the tier (cutoff level) for fermionic hierarchy\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of total ADOs\nsup_dim : the dimension of system superoperator\nparity : the parity label of the operator which HEOMLS is acting on. \nBbath::Vector{BosonBath} : the vector which stores all BosonBath objects\nFbath::Vector{FermionBath} : the vector which stores all FermionBath objects\nhierarchy::MixHierarchyDict: the object which contains all dictionaries for mixed-bath-ADOs hierarchy.","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"One can obtain the value of each fields as follows:","category":"page"},{"location":"heom_matrix/M_Boson_Fermion/","page":"HEOMLS for Bosonic and Fermionic Bath","title":"HEOMLS for Bosonic and Fermionic Bath","text":"M::M_Boson_Fermion\n\nM.data\nM.Btier\nM.Ftier\nM.dims\nM.N\nM.sup_dim\nM.parity\nM.Bbath\nM.Fbath\nM.hierarchy","category":"page"},{"location":"cite/#doc-Cite","page":"Cite HierarchicalEOM.jl","title":"Cite HierarchicalEOM.jl","text":"","category":"section"},{"location":"cite/#BibTex-for-[Commun.-Phys.-6,-313-(2023)](https://doi.org/10.1038/s42005-023-01427-2)","page":"Cite HierarchicalEOM.jl","title":"BibTex for Commun. Phys. 6, 313 (2023)","text":"","category":"section"},{"location":"cite/","page":"Cite HierarchicalEOM.jl","title":"Cite HierarchicalEOM.jl","text":"@article{HierarchicalEOM-jl2023,\n doi = {10.1038/s42005-023-01427-2},\n url = {https://doi.org/10.1038/s42005-023-01427-2},\n year = {2023},\n month = {Oct},\n publisher = {Nature Portfolio},\n volume = {6},\n number = {1},\n pages = {313},\n author = {Huang, Yi-Te and Kuo, Po-Chen and Lambert, Neill and Cirio, Mauro and Cross, Simon and Yang, Shen-Liang and Nori, Franco and Chen, Yueh-Nan},\n title = {An efficient {J}ulia framework for hierarchical equations of motion in open quantum systems},\n journal = {Communications Physics}\n}","category":"page"},{"location":"cite/#BibTex-for-[arXiv:2306.07522-(2023)](https://doi.org/10.48550/arXiv.2306.07522)","page":"Cite HierarchicalEOM.jl","title":"BibTex for arXiv:2306.07522 (2023)","text":"","category":"section"},{"location":"cite/","page":"Cite HierarchicalEOM.jl","title":"Cite HierarchicalEOM.jl","text":"@article{HierarchicalEOM-jl2023,\n title={{HierarchicalEOM.jl}: {A}n efficient {J}ulia framework for hierarchical equations of motion in open quantum systems},\n author={Huang, Yi-Te and Kuo, Po-Chen and Lambert, Neill and Cirio, Mauro and Cross, Simon and Yang, Shen-Liang and Nori, Franco and Chen, Yueh-Nan},\n journal={arXiv preprint arXiv:2306.07522},\n year={2023}\n}","category":"page"},{"location":"ADOs/#doc-ADOs","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"","category":"section"},{"location":"ADOs/#Introduction","page":"Auxiliary Density Operators","title":"Introduction","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"The auxiliary density operators (ADOs) rho_textbfjverttextbfq^(mnp)(t) encode environmental effects related to different exponential terms (Exponent) present in the Bosonic Bath and Fermionic Bath correlation functions and provide an iterative description of high-order system-baths memory effects.","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"In rho_textbfjverttextbfq^(mnp)(t), the tuple (m n p) represents the mth-level-bosonic-and-nth-level-fermionic ADO with parity p, and textbfj (textbfq) denotes a vector j_mcdotsj_1 (q_ncdotsq_1) where each j (q) represents a specific multi-index ensemble beta l (alpha h) with","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"beta : denotes the index of bosonic bath\nalpha : denotes the index of fermionic bath\nl : denotes the index of exponent in the bosonic bath\nh : denotes the index of exponent in the fermionic bath","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"note: Reduced Density Operator\nThe system reduced density operator refers to m=n=0, namely rho_vert^(00p)(t).","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"In HierarchicalEOM.jl, we express all the auxiliary density operators into a single column vector and store it in the object defined as : ","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"struct ADOs, ","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"which is usually obtained after solving the time evolution or stationary state by a given HEOM Liouvillian superoperator Matrix.","category":"page"},{"location":"ADOs/#Fields","page":"Auxiliary Density Operators","title":"Fields","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"The fields of the structure ADOs are as follows:","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"data : the vectorized auxiliary density operators\ndims : the dimension list of the coupling operator (should be equal to the system dims).\nN : the number of auxiliary density operators\nparity: the parity label","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"One obtain the value of each fields as follows:","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"# usually obtained after solving time evolution or stationary state\nados::ADOs\n\nados.data\nados.dims\nados.N\nados.parity","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"warning: Warning\nWe express all the auxiliary density operators in only a single column vector ADOs.data. To obtain each auxiliary density operators in matrix form, please use the following methods and functions.","category":"page"},{"location":"ADOs/#Reduced-Density-Operator","page":"Auxiliary Density Operators","title":"Reduced Density Operator","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"In order to obtain the system reduced density operator in the type of QuantumObject, just simply call getRho","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\nρ = getRho(ados)","category":"page"},{"location":"ADOs/#High-Level-Auxiliary-Density-Operators","page":"Auxiliary Density Operators","title":"High-Level Auxiliary Density Operators","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Although we express all the auxiliary density operators in the vector ADOs.data, we still make the ADOs like a list where accessing each element would return a specific auxiliary density operator in matrix type. ","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"In order to obtain the auxiliary density operator in the type of QuantumObject with a specific index i, just simply call getADO","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\ni::Int\n\nρ = getADO(ados, 1) # the first element will always be the reduced density operator\nado = getADO(ados, i) # the i-th auxiliary density operator","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Also, ADOs supports all the element-wise methods (functions) :","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Supports length(::ADOs) which returns the total number of auxiliary density operators (same as ADOs.N) :","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\nlength(ados)","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Supports bracket operation [] which is similar to access the element of a list :","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\n\n# all the following returned ADO will be in matrix form\nados[1] # returns the first auxiliary density operator (which is always the reduced density operator)\nados[10] # returns the 10-th auxiliary density operator\nados[3:10] # returns a list of auxiliary density operators from index 3 to 10\nados[end] # returns the last auxiliary density operator","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Supports iteration (for-loop) process :","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"ados::ADOs\n\nfor ado in ados # iteration\n ado # each auxiliary density operator in matrix form\nend","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"note: Work on high-level auxiliary density operators with Hierarchy Dictionary\nTo find the index of the auxiliary density operator and it's corresponding bath Exponent, please refer to Hierarchy Dictionary for more details.","category":"page"},{"location":"ADOs/#Expectation-Value","page":"Auxiliary Density Operators","title":"Expectation Value","text":"","category":"section"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Given an observable A and ADOs rho^(mnp)_textbfj vert textbfq, one can calculate the expectation value by","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"langle A rangle = textrmTrleftA rho^(00p)_ vert right","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"where, m=n=0 represents the reduced density operator.","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"One can directly calculate the expectation values using the function QuantumToolbox.expect:","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"A::QuantumObject # observable\n\n# with a single ADOs\nados::ADOs\nE = expect(A, ados)\n\n# with a list contains many ADOs\nados_list::Vector{ADOs}\nElist = expect(A, ados_list)","category":"page"},{"location":"ADOs/","page":"Auxiliary Density Operators","title":"Auxiliary Density Operators","text":"Here, Elist contains the expectation values corresponding to the ados_list.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#doc-Bosonic-Bath","page":"Introduction","title":"Bosonic Bath","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/#Bosonic-Bath-Overview","page":"Introduction","title":"Overview","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"The BosonBath object describes the interaction between the system (s) and a exterior bosonic environment (b), which can be modeled by","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"H_sb=V_ssum_k g_k (b_k + b_k^dagger)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"in terms of the coupling strength g_k and the annihilation (creation) operator b_k (b_k^dagger) associated to the k-th mode of the bosonic environment. Here, V_s refers to the system-interaction operator. In particular, V_s must be a Hermitian operator which can act on both bosonic and fermionic systems degree of freedom. In the fermionic system case, V_s must have even parity to be compatible with charge conservation.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"The effects of a bosonic environment (initially in thermal equilibrium and linearly coupled to the system) are completely encoded in the two-time correlation functions, namely","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"C(t_1 t_2)\n=frac12piint_0^infty domega J(omega)leftn(omega)e^iomega (t_1-t_2)+(n(omega)+1)e^-iomega (t_1-t_2)right","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"where J(omega)=2piSigma_k g_k^2 delta(omega-omega_k) is the spectral density of the bath and n(omega)=exp(omegak_B T)-1^-1 represents the Bose-Einstein distribution.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"A more practical representation can be found by expressing the correlation function as a sum of exponential terms (Exponent), namely","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"C(t_1 t_2)=sum_i eta_i e^-gamma_i (t_1-t_2)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"This allows us to define an iterative procedure which leads to the hierarchical equations of motion (HEOM).","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Construct-BosonBath-(with-real-and-imaginary-parts-are-combined)","page":"Introduction","title":"Construct BosonBath (with real and imaginary parts are combined)","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can construct the BosonBath object with the coupling operator Vs::QuantumObject and the two lists η::AbstractVector and γ::AbstractVector which corresponds to the exponential terms eta_i_i and gamma_i_i, respectively.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"bath = BosonBath(Vs, η, γ)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"warning: Warning\nHere, the length of η and γ should be the same.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Construct-BosonBath-(with-real-and-imaginary-parts-are-separated)","page":"Introduction","title":"Construct BosonBath (with real and imaginary parts are separated)","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"When gamma_i neq gamma_i^*, a closed form for the HEOM can be obtained by further decomposing C(t_1 t_2) into its real (R) and imaginary (I) parts as","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"C(t_1 t_2)=sum_u=textrmRtextrmI(delta_u textrmR + idelta_u textrmI)C^u(t_1 t_2)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"where delta is the Kronecker delta function and C^u(t_1 t_2)=sum_i eta_i^u exp(-gamma_i^u (t_1-t_2))","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"In this case, the BosonBath object can be constructed by the following method:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"bath = BosonBath(Vs, η_real, γ_real, η_imag, γ_imag)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"warning: Warning\nHere, the length of η_real and γ_real should be the same. Also, the length of η_imag and γ_imag should be the same.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"Here, η_real::AbstractVector, γ_real::AbstractVector, η_imag::AbstractVector and γ_imag::AbstractVector correspond to the exponential terms eta_i^textrmR_i, gamma_i^textrmR_i, eta_i^textrmI_i and gamma_i^textrmI_i, respectively.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"note: Note\nInstead of analytically solving the correlation function C(t_1 t_2) to obtain a sum of exponential terms, one can also use the built-in functions (for different spectral densities J(omega) and spectral decomposition methods, which have been analytically solved by the developers already). See the other categories of the Bosonic Bath in the sidebar for more details.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Print-Bosonic-Bath","page":"Introduction","title":"Print Bosonic Bath","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can check the information of the BosonBath by the print function, for example:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"print(bath)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"BosonBath object with 4 exponential-expansion terms","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Calculate-the-correlation-function","page":"Introduction","title":"Calculate the correlation function","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"To check whether the exponential terms in the BosonBath is correct or not, one can call C(bath::BosonBath, tlist::AbstractVector) to calculate the correlation function C(t), where t=t_1-t_2:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"c_list = C(bath, tlist)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"Here, c_list is a list which contains the value of C(t) corresponds to the given time series tlist.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/#Exponent","page":"Introduction","title":"Exponent","text":"","category":"section"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"HierarchicalEOM.jl also supports users to access the specific exponential term with brackets []. This returns an Exponent object, which contains the corresponding value of eta_i and gamma_i:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"e = bath[2] # the 2nd-term\nprint(e)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"bRI\", η = 1.5922874021206546e-6 + 0.0im, γ = 0.3141645167860635 + 0.0im.","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"The different types of the (bosonic-bath) Exponent:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"\"bR\" : from real part of bosonic correlation function C^u=textrmR(t_1 t_2)\n\"bI\" : from imaginary part of bosonic correlation function C^u=textrmI(t_1 t_2)\n\"bRI\" : from combined (real and imaginary part) bosonic bath correlation function C(t_1 t_2)","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"One can even obtain the Exponent with iterative method:","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"for e in bath\n println(e)\nend","category":"page"},{"location":"bath_boson/bosonic_bath_intro/","page":"Introduction","title":"Introduction","text":"Bath Exponent with types = \"bRI\", η = 4.995832638723504e-5 - 2.5e-6im, γ = 0.005 + 0.0im.\n\nBath Exponent with types = \"bRI\", η = 1.5922874021206546e-6 + 0.0im, γ = 0.3141645167860635 + 0.0im.\n\nBath Exponent with types = \"bRI\", η = 1.0039844180003819e-6 + 0.0im, γ = 0.6479143347831898 + 0.0im.\n\nBath Exponent with types = \"bRI\", η = 3.1005439801387293e-6 + 0.0im, γ = 1.8059644711829272 + 0.0im.","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"EditURL = \"../../../examples/quick_start.jl\"","category":"page"},{"location":"examples/quick_start/#Quick-Start","page":"Quick Start","title":"Quick Start","text":"","category":"section"},{"location":"examples/quick_start/#Content","page":"Quick Start","title":"Content","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Import HierarchicalEOM.jl\nSystem and Bath\nHEOM Liouvillian superoperator\nTime Evolution\nStationary State\nReduced Density Operator\nExpectation Value\nMultiple Baths","category":"page"},{"location":"examples/quick_start/#Import-HierarchicalEOM.jl","page":"Quick Start","title":"Import HierarchicalEOM.jl","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Here are the functions in HierarchicalEOM.jl that we will use in this tutorial (Quick Start):","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"import HierarchicalEOM\nimport HierarchicalEOM: Boson_DrudeLorentz_Pade, M_Boson, HEOMsolve, getRho, BosonBath","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Note that you can also type using HierarchicalEOM to import everything you need in HierarchicalEOM.jl. To check the versions of dependencies of HierarchicalEOM.jl, run the following function","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"HierarchicalEOM.versioninfo()","category":"page"},{"location":"examples/quick_start/#System-and-Bath","page":"Quick Start","title":"System and Bath","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Let us consider a simple two-level system coupled to a Drude-Lorentz bosonic bath. The system Hamiltonian, H_sys, and the bath spectral density, J_D, are","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"H_sys=fracepsilon sigma_z2 + fracDelta sigma_x2 textand","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"J_D(omega)=frac2lambda WomegaW^2+omega^2","category":"page"},{"location":"examples/quick_start/#System-Hamiltonian-and-initial-state","page":"Quick Start","title":"System Hamiltonian and initial state","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"You must construct system hamiltonian, initial state, and coupling operators by QuantumToolbox framework. It provides many useful functions to create arbitrary quantum states and operators which can be combined in all the expected ways.","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"import QuantumToolbox: Qobj, sigmaz, sigmax, basis, ket2dm, expect, steadystate\n\n# The system Hamiltonian\nϵ = 0.5 # energy of 2-level system\nΔ = 1.0 # tunneling term\n\nHsys = 0.5 * ϵ * sigmaz() + 0.5 * Δ * sigmax()\n\n# System initial state\nρ0 = ket2dm(basis(2, 0));\n\n# Define the operators that measure the populations of the two system states:\nP00 = ket2dm(basis(2, 0))\nP11 = ket2dm(basis(2, 1))\n\n# Define the operator that measures the 0, 1 element of density matrix\n# (corresponding to coherence):\nP01 = basis(2, 0) * basis(2, 1)'","category":"page"},{"location":"examples/quick_start/#Bath-Properties","page":"Quick Start","title":"Bath Properties","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Now, we demonstrate how to describe the bath using the built-in implementation of J_D(omega) under Pade expansion by calling Boson_DrudeLorentz_Pade","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"λ = 0.1 # coupling strength\nW = 0.5 # band-width (cut-off frequency)\nkT = 0.5 # the product of the Boltzmann constant k and the absolute temperature T\n\nQ = sigmaz() # system-bath coupling operator\n\nN = 2 # Number of expansion terms to retain:\n\n# Padé expansion:\nbath = Boson_DrudeLorentz_Pade(Q, λ, W, kT, N)","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"For other different expansions of the different spectral density correlation functions, please refer to Bosonic Bath and Fermionic Bath.","category":"page"},{"location":"examples/quick_start/#HEOM-Liouvillian-superoperator","page":"Quick Start","title":"HEOM Liouvillian superoperator","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"For bosonic bath, we can construct the HEOM Liouvillian superoperator matrix by calling M_Boson","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"tier = 5 # maximum tier of hierarchy\nL = M_Boson(Hsys, tier, bath)","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"To learn more about the HEOM Liouvillian superoperator matrix (including other types: M_Fermion, M_Boson_Fermion), please refer to HEOMLS Matrices.","category":"page"},{"location":"examples/quick_start/#Time-Evolution","page":"Quick Start","title":"Time Evolution","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"Next, we can calculate the time evolution for the entire auxiliary density operators (ADOs) by calling HEOMsolve","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"tlist = 0:0.2:50\nsol = HEOMsolve(L, ρ0, tlist; e_ops = [P00, P11, P01])","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"To learn more about HEOMsolve, please refer to Time Evolution.","category":"page"},{"location":"examples/quick_start/#Stationary-State","page":"Quick Start","title":"Stationary State","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"We can also solve the stationary state of the auxiliary density operators (ADOs) by calling steadystate.","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"ados_steady = steadystate(L)","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"To learn more about steadystate, please refer to Stationary State.","category":"page"},{"location":"examples/quick_start/#Reduced-Density-Operator","page":"Quick Start","title":"Reduced Density Operator","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"To obtain the reduced density operator, one can either access the first element of auxiliary density operator (ADOs) or call getRho:","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"# reduce density operator in the final time (`end`) of the evolution\nados_list = sol.ados\nρ = ados_list[end][1] # index `1` represents the reduced density operator\nρ = getRho(ados_list[end])\n\n# reduce density operator in stationary state\nρ = ados_steady[1]\nρ = getRho(ados_steady)","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"One of the great features of HierarchicalEOM.jl is that we allow users to not only considering the density operator of the reduced state but also easily take high-order terms into account without struggling in finding the indices (see Auxiliary Density Operators and Hierarchy Dictionary for more details).","category":"page"},{"location":"examples/quick_start/#Expectation-Value","page":"Quick Start","title":"Expectation Value","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"We can now compare the results obtained from HEOMsolve and steadystate:","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"# for time evolution\np00_e = real(sol.expect[1, :]) # P00 is the 1st element in e_ops\np01_e = real(sol.expect[3, :]); # P01 is the 3rd element in e_ops\n\n# for steady state\np00_s = expect(P00, ados_steady)\np01_s = expect(P01, ados_steady);\nnothing #hide","category":"page"},{"location":"examples/quick_start/#Plot-the-results","page":"Quick Start","title":"Plot the results","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"using Plots, LaTeXStrings\n\nplot(tlist, p00_e, label = L\"\\textrm{P}_{00}\", linecolor = :blue, linestyle = :solid, linewidth = 3, grid = false)\nplot!(tlist, p01_e, label = L\"\\textrm{P}_{01}\", linecolor = :red, linestyle = :solid, linewidth = 3)\nplot!(\n tlist,\n ones(length(tlist)) .* p00_s,\n label = L\"\\textrm{P}_{00} \\textrm{(Steady State)}\",\n linecolor = :blue,\n linestyle = :dash,\n linewidth = 3,\n)\nplot!(\n tlist,\n ones(length(tlist)) .* p01_s,\n label = L\"\\textrm{P}_{01} \\textrm{(Steady State)}\",\n linecolor = :red,\n linestyle = :dash,\n linewidth = 3,\n)\n\nxlabel!(\"time\")\nylabel!(\"Population\")","category":"page"},{"location":"examples/quick_start/#Multiple-Baths","page":"Quick Start","title":"Multiple Baths","text":"","category":"section"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"HierarchicalEOM.jl also supports for system to interact with multiple baths.","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"All you need to do is to provide a list of baths instead of a single bath","category":"page"},{"location":"examples/quick_start/","page":"Quick Start","title":"Quick Start","text":"# The system Hamiltonian\nHsys = Qobj([\n 0.25 1.50 2.50\n 1.50 0.75 3.50\n 2.50 3.50 1.25\n])\n\n# System initial state\nρ0 = ket2dm(basis(3, 0));\n\n# Projector for each system state:\nP00 = ket2dm(basis(3, 0))\nP11 = ket2dm(basis(3, 1))\nP22 = ket2dm(basis(3, 2));\n\n# Construct one bath for each system state:\n# note that `BosonBath[]` make the list created in type: Vector{BosonBath}\nbaths = BosonBath[]\nfor i in 0:2\n # system-bath coupling operator: |i>

where a half-Fourier transform has been introduced in the third line. We note that only the reduced density operator ($m=n=0$) is considered when taking the final trace operation.

This function solves the linear problem $\textbf{A x}=\textbf{b}$ at a fixed frequency $\omega$ where

  • $\textbf{A}=\hat{\mathcal{M}}-i\omega$
  • $\textbf{b}=Q\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$

using the package LinearSolve.jl.

Finially, one can obtain the value of the power spectrum for specific $\omega$, namely

\[\pi S(\omega) = -\textrm{Re}\left\{\textrm{Tr}\left[ P \textbf{x}\right]\right\}.\]

Odd-Parity for Power Spectrum

When $Q$ is an operator acting on fermionic systems and has ODD-parity, the HEOMLS matrix $\hat{\mathcal{M}}$ is acting on the ODD-parity space because $\textbf{b}=Q\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$. Therefore, remember to construct $\hat{\mathcal{M}}$ with ODD parity in this kind of cases.

See also the docstring :

HierarchicalEOM.PowerSpectrumFunction
PowerSpectrum(M, ρ, P_op, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)

Calculate power spectrum for the system in frequency domain.

\[\pi S(\omega)=\textrm{Re}\left\{\int_0^\infty dt \langle P(t) Q(0)\rangle e^{-i\omega t}\right\},\]

To calculate spectrum when input operator Q_op has EVEN-parity:

remember to set the parameters:

  • M::AbstractHEOMLSMatrix: should be EVEN parity

To calculate spectrum when input operator Q_op has ODD-parity:

remember to set the parameters:

  • M::AbstractHEOMLSMatrix: should be ODD parity

Parameters

  • M::AbstractHEOMLSMatrix : the HEOMLS matrix.
  • ρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.
  • P_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) $P$ acting on the system.
  • Q_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) $Q$ acting on the system.
  • ωlist::AbstractVector : the specific frequency points to solve.
  • reverse::Bool : If true, calculate $\langle P(-t)Q(0) \rangle = \langle P(0)Q(t) \rangle = \langle P(t)Q(0) \rangle^*$ instead of $\langle P(t) Q(0) \rangle$. Default to false.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the value of spectrum for each ω will be saved into the file "filename.txt" during the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • spec::AbstractVector : the spectrum list corresponds to the specified ωlist
source
M::AbstractHEOMLSMatrix
+\end{aligned}\]

where a half-Fourier transform has been introduced in the third line. We note that only the reduced density operator ($m=n=0$) is considered when taking the final trace operation.

This function solves the linear problem $\textbf{A x}=\textbf{b}$ at a fixed frequency $\omega$ where

  • $\textbf{A}=\hat{\mathcal{M}}-i\omega$
  • $\textbf{b}=Q\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$

using the package LinearSolve.jl.

Finially, one can obtain the value of the power spectrum for specific $\omega$, namely

\[\pi S(\omega) = -\textrm{Re}\left\{\textrm{Tr}\left[ P \textbf{x}\right]\right\}.\]

Odd-Parity for Power Spectrum

When $Q$ is an operator acting on fermionic systems and has ODD-parity, the HEOMLS matrix $\hat{\mathcal{M}}$ is acting on the ODD-parity space because $\textbf{b}=Q\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$. Therefore, remember to construct $\hat{\mathcal{M}}$ with ODD parity in this kind of cases.

See also the docstring :

HierarchicalEOM.PowerSpectrumFunction
PowerSpectrum(M, ρ, P_op, Q_op, ωlist, reverse; solver, verbose, filename, SOLVEROptions...)

Calculate power spectrum for the system in frequency domain.

\[\pi S(\omega)=\textrm{Re}\left\{\int_0^\infty dt \langle P(t) Q(0)\rangle e^{-i\omega t}\right\},\]

To calculate spectrum when input operator Q_op has EVEN-parity:

remember to set the parameters:

  • M::AbstractHEOMLSMatrix: should be EVEN parity

To calculate spectrum when input operator Q_op has ODD-parity:

remember to set the parameters:

  • M::AbstractHEOMLSMatrix: should be ODD parity

Parameters

  • M::AbstractHEOMLSMatrix : the HEOMLS matrix.
  • ρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.
  • P_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) $P$ acting on the system.
  • Q_op::Union{QuantumObject,HEOMSuperOp}: the system operator (or HEOMSuperOp) $Q$ acting on the system.
  • ωlist::AbstractVector : the specific frequency points to solve.
  • reverse::Bool : If true, calculate $\langle P(-t)Q(0) \rangle = \langle P(0)Q(t) \rangle = \langle P(t)Q(0) \rangle^*$ instead of $\langle P(t) Q(0) \rangle$. Default to false.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the value of spectrum for each ω will be saved into the file "filename.txt" during the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • spec::AbstractVector : the spectrum list corresponds to the specified ωlist
source
M::AbstractHEOMLSMatrix
 
 # the input state can be in either type (but usually ADOs):
 ρ::QuantumObject # the reduced density operator
@@ -38,7 +38,7 @@
 &= \textrm{Re}\left\{\int_0^\infty dt \langle d e^{\hat{\mathcal{M}} t}d^\dagger\rangle e^{i\omega t}\right\}+\textrm{Re}\left\{\int_0^\infty dt \langle d^\dagger e^{\hat{\mathcal{M}} t}d\rangle e^{-i\omega t}\right\}\\
 &= -\textrm{Re}\left\{\langle d (\hat{\mathcal{M}} +i\omega)^{-1} d^\dagger\rangle + \langle d^\dagger (\hat{\mathcal{M}} -i\omega)^{-1} d\rangle\right\}\\
 &= -\textrm{Re}\left\{\textrm{Tr}\left[ d (\hat{\mathcal{M}} +i\omega)^{-1} d^\dagger\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}\right] + \textrm{Tr}\left[ d^\dagger (\hat{\mathcal{M}} -i\omega)^{-1} d\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}\right]\right\},
-\end{aligned}\]

where a half-Fourier transform has been introduced in the third line. We note that only the reduced density operator ($m=n=0$) is considered when taking the final trace operation.

This functionsolves two linear problems $\textbf{A}_+ \textbf{x}_+=\textbf{b}_+$ and $\textbf{A}_- \textbf{x}_-=\textbf{b}_-$ at a fixed frequency $\omega$ where

  • $\textbf{A}_+=\hat{\mathcal{M}}+i\omega$
  • $\textbf{b}_+=d^\dagger\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$
  • $\textbf{A}_-=\hat{\mathcal{M}}-i\omega$
  • $\textbf{b}_-=d\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$

using the package LinearSolve.jl.

Finially, one can obtain the density of states for specific $\omega$, namely

\[\pi A(\omega) = -\textrm{Re}\left\{\textrm{Tr}\left[ d \textbf{x}_+\right]+\textrm{Tr}\left[ d^\dagger \textbf{x}_-\right]\right\}.\]

Odd-Parity for Density of States

As shown above, the HEOMLS matrix $\hat{\mathcal{M}}$ acts on the ODD-parity space, compatibly with the parity of both the operators $\textbf{b}_-=d\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$ and $\textbf{b}_+=d^\dagger\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$. Therefore, remember to construct $\hat{\mathcal{M}}$ with ODD parity for solving spectrum of fermionic systems.

See also the docstring :

HierarchicalEOM.DensityOfStatesMethod
DensityOfStates(M, ρ, d_op, ωlist; solver, verbose, filename, SOLVEROptions...)

Calculate density of states for the fermionic system in frequency domain.

\[ \pi A(\omega)=\textrm{Re}\left\{\int_0^\infty dt \left[\langle d(t) d^\dagger(0)\rangle^* + \langle d^\dagger(t) d(0)\rangle \right] e^{-i\omega t}\right\},\]

Parameters

  • M::AbstractHEOMLSMatrix : the HEOMLS matrix which acts on ODD-parity operators.
  • ρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.
  • d_op::QuantumObject : The annihilation operator ($d$ as shown above) acting on the fermionic system.
  • ωlist::AbstractVector : the specific frequency points to solve.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the value of spectrum for each ω will be saved into the file "filename.txt" during the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • dos::AbstractVector : the list of density of states corresponds to the specified ωlist
source
Hs::QuantumObject  # system Hamiltonian
+\end{aligned}\]

where a half-Fourier transform has been introduced in the third line. We note that only the reduced density operator ($m=n=0$) is considered when taking the final trace operation.

This functionsolves two linear problems $\textbf{A}_+ \textbf{x}_+=\textbf{b}_+$ and $\textbf{A}_- \textbf{x}_-=\textbf{b}_-$ at a fixed frequency $\omega$ where

  • $\textbf{A}_+=\hat{\mathcal{M}}+i\omega$
  • $\textbf{b}_+=d^\dagger\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$
  • $\textbf{A}_-=\hat{\mathcal{M}}-i\omega$
  • $\textbf{b}_-=d\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$

using the package LinearSolve.jl.

Finially, one can obtain the density of states for specific $\omega$, namely

\[\pi A(\omega) = -\textrm{Re}\left\{\textrm{Tr}\left[ d \textbf{x}_+\right]+\textrm{Tr}\left[ d^\dagger \textbf{x}_-\right]\right\}.\]

Odd-Parity for Density of States

As shown above, the HEOMLS matrix $\hat{\mathcal{M}}$ acts on the ODD-parity space, compatibly with the parity of both the operators $\textbf{b}_-=d\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$ and $\textbf{b}_+=d^\dagger\rho^{(m,n,+)}_{\textbf{j} \vert \textbf{q}}$. Therefore, remember to construct $\hat{\mathcal{M}}$ with ODD parity for solving spectrum of fermionic systems.

See also the docstring :

HierarchicalEOM.DensityOfStatesMethod
DensityOfStates(M, ρ, d_op, ωlist; solver, verbose, filename, SOLVEROptions...)

Calculate density of states for the fermionic system in frequency domain.

\[ \pi A(\omega)=\textrm{Re}\left\{\int_0^\infty dt \left[\langle d(t) d^\dagger(0)\rangle^* + \langle d^\dagger(t) d(0)\rangle \right] e^{-i\omega t}\right\},\]

Parameters

  • M::AbstractHEOMLSMatrix : the HEOMLS matrix which acts on ODD-parity operators.
  • ρ::Union{QuantumObject,ADOs} : the system density matrix or the auxiliary density operators.
  • d_op::QuantumObject : The annihilation operator ($d$ as shown above) acting on the fermionic system.
  • ωlist::AbstractVector : the specific frequency points to solve.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the value of spectrum for each ω will be saved into the file "filename.txt" during the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • dos::AbstractVector : the list of density of states corresponds to the specified ωlist
source
Hs::QuantumObject  # system Hamiltonian
 bath::FermionBath  # fermionic bath object
 tier::Int          # fermionic truncation level 
 
@@ -55,4 +55,4 @@
 # the spectrum value for the specific frequency ω which need to be solved
 ω_list = 0:0.5:2 # [0.0, 0.5, 1.0, 1.5, 2.0]
 
-πAω = DensityOfStates(M_odd, ados, d, ω_list)
+πAω = DensityOfStates(M_odd, ados, d, ω_list)
diff --git a/dev/stationary_state/index.html b/dev/stationary_state/index.html index f8f6f68c..eba6ddde 100644 --- a/dev/stationary_state/index.html +++ b/dev/stationary_state/index.html @@ -1,16 +1,16 @@ -Stationary State · Documentation | HierarchicalEOM.jl

Stationary State

HierarchicalEOM.jl implements two different ways to calculate stationary states of all Auxiliary Density Operators (ADOs).

To solve the stationary state of the reduced state and also all the ADOs, you only need to call steadystate. Different methods are implemented with different input parameters of the function which makes it easy to switch between different methods. The output of the function steadystate for each methods will always be in the type of the auxiliary density operators ADOs.

Solve with LinearSolve.jl

The first method is implemented by solving the linear problem

\[0=\hat{\mathcal{M}}\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(t)\]

HierarchicalEOM.jl wraps some of the functions in LinearSolve.jl, which is a very rich numerical library for solving the linear problems and provides many solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to LinearSolve solvers and also the documentation of LinearSolve.jl.

See the docstring of this method:

QuantumToolbox.steadystateMethod
steadystate(M::AbstractHEOMLSMatrix; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on LinearSolve.jl (i.e., solving $x$ where $A \times x = b$).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source
# the HEOMLS matrix
+Stationary State · Documentation | HierarchicalEOM.jl

Stationary State

HierarchicalEOM.jl implements two different ways to calculate stationary states of all Auxiliary Density Operators (ADOs).

To solve the stationary state of the reduced state and also all the ADOs, you only need to call steadystate. Different methods are implemented with different input parameters of the function which makes it easy to switch between different methods. The output of the function steadystate for each methods will always be in the type of the auxiliary density operators ADOs.

Solve with LinearSolve.jl

The first method is implemented by solving the linear problem

\[0=\hat{\mathcal{M}}\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(t)\]

HierarchicalEOM.jl wraps some of the functions in LinearSolve.jl, which is a very rich numerical library for solving the linear problems and provides many solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to LinearSolve solvers and also the documentation of LinearSolve.jl.

See the docstring of this method:

QuantumToolbox.steadystateMethod
steadystate(M::AbstractHEOMLSMatrix; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on LinearSolve.jl (i.e., solving $x$ where $A \times x = b$).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • solver::SciMLLinearSolveAlgorithm : solver in package LinearSolve.jl. Default to UMFPACKFactorization().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

  • For more details about solver and SOLVEROptions, please refer to LinearSolve.jl

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source
# the HEOMLS matrix
 M::AbstractHEOMLSMatrix  
-ados_steady = steadystate(M)
Unphysical solution

This method does not require an initial condition $\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(0)$. Although this method works for most of the cases, it does not guarantee that one can obtain a physical (or unique) solution. If there is any problem within the solution, please try the second method which solves with an initial condition, as shown below.

Solve with DifferentialEquations.jl

The second method is implemented by solving the ordinary differential equation (ODE) method :

\[\partial_{t}\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(t)=\hat{\mathcal{M}}\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(t)\]

until finding a stationary solution.

HierarchicalEOM.jl wraps some of the functions in DifferentialEquations.jl, which is a very rich numerical library for solving the differential equations and provides many ODE solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to the documentation of DifferentialEquations.jl.

Given the initial state as Density Operator (QuantumObject type)

See the docstring of this method:

QuantumToolbox.steadystateFunction
steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tspan::Number : the time limit to find stationary state. Default to Inf
  • solver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source
# the HEOMLS matrix
+ados_steady = steadystate(M)
Unphysical solution

This method does not require an initial condition $\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(0)$. Although this method works for most of the cases, it does not guarantee that one can obtain a physical (or unique) solution. If there is any problem within the solution, please try the second method which solves with an initial condition, as shown below.

Solve with DifferentialEquations.jl

The second method is implemented by solving the ordinary differential equation (ODE) method :

\[\partial_{t}\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(t)=\hat{\mathcal{M}}\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(t)\]

until finding a stationary solution.

HierarchicalEOM.jl wraps some of the functions in DifferentialEquations.jl, which is a very rich numerical library for solving the differential equations and provides many ODE solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to the documentation of DifferentialEquations.jl.

Given the initial state as Density Operator (QuantumObject type)

See the docstring of this method:

QuantumToolbox.steadystateFunction
steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tspan::Number : the time limit to find stationary state. Default to Inf
  • solver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source
# the HEOMLS matrix
 M::AbstractHEOMLSMatrix  
 
 # the initial state of the system density operator
 ρ0::QuantumObject
 
-ados_steady = steadystate(M, ρ0)

Given the initial state as Auxiliary Density Operators

See the docstring of this method:

QuantumToolbox.steadystateFunction
steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tspan::Number : the time limit to find stationary state. Default to Inf
  • solver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source
# the HEOMLS matrix
+ados_steady = steadystate(M, ρ0)

Given the initial state as Auxiliary Density Operators

See the docstring of this method:

QuantumToolbox.steadystateFunction
steadystate(M::AbstractHEOMLSMatrix, ρ0, tspan; solver, verbose, SOLVEROptions...)

Solve the steady state of the auxiliary density operators based on time evolution (OrdinaryDiffEq.jl) with initial state is given in the type of density-matrix (ρ0).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model, where the parity should be EVEN.
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tspan::Number : the time limit to find stationary state. Default to Inf
  • solver::OrdinaryDiffEqAlgorithm : The ODE solvers in package DifferentialEquations.jl. Default to DP5().
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • SOLVEROptions : extra options for solver

Notes

Returns

  • ::ADOs : The steady state of auxiliary density operators.
source
# the HEOMLS matrix
 M::AbstractHEOMLSMatrix  
 
 # the initial state of the ADOs
 ados::ADOs
 
-ados_steady = steadystate(M, ados)
+ados_steady = steadystate(M, ados)
diff --git a/dev/time_evolution/index.html b/dev/time_evolution/index.html index 73048435..0f3d2875 100644 --- a/dev/time_evolution/index.html +++ b/dev/time_evolution/index.html @@ -25,7 +25,7 @@ filename = "test.jld2" jldopen(filename, "r") do file ados_list = file["ados"] -end

Ordinary Differential Equation (ODE) Method

The first method is implemented by solving the ordinary differential equation (ODE). HierarchicalEOM.jl wraps some of the functions in DifferentialEquations.jl, which is a very rich numerical library for solving the differential equations and provides many ODE solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to DifferentialEquations solvers and also the documentation of DifferentialEquations.jl.

Extension for CUDA.jl

HierarchicalEOM.jl provides an extension to support GPU (CUDA.jl) acceleration for solving the time evolution (only for ODE method with time-independent system Hamiltonian). See here for more details.

See the docstring of this method:

HierarchicalEOM.HEOMsolveMethod
HEOMsolve(M, ρ0, tlist; e_ops, solver, H_t, params, verbose, filename, SOLVEROptions...)

Solve the time evolution for auxiliary density operators based on ordinary differential equations.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tlist::AbstractVector : Denote the specific time points to save the solution at, during the solving process.
  • e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.
  • solver::OrdinaryDiffEqAlgorithm : solver in package DifferentialEquations.jl. Default to DP5().
  • H_t::Union{Nothing,Function}=nothing: The time-dependent Hamiltonian or Liouvillian. It will be called by H_t(t, params).
  • params::NamedTuple=NamedTuple(): The parameters of the time evolution.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file "filename.jld2" after the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • The ADOs will be saved depend on the keyword argument saveat in kwargs.
  • If e_ops is specified, the default value of saveat=[tlist[end]] (only save the final ADOs), otherwise, saveat=tlist (saving the ADOs corresponding to tlist). You can also specify e_ops and saveat separately.
  • The default tolerances in kwargs are given as reltol=1e-6 and abstol=1e-8.
  • For more details about solver please refer to DifferentialEquations.jl (ODE Solvers)
  • For more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)

Returns

source
# the time-independent HEOMLS matrix
+end

Ordinary Differential Equation (ODE) Method

The first method is implemented by solving the ordinary differential equation (ODE). HierarchicalEOM.jl wraps some of the functions in DifferentialEquations.jl, which is a very rich numerical library for solving the differential equations and provides many ODE solvers. It offers quite a few options for the user to tailor the solver to their specific needs. The default solver (and its corresponding settings) are chosen to suit commonly encountered problems and should work fine for most of the cases. If you require more specialized methods, such as the choice of algorithm, please refer to DifferentialEquations solvers and also the documentation of DifferentialEquations.jl.

Extension for CUDA.jl

HierarchicalEOM.jl provides an extension to support GPU (CUDA.jl) acceleration for solving the time evolution (only for ODE method with time-independent system Hamiltonian). See here for more details.

See the docstring of this method:

HierarchicalEOM.HEOMsolveMethod
HEOMsolve(M, ρ0, tlist; e_ops, solver, H_t, params, verbose, filename, SOLVEROptions...)

Solve the time evolution for auxiliary density operators based on ordinary differential equations.

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • tlist::AbstractVector : Denote the specific time points to save the solution at, during the solving process.
  • e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.
  • solver::OrdinaryDiffEqAlgorithm : solver in package DifferentialEquations.jl. Default to DP5().
  • H_t::Union{Nothing,Function}=nothing: The time-dependent Hamiltonian or Liouvillian. It will be called by H_t(t, params).
  • params::NamedTuple=NamedTuple(): The parameters of the time evolution.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file "filename.jld2" after the solving process.
  • SOLVEROptions : extra options for solver

Notes

  • The ADOs will be saved depend on the keyword argument saveat in kwargs.
  • If e_ops is specified, the default value of saveat=[tlist[end]] (only save the final ADOs), otherwise, saveat=tlist (saving the ADOs corresponding to tlist). You can also specify e_ops and saveat separately.
  • The default tolerances in kwargs are given as reltol=1e-6 and abstol=1e-8.
  • For more details about solver please refer to DifferentialEquations.jl (ODE Solvers)
  • For more details about SOLVEROptions please refer to DifferentialEquations.jl (Keyword Arguments)

Returns

source
# the time-independent HEOMLS matrix
 M::AbstractHEOMLSMatrix  
 
 # the initial state can be either the system density operator or ADOs
@@ -56,7 +56,7 @@
 ρ0::QuantumObject
 tlist = 0:0.1:10
 
-sol = HEOMsolve(M, ρ0, tlist; H_t = H_1)
Note

The default value for params in HEOMsolve is an empty NamedTuple().

Propagator Method

The second method is implemented by directly construct the propagator of a given HEOMLS matrix $\hat{\mathcal{M}}$. Because $\hat{\mathcal{M}}$ is time-independent, the equation above can be solved analytically as

\[\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(t)=\hat{\mathcal{G}}(t)\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(0),\]

where $\hat{\mathcal{G}}(t)\equiv \exp(\hat{\mathcal{M}}t)$ is the propagator for all ADOs corresponding to $\hat{\mathcal{M}}$.

To construct the propagator, we wrap the function in the package fastExpm.jl, which is optimized for the exponentiation of either large-dense or sparse matrices.

See the docstring of this method:

HierarchicalEOM.HEOMsolveMethod
HEOMsolve(M, ρ0, Δt, steps; e_ops, threshold, nonzero_tol, verbose, filename)

Solve the time evolution for auxiliary density operators based on propagator (generated by FastExpm.jl).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • Δt::Real : A specific time step (time interval).
  • steps::Int : The number of time steps
  • e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.
  • threshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.
  • nonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file "filename.jld2" after the solving process.

Notes

  • The ADOs will be saved depend on the keyword argument e_ops.
  • If e_ops is specified, the solution will only save the final ADOs, otherwise, it will save all the ADOs corresponding to tlist = 0:Δt:(Δt * steps).
  • For more details of the propagator, please refer to FastExpm.jl

Returns

source
# the time-independent HEOMLS matrix
+sol = HEOMsolve(M, ρ0, tlist; H_t = H_1)
Note

The default value for params in HEOMsolve is an empty NamedTuple().

Propagator Method

The second method is implemented by directly construct the propagator of a given HEOMLS matrix $\hat{\mathcal{M}}$. Because $\hat{\mathcal{M}}$ is time-independent, the equation above can be solved analytically as

\[\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(t)=\hat{\mathcal{G}}(t)\rho^{(m,n,p)}_{\textbf{j} \vert \textbf{q}}(0),\]

where $\hat{\mathcal{G}}(t)\equiv \exp(\hat{\mathcal{M}}t)$ is the propagator for all ADOs corresponding to $\hat{\mathcal{M}}$.

To construct the propagator, we wrap the function in the package fastExpm.jl, which is optimized for the exponentiation of either large-dense or sparse matrices.

See the docstring of this method:

HierarchicalEOM.HEOMsolveMethod
HEOMsolve(M, ρ0, Δt, steps; e_ops, threshold, nonzero_tol, verbose, filename)

Solve the time evolution for auxiliary density operators based on propagator (generated by FastExpm.jl).

Parameters

  • M::AbstractHEOMLSMatrix : the matrix given from HEOM model
  • ρ0::Union{QuantumObject,ADOs} : system initial state (density matrix) or initial auxiliary density operators (ADOs)
  • Δt::Real : A specific time step (time interval).
  • steps::Int : The number of time steps
  • e_ops::Union{Nothing,AbstractVector}: List of operators for which to calculate expectation values.
  • threshold::Real : Determines the threshold for the Taylor series. Defaults to 1.0e-6.
  • nonzero_tol::Real : Strips elements smaller than nonzero_tol at each computation step to preserve sparsity. Defaults to 1.0e-14.
  • verbose::Bool : To display verbose output and progress bar during the process or not. Defaults to true.
  • filename::String : If filename was specified, the ADOs at each time point will be saved into the JLD2 file "filename.jld2" after the solving process.

Notes

  • The ADOs will be saved depend on the keyword argument e_ops.
  • If e_ops is specified, the solution will only save the final ADOs, otherwise, it will save all the ADOs corresponding to tlist = 0:Δt:(Δt * steps).
  • For more details of the propagator, please refer to FastExpm.jl

Returns

source
# the time-independent HEOMLS matrix
 M::AbstractHEOMLSMatrix  
 
 # the initial state can be either the system density operator or ADOs
@@ -70,4 +70,4 @@
 steps = 4
 
 # equivalent to tlist = 0 : Δt : (Δt * steps)
-sol = HEOMsolve(M, ρ0, Δt, steps) 
+sol = HEOMsolve(M, ρ0, Δt, steps)