From 60f0a81d9ca3776a782eb89970dda378de3db0d2 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sat, 28 Oct 2023 19:04:58 +0000 Subject: [PATCH] build based on 2279184 --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/reference/index.html | 14 +++++++------- dev/search_index.js | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index d077a11..42012dd 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-28T15:29:02","documenter_version":"1.1.2"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-28T19:04:55","documenter_version":"1.1.2"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index acea8e3..a1364e4 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · SpectralDensities.jl

SpectralDensities.jl

This package implements commonly used spectral densities for Open Quantum Systems and typical operations on them.

Features

Features of SpectralDensities.jl include:

  • Definition of most widely used spectral densities: Ohmic, Sub-Ohmic, Supra-Ohmic, Lorentzian (Underdamped), Debye (Overdamped)
  • Flexibility to choose desidred cutoff functions: hard cutoffs, exponential cutoff, gaussian cutoff.
  • Calculation of the correlation function of a given spectral density (with specialised methods for the pre-defined types)
  • Calculation of reorganisation energy of a given spectral density (with specialised methods for the pre-defined types)
  • Calculation of the memory kernel of a given spectral density, both in the time domain, and the imaginary part in the Fourier domain (with specialised methods for some of the pre-defined types)
  • Methods to compute the spectral density integrals that appear in the weak coupling (2nd order expansion), both for the dynamics (see e.g. H. Breuer, F. Petruccione, "The Theory of Open Quantum Systems"), and the equilibrium mean-force state (see e.g. J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021)).

Quick start

The desired spectral density can be constructed by simply passing the desired parameters to their respective constructor. For example, for an Ohmic spectral density $J(\omega) = 3\omega$ we have

Johmic = OhmicSD(3)

To add a ctuoff to a base spectral density, one simply passes it to the cutoff constructor. For example, to add an exponential cutoff $e^{-\omega/7}$ we can do

Jc = ExponentialCutoffSD(Johmic, 7)

Defining custom spectral densities

The base AbstractSD can be easily extended by the user. To do so, one must create a new sub-type for which at least one of the methods sd (the spectral density itself $J(\omega)$) or sdoverω (the spectral density divided by frequency $J(\omega)/\omega$) must be defined. It is strongly recommended to define, if possible, sdoverω since it typically makes it simpler to numerically handle potential singularities.

This is the only requirement, and all other methods will automatically work on the new subtype. Of course, as is typical of Julia's super flexible multiple-dispatch system, the user should consider providing custom functions on the new type for the reorganisation energy, etc.

+Home · SpectralDensities.jl

SpectralDensities.jl

This package implements commonly used spectral densities for Open Quantum Systems and typical operations on them.

Features

Features of SpectralDensities.jl include:

  • Definition of most widely used spectral densities: Ohmic, Sub-Ohmic, Supra-Ohmic, Lorentzian (Underdamped), Debye (Overdamped)
  • Flexibility to choose desidred cutoff functions: hard cutoffs, exponential cutoff, gaussian cutoff.
  • Calculation of the correlation function of a given spectral density (with specialised methods for the pre-defined types)
  • Calculation of reorganisation energy of a given spectral density (with specialised methods for the pre-defined types)
  • Calculation of the memory kernel of a given spectral density, both in the time domain, and the imaginary part in the Fourier domain (with specialised methods for some of the pre-defined types)
  • Methods to compute the spectral density integrals that appear in the weak coupling (2nd order expansion), both for the dynamics (see e.g. H. Breuer, F. Petruccione, "The Theory of Open Quantum Systems"), and the equilibrium mean-force state (see e.g. J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021)).

Quick start

The desired spectral density can be constructed by simply passing the desired parameters to their respective constructor. For example, for an Ohmic spectral density $J(\omega) = 3\omega$ we have

Johmic = OhmicSD(3)

To add a ctuoff to a base spectral density, one simply passes it to the cutoff constructor. For example, to add an exponential cutoff $e^{-\omega/7}$ we can do

Jc = ExponentialCutoffSD(Johmic, 7)

Defining custom spectral densities

The base AbstractSD can be easily extended by the user. To do so, one must create a new sub-type for which at least one of the methods sd (the spectral density itself $J(\omega)$) or sdoverω (the spectral density divided by frequency $J(\omega)/\omega$) must be defined. It is strongly recommended to define, if possible, sdoverω since it typically makes it simpler to numerically handle potential singularities.

This is the only requirement, and all other methods will automatically work on the new subtype. Of course, as is typical of Julia's super flexible multiple-dispatch system, the user should consider providing custom functions on the new type for the reorganisation energy, etc.

diff --git a/dev/reference/index.html b/dev/reference/index.html index 6c24fd7..471123f 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,14 +1,14 @@ -API Reference · SpectralDensities.jl

API Reference

SpectralDensities

SpectralDensities.AbstractSDType
abstract type AbstractSD

AbstractSD represents an abstract bath spectral density.

Any subtype of AbstractSD must at least define either sd or sdoverω for the new type.

source
SpectralDensities.DebyeSDType
struct DebyeSD <: AbstractSD

DebyeSD represents a Debye spectral density. It is characterized by an amplitude α representing the strength of the coupling and the cutoff frequency ωc. That is

\[J(\omega) = \frac{2\alpha}{\pi}\frac{\omega\omega_c^2}{\omega^2 + \omega_c^2}\]

Fields

  • α::Float64: The amplitude α, indicating the strength of the coupling.
  • ωc::Float64: The cutoff frequency.
source
SpectralDensities.DebyeSDMethod
DebyeSD(α::Real, ωc::Real)

Construct a Debye spectral density with the given amplitude α and cutoff frequency ωc.

Arguments

  • α::Real: The amplitude α, indicating the strength of the coupling.
  • ωc::Real: The cutoff frequency.

Returns

  • An instance of the DebyeSD struct representing the Debye spectral density.
source
SpectralDensities.ExponentialCutoffSDType
struct ExponentialCutoffSD{T <: AbstractSD} <: AbstractSD

ExponentialCutoffSD represents a spectral density with an exponential frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is

\[J_\mathrm{exp}(\omega) = J(\omega)e^{-\omega/\omega_c}\]

Fields

  • J::T: The underlying spectral density.
  • ωcutoff::Float64: The frequency cutoff.
source
SpectralDensities.ExponentialCutoffSDMethod
ExponentialCutoffSD(J::AbstractSD, ωcutoff)

Construct a spectral density with an exponential frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.

Arguments

  • J::AbstractSD: The underlying spectral density.
  • ωcutoff: The frequency cutoff.

Returns

  • An instance of the ExponentialCutoffSD struct representing the spectral density with an exponential frequency cutoff.
source
SpectralDensities.GaussianCutoffSDType
struct GaussianCutoffSD{T <: AbstractSD} <: AbstractSD

GaussianCutoffSD represents a spectral density with a Gaussian frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is

\[J_\mathrm{gauss}(\omega) = J(\omega)e^{-\omega^2/\omega_c^2}\]

Fields

  • J::T: The underlying spectral density.
  • ωcutoff::Float64: The frequency cutoff.
source
SpectralDensities.GaussianCutoffSDMethod
GaussianCutoffSD(J::AbstractSD, ωcutoff)

Construct a spectral density with a Gaussian frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.

Arguments

  • J::AbstractSD: The underlying spectral density.
  • ωcutoff: The frequency cutoff.

Returns

  • An instance of the GaussianCutoffSD struct representing the spectral density with a Gaussian frequency cutoff.
source
SpectralDensities.HardCutoffSDType
struct HardCutoffSD{T <: AbstractSD} <: AbstractSD

HardCutoffSD represents a spectral density with a hard frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is

\[J_\mathrm{hard}(\omega) = J(\omega)\Theta(\omega_c - \omega)\]

where $\Theta$ is the Heaviside theta function.

Fields

  • J::T: The underlying spectral density.
  • ωcutoff::Float64: The frequency cutoff.
source
SpectralDensities.HardCutoffSDMethod
HardCutoffSD(J::AbstractSD, ωcutoff)

Construct a spectral density with a hard frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.

Arguments

  • J::AbstractSD: The underlying spectral density.
  • ωcutoff::Float64: The frequency cutoff.

Returns

  • An instance of the HardCutoffSD struct representing the spectral density with a hard frequency cutoff.
source
SpectralDensities.InversePolyKernelSDType
struct InversePolyKernelSD <: AbstractSD

InversePolyKernelSD represents a spectral density whose corresponding memory kernel in frequency space is given by one over a polynomial in frequency. It is characterized by the degree of the polynomial deg and the list of coefficients coefs (in ascending order of powers). That is,

\[J(\omega) = \frac{1}{\pi}\mathrm{Im}\left[\frac{1}{\sum_{k=0}^{\mathrm{deg}}\mathrm{coeffs}[k]\omega^k}\right]\]

Fields

  • deg::Int64: The degree of the polynomial.
  • coeffs::AbstractVector{ComplexF64}: Coefficients of the polynomial (in ascending order of powers). The length of the vector should be deg + 1.
source
SpectralDensities.InversePolyKernelSDMethod
InversePolyKernelSD(coeffs::AbstractVector)

Construct a InversePolyKernelSD spectral density with the given coefficients.

Arguments

  • coeffs::AbstractVector: A vector containing the coefficients of the polynomial (in ascending order of powers).

Returns

  • An instance of the InversePolyKernelSD struct representing the spectral density.
source
SpectralDensities.LorentzianSDType
struct LorentzianSD <: AbstractSD

LorentzianSD represents a Lorentzian spectral density. It is characterized by an amplitude α representing the strength of the coupling, the peak centre frequency ω0, and the width of the Lorentzian peak Γ. That is

\[J(\omega) = \frac{\alpha\Gamma}{\pi}\frac{\omega}{(\omega^2 - \omega_0^2)^2 + \omega^2\Gamma^2}\]

Fields

  • α::Float64: The amplitude α, indicating the strength of the coupling.
  • ω0::Float64: The centre frequency of the Lorentzian peak.
  • Γ::Float64: The width of the Lorentzian peak.
source
SpectralDensities.LorentzianSDMethod
LorentzianSD(α::Real, ω0::Real, Γ::Real)

Construct a Lorentzian spectral density with the given amplitude α, centre frequency ω0, and width Γ.

Arguments

  • α::Real: The amplitude α, indicating the strength of the coupling.
  • ω0::Real: The centre frequency of the Lorentzian peak.
  • Γ::Real: The width of the Lorentzian peak.

Returns

  • An instance of the LorentzianSD struct representing the Lorentzian spectral density.
source
SpectralDensities.OhmicSDType
struct OhmicSD <: AbstractSD

OhmicSD represents an Ohmic spectral density. It is characterized by an amplitude α representing the strength of the Ohmic coupling. That is

\[J(\omega) = \alpha\omega\]

Fields

  • α::Float64: The amplitude α, indicating the strength of the Ohmic coupling.
