From b8beda0d7545b43ba6d32413e9dac2ba629f20fa Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Fri, 7 Jul 2023 11:15:55 +0000 Subject: [PATCH] build based on 4fdd20d --- dev/index.html | 2 +- dev/reference/index.html | 14 +++++++------- dev/search/index.html | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dev/index.html b/dev/index.html index 6ee8a40..4e72ae6 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 9914f02..13af459 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.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.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.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)
+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.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.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.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.WeakCoupling.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.WeakCoupling.weak_coupling_ΔMethod
weak_coupling_Δ(J::AbstractSD, ω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 +(4.0, 2.220446049250313e-16)

source
SpectralDensities.WeakCoupling.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.WeakCoupling.weak_coupling_ΔMethod
weak_coupling_Δ(J::AbstractSD, ω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\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.

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, β)

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\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.

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, β)

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\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.

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)

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.

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)

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\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.

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)

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.

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)

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.

Returns

  • The weak-coupling coefficient Σ′ for the spectral density J and system Bohr frequency ωB.
source
+ \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

Returns

source diff --git a/dev/search/index.html b/dev/search/index.html index 803de49..68e2665 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · SpectralDensities.jl

Loading search...

    +Search · SpectralDensities.jl

    Loading search...