source
SpectralDensities.OhmicSDMethod
OhmicSD(α::Real)

Construct an Ohmic spectral density with amplitude α.

Arguments

  • α::Real: The amplitude α, indicating the strength of the Ohmic coupling.

Returns

  • An instance of the OhmicSD struct representing the Ohmic spectral density.
source
SpectralDensities.PolySDType
struct PolySD <: AbstractSD

PolySD represents a polynomial spectral density. It is characterized by an amplitude α representing the strength of the coupling and the polynomial degree n. That is

\[J(\omega) = \alpha\omega^n\]

Fields

  • α::Float64: The amplitude α, indicating the strength of the coupling.
  • n::Int: The polynomial degree.
source
SpectralDensities.PolySDMethod
PolySD(α::Real, n::Int)

Construct a polynomial spectral density with the given amplitude α and degree n.

Arguments

  • α::Real: The amplitude α, indicating the strength of the coupling.
  • n::Int: The polynomial degree.

Returns

  • An instance of the PolySD struct representing the polynomial spectral density.
source
SpectralDensities.correlationsMethod
correlations(J::AbstractSD, τ, β)

Calculate the correlation function for a spectral density J at a given time delay τ and inverse temperature β.

Arguments

  • J::AbstractSD: The spectral density.
  • τ: The time delay at which the correlation function is calculated.
  • β: The inverse temperature.

Returns

  • The correlation function for the spectral density J at the given time delay τ and inverse temperature β.
source
SpectralDensities.frequency_cutoffMethod
frequency_cutoff(J::AbstractSD; tol=eps())

Return the frequency cutoff of the spectral density J to accuracy set by the tolerance parameter tol.

Arguments

  • J::AbstractSD: The spectral density.
  • tol: The tolerance at which to truncate the spectral density.

Returns

  • The frequency cutoff for the desired tolerance.
source
SpectralDensities.imag_memory_kernel_ftMethod
imag_memory_kernel_ft(J::AbstractSD, ω)

Calculate the imaginary part of the Fourier-transform of the memory kernel for a spectral density J at a given frequency ω.

Arguments

  • J::AbstractSD: The spectral density.
  • ω: The frequency at which the imaginary part of the Fourier-transform of the memory kernel is evaluated.

Returns

  • The imaginary part of the Fourier-transform of the memory kernel for the spectral density J at the given frequency ω.
source
SpectralDensities.memory_kernelMethod
memory_kernel(J::AbstractSD, τ)

Calculate the memory kernel for a spectral density J at a given time delay τ, that is

\[\mathcal{K}(\tau) = 2\Theta(\tau)\int_0^\infty J(\omega)\sin(\omega)\mathrm{d}\omega,\]

where $\Theta$ is the Heavisde theta function.

Arguments

  • J::AbstractSD: The spectral density.
  • τ: The time delay at which the memory kernel is evaluated.

Returns

  • The memory kernel for the spectral density J at the given time delay τ.
source
SpectralDensities.reorganisation_energyMethod
reorganisation_energy(J::AbstractSD)

Calculate the reorganization energy of a given spectral density J, i.e.

\[\int_0^\infty \frac{J(\omega)}{\omega} \mathrm{d}\omega \]

Arguments

  • J::AbstractSD: The spectral density.

Returns

  • The reorganization energy of the spectral density J.
source
SpectralDensities.sdMethod
sd(J::T, ω) where T <: AbstractSD

Evaluate the spectral density represented by J at a given frequency ω, i.e. J(ω).

Arguments

  • J::T: The spectral density.
  • ω: The frequency at which the spectral density is evaluated.

Returns

  • The spectral density J at the frequency ω.
source
SpectralDensities.sdoverωMethod
sdoverω(J::T, ω) where T <: AbstractSD

Evaluate the spectral density represented by J divided by a given frequency ω, i.e. J(ω)/ω.

Arguments

  • J::T: The spectral density.
  • ω: The frequency at which the spectral density is evaluated.

Returns

  • The spectral density J(ω) divided by ω.
source

WeakCoupling

SpectralDensities.WeakCoupling.weak_coupling_ΔMethod
weak_coupling_Δ(J::AbstractSD, ωB, β; ωcutoff=Inf, ħ=one(ωB))

Calculate the weak-coupling coefficient Δ for the spectral density J, system Bohr frequency ωB, and inverse temperature β, defined as

\[\Delta_\beta(\omega_\mathrm{B}) = 2\omega_\mathrm{B}\int_0^\infty +API Reference · SpectralDensities.jl

API Reference

SpectralDensities

SpectralDensities.AbstractSDType
abstract type AbstractSD

AbstractSD represents an abstract bath spectral density.

Any subtype of AbstractSD must at least define either sd or sdoverω for the new type.

source
SpectralDensities.DebyeSDType
struct DebyeSD <: AbstractSD

DebyeSD represents a Debye spectral density. It is characterized by an amplitude α representing the strength of the coupling and the cutoff frequency ωc. That is

\[J(\omega) = \frac{2\alpha}{\pi}\frac{\omega\omega_c^2}{\omega^2 + \omega_c^2}\]

Fields

  • α::Float64: The amplitude α, indicating the strength of the coupling.
  • ωc::Float64: The cutoff frequency.
source
SpectralDensities.DebyeSDMethod
DebyeSD(α::Real, ωc::Real)

Construct a Debye spectral density with the given amplitude α and cutoff frequency ωc.

Arguments

  • α::Real: The amplitude α, indicating the strength of the coupling.
  • ωc::Real: The cutoff frequency.

Returns

  • An instance of the DebyeSD struct representing the Debye spectral density.
source
SpectralDensities.ExponentialCutoffSDType
struct ExponentialCutoffSD{T <: AbstractSD} <: AbstractSD

ExponentialCutoffSD represents a spectral density with an exponential frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is

\[J_\mathrm{exp}(\omega) = J(\omega)e^{-\omega/\omega_c}\]

Fields

  • J::T: The underlying spectral density.
  • ωcutoff::Float64: The frequency cutoff.
source
SpectralDensities.ExponentialCutoffSDMethod
ExponentialCutoffSD(J::AbstractSD, ωcutoff)

Construct a spectral density with an exponential frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.

Arguments

  • J::AbstractSD: The underlying spectral density.
  • ωcutoff: The frequency cutoff.

Returns

  • An instance of the ExponentialCutoffSD struct representing the spectral density with an exponential frequency cutoff.
source
SpectralDensities.GaussianCutoffSDType
struct GaussianCutoffSD{T <: AbstractSD} <: AbstractSD

GaussianCutoffSD represents a spectral density with a Gaussian frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is

\[J_\mathrm{gauss}(\omega) = J(\omega)e^{-\omega^2/\omega_c^2}\]

Fields

  • J::T: The underlying spectral density.
  • ωcutoff::Float64: The frequency cutoff.
source
SpectralDensities.GaussianCutoffSDMethod
GaussianCutoffSD(J::AbstractSD, ωcutoff)

Construct a spectral density with a Gaussian frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.

Arguments

  • J::AbstractSD: The underlying spectral density.
  • ωcutoff: The frequency cutoff.

Returns

  • An instance of the GaussianCutoffSD struct representing the spectral density with a Gaussian frequency cutoff.
source
SpectralDensities.HardCutoffSDType
struct HardCutoffSD{T <: AbstractSD} <: AbstractSD

HardCutoffSD represents a spectral density with a hard frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is

\[J_\mathrm{hard}(\omega) = J(\omega)\Theta(\omega_c - \omega)\]

where $\Theta$ is the Heaviside theta function.

Fields

  • J::T: The underlying spectral density.
  • ωcutoff::Float64: The frequency cutoff.
source
SpectralDensities.HardCutoffSDMethod
HardCutoffSD(J::AbstractSD, ωcutoff)

Construct a spectral density with a hard frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.

Arguments

  • J::AbstractSD: The underlying spectral density.
  • ωcutoff::Float64: The frequency cutoff.

Returns

  • An instance of the HardCutoffSD struct representing the spectral density with a hard frequency cutoff.
source
SpectralDensities.InversePolyKernelSDType
struct InversePolyKernelSD <: AbstractSD

InversePolyKernelSD represents a spectral density whose corresponding memory kernel in frequency space is given by one over a polynomial in frequency. It is characterized by the degree of the polynomial deg and the list of coefficients coefs (in ascending order of powers). That is,

\[J(\omega) = \frac{1}{\pi}\mathrm{Im}\left[\frac{1}{\sum_{k=0}^{\mathrm{deg}}\mathrm{coeffs}[k]\omega^k}\right]\]

Fields

  • deg::Int64: The degree of the polynomial.
  • coeffs::AbstractVector{ComplexF64}: Coefficients of the polynomial (in ascending order of powers). The length of the vector should be deg + 1.
source
SpectralDensities.InversePolyKernelSDMethod
InversePolyKernelSD(coeffs::AbstractVector)

Construct a InversePolyKernelSD spectral density with the given coefficients.

Arguments

  • coeffs::AbstractVector: A vector containing the coefficients of the polynomial (in ascending order of powers).

Returns

  • An instance of the InversePolyKernelSD struct representing the spectral density.
source
SpectralDensities.LorentzianSDType
struct LorentzianSD <: AbstractSD

LorentzianSD represents a Lorentzian spectral density. It is characterized by an amplitude α representing the strength of the coupling, the peak centre frequency ω0, and the width of the Lorentzian peak Γ. That is

\[J(\omega) = \frac{\alpha\Gamma}{\pi}\frac{\omega}{(\omega^2 - \omega_0^2)^2 + \omega^2\Gamma^2}\]

Fields

  • α::Float64: The amplitude α, indicating the strength of the coupling.
  • ω0::Float64: The centre frequency of the Lorentzian peak.
  • Γ::Float64: The width of the Lorentzian peak.
source
SpectralDensities.LorentzianSDMethod
LorentzianSD(α::Real, ω0::Real, Γ::Real)

Construct a Lorentzian spectral density with the given amplitude α, centre frequency ω0, and width Γ.

Arguments

  • α::Real: The amplitude α, indicating the strength of the coupling.
  • ω0::Real: The centre frequency of the Lorentzian peak.
  • Γ::Real: The width of the Lorentzian peak.

Returns

  • An instance of the LorentzianSD struct representing the Lorentzian spectral density.
source
SpectralDensities.OhmicSDType
struct OhmicSD <: AbstractSD

OhmicSD represents an Ohmic spectral density. It is characterized by an amplitude α representing the strength of the Ohmic coupling. That is

\[J(\omega) = \alpha\omega\]

Fields

  • α::Float64: The amplitude α, indicating the strength of the Ohmic coupling.
source
SpectralDensities.OhmicSDMethod
OhmicSD(α::Real)

Construct an Ohmic spectral density with amplitude α.

Arguments

  • α::Real: The amplitude α, indicating the strength of the Ohmic coupling.

Returns

  • An instance of the OhmicSD struct representing the Ohmic spectral density.
source
SpectralDensities.PolySDType
struct PolySD <: AbstractSD

PolySD represents a polynomial spectral density. It is characterized by an amplitude α representing the strength of the coupling and the polynomial degree n. That is

\[J(\omega) = \alpha\omega^n\]

Fields

  • α::Float64: The amplitude α, indicating the strength of the coupling.
  • n::Int: The polynomial degree.
source
SpectralDensities.PolySDMethod
PolySD(α::Real, n::Int)

Construct a polynomial spectral density with the given amplitude α and degree n.

Arguments

  • α::Real: The amplitude α, indicating the strength of the coupling.
  • n::Int: The polynomial degree.

Returns

  • An instance of the PolySD struct representing the polynomial spectral density.
source
SpectralDensities.correlationsMethod
correlations(J::AbstractSD, τ, β)

Calculate the correlation function for a spectral density J at a given time delay τ and inverse temperature β.

Arguments

  • J::AbstractSD: The spectral density.
  • τ: The time delay at which the correlation function is calculated.
  • β: The inverse temperature.

Returns

  • The correlation function for the spectral density J at the given time delay τ and inverse temperature β.
source
SpectralDensities.frequency_cutoffMethod
frequency_cutoff(J::AbstractSD; tol=eps())

Return the frequency cutoff of the spectral density J to accuracy set by the tolerance parameter tol.

Arguments

  • J::AbstractSD: The spectral density.
  • tol: The tolerance at which to truncate the spectral density.

Returns

  • The frequency cutoff for the desired tolerance.
source
SpectralDensities.imag_memory_kernel_ftMethod
imag_memory_kernel_ft(J::AbstractSD, ω)

Calculate the imaginary part of the Fourier-transform of the memory kernel for a spectral density J at a given frequency ω.

Arguments

  • J::AbstractSD: The spectral density.
  • ω: The frequency at which the imaginary part of the Fourier-transform of the memory kernel is evaluated.

Returns

  • The imaginary part of the Fourier-transform of the memory kernel for the spectral density J at the given frequency ω.
source
SpectralDensities.memory_kernelMethod
memory_kernel(J::AbstractSD, τ)

Calculate the memory kernel for a spectral density J at a given time delay τ, that is

\[\mathcal{K}(\tau) = 2\Theta(\tau)\int_0^\infty J(\omega)\sin(\omega)\mathrm{d}\omega,\]

where $\Theta$ is the Heavisde theta function.

Arguments

  • J::AbstractSD: The spectral density.
  • τ: The time delay at which the memory kernel is evaluated.

Returns

  • The memory kernel for the spectral density J at the given time delay τ.
source
SpectralDensities.memory_kernel_ftMethod
memory_kernel_ft(J::AbstractSD, ω)

Calculate the Fourier-transform of the memory kernel for a spectral density J at a given frequency ω.

Arguments

  • J::AbstractSD: The spectral density.
  • ω: The frequency at which the Fourier-transform of the memory kernel is evaluated.

Returns

  • The Fourier-transform of the memory kernel for the spectral density J at the given frequency ω.
source
SpectralDensities.real_memory_kernel_ftMethod
real_memory_kernel_ft(J::AbstractSD, ω)

Calculate the real part of the Fourier-transform of the memory kernel for a spectral density J at a given frequency ω.

Arguments

  • J::AbstractSD: The spectral density.
  • ω: The frequency at which the real part of the Fourier-transform of the memory kernel is evaluated.

Returns

  • The real part of the Fourier-transform of the memory kernel for the spectral density J at the given frequency ω.
source
SpectralDensities.reorganisation_energyMethod
reorganisation_energy(J::AbstractSD)

Calculate the reorganization energy of a given spectral density J, i.e.

\[\int_0^\infty \frac{J(\omega)}{\omega} \mathrm{d}\omega \]

Arguments

  • J::AbstractSD: The spectral density.

Returns

  • The reorganization energy of the spectral density J.
source
SpectralDensities.sdMethod
sd(J::T, ω) where T <: AbstractSD

Evaluate the spectral density represented by J at a given frequency ω, i.e. J(ω).

Arguments

  • J::T: The spectral density.
  • ω: The frequency at which the spectral density is evaluated.

Returns

  • The spectral density J at the frequency ω.
source
SpectralDensities.sdoverωMethod
sdoverω(J::T, ω) where T <: AbstractSD

Evaluate the spectral density represented by J divided by a given frequency ω, i.e. J(ω)/ω.

Arguments

  • J::T: The spectral density.
  • ω: The frequency at which the spectral density is evaluated.

Returns

  • The spectral density J(ω) divided by ω.
source

WeakCoupling

SpectralDensities.WeakCoupling.weak_coupling_ΔMethod
weak_coupling_Δ(J::AbstractSD, ωB, β; ωcutoff=Inf, ħ=one(ωB))

Calculate the weak-coupling coefficient Δ for the spectral density J, system Bohr frequency ωB, and inverse temperature β, defined as

\[\Delta_\beta(\omega_\mathrm{B}) = 2\omega_\mathrm{B}\int_0^\infty J(\omega)\frac{1}{\omega^2-\omega_\mathrm{B}^2} - \coth\left(\frac{\beta\hbar\omega}{2}\right) \mathrm{d}\omega\]

See: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).

Arguments

  • J::AbstractSD: The spectral density.
  • ωB: The system Bohr frequency of interest.
  • β: The inverse temperature.
  • ωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.
  • ħ: The value of the reduced Planck constant. Default is 1.

Returns

  • The weak-coupling coefficient Δ for the spectral density J, system Bohr frequency ωB, and inverse temperature β.
source
SpectralDensities.WeakCoupling.weak_coupling_ΔprimeMethod
weak_coupling_Δprime(J::AbstractSD, ωB, β; ωcutoff=Inf, ħ=one(ωB))

Calculate the weak-coupling coefficient Δ′ for the spectral density J, system Bohr frequency ωB, and inverse temperature β, defined as

\[{\Delta'}_\beta(\omega_\mathrm{B}) = 2\int_0^\infty + \coth\left(\frac{\beta\hbar\omega}{2}\right) \mathrm{d}\omega\]

See: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).

Arguments

  • J::AbstractSD: The spectral density.
  • ωB: The system Bohr frequency of interest.
  • β: The inverse temperature.
  • ωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.
  • ħ: The value of the reduced Planck constant. Default is 1.

Returns

  • The weak-coupling coefficient Δ for the spectral density J, system Bohr frequency ωB, and inverse temperature β.
source
SpectralDensities.WeakCoupling.weak_coupling_ΔprimeMethod
weak_coupling_Δprime(J::AbstractSD, ωB, β; ωcutoff=Inf, ħ=one(ωB))

Calculate the weak-coupling coefficient Δ′ for the spectral density J, system Bohr frequency ωB, and inverse temperature β, defined as

\[{\Delta'}_\beta(\omega_\mathrm{B}) = 2\int_0^\infty J(\omega)\frac{(\omega^2 + \omega_\mathrm{B}^2)}{(\omega^2-\omega_\mathrm{B}^2)^2} - \coth\left(\frac{\beta\hbar\omega}{2}\right) \mathrm{d}\omega\]

See: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).

Note: The spectral density J must support automatic differentiation with ForwardDiff.jl.

Arguments

  • J::AbstractSD: The spectral density.
  • ωB: The system Bohr frequency of interest.
  • β: The inverse temperature.
  • ωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.
  • ħ: The value of the reduced Planck constant. Default is 1.

Returns

  • The weak-coupling coefficient Δ′ for the spectral density J, system Bohr frequency ωB, and inverse temperature β.
source
SpectralDensities.WeakCoupling.weak_coupling_ΣMethod
weak_coupling_Σ(J::AbstractSD, ωB; ωcutoff=Inf)

Calculate the weak-coupling coefficient Σ for the spectral density J and system Bohr frequency ωB, defined as

\[\Sigma(\omega_\mathrm{B}) = 2\int_0^\infty - J(\omega)\frac{\omega}{\omega^2-\omega_\mathrm{B}^2} \mathrm{d}\omega\]

See: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).

Arguments

  • J::AbstractSD: The spectral denstiy.
  • ωB: The system Bohr frequency of interest.
  • ωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.

Returns

  • The weak-coupling coefficient Σ for the spectral density J and system Bohr frequency ωB.
source
SpectralDensities.WeakCoupling.weak_coupling_ΣprimeMethod
weak_coupling_Σprime(J::AbstractSD, ωB; ωcutoff=Inf)

Calculate the weak-coupling coefficient Σ′ for the spectral density J and system Bohr frequency ωB, defined as

\[\Sigma'(\omega_\mathrm{B}) = 4\omega_\mathrm{B}\int_0^\infty + \coth\left(\frac{\beta\hbar\omega}{2}\right) \mathrm{d}\omega\]

See: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).

Note: The spectral density J must support automatic differentiation with ForwardDiff.jl.

Arguments

  • J::AbstractSD: The spectral density.
  • ωB: The system Bohr frequency of interest.
  • β: The inverse temperature.
  • ωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.
  • ħ: The value of the reduced Planck constant. Default is 1.

Returns

  • The weak-coupling coefficient Δ′ for the spectral density J, system Bohr frequency ωB, and inverse temperature β.
source
SpectralDensities.WeakCoupling.weak_coupling_ΣMethod
weak_coupling_Σ(J::AbstractSD, ωB; ωcutoff=Inf)

Calculate the weak-coupling coefficient Σ for the spectral density J and system Bohr frequency ωB, defined as

\[\Sigma(\omega_\mathrm{B}) = 2\int_0^\infty + J(\omega)\frac{\omega}{\omega^2-\omega_\mathrm{B}^2} \mathrm{d}\omega\]

See: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).

Arguments

  • J::AbstractSD: The spectral denstiy.
  • ωB: The system Bohr frequency of interest.
  • ωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.

Returns

  • The weak-coupling coefficient Σ for the spectral density J and system Bohr frequency ωB.
source
SpectralDensities.WeakCoupling.weak_coupling_ΣprimeMethod
weak_coupling_Σprime(J::AbstractSD, ωB; ωcutoff=Inf)

Calculate the weak-coupling coefficient Σ′ for the spectral density J and system Bohr frequency ωB, defined as

\[\Sigma'(\omega_\mathrm{B}) = 4\omega_\mathrm{B}\int_0^\infty J(\omega)\frac{\omega}{(\omega^2-\omega_\mathrm{B}^2)^2} - \mathrm{d}\omega\]

See: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).

Note: The spectral density J must support automatic differentiation with ForwardDiff.jl.

Arguments

  • J::AbstractSD: The spectral density.
  • ωB: The system Bohr frequency of interest.
  • ωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.

Returns

  • The weak-coupling coefficient Σ′ for the spectral density J and system Bohr frequency ωB.
source

SingularIntegrals

SpectralDensities.SingularIntegrals.cauchy_quadgkFunction
cauchy_quadgk(g, a, b, x0=0; kws...)

Computes the Cauchy principal value of the integral of a function g with singularity at x0 over the interval [a, b], that is

\[\mathrm{P.V.}\int_a^b\frac{g(x)}{x-x_0}\mathrm{d}x\]

Note that x0 must be contained in the interval [a, b]. The actual integration is performed by the quadgk method of the QuadGK.jl package and the keyword arguments kws are passed directly onto quadgk.

Note: If the function g contains additional integrable singularities, the user should manually split the integration interval around them, since currently there is no way of passing integration break points onto quadgk.

Arguments

  • g: The function to integrate.
  • a: The lower bound of the interval.
  • b: The upper bound of the interval.
  • x0: The location of the singularity. Default value is the origin.
  • kws...: Additional keyword arguments accepted by quadgk.

Returns

A tuple (I, E) containing the approximated integral I and an estimated upper bound on the absolute error E.

Throws

  • ArgumentError: If the interval [a, b] does not include the singularity x0.

Examples

julia> cauchy_quadgk(x -> 1/(x+2), -1.0, 1.0)
+    \mathrm{d}\omega\]

See: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).

Note: The spectral density J must support automatic differentiation with ForwardDiff.jl.

Arguments

  • J::AbstractSD: The spectral density.
  • ωB: The system Bohr frequency of interest.
  • ωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.

Returns

  • The weak-coupling coefficient Σ′ for the spectral density J and system Bohr frequency ωB.
source

SingularIntegrals

SpectralDensities.SingularIntegrals.cauchy_quadgkFunction
cauchy_quadgk(g, a, b, x0=0; kws...)

Computes the Cauchy principal value of the integral of a function g with singularity at x0 over the interval [a, b], that is

\[\mathrm{P.V.}\int_a^b\frac{g(x)}{x-x_0}\mathrm{d}x\]

Note that x0 must be contained in the interval [a, b]. The actual integration is performed by the quadgk method of the QuadGK.jl package and the keyword arguments kws are passed directly onto quadgk.

Note: If the function g contains additional integrable singularities, the user should manually split the integration interval around them, since currently there is no way of passing integration break points onto quadgk.

Arguments

  • g: The function to integrate.
  • a: The lower bound of the interval.
  • b: The upper bound of the interval.
  • x0: The location of the singularity. Default value is the origin.
  • kws...: Additional keyword arguments accepted by quadgk.

Returns

A tuple (I, E) containing the approximated integral I and an estimated upper bound on the absolute error E.

Throws

  • ArgumentError: If the interval [a, b] does not include the singularity x0.

Examples

julia> cauchy_quadgk(x -> 1/(x+2), -1.0, 1.0)
 (-0.549306144334055, 9.969608472104596e-12)
 
 julia> cauchy_quadgk(x -> x^2, 0.0, 2.0, 1.0)
-(4.0, 2.220446049250313e-16)
source
SpectralDensities.SingularIntegrals.hadamard_quadgkFunction
hadamard_quadgk(g, g′, a, b, x0=0; kws...)

Computes the Hadamard finite part of the integral of a function g with a singularity at x0 over the interval [a, b], that is

\[\mathcal{H}\int_a^b\frac{g(x)}{(x-x_0)^2}\mathrm{d}x\]

Note that x0 must be contained in the interval [a, b]. The actual integration is performed by the quadgk method of the QuadGK.jl package and the keyword arguments kws are passed directly onto quadgk.

Note: If the function g′ contains additional integrable singularities, the user should manually split the integration interval around them, since currently there is no way of passing integration break points onto quadgk.

Arguments

  • g: The function to integrate.
  • g′: The derivative of the function g.
  • a: The lower bound of the interval.
  • b: The upper bound of the interval.
  • x0: The location of the singularity. Defaults value is the origin.
  • kws...: Additional keyword arguments accepted by quadgk.

Returns

A tuple (I, E...) containing the approximated Hadamard finite part integral I and an additional error estimate E from the quadrature method.

Throws

  • ArgumentError: If the interval [a, b] does not include the singularity x0.

Examples

julia> hadamard_quadgk(x -> log(x+1), x -> 1/(x+1), 0.0, 2.0, 1.0)
-(-1.6479184330021648, 9.969608472104596e-12)
source
+(4.0, 2.220446049250313e-16)
source
SpectralDensities.SingularIntegrals.hadamard_quadgkFunction
hadamard_quadgk(g, g′, a, b, x0=0; kws...)

Computes the Hadamard finite part of the integral of a function g with a singularity at x0 over the interval [a, b], that is

\[\mathcal{H}\int_a^b\frac{g(x)}{(x-x_0)^2}\mathrm{d}x\]

Note that x0 must be contained in the interval [a, b]. The actual integration is performed by the quadgk method of the QuadGK.jl package and the keyword arguments kws are passed directly onto quadgk.

Note: If the function g′ contains additional integrable singularities, the user should manually split the integration interval around them, since currently there is no way of passing integration break points onto quadgk.

Arguments

  • g: The function to integrate.
  • g′: The derivative of the function g.
  • a: The lower bound of the interval.
  • b: The upper bound of the interval.
  • x0: The location of the singularity. Defaults value is the origin.
  • kws...: Additional keyword arguments accepted by quadgk.

Returns

A tuple (I, E...) containing the approximated Hadamard finite part integral I and an additional error estimate E from the quadrature method.

Throws

  • ArgumentError: If the interval [a, b] does not include the singularity x0.

Examples

julia> hadamard_quadgk(x -> log(x+1), x -> 1/(x+1), 0.0, 2.0, 1.0)
+(-1.6479184330021648, 9.969608472104596e-12)
source
SpectralDensities.SingularIntegrals.kramers_kronigMethod
kramers_kronig(f, ω; cutoff=Inf, type=:real)

Use the Kramers-Kronig relations to compute the analytic continuation of the function f at point ω. That is, if type == :real compute

\[\frac{1}{\pi}\int_{-\infty}^{\infty} \frac{f(\omega')}{\omega'-\omega} \mathrm{d}\omega',\]

and if type == :imag compute

\[-\frac{1}{\pi}\int_{-\infty}^{\infty} \frac{f(\omega')}{\omega'-\omega} \mathrm{d}\omega'.\]

Arguments

  • f: A function that is either the real or imaginary part of an analytic complex function.
  • ω: The point where to evaluate the analytic continuation of f.
  • cutoff: (optional, default=Inf) A cutoff that bounds the range of integration.
  • type::Symbol: (optional, default=:real) If :real, take f as the imaginary part and calculate the real part of the analytic continuation.

If :imag, take f as the real part and calculate the imaginary part of the analytic continuation.

Returns

  • The real or imaginary part of the analytic continuation of f evaluated at ω.
source
diff --git a/dev/search_index.js b/dev/search_index.js index 56d6c15..ce55cd8 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"reference/#API-Reference","page":"API Reference","title":"API Reference","text":"","category":"section"},{"location":"reference/#SpectralDensities","page":"API Reference","title":"SpectralDensities","text":"","category":"section"},{"location":"reference/","page":"API Reference","title":"API Reference","text":"Modules = [SpectralDensities]","category":"page"},{"location":"reference/#SpectralDensities.AbstractSD","page":"API Reference","title":"SpectralDensities.AbstractSD","text":"abstract type AbstractSD\n\nAbstractSD represents an abstract bath spectral density.\n\nAny subtype of AbstractSD must at least define either sd or sdoverω for the new type.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.DebyeSD","page":"API Reference","title":"SpectralDensities.DebyeSD","text":"struct DebyeSD <: AbstractSD\n\nDebyeSD represents a Debye spectral density. It is characterized by an amplitude α representing the strength of the coupling and the cutoff frequency ωc. That is\n\nJ(omega) = frac2alphapifracomegaomega_c^2omega^2 + omega_c^2\n\nFields\n\nα::Float64: The amplitude α, indicating the strength of the coupling.\nωc::Float64: The cutoff frequency.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.DebyeSD-Tuple{Real, Real}","page":"API Reference","title":"SpectralDensities.DebyeSD","text":"DebyeSD(α::Real, ωc::Real)\n\nConstruct a Debye spectral density with the given amplitude α and cutoff frequency ωc.\n\nArguments\n\nα::Real: The amplitude α, indicating the strength of the coupling.\nωc::Real: The cutoff frequency.\n\nReturns\n\nAn instance of the DebyeSD struct representing the Debye spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.ExponentialCutoffSD","page":"API Reference","title":"SpectralDensities.ExponentialCutoffSD","text":"struct ExponentialCutoffSD{T <: AbstractSD} <: AbstractSD\n\nExponentialCutoffSD represents a spectral density with an exponential frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is\n\nJ_mathrmexp(omega) = J(omega)e^-omegaomega_c\n\nFields\n\nJ::T: The underlying spectral density.\nωcutoff::Float64: The frequency cutoff.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.ExponentialCutoffSD-Tuple{Any, Any}","page":"API Reference","title":"SpectralDensities.ExponentialCutoffSD","text":"ExponentialCutoffSD(J::AbstractSD, ωcutoff)\n\nConstruct a spectral density with an exponential frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.\n\nArguments\n\nJ::AbstractSD: The underlying spectral density.\nωcutoff: The frequency cutoff.\n\nReturns\n\nAn instance of the ExponentialCutoffSD struct representing the spectral density with an exponential frequency cutoff.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.GaussianCutoffSD","page":"API Reference","title":"SpectralDensities.GaussianCutoffSD","text":"struct GaussianCutoffSD{T <: AbstractSD} <: AbstractSD\n\nGaussianCutoffSD represents a spectral density with a Gaussian frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is\n\nJ_mathrmgauss(omega) = J(omega)e^-omega^2omega_c^2\n\nFields\n\nJ::T: The underlying spectral density.\nωcutoff::Float64: The frequency cutoff.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.GaussianCutoffSD-Tuple{Any, Any}","page":"API Reference","title":"SpectralDensities.GaussianCutoffSD","text":"GaussianCutoffSD(J::AbstractSD, ωcutoff)\n\nConstruct a spectral density with a Gaussian frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.\n\nArguments\n\nJ::AbstractSD: The underlying spectral density.\nωcutoff: The frequency cutoff.\n\nReturns\n\nAn instance of the GaussianCutoffSD struct representing the spectral density with a Gaussian frequency cutoff.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.HardCutoffSD","page":"API Reference","title":"SpectralDensities.HardCutoffSD","text":"struct HardCutoffSD{T <: AbstractSD} <: AbstractSD\n\nHardCutoffSD represents a spectral density with a hard frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is\n\nJ_mathrmhard(omega) = J(omega)Theta(omega_c - omega)\n\nwhere Theta is the Heaviside theta function.\n\nFields\n\nJ::T: The underlying spectral density.\nωcutoff::Float64: The frequency cutoff.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.HardCutoffSD-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.HardCutoffSD","text":"HardCutoffSD(J::AbstractSD, ωcutoff)\n\nConstruct a spectral density with a hard frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.\n\nArguments\n\nJ::AbstractSD: The underlying spectral density.\nωcutoff::Float64: The frequency cutoff.\n\nReturns\n\nAn instance of the HardCutoffSD struct representing the spectral density with a hard frequency cutoff.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.InversePolyKernelSD","page":"API Reference","title":"SpectralDensities.InversePolyKernelSD","text":"struct InversePolyKernelSD <: AbstractSD\n\nInversePolyKernelSD represents a spectral density whose corresponding memory kernel in frequency space is given by one over a polynomial in frequency. It is characterized by the degree of the polynomial deg and the list of coefficients coefs (in ascending order of powers). That is,\n\nJ(omega) = frac1pimathrmImleftfrac1sum_k=0^mathrmdegmathrmcoeffskomega^kright\n\nFields\n\ndeg::Int64: The degree of the polynomial.\ncoeffs::AbstractVector{ComplexF64}: Coefficients of the polynomial (in ascending order of powers). The length of the vector should be deg + 1.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.InversePolyKernelSD-Tuple{AbstractVector}","page":"API Reference","title":"SpectralDensities.InversePolyKernelSD","text":"InversePolyKernelSD(coeffs::AbstractVector)\n\nConstruct a InversePolyKernelSD spectral density with the given coefficients.\n\nArguments\n\ncoeffs::AbstractVector: A vector containing the coefficients of the polynomial (in ascending order of powers).\n\nReturns\n\nAn instance of the InversePolyKernelSD struct representing the spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.LorentzDrudeSD","page":"API Reference","title":"SpectralDensities.LorentzDrudeSD","text":"struct LorentzDrudeSD <: AbstractSD\n\nRepresents a Lorentz-Drude spectral density. This is just an alias for DebyeSD.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.LorentzianSD","page":"API Reference","title":"SpectralDensities.LorentzianSD","text":"struct LorentzianSD <: AbstractSD\n\nLorentzianSD represents a Lorentzian spectral density. It is characterized by an amplitude α representing the strength of the coupling, the peak centre frequency ω0, and the width of the Lorentzian peak Γ. That is\n\nJ(omega) = fracalphaGammapifracomega(omega^2 - omega_0^2)^2 + omega^2Gamma^2\n\nFields\n\nα::Float64: The amplitude α, indicating the strength of the coupling.\nω0::Float64: The centre frequency of the Lorentzian peak.\nΓ::Float64: The width of the Lorentzian peak.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.LorentzianSD-Tuple{Real, Real, Real}","page":"API Reference","title":"SpectralDensities.LorentzianSD","text":"LorentzianSD(α::Real, ω0::Real, Γ::Real)\n\nConstruct a Lorentzian spectral density with the given amplitude α, centre frequency ω0, and width Γ.\n\nArguments\n\nα::Real: The amplitude α, indicating the strength of the coupling.\nω0::Real: The centre frequency of the Lorentzian peak.\nΓ::Real: The width of the Lorentzian peak.\n\nReturns\n\nAn instance of the LorentzianSD struct representing the Lorentzian spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.OhmicSD","page":"API Reference","title":"SpectralDensities.OhmicSD","text":"struct OhmicSD <: AbstractSD\n\nOhmicSD represents an Ohmic spectral density. It is characterized by an amplitude α representing the strength of the Ohmic coupling. That is\n\nJ(omega) = alphaomega\n\nFields\n\nα::Float64: The amplitude α, indicating the strength of the Ohmic coupling.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.OhmicSD-Tuple{Real}","page":"API Reference","title":"SpectralDensities.OhmicSD","text":"OhmicSD(α::Real)\n\nConstruct an Ohmic spectral density with amplitude α.\n\nArguments\n\nα::Real: The amplitude α, indicating the strength of the Ohmic coupling.\n\nReturns\n\nAn instance of the OhmicSD struct representing the Ohmic spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.OverdampedSD","page":"API Reference","title":"SpectralDensities.OverdampedSD","text":"struct OverdampedSD <: AbstractSD\n\nRepresents an overdamped spectral density. This is just an alias for DebyeSD.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.PolySD","page":"API Reference","title":"SpectralDensities.PolySD","text":"struct PolySD <: AbstractSD\n\nPolySD represents a polynomial spectral density. It is characterized by an amplitude α representing the strength of the coupling and the polynomial degree n. That is\n\nJ(omega) = alphaomega^n\n\nFields\n\nα::Float64: The amplitude α, indicating the strength of the coupling.\nn::Int: The polynomial degree.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.PolySD-Tuple{Real, Int64}","page":"API Reference","title":"SpectralDensities.PolySD","text":"PolySD(α::Real, n::Int)\n\nConstruct a polynomial spectral density with the given amplitude α and degree n.\n\nArguments\n\nα::Real: The amplitude α, indicating the strength of the coupling.\nn::Int: The polynomial degree.\n\nReturns\n\nAn instance of the PolySD struct representing the polynomial spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.UnderdampedSD","page":"API Reference","title":"SpectralDensities.UnderdampedSD","text":"struct UnderdampedSD <: AbstractSD\n\nRepresents an underdamped spectral density. This is just an alias for LorentzianSD.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.correlations-Tuple{AbstractSD, Any, Any}","page":"API Reference","title":"SpectralDensities.correlations","text":"correlations(J::AbstractSD, τ, β)\n\nCalculate the correlation function for a spectral density J at a given time delay τ and inverse temperature β.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nτ: The time delay at which the correlation function is calculated.\nβ: The inverse temperature.\n\nReturns\n\nThe correlation function for the spectral density J at the given time delay τ and inverse temperature β.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.frequency_cutoff-Tuple{AbstractSD}","page":"API Reference","title":"SpectralDensities.frequency_cutoff","text":"frequency_cutoff(J::AbstractSD; tol=eps())\n\nReturn the frequency cutoff of the spectral density J to accuracy set by the tolerance parameter tol.\n\nArguments\n\nJ::AbstractSD: The spectral density.\ntol: The tolerance at which to truncate the spectral density.\n\nReturns\n\nThe frequency cutoff for the desired tolerance.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.imag_memory_kernel_ft-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.imag_memory_kernel_ft","text":"imag_memory_kernel_ft(J::AbstractSD, ω)\n\nCalculate the imaginary part of the Fourier-transform of the memory kernel for a spectral density J at a given frequency ω.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nω: The frequency at which the imaginary part of the Fourier-transform of the memory kernel is evaluated.\n\nReturns\n\nThe imaginary part of the Fourier-transform of the memory kernel for the spectral density J at the given frequency ω.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.memory_kernel-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.memory_kernel","text":"memory_kernel(J::AbstractSD, τ)\n\nCalculate the memory kernel for a spectral density J at a given time delay τ, that is\n\nmathcalK(tau) = 2Theta(tau)int_0^infty J(omega)sin(omega)mathrmdomega\n\nwhere Theta is the Heavisde theta function.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nτ: The time delay at which the memory kernel is evaluated.\n\nReturns\n\nThe memory kernel for the spectral density J at the given time delay τ.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.reorganisation_energy-Tuple{AbstractSD}","page":"API Reference","title":"SpectralDensities.reorganisation_energy","text":"reorganisation_energy(J::AbstractSD)\n\nCalculate the reorganization energy of a given spectral density J, i.e.\n\nint_0^infty fracJ(omega)omega mathrmdomega \n\nArguments\n\nJ::AbstractSD: The spectral density.\n\nReturns\n\nThe reorganization energy of the spectral density J.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.sd-Union{Tuple{T}, Tuple{T, Any}} where T<:AbstractSD","page":"API Reference","title":"SpectralDensities.sd","text":"sd(J::T, ω) where T <: AbstractSD\n\nEvaluate the spectral density represented by J at a given frequency ω, i.e. J(ω).\n\nArguments\n\nJ::T: The spectral density.\nω: The frequency at which the spectral density is evaluated.\n\nReturns\n\nThe spectral density J at the frequency ω.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.sdoverω-Union{Tuple{T}, Tuple{T, Any}} where T<:AbstractSD","page":"API Reference","title":"SpectralDensities.sdoverω","text":"sdoverω(J::T, ω) where T <: AbstractSD\n\nEvaluate the spectral density represented by J divided by a given frequency ω, i.e. J(ω)/ω.\n\nArguments\n\nJ::T: The spectral density.\nω: The frequency at which the spectral density is evaluated.\n\nReturns\n\nThe spectral density J(ω) divided by ω.\n\n\n\n\n\n","category":"method"},{"location":"reference/#WeakCoupling","page":"API Reference","title":"WeakCoupling","text":"","category":"section"},{"location":"reference/","page":"API Reference","title":"API Reference","text":"Modules = [WeakCoupling]","category":"page"},{"location":"reference/#SpectralDensities.WeakCoupling.weak_coupling_Δ-Tuple{AbstractSD, Any, Any}","page":"API Reference","title":"SpectralDensities.WeakCoupling.weak_coupling_Δ","text":"weak_coupling_Δ(J::AbstractSD, ωB, β; ωcutoff=Inf, ħ=one(ωB))\n\nCalculate the weak-coupling coefficient Δ for the spectral density J, system Bohr frequency ωB, and inverse temperature β, defined as\n\nDelta_beta(omega_mathrmB) = 2omega_mathrmBint_0^infty\n J(omega)frac1omega^2-omega_mathrmB^2\n cothleft(fracbetahbaromega2right) mathrmdomega\n\nSee: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).\n\nArguments\n\nJ::AbstractSD: The spectral density.\nωB: The system Bohr frequency of interest.\nβ: The inverse temperature.\nωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.\nħ: The value of the reduced Planck constant. Default is 1.\n\nReturns\n\nThe weak-coupling coefficient Δ for the spectral density J, system Bohr frequency ωB, and inverse temperature β.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.WeakCoupling.weak_coupling_Δprime-Tuple{AbstractSD, Any, Any}","page":"API Reference","title":"SpectralDensities.WeakCoupling.weak_coupling_Δprime","text":"weak_coupling_Δprime(J::AbstractSD, ωB, β; ωcutoff=Inf, ħ=one(ωB))\n\nCalculate the weak-coupling coefficient Δ′ for the spectral density J, system Bohr frequency ωB, and inverse temperature β, defined as\n\nDelta_beta(omega_mathrmB) = 2int_0^infty\n J(omega)frac(omega^2 + omega_mathrmB^2)(omega^2-omega_mathrmB^2)^2\n cothleft(fracbetahbaromega2right) mathrmdomega\n\nSee: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).\n\nNote: The spectral density J must support automatic differentiation with ForwardDiff.jl.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nωB: The system Bohr frequency of interest.\nβ: The inverse temperature.\nωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.\nħ: The value of the reduced Planck constant. Default is 1.\n\nReturns\n\nThe weak-coupling coefficient Δ′ for the spectral density J, system Bohr frequency ωB, and inverse temperature β.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.WeakCoupling.weak_coupling_Σ-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.WeakCoupling.weak_coupling_Σ","text":"weak_coupling_Σ(J::AbstractSD, ωB; ωcutoff=Inf)\n\nCalculate the weak-coupling coefficient Σ for the spectral density J and system Bohr frequency ωB, defined as\n\nSigma(omega_mathrmB) = 2int_0^infty\n J(omega)fracomegaomega^2-omega_mathrmB^2 mathrmdomega\n\nSee: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).\n\nArguments\n\nJ::AbstractSD: The spectral denstiy.\nωB: The system Bohr frequency of interest.\nωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.\n\nReturns\n\nThe weak-coupling coefficient Σ for the spectral density J and system Bohr frequency ωB.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.WeakCoupling.weak_coupling_Σprime-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.WeakCoupling.weak_coupling_Σprime","text":"weak_coupling_Σprime(J::AbstractSD, ωB; ωcutoff=Inf)\n\nCalculate the weak-coupling coefficient Σ′ for the spectral density J and system Bohr frequency ωB, defined as\n\nSigma(omega_mathrmB) = 4omega_mathrmBint_0^infty\n J(omega)fracomega(omega^2-omega_mathrmB^2)^2\n mathrmdomega\n\nSee: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).\n\nNote: The spectral density J must support automatic differentiation with ForwardDiff.jl.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nωB: The system Bohr frequency of interest.\nωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.\n\nReturns\n\nThe weak-coupling coefficient Σ′ for the spectral density J and system Bohr frequency ωB.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SingularIntegrals","page":"API Reference","title":"SingularIntegrals","text":"","category":"section"},{"location":"reference/","page":"API Reference","title":"API Reference","text":"Modules = [SingularIntegrals]","category":"page"},{"location":"reference/#SpectralDensities.SingularIntegrals.cauchy_quadgk","page":"API Reference","title":"SpectralDensities.SingularIntegrals.cauchy_quadgk","text":"cauchy_quadgk(g, a, b, x0=0; kws...)\n\nComputes the Cauchy principal value of the integral of a function g with singularity at x0 over the interval [a, b], that is\n\nmathrmPVint_a^bfracg(x)x-x_0mathrmdx\n\nNote that x0 must be contained in the interval [a, b]. The actual integration is performed by the quadgk method of the QuadGK.jl package and the keyword arguments kws are passed directly onto quadgk.\n\nNote: If the function g contains additional integrable singularities, the user should manually split the integration interval around them, since currently there is no way of passing integration break points onto quadgk.\n\nArguments\n\ng: The function to integrate.\na: The lower bound of the interval.\nb: The upper bound of the interval.\nx0: The location of the singularity. Default value is the origin.\nkws...: Additional keyword arguments accepted by quadgk.\n\nReturns\n\nA tuple (I, E) containing the approximated integral I and an estimated upper bound on the absolute error E.\n\nThrows\n\nArgumentError: If the interval [a, b] does not include the singularity x0.\n\nExamples\n\njulia> cauchy_quadgk(x -> 1/(x+2), -1.0, 1.0)\n(-0.549306144334055, 9.969608472104596e-12)\n\njulia> cauchy_quadgk(x -> x^2, 0.0, 2.0, 1.0)\n(4.0, 2.220446049250313e-16)\n\n\n\n\n\n","category":"function"},{"location":"reference/#SpectralDensities.SingularIntegrals.hadamard_quadgk","page":"API Reference","title":"SpectralDensities.SingularIntegrals.hadamard_quadgk","text":"hadamard_quadgk(g, g′, a, b, x0=0; kws...)\n\nComputes the Hadamard finite part of the integral of a function g with a singularity at x0 over the interval [a, b], that is\n\nmathcalHint_a^bfracg(x)(x-x_0)^2mathrmdx\n\nNote that x0 must be contained in the interval [a, b]. The actual integration is performed by the quadgk method of the QuadGK.jl package and the keyword arguments kws are passed directly onto quadgk.\n\nNote: If the function g′ contains additional integrable singularities, the user should manually split the integration interval around them, since currently there is no way of passing integration break points onto quadgk.\n\nArguments\n\ng: The function to integrate.\ng′: The derivative of the function g.\na: The lower bound of the interval.\nb: The upper bound of the interval.\nx0: The location of the singularity. Defaults value is the origin.\nkws...: Additional keyword arguments accepted by quadgk.\n\nReturns\n\nA tuple (I, E...) containing the approximated Hadamard finite part integral I and an additional error estimate E from the quadrature method.\n\nThrows\n\nArgumentError: If the interval [a, b] does not include the singularity x0.\n\nExamples\n\njulia> hadamard_quadgk(x -> log(x+1), x -> 1/(x+1), 0.0, 2.0, 1.0)\n(-1.6479184330021648, 9.969608472104596e-12)\n\n\n\n\n\n","category":"function"},{"location":"","page":"Home","title":"Home","text":"CurrentModule = SpectralDensities","category":"page"},{"location":"#SpectralDensities.jl","page":"Home","title":"SpectralDensities.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This package implements commonly used spectral densities for Open Quantum Systems and typical operations on them.","category":"page"},{"location":"#Features","page":"Home","title":"Features","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Features of SpectralDensities.jl include:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Definition of most widely used spectral densities: Ohmic, Sub-Ohmic, Supra-Ohmic, Lorentzian (Underdamped), Debye (Overdamped)\nFlexibility to choose desidred cutoff functions: hard cutoffs, exponential cutoff, gaussian cutoff.\nCalculation of the correlation function of a given spectral density (with specialised methods for the pre-defined types)\nCalculation of reorganisation energy of a given spectral density (with specialised methods for the pre-defined types)\nCalculation of the memory kernel of a given spectral density, both in the time domain, and the imaginary part in the Fourier domain (with specialised methods for some of the pre-defined types)\nMethods to compute the spectral density integrals that appear in the weak coupling (2nd order expansion), both for the dynamics (see e.g. H. Breuer, F. Petruccione, \"The Theory of Open Quantum Systems\"), and the equilibrium mean-force state (see e.g. J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021)).","category":"page"},{"location":"#Quick-start","page":"Home","title":"Quick start","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The desired spectral density can be constructed by simply passing the desired parameters to their respective constructor. For example, for an Ohmic spectral density J(omega) = 3omega we have","category":"page"},{"location":"","page":"Home","title":"Home","text":"Johmic = OhmicSD(3)","category":"page"},{"location":"","page":"Home","title":"Home","text":"To add a ctuoff to a base spectral density, one simply passes it to the cutoff constructor. For example, to add an exponential cutoff e^-omega7 we can do","category":"page"},{"location":"","page":"Home","title":"Home","text":"Jc = ExponentialCutoffSD(Johmic, 7)","category":"page"},{"location":"#Defining-custom-spectral-densities","page":"Home","title":"Defining custom spectral densities","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The base AbstractSD can be easily extended by the user. To do so, one must create a new sub-type for which at least one of the methods sd (the spectral density itself J(omega)) or sdoverω (the spectral density divided by frequency J(omega)omega) must be defined. It is strongly recommended to define, if possible, sdoverω since it typically makes it simpler to numerically handle potential singularities.","category":"page"},{"location":"","page":"Home","title":"Home","text":"This is the only requirement, and all other methods will automatically work on the new subtype. Of course, as is typical of Julia's super flexible multiple-dispatch system, the user should consider providing custom functions on the new type for the reorganisation energy, etc.","category":"page"}] +[{"location":"reference/#API-Reference","page":"API Reference","title":"API Reference","text":"","category":"section"},{"location":"reference/#SpectralDensities","page":"API Reference","title":"SpectralDensities","text":"","category":"section"},{"location":"reference/","page":"API Reference","title":"API Reference","text":"Modules = [SpectralDensities]","category":"page"},{"location":"reference/#SpectralDensities.AbstractSD","page":"API Reference","title":"SpectralDensities.AbstractSD","text":"abstract type AbstractSD\n\nAbstractSD represents an abstract bath spectral density.\n\nAny subtype of AbstractSD must at least define either sd or sdoverω for the new type.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.DebyeSD","page":"API Reference","title":"SpectralDensities.DebyeSD","text":"struct DebyeSD <: AbstractSD\n\nDebyeSD represents a Debye spectral density. It is characterized by an amplitude α representing the strength of the coupling and the cutoff frequency ωc. That is\n\nJ(omega) = frac2alphapifracomegaomega_c^2omega^2 + omega_c^2\n\nFields\n\nα::Float64: The amplitude α, indicating the strength of the coupling.\nωc::Float64: The cutoff frequency.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.DebyeSD-Tuple{Real, Real}","page":"API Reference","title":"SpectralDensities.DebyeSD","text":"DebyeSD(α::Real, ωc::Real)\n\nConstruct a Debye spectral density with the given amplitude α and cutoff frequency ωc.\n\nArguments\n\nα::Real: The amplitude α, indicating the strength of the coupling.\nωc::Real: The cutoff frequency.\n\nReturns\n\nAn instance of the DebyeSD struct representing the Debye spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.ExponentialCutoffSD","page":"API Reference","title":"SpectralDensities.ExponentialCutoffSD","text":"struct ExponentialCutoffSD{T <: AbstractSD} <: AbstractSD\n\nExponentialCutoffSD represents a spectral density with an exponential frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is\n\nJ_mathrmexp(omega) = J(omega)e^-omegaomega_c\n\nFields\n\nJ::T: The underlying spectral density.\nωcutoff::Float64: The frequency cutoff.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.ExponentialCutoffSD-Tuple{Any, Any}","page":"API Reference","title":"SpectralDensities.ExponentialCutoffSD","text":"ExponentialCutoffSD(J::AbstractSD, ωcutoff)\n\nConstruct a spectral density with an exponential frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.\n\nArguments\n\nJ::AbstractSD: The underlying spectral density.\nωcutoff: The frequency cutoff.\n\nReturns\n\nAn instance of the ExponentialCutoffSD struct representing the spectral density with an exponential frequency cutoff.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.GaussianCutoffSD","page":"API Reference","title":"SpectralDensities.GaussianCutoffSD","text":"struct GaussianCutoffSD{T <: AbstractSD} <: AbstractSD\n\nGaussianCutoffSD represents a spectral density with a Gaussian frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is\n\nJ_mathrmgauss(omega) = J(omega)e^-omega^2omega_c^2\n\nFields\n\nJ::T: The underlying spectral density.\nωcutoff::Float64: The frequency cutoff.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.GaussianCutoffSD-Tuple{Any, Any}","page":"API Reference","title":"SpectralDensities.GaussianCutoffSD","text":"GaussianCutoffSD(J::AbstractSD, ωcutoff)\n\nConstruct a spectral density with a Gaussian frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.\n\nArguments\n\nJ::AbstractSD: The underlying spectral density.\nωcutoff: The frequency cutoff.\n\nReturns\n\nAn instance of the GaussianCutoffSD struct representing the spectral density with a Gaussian frequency cutoff.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.HardCutoffSD","page":"API Reference","title":"SpectralDensities.HardCutoffSD","text":"struct HardCutoffSD{T <: AbstractSD} <: AbstractSD\n\nHardCutoffSD represents a spectral density with a hard frequency cutoff. It is parameterized by the underlying spectral density J, and the frequency cutoff ωcutoff. That is\n\nJ_mathrmhard(omega) = J(omega)Theta(omega_c - omega)\n\nwhere Theta is the Heaviside theta function.\n\nFields\n\nJ::T: The underlying spectral density.\nωcutoff::Float64: The frequency cutoff.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.HardCutoffSD-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.HardCutoffSD","text":"HardCutoffSD(J::AbstractSD, ωcutoff)\n\nConstruct a spectral density with a hard frequency cutoff using the underlying spectral density J and the given frequency cutoff ωcutoff.\n\nArguments\n\nJ::AbstractSD: The underlying spectral density.\nωcutoff::Float64: The frequency cutoff.\n\nReturns\n\nAn instance of the HardCutoffSD struct representing the spectral density with a hard frequency cutoff.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.InversePolyKernelSD","page":"API Reference","title":"SpectralDensities.InversePolyKernelSD","text":"struct InversePolyKernelSD <: AbstractSD\n\nInversePolyKernelSD represents a spectral density whose corresponding memory kernel in frequency space is given by one over a polynomial in frequency. It is characterized by the degree of the polynomial deg and the list of coefficients coefs (in ascending order of powers). That is,\n\nJ(omega) = frac1pimathrmImleftfrac1sum_k=0^mathrmdegmathrmcoeffskomega^kright\n\nFields\n\ndeg::Int64: The degree of the polynomial.\ncoeffs::AbstractVector{ComplexF64}: Coefficients of the polynomial (in ascending order of powers). The length of the vector should be deg + 1.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.InversePolyKernelSD-Tuple{AbstractVector}","page":"API Reference","title":"SpectralDensities.InversePolyKernelSD","text":"InversePolyKernelSD(coeffs::AbstractVector)\n\nConstruct a InversePolyKernelSD spectral density with the given coefficients.\n\nArguments\n\ncoeffs::AbstractVector: A vector containing the coefficients of the polynomial (in ascending order of powers).\n\nReturns\n\nAn instance of the InversePolyKernelSD struct representing the spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.LorentzDrudeSD","page":"API Reference","title":"SpectralDensities.LorentzDrudeSD","text":"struct LorentzDrudeSD <: AbstractSD\n\nRepresents a Lorentz-Drude spectral density. This is just an alias for DebyeSD.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.LorentzianSD","page":"API Reference","title":"SpectralDensities.LorentzianSD","text":"struct LorentzianSD <: AbstractSD\n\nLorentzianSD represents a Lorentzian spectral density. It is characterized by an amplitude α representing the strength of the coupling, the peak centre frequency ω0, and the width of the Lorentzian peak Γ. That is\n\nJ(omega) = fracalphaGammapifracomega(omega^2 - omega_0^2)^2 + omega^2Gamma^2\n\nFields\n\nα::Float64: The amplitude α, indicating the strength of the coupling.\nω0::Float64: The centre frequency of the Lorentzian peak.\nΓ::Float64: The width of the Lorentzian peak.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.LorentzianSD-Tuple{Real, Real, Real}","page":"API Reference","title":"SpectralDensities.LorentzianSD","text":"LorentzianSD(α::Real, ω0::Real, Γ::Real)\n\nConstruct a Lorentzian spectral density with the given amplitude α, centre frequency ω0, and width Γ.\n\nArguments\n\nα::Real: The amplitude α, indicating the strength of the coupling.\nω0::Real: The centre frequency of the Lorentzian peak.\nΓ::Real: The width of the Lorentzian peak.\n\nReturns\n\nAn instance of the LorentzianSD struct representing the Lorentzian spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.OhmicSD","page":"API Reference","title":"SpectralDensities.OhmicSD","text":"struct OhmicSD <: AbstractSD\n\nOhmicSD represents an Ohmic spectral density. It is characterized by an amplitude α representing the strength of the Ohmic coupling. That is\n\nJ(omega) = alphaomega\n\nFields\n\nα::Float64: The amplitude α, indicating the strength of the Ohmic coupling.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.OhmicSD-Tuple{Real}","page":"API Reference","title":"SpectralDensities.OhmicSD","text":"OhmicSD(α::Real)\n\nConstruct an Ohmic spectral density with amplitude α.\n\nArguments\n\nα::Real: The amplitude α, indicating the strength of the Ohmic coupling.\n\nReturns\n\nAn instance of the OhmicSD struct representing the Ohmic spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.OverdampedSD","page":"API Reference","title":"SpectralDensities.OverdampedSD","text":"struct OverdampedSD <: AbstractSD\n\nRepresents an overdamped spectral density. This is just an alias for DebyeSD.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.PolySD","page":"API Reference","title":"SpectralDensities.PolySD","text":"struct PolySD <: AbstractSD\n\nPolySD represents a polynomial spectral density. It is characterized by an amplitude α representing the strength of the coupling and the polynomial degree n. That is\n\nJ(omega) = alphaomega^n\n\nFields\n\nα::Float64: The amplitude α, indicating the strength of the coupling.\nn::Int: The polynomial degree.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.PolySD-Tuple{Real, Int64}","page":"API Reference","title":"SpectralDensities.PolySD","text":"PolySD(α::Real, n::Int)\n\nConstruct a polynomial spectral density with the given amplitude α and degree n.\n\nArguments\n\nα::Real: The amplitude α, indicating the strength of the coupling.\nn::Int: The polynomial degree.\n\nReturns\n\nAn instance of the PolySD struct representing the polynomial spectral density.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.UnderdampedSD","page":"API Reference","title":"SpectralDensities.UnderdampedSD","text":"struct UnderdampedSD <: AbstractSD\n\nRepresents an underdamped spectral density. This is just an alias for LorentzianSD.\n\n\n\n\n\n","category":"type"},{"location":"reference/#SpectralDensities.correlations-Tuple{AbstractSD, Any, Any}","page":"API Reference","title":"SpectralDensities.correlations","text":"correlations(J::AbstractSD, τ, β)\n\nCalculate the correlation function for a spectral density J at a given time delay τ and inverse temperature β.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nτ: The time delay at which the correlation function is calculated.\nβ: The inverse temperature.\n\nReturns\n\nThe correlation function for the spectral density J at the given time delay τ and inverse temperature β.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.frequency_cutoff-Tuple{AbstractSD}","page":"API Reference","title":"SpectralDensities.frequency_cutoff","text":"frequency_cutoff(J::AbstractSD; tol=eps())\n\nReturn the frequency cutoff of the spectral density J to accuracy set by the tolerance parameter tol.\n\nArguments\n\nJ::AbstractSD: The spectral density.\ntol: The tolerance at which to truncate the spectral density.\n\nReturns\n\nThe frequency cutoff for the desired tolerance.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.imag_memory_kernel_ft-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.imag_memory_kernel_ft","text":"imag_memory_kernel_ft(J::AbstractSD, ω)\n\nCalculate the imaginary part of the Fourier-transform of the memory kernel for a spectral density J at a given frequency ω.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nω: The frequency at which the imaginary part of the Fourier-transform of the memory kernel is evaluated.\n\nReturns\n\nThe imaginary part of the Fourier-transform of the memory kernel for the spectral density J at the given frequency ω.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.memory_kernel-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.memory_kernel","text":"memory_kernel(J::AbstractSD, τ)\n\nCalculate the memory kernel for a spectral density J at a given time delay τ, that is\n\nmathcalK(tau) = 2Theta(tau)int_0^infty J(omega)sin(omega)mathrmdomega\n\nwhere Theta is the Heavisde theta function.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nτ: The time delay at which the memory kernel is evaluated.\n\nReturns\n\nThe memory kernel for the spectral density J at the given time delay τ.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.memory_kernel_ft-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.memory_kernel_ft","text":"memory_kernel_ft(J::AbstractSD, ω)\n\nCalculate the Fourier-transform of the memory kernel for a spectral density J at a given frequency ω.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nω: The frequency at which the Fourier-transform of the memory kernel is evaluated.\n\nReturns\n\nThe Fourier-transform of the memory kernel for the spectral density J at the given frequency ω.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.real_memory_kernel_ft-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.real_memory_kernel_ft","text":"real_memory_kernel_ft(J::AbstractSD, ω)\n\nCalculate the real part of the Fourier-transform of the memory kernel for a spectral density J at a given frequency ω.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nω: The frequency at which the real part of the Fourier-transform of the memory kernel is evaluated.\n\nReturns\n\nThe real part of the Fourier-transform of the memory kernel for the spectral density J at the given frequency ω.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.reorganisation_energy-Tuple{AbstractSD}","page":"API Reference","title":"SpectralDensities.reorganisation_energy","text":"reorganisation_energy(J::AbstractSD)\n\nCalculate the reorganization energy of a given spectral density J, i.e.\n\nint_0^infty fracJ(omega)omega mathrmdomega \n\nArguments\n\nJ::AbstractSD: The spectral density.\n\nReturns\n\nThe reorganization energy of the spectral density J.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.sd-Union{Tuple{T}, Tuple{T, Any}} where T<:AbstractSD","page":"API Reference","title":"SpectralDensities.sd","text":"sd(J::T, ω) where T <: AbstractSD\n\nEvaluate the spectral density represented by J at a given frequency ω, i.e. J(ω).\n\nArguments\n\nJ::T: The spectral density.\nω: The frequency at which the spectral density is evaluated.\n\nReturns\n\nThe spectral density J at the frequency ω.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.sdoverω-Union{Tuple{T}, Tuple{T, Any}} where T<:AbstractSD","page":"API Reference","title":"SpectralDensities.sdoverω","text":"sdoverω(J::T, ω) where T <: AbstractSD\n\nEvaluate the spectral density represented by J divided by a given frequency ω, i.e. J(ω)/ω.\n\nArguments\n\nJ::T: The spectral density.\nω: The frequency at which the spectral density is evaluated.\n\nReturns\n\nThe spectral density J(ω) divided by ω.\n\n\n\n\n\n","category":"method"},{"location":"reference/#WeakCoupling","page":"API Reference","title":"WeakCoupling","text":"","category":"section"},{"location":"reference/","page":"API Reference","title":"API Reference","text":"Modules = [WeakCoupling]","category":"page"},{"location":"reference/#SpectralDensities.WeakCoupling.weak_coupling_Δ-Tuple{AbstractSD, Any, Any}","page":"API Reference","title":"SpectralDensities.WeakCoupling.weak_coupling_Δ","text":"weak_coupling_Δ(J::AbstractSD, ωB, β; ωcutoff=Inf, ħ=one(ωB))\n\nCalculate the weak-coupling coefficient Δ for the spectral density J, system Bohr frequency ωB, and inverse temperature β, defined as\n\nDelta_beta(omega_mathrmB) = 2omega_mathrmBint_0^infty\n J(omega)frac1omega^2-omega_mathrmB^2\n cothleft(fracbetahbaromega2right) mathrmdomega\n\nSee: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).\n\nArguments\n\nJ::AbstractSD: The spectral density.\nωB: The system Bohr frequency of interest.\nβ: The inverse temperature.\nωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.\nħ: The value of the reduced Planck constant. Default is 1.\n\nReturns\n\nThe weak-coupling coefficient Δ for the spectral density J, system Bohr frequency ωB, and inverse temperature β.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.WeakCoupling.weak_coupling_Δprime-Tuple{AbstractSD, Any, Any}","page":"API Reference","title":"SpectralDensities.WeakCoupling.weak_coupling_Δprime","text":"weak_coupling_Δprime(J::AbstractSD, ωB, β; ωcutoff=Inf, ħ=one(ωB))\n\nCalculate the weak-coupling coefficient Δ′ for the spectral density J, system Bohr frequency ωB, and inverse temperature β, defined as\n\nDelta_beta(omega_mathrmB) = 2int_0^infty\n J(omega)frac(omega^2 + omega_mathrmB^2)(omega^2-omega_mathrmB^2)^2\n cothleft(fracbetahbaromega2right) mathrmdomega\n\nSee: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).\n\nNote: The spectral density J must support automatic differentiation with ForwardDiff.jl.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nωB: The system Bohr frequency of interest.\nβ: The inverse temperature.\nωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.\nħ: The value of the reduced Planck constant. Default is 1.\n\nReturns\n\nThe weak-coupling coefficient Δ′ for the spectral density J, system Bohr frequency ωB, and inverse temperature β.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.WeakCoupling.weak_coupling_Σ-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.WeakCoupling.weak_coupling_Σ","text":"weak_coupling_Σ(J::AbstractSD, ωB; ωcutoff=Inf)\n\nCalculate the weak-coupling coefficient Σ for the spectral density J and system Bohr frequency ωB, defined as\n\nSigma(omega_mathrmB) = 2int_0^infty\n J(omega)fracomegaomega^2-omega_mathrmB^2 mathrmdomega\n\nSee: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).\n\nArguments\n\nJ::AbstractSD: The spectral denstiy.\nωB: The system Bohr frequency of interest.\nωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.\n\nReturns\n\nThe weak-coupling coefficient Σ for the spectral density J and system Bohr frequency ωB.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SpectralDensities.WeakCoupling.weak_coupling_Σprime-Tuple{AbstractSD, Any}","page":"API Reference","title":"SpectralDensities.WeakCoupling.weak_coupling_Σprime","text":"weak_coupling_Σprime(J::AbstractSD, ωB; ωcutoff=Inf)\n\nCalculate the weak-coupling coefficient Σ′ for the spectral density J and system Bohr frequency ωB, defined as\n\nSigma(omega_mathrmB) = 4omega_mathrmBint_0^infty\n J(omega)fracomega(omega^2-omega_mathrmB^2)^2\n mathrmdomega\n\nSee: J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021).\n\nNote: The spectral density J must support automatic differentiation with ForwardDiff.jl.\n\nArguments\n\nJ::AbstractSD: The spectral density.\nωB: The system Bohr frequency of interest.\nωcutoff: (optional, default=Inf) Frequency cutoff to help with the convergence of the integration.\n\nReturns\n\nThe weak-coupling coefficient Σ′ for the spectral density J and system Bohr frequency ωB.\n\n\n\n\n\n","category":"method"},{"location":"reference/#SingularIntegrals","page":"API Reference","title":"SingularIntegrals","text":"","category":"section"},{"location":"reference/","page":"API Reference","title":"API Reference","text":"Modules = [SingularIntegrals]","category":"page"},{"location":"reference/#SpectralDensities.SingularIntegrals.cauchy_quadgk","page":"API Reference","title":"SpectralDensities.SingularIntegrals.cauchy_quadgk","text":"cauchy_quadgk(g, a, b, x0=0; kws...)\n\nComputes the Cauchy principal value of the integral of a function g with singularity at x0 over the interval [a, b], that is\n\nmathrmPVint_a^bfracg(x)x-x_0mathrmdx\n\nNote that x0 must be contained in the interval [a, b]. The actual integration is performed by the quadgk method of the QuadGK.jl package and the keyword arguments kws are passed directly onto quadgk.\n\nNote: If the function g contains additional integrable singularities, the user should manually split the integration interval around them, since currently there is no way of passing integration break points onto quadgk.\n\nArguments\n\ng: The function to integrate.\na: The lower bound of the interval.\nb: The upper bound of the interval.\nx0: The location of the singularity. Default value is the origin.\nkws...: Additional keyword arguments accepted by quadgk.\n\nReturns\n\nA tuple (I, E) containing the approximated integral I and an estimated upper bound on the absolute error E.\n\nThrows\n\nArgumentError: If the interval [a, b] does not include the singularity x0.\n\nExamples\n\njulia> cauchy_quadgk(x -> 1/(x+2), -1.0, 1.0)\n(-0.549306144334055, 9.969608472104596e-12)\n\njulia> cauchy_quadgk(x -> x^2, 0.0, 2.0, 1.0)\n(4.0, 2.220446049250313e-16)\n\n\n\n\n\n","category":"function"},{"location":"reference/#SpectralDensities.SingularIntegrals.hadamard_quadgk","page":"API Reference","title":"SpectralDensities.SingularIntegrals.hadamard_quadgk","text":"hadamard_quadgk(g, g′, a, b, x0=0; kws...)\n\nComputes the Hadamard finite part of the integral of a function g with a singularity at x0 over the interval [a, b], that is\n\nmathcalHint_a^bfracg(x)(x-x_0)^2mathrmdx\n\nNote that x0 must be contained in the interval [a, b]. The actual integration is performed by the quadgk method of the QuadGK.jl package and the keyword arguments kws are passed directly onto quadgk.\n\nNote: If the function g′ contains additional integrable singularities, the user should manually split the integration interval around them, since currently there is no way of passing integration break points onto quadgk.\n\nArguments\n\ng: The function to integrate.\ng′: The derivative of the function g.\na: The lower bound of the interval.\nb: The upper bound of the interval.\nx0: The location of the singularity. Defaults value is the origin.\nkws...: Additional keyword arguments accepted by quadgk.\n\nReturns\n\nA tuple (I, E...) containing the approximated Hadamard finite part integral I and an additional error estimate E from the quadrature method.\n\nThrows\n\nArgumentError: If the interval [a, b] does not include the singularity x0.\n\nExamples\n\njulia> hadamard_quadgk(x -> log(x+1), x -> 1/(x+1), 0.0, 2.0, 1.0)\n(-1.6479184330021648, 9.969608472104596e-12)\n\n\n\n\n\n","category":"function"},{"location":"reference/#SpectralDensities.SingularIntegrals.kramers_kronig-Tuple{Any, Any}","page":"API Reference","title":"SpectralDensities.SingularIntegrals.kramers_kronig","text":"kramers_kronig(f, ω; cutoff=Inf, type=:real)\n\nUse the Kramers-Kronig relations to compute the analytic continuation of the function f at point ω. That is, if type == :real compute\n\nfrac1piint_-infty^infty fracf(omega)omega-omega mathrmdomega\n\nand if type == :imag compute\n\n-frac1piint_-infty^infty fracf(omega)omega-omega mathrmdomega\n\nArguments\n\nf: A function that is either the real or imaginary part of an analytic complex function.\nω: The point where to evaluate the analytic continuation of f.\ncutoff: (optional, default=Inf) A cutoff that bounds the range of integration.\ntype::Symbol: (optional, default=:real) If :real, take f as the imaginary part and calculate the real part of the analytic continuation.\n\nIf :imag, take f as the real part and calculate the imaginary part of the analytic continuation.\n\nReturns\n\nThe real or imaginary part of the analytic continuation of f evaluated at ω.\n\n\n\n\n\n","category":"method"},{"location":"","page":"Home","title":"Home","text":"CurrentModule = SpectralDensities","category":"page"},{"location":"#SpectralDensities.jl","page":"Home","title":"SpectralDensities.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This package implements commonly used spectral densities for Open Quantum Systems and typical operations on them.","category":"page"},{"location":"#Features","page":"Home","title":"Features","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Features of SpectralDensities.jl include:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Definition of most widely used spectral densities: Ohmic, Sub-Ohmic, Supra-Ohmic, Lorentzian (Underdamped), Debye (Overdamped)\nFlexibility to choose desidred cutoff functions: hard cutoffs, exponential cutoff, gaussian cutoff.\nCalculation of the correlation function of a given spectral density (with specialised methods for the pre-defined types)\nCalculation of reorganisation energy of a given spectral density (with specialised methods for the pre-defined types)\nCalculation of the memory kernel of a given spectral density, both in the time domain, and the imaginary part in the Fourier domain (with specialised methods for some of the pre-defined types)\nMethods to compute the spectral density integrals that appear in the weak coupling (2nd order expansion), both for the dynamics (see e.g. H. Breuer, F. Petruccione, \"The Theory of Open Quantum Systems\"), and the equilibrium mean-force state (see e.g. J.D. Cresser, J. Anders, Phys. Rev. Lett. 127, 250601 (2021)).","category":"page"},{"location":"#Quick-start","page":"Home","title":"Quick start","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The desired spectral density can be constructed by simply passing the desired parameters to their respective constructor. For example, for an Ohmic spectral density J(omega) = 3omega we have","category":"page"},{"location":"","page":"Home","title":"Home","text":"Johmic = OhmicSD(3)","category":"page"},{"location":"","page":"Home","title":"Home","text":"To add a ctuoff to a base spectral density, one simply passes it to the cutoff constructor. For example, to add an exponential cutoff e^-omega7 we can do","category":"page"},{"location":"","page":"Home","title":"Home","text":"Jc = ExponentialCutoffSD(Johmic, 7)","category":"page"},{"location":"#Defining-custom-spectral-densities","page":"Home","title":"Defining custom spectral densities","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The base AbstractSD can be easily extended by the user. To do so, one must create a new sub-type for which at least one of the methods sd (the spectral density itself J(omega)) or sdoverω (the spectral density divided by frequency J(omega)omega) must be defined. It is strongly recommended to define, if possible, sdoverω since it typically makes it simpler to numerically handle potential singularities.","category":"page"},{"location":"","page":"Home","title":"Home","text":"This is the only requirement, and all other methods will automatically work on the new subtype. Of course, as is typical of Julia's super flexible multiple-dispatch system, the user should consider providing custom functions on the new type for the reorganisation energy, etc.","category":"page"}] }