LadderDGA.jl Documentation

Index

List of Functions

LadderDGA

LadderDGA.EnvironmentVarsType
EnvironmentVars <: ConfigStruct

Contains various settings, controlling the I/O behaviour of this module. This is typically generated from a config.toml file using the readConfig function.

Fields

  • inputDir : String, Directory of input files
  • inputVars : String, File name of .jld2 file containing input.
  • loglevel : String, Options: disabled, error, warn, info, debug
  • logfile : String, Options: STDOUT, STDERR, filename
source
LadderDGA.ModelParametersType
ModelParameters <: ConfigStruct

Contains model parameters for the Hubbard model. This is typically generated from a config.toml file using the readConfig function.

Fields

  • U : Float64, Hubbard U
  • μ : Float64, chemical potential
  • β : Float64, inverse temperature
  • n : Float64, filling
  • Epot_1Pt : Float64, DMFT potential energy
  • Ekin_1Pt : Float64, DMFT kinetic energy
source
LadderDGA.RPAHelperType
RPAHelper <: RunHelper

Struct with data needed to run ladder RPA calculations.

Constructor

setup_RPA(kGridStr::Tuple{String,Int}, mP::ModelParameters, sP::SimulationParameters, env::EnvironmentVars [; silent=false])

See setup_RPA

Fields

TODO: documentation
source
LadderDGA.SimulationParametersType
SimulationParameters <: ConfigStruct

Contains simulation parameters for the ladder DGA computations. This is typically generated from a config.toml file using the readConfig function.

Fields

  • n_iω : Int, Number of positive bosonic frequencies (full number will be 2*n_iω+1
  • n_iν : Int, Number of positive fermionic frequencies (full number will be 2*n_iν
  • n_iν_shell : Int, Number of fermionic frequencies used for asymptotic sum improvement (χ_asym_r arrays with at least these many entries need to be provided)
  • shift : Bool, Flag specifying if -n_iν:n_iν-1 is shifted by -ωₙ/2 at each ωₙ slice (centering the main features)
  • χ_helper : struct, helper struct for asymptotic sum improvements involving the generalized susceptibility (nothing if n_iν_shell == 0), see also BSE_SC.jl.
  • sVk : Float64, ∑_k Vₖ^2
  • fft_range : Int, Frequencies used for computations of type f(νₙ + ωₙ).
  • usable_prct_reduction : Float64, percent reduction of usable bosonic frequencies
  • dbg_full_eom_omega : Bool, if true overrides usable ω ranges to n_iω.
source
LadderDGA.lDΓAHelperType
lDΓAHelper <: RunHelper

Struct with data needed to run ladder DΓA calculations.

Constructor

setup_LDGA(kGridStr::Tuple{String,Int}, mP::ModelParameters, sP::SimulationParameters, env::EnvironmentVars)

See setup_LDGA

Fields

TODO: documentation for fields

source
LadderDGA.γTType
γT <: MatsubaraFunction

Struct for the non-local triangular vertex.

Fields

  • data : Array{ComplexF64,3}, data
  • axis_types : Dict{Symbol,Int}, Dictionary mapping :q, :ν, :ω to the axis indices.
source
LadderDGA.χTType
χT <: MatsubaraFunction

Struct for the non-local susceptibilities.

Constructor

χT(data::Array{T, 2}; full_range=true, reduce_range_prct=0.1): if full_range is set to false, the usable range is determined via find_usable_χ_interval.

Fields

  • data : Array{ComplexF64,3}, data
  • axis_types : Dict{Symbol,Int}, Dictionary mapping :q, :ω to the axis indices.
  • indices_ω : Vector{Int},
  • tail_c : Vector{Float64}, tail coefficients of $1/\omega^i$ tails. Index 1 corresponds to i=0.
  • λ : Float64, λ correction parameter.
  • β : Float64, inverse temperature.
  • usable_ω : AbstractArray{Int}, usable indices for which data is assumed to be correct. See also find_usable_χ_interval
source
LadderDGA.χ₀RPA_TType
χ₀RPA_T <: MatsubaraFunction

Struct for the RPA bubble term.

TODO: this does not use the χ₀Asym function and mixes thermodynamic quantities (kinetic energy) with tail coefficients (they are the same, but should not be stored this way here).

Constructor

χ₀RPAT(data::Array{eltype,2}, ωnGrid::AbstractVector{Int}, νnGrid::UnitRange{Int64}, β::Float64)

This constructor does not perform any checks for the entered data array in the currently implemented version. Make sure that the axes match the axis_types field!

Fields

  • data : Array{ComplexF64,3}, data.
  • axis_types : Dict{Symbol,Int}, Dictionary mapping :q, :ω to the axis indices.
  • indices_ω : Vector{Int}, m indices m of bosonic $\omega_m$ Matsubara frequencies.
  • β : Float64, inverse temperature.
  • e_kin : Float64, kinetic energy.
  • Nq : Int, Number of points per dimension that are used to sample the reciprocal space
  • Ngl : Int, Number of gauß-legendre sample points per dimension that where used to calculate each element
source
LadderDGA.χ₀TType
χ₀T <: MatsubaraFunction

Struct for the bubble term. The q, ω dependent asymptotic behavior is computed from the t1 and t2 input. See χ₀Asym_coeffs implementation for details.

Constructor

χ₀T(type::Symbol, data::Array{_eltype,3}, kG::KGrid, ωnGrid::AbstractVector{Int}, n_iν::Int, shift::Bool, mP::ModelParameters)

Set local_tail=true in case of the local bubble constructed fro mthe impurity Green's function. This is necessary in order to construct the correct asymptotics.

Fields

  • type : Symbol, can be DMFT, local, RPA, RPA_exact. TODO: documentation
  • data : Array{ComplexF64,3}, data
  • asym : Array{ComplexF64,2}, [q, ω] dependent asymptotic behavior.
  • axis_types : Dict{Symbol,Int}, Dictionary mapping :q, :ν, :ω to the axis indices.
  • indices_νω : Matrix{Tuple{Int,Int}}, (n,m) indices of fermionic $\nu_n$ and bosonic $\omega_m$ Matsubara frequencies.
  • β : Float64, inverse temperature.
source
Base.showMethod
Base.show(io::IO, m::ModelParameters)

Custom output for ModelParameters

source
Base.showMethod
Base.show(io::IO, m::SimulationParameters)

Custom output for SimulationParameters

source
LadderDGA.EPot1Method

Specialized function for DGA potential energy. Better performance than calc_E.

source
LadderDGA.EPot_p1Method
EPot_p1(χm::χT, χd::χT, λm::Float64, λd::Float64, n::Float64, U::Float64)::Float64

Pauli-Principle on 2-particle level: $\sum_{k,\nu} G^{\lambda,\nu}_{k} \Sigma^{\lambda,\nu}_{k}$.

source
LadderDGA.EPot_p2Method
EPot_p2(χm::χT, χd::χT, λm::Float64, λd::Float64, n::Float64, U::Float64)::Float64

Pauli-Principle on 2-particle level: $U(\sum_{k,\omega} \chi^{\lambda,\omega}_{m,k} - \sum_{k,\omega} \chi^{\lambda,\omega}_{d,k})/2 + U n^2/4$.

source
LadderDGA.F_from_χMethod
F_from_χ(type::Symbol, h::lDΓAHelper; diag_term=true)
F_from_χ(χ::AbstractArray{ComplexF64,3}, G::AbstractArray{ComplexF64,1}, sP::SimulationParameters, β::Float64; diag_term=true)

TODO: documentation

source
LadderDGA.F_from_χ_genMethod
F_from_χ_gen(χ₀::χ₀T, χr::Array{ComplexF64,4})::Array{ComplexF64,4}

Calculates the full vertex from the generalized susceptibility $\chi^{\nu\nu'\omega}_r$ and the bubble term $\chi_0$ via $F^{\nu\nu'\omega}_{r,\mathbf{q}} = \beta^2 \left( \chi^{\nu\nu'\omega}_{0,\mathbf{q}} \right)^{-1} - \left( \chi^{\nu\omega}_{0,\mathbf{q}} \right)^{-1} \chi^{\nu\nu'\omega}_{r,\mathbf{q}} \left( \chi^{\nu'\omega}_{0,\mathbf{q}} \right)^{-1}$

For a version using the physical susceptibilities see F_from_χ_gen.

source
LadderDGA.F_from_χ_star_genMethod
F_from_χ_star_gen(χ₀::χ₀T, χstar_r::Array{ComplexF64,4}, χr::χT, γr::γT, Ur::Float64)

Calculates the full vertex from the generalized susceptibility $\chi^{\nu\nu'\omega}_r$, the physical susceptibility $\chi^{\omega}_r$ and the triangular vertex $\gamma^{\nu\omega}_r$. This is usefull to calculate a $\lambda$-corrected full vertex.

$F^{\nu\nu'\omega}_{r,\mathbf{q}} = \beta^2 \left( \chi^{\nu\nu'\omega}_{0,\mathbf{q}} \right)^{-1} - \beta^2 (\chi^{\nu\omega}_{0,\mathbf{q}})^{-1} \chi^{*,\nu\nu'\omega}_{r,\mathbf{q}} (\chi^{\nu'\omega}_{0,\mathbf{q}})^{-1} + U_r (1 - U_r \chi^{\omega}_{r,\mathbf{q}}) \gamma^{\nu\omega}_{r,\mathbf{q}} \gamma^{\nu'\omega}_{r,\mathbf{q}}$ For a version using the physical susceptibilities see F_from_χ_gen.

source
LadderDGA.G_fftMethod
G_fft(G::GνqT, kG::KGrid, mP::ModelParameters, sP::SimulationParameters)

Calculates fast Fourier transformed lattice Green's functions used for calc_bubble.

source
LadderDGA.G_from_ΣMethod
G_from_Σ(ind::Int64, β::Float64, μ::Float64, ϵₖ::Float64, Σ::ComplexF64)
G_from_Σ(mf::ComplexF64, μ::Float64, ϵₖ::Float64, Σ::ComplexF64)

Computes Green's function according to $[\frac{(2 n + 1)\pi i}{\beta} + \mu - \epsilon_k - \Sigma(k,i\nu_n)]^{-1}$, where $\epsilon_k$ and $\Sigma(k,i\nu_n)$ are given as single values. Convenience wrappers for full grids are provided below.

Arguments:

  • ind : Matsubara frequency index
  • mf : Matsubara frequency
  • β : Inverse temperature (only needs to be set, if index instead of frequency is given)
  • μ : Chemical potential
  • ϵₖ : Dispersion relation at fixed k, see below for convenience wrappers.
  • Σ : Self energy at fixed frequency (and potentially fixed k), see below for convenience wrappers.
source
LadderDGA.G_from_ΣMethod
G_from_Σ(Σ::OffsetVector{ComplexF64}, ϵkGrid::Vector{Float64}, range::UnitRange{Int}, mP::ModelParameters;
              μ = mP.μ, Σloc::OffsetVector{ComplexF64} = OffsetVector(ComplexF64[], 0:-1),
        )
G_from_Σ!(res::OffsetMatrix{ComplexF64}, Σ::OffsetVector{ComplexF64}, ϵkGrid::Vector{Float64}, range::UnitRange{Int},
            mP::ModelParameters; μ = mP.μ, Σloc::OffsetVector{ComplexF64} = OffsetVector(ComplexF64[], 0:-1),
        )::Nothing

mP::ModelParameters; μ = mP.μ, Σloc::OffsetVector{ComplexF64} = OffsetVector(ComplexF64[], 0:-1),

G_from_Σ(Σ::AbstractVector{ComplexF64}, ϵkGrid::Vector{Float64}, range::AbstractVector{Int}, mP::ModelParameters; μ = mP.μ,  Σloc::AbstractArray = nothing) 
G_from_Σ!(res::Matrix{ComplexF64}, Σ::AbstractVector{ComplexF64}, ϵkGrid::Vector{Float64}, range::AbstractVector{Int}, mP::ModelParameters; μ = mP.μ,  Σloc::AbstractVector = nothing)

#TODO: unify API, redo documentation

Computes Green's function from self energy Σ and dispersion ϵkGrid over given frequency indices range. Optionally, a different chemical potential μ can be provided. When the non-local self energy is used, one typically wants to extend the usefull range of frequencies by attaching the tail of the local self energy in the high frequency regime. This is done by providing a range larger than the array size of Σ and in addition setting Σloc (the size of Σloc must be as large or larger than range). The inplace version stores the result in res.

source
LadderDGA.G_from_ΣladderMethod
G_from_Σladder(Σ_ladder::AbstractMatrix{ComplexF64}, Σloc::Vector{ComplexF64}, kG::KGrid, mP::ModelParameters, sP::SimulationParameters; 
               fix_n::Bool=false, μ=mP.μ, improved_sum_filling::Bool=true, νRange = sP.fft_range, n = mP.n, νFitRange=0:last(axes(Σ_ladder, 2)) )
G_from_Σladder!(G_new::OffsetMatrix{ComplexF64}, Σ_ladder::OffsetMatrix{ComplexF64}, Σloc::AbstractVector{ComplexF64}, kG::KGrid, mP::ModelParameters; 
                fix_n::Bool=false, μ=mP.μ, improved_sum_filling::Bool=true, n = mP.n, νFitRange=0:last(axes(Σ_ladder, 2)) )

Computes Green's function from lDΓA self-energy. This is the Greensfunction used in eq. (8) of Stobbe, J., & Rohringer, G. (2022). Consistency of potential energy in the dynamical vertex approximation. Physical Review B, 106(20), 205101.

The resulting frequency range is given by default as νRange = sP.fft_range, if less frequencies are available from Σ_ladder, Σloc is used instead. TODO: documentation for arguments TODO: fit function computes loads of unnecessary frequencies

source
LadderDGA.G_rfft!Method
G_rfft!(G_rfft::GνqT, G::GνqT, kG::KGrid, fft_range::UnitRange)::Nothing

Calculates fast Fourier transformed lattice Green's functions used for calc_bubble. Inplace version of G_fft.

source
LadderDGA.OneToIndex_to_FreqMethod
OneToIndex_to_Freq(ωi::Int, νpi::Int, νi::Int, sP::SimulationParameters)
Freq_to_OneToIndex(ωn::Int, νn::Int, νpn::Int, shift::Int, nBose::Int, nFermi::Int)

Converts Matsubara frequency index to array indices, starting at 1. This is the inverse function of OneToIndex_to_Freq.

source
LadderDGA.OneToIndex_to_FreqMethod
OneToIndex_to_Freq(ωi::Int, νi::Int, sP::SimulationParameters)
OneToIndex_to_Freq(ωi::Int, νi::Int, shift::Int, nBose::Int, nFermi::Int)

Converts (1:N,1:N) index tuple for bosonic (ωi) and fermionic (νi) frequency to Matsubara frequency number. If the array has a ν shell (for example for tail improvements) this will also be taken into account by providing Nν_shell. This is the inverse function of Freq_to_OneToIndex.

source
LadderDGA.PP_p1Method
PP_p1(χm::χT, χd::χT, λm::Float64, λd::Float64, n::Float64, U::Float64)::Float64

Pauli-Principle on 1-particle level: $n/2 (1-n/2)$.

source
LadderDGA.PP_p2Method
PP_p2(χm::χT, χd::χT, λm::Float64, λd::Float64, n::Float64, U::Float64)::Float64

Pauli-Principle on 2-particle level: $(\sum_{k,\omega} \chi^{\lambda,\omega}_{m,k} + \sum_{k,\omega} \chi^{\lambda,\omega}_{d,k})/2$.

source
LadderDGA.attach_ΣlocMethod
attach_Σloc(Σ_ladder::OffsetMatrix, Σ_loc::OffsetVector; 
            ν_first::Int=last(axis(Σ_ladder,2))+1, ν_last::Int=last(axes(Σloc,1)))

Attach the local self energy tail, starting at ν_first up to ν_last to the ladder self energy. #TODO: attach this smoothely by also considering derivatives

source
LadderDGA.build_GGMethod
build_GG(GF::OffsetMatrix, νnGrid::AbstractVector{Int}, kVecs::AbstractVector{NTuple})::Matrix{ComplexF64}

Builds helper array A, defined as: $A^{\nu}_{k} = G^\nu_{k} G^{-\nu}_{-k}$. Used, for example, by build_Γs.

source
LadderDGA.build_q_access_GMethod
build_q_access(kG::KGrid, k_vecs::AbstractVector{NTuple})::Array{Int,2}

Builds helper array A, defined as: $A^{\nu}_{k} = G^\nu_{k} G^{-\nu}_{-k}$. Used, for example, by build_Γs.

source
LadderDGA.calc_EMethod

calcE(χsp::χT, γsp::γT, χch::χT, γch::γT, λ₀, Σloc, gLocrfft, kG::KGrid, mP::ModelParameters, sP::SimulationParameters; νmax::Int = eomνcutoff(sP), tc::Bool=true) calcE([G::Array{ComplexF64,2},] Σ::AbstractArray{ComplexF64,2}, kG::KGrid, mP::ModelParameters; trace::Bool=false)

Returns kinetic and potential energies from given * self-energy Σ or * the ingredients of the equation of motion: the physical susceptibilies as well as the triangular vertices in spin and charge channel, the correction term and the greensfunction to be used.

source
LadderDGA.calc_E_EDMethod
calc_E_ED(ϵₖ::Vector{Float64}, Vₖ::Vector{Float64}, GImp::Vector{ComplexF64}, U, n, μ, β)
calc_E_ED(ϵₖ::Vector{Float64}, Vₖ::Vector{Float64}, GImp::Vector{ComplexF64}, mP::ModelParameters)
calc_E_ED(fname::String)

Computes kinetic and potential energies from Anderson parameters.

Returns:

(EKin, EPot): Tuple{Float64,Float64}, kinetic and potential energy.

Arguments:

  • fname : jld2-file containing the fields: [gImp, β, ϵₖ, Vₖ, U, nden, μ] (see below)
  • ϵₖ : bath levels
  • Vₖ : hoppend amplitudes
  • GImp : impurity Green's function. WARNING: the arguments are assumed to by fermionic Matsuabra indices 0:length(GImp)-1!
  • U : Coulomb interaction strength
  • n : number density
  • μ : chemical potential
  • β : inverse temperature
  • mP : Alternative call with model parameters as Float64. See also ModelParameters.
source
LadderDGA.calc_bubbleMethod
calc_bubble(type::Symbol, h <: RunHelper; mode=:ph)
calc_bubble(type::Symbol, Gνω::GνqT, Gνω_r::GνqT, kG::KGrid, mP::ModelParameters, sP::SimulationParameters; mode=:ph)

Calculates bubble term.

$\chi^{\omega}_{0,\mathbf{q}} = -\Sigma_{\mathbf{k}} \Sigma_{\nu} G^{\nu}_{\mathbf{k}} \cdot G^{\nu+\omega}_{\mathbf{k}+\mathbf{q}}$

where $\nu$ : Fermionic Matsubara frequencies $\omega$ : Bosonic Matsubara frequencies $\mathbf{k}, \mathbf{q}$: Element of the first Brillouin zone

This is a real-valued quantity.

Returns

Bubble, χ₀::χ₀T

Arguments

  • type : Symbol, can be DMFT, local, RPA, RPA_exact. TODO: documentation
  • RPAHelper : Helper struct generated by setup_RPA.
  • β : Float64, Inverse temperature in natural units
  • kG : KGrid, The k-grid on which to perform the calculation
  • sP : SimulationParameters, (to construct a frequency range)
  • mode : selects particle-hole (:ph, default) or particle-particle (:pp) notation
source
LadderDGA.calc_bubble_parMethod
calc_bubble_par(h::lDΓAHelper; collect_data=true)
calc_bubble_par(kG::KGrid, mP::ModelParameters, sP::SimulationParameters; collect_data=true)

Calculates the bubble, based on two fourier-transformed Greens functions where the second one has to be reversed.

source
LadderDGA.calc_gen_χMethod
calc_gen_χ(Γr::ΓT, χ₀::χ₀T, kG::KGrid)

Calculates generalized susceptibility from Γr by solving the Bethe Salpeter Equation. See calc_χγ for direct (and more efficient) calculation of physical susceptibility and triangular vertex.

Returns: $\chi^{\nu\nu'\omega}_q$ as 4-dim array with axis: νi, νpi, qi, ωi.

source
LadderDGA.calc_Γs_udMethod
calc_Γs_ud(Fm, Fd, Phi_ud, h::lDΓAHelper)

Calculates the Γs in particle-particle notation from the ladder vertices.

source
LadderDGA.calc_ΣMethod
calc_Σ(χm::χT, γm::γT, χd::χT, γd::γT, λ₀::λ₀T, h::lDΓAHelper;
       νmax=eom_ν_cutoff(h), λm::Float64=0.0, λd::Float64=0.0, tc::Bool=true)
calc_Σ(χm::χT, γm::γT, χd::χT, γd::γT, λ₀::λ₀T, gLoc_rfft, h; 
       νmax::Int=eom_ν_cutoff(h), λm::Float64 = 0.0, λd::Float64 = 0.0, tc::Bool = true)
calc_Σ(χm::χT, γm::γT, χd::χT, γd::γT, χ_m_sum::Union{Float64,ComplexF64}, λ₀::λ₀T,
       Gνω::GνqT, kG::KGrid, mP::ModelParameters, sP::SimulationParameters; 
       νmax=eom_ν_cutoff(sP), λm::Float64=0.0, λd::Float64=0.0, tc::Bool=true)

Calculates the self-energy from ladder quantities.

This is the single core variant, see calc_Σ_par for the parallel version.

source
LadderDGA.calc_Σ_parMethod
calc_Σ_par(; λm::Float64=0.0, λd::Float64=0.0, collect_data=true, tc::Bool=true)

Calculates self-energy on worker pool. Workers must first be initialized using initialize_EoM. #TODO: νrange must be equal to the one used during initialization. remove one.

source
LadderDGA.calc_Σ_partsMethod
calc_Σ_parts(χm::χT,γm::γT,χd::χT,γd::γT,h::lDΓAHelper,λ₀::AbstractArray{ComplexF64,3};λm::Float64=0.0, λd::Float64=0.0)
calc_Σ_parts(χm::χT,γm::γT, χd::χT, γd::γT, χ_m_sum::Union{Float64,ComplexF64}, λ₀::λ₀T,
             Gνω::GνqT, kG::KGrid,mP::ModelParameters, sP::SimulationParameters;
             λm::Float64=0.0, λd::Float64=0.0)

Calculates the $lD\GammaA$ self-energy (see also calc_Σ), but split into 7 contributions from: χm, γm, χd, γd, U, Fm + Σ_hartree, tail_correction.

source
LadderDGA.calc_λ0Method

calcλ0(χ₀::χ₀RPAT, helper::RPAHelper) calcλ0(χ₀::χ₀RPAT, sP::SimulationParameters, mP::ModelParameters)

This function corresponds to the following mapping

λ0: BZ × π(2N + 1)/β × 2πN/β → C, (q, ν, ω)↦ -U χ₀(q,ω)

where ...
    ... U is the Hubbard on-site interaction parameter
    ... χ₀ is the RPA bubble term

TODO: λ0 is constant in the fermionic matsubara frequency. This should be refactured.

source
LadderDGA.calc_λ0Method
calc_λ0(χ₀::χ₀T, h::lDΓAHelper)
calc_λ0(χ₀::χ₀T, Fr::FT, h::lDΓAHelper)
calc_λ0(χ₀::χ₀T, Fr::FT, χ::χT, γ::γT, mP::ModelParameters, sP::SimulationParameters)

Correction term, TODO: documentation

source
LadderDGA.calc_λmax_linEliashbergMethod
calc_λmax_linEliashberg(bubble::χ₀T, χm::χT, χd::χT, γm::γT, γd::γT, h::lDΓAHelper, env;
                         GF=h.gLoc, max_Nk::Int=h.kG.Ns, χm_star_gen=nothing, χd_star_gen=nothing)

Calculates largest and smallest (real) eigen value of $\Gamma_{\mathrm{s},\uparrow\downarrow}$.

TODO: TeX/DOCU...

source
LadderDGA.calc_χγMethod
calc_χγ(type::Symbol, h::lDΓAHelper, χ₀::χ₀T)
calc_χγ(type::Symbol, Γr::ΓT, χ₀::χ₀T, kG::KGrid, mP::ModelParameters, sP::SimulationParameters)

Calculates susceptibility and triangular vertex in type channel. See calc_χγ_par for parallel calculation.

This method solves the following equation: `` \chir = \chi0 - \frac{1}{\beta^2} \chi0 \Gammar \chir \ \Leftrightarrow (1 + \frac{1}{\beta^2} \chi0 \Gammar) = \chi0 \ \Leftrightarrow (\chi^{-1}r - \chi^{-1}0) = \frac{1}{\beta^2} \Gamma_r ``

source
LadderDGA.calc_χγMethod
calc_χγ(type::Symbol, χ₀::χ₀RPA_T, kG::KGrid, mP::ModelParameters)

This function corresponds to the following mappings

    χ: BZ × 2πN/β → R, (q, ω)↦ χ₀(q,ω) / ( 1 + U_r⋅χ₀(q,ω) )
    
    γ: BZ × π(2N + 1)/β × 2πN/β → C, (q, ν, ω)↦ 1

    where ...
        ... U_r is the Hubbard on-site interaction parameter multiplied by +1 if type = d and -1 if type = m.
        ... χ₀ is the RPA bubble term
        ... ν is a fermionic matsubara frequency
        ... ω is a bosonic matsubara frequency
        ... N is the set of natural numbers
        ... β is the inverse temperature
        ... q is a point in reciprocal space
source
LadderDGA.calc_χγ_parMethod
calc_χγ_par(type::Symbol, h::lDΓAHelper)
calc_χγ_par(type::Symbol, Γr::ΓT, kG::KGrid, mP::ModelParameters, sP::SimulationParameters; collect_data=true)

Calculate susceptibility and triangular vertex parallel on workerpool.

Set collect_data to return both quantities, or call collect_χ and collect_γ at a later point. calc_χγ can be used for single core computations.

source
LadderDGA.clear_wcache!Method
clear_wcache!()

Clears cache on all workers. Must be used when recalculating susceptibilities after EoM initialization.

source
LadderDGA.collect_Σ!Method
collect_Σ!(Σ_ladder::OffsetMatrix{ComplexF64, Matrix{ComplexF64}}, mP::ModelParameters; λm=0.0)

Collects self-energy from workers.

source
LadderDGA.collect_γMethod
collect_γ(type::Symbol, [kG::KGrid, mP::ModelParameters, sP::SimulationParameters] OR [h::lDΓAHelper])

Collects triangular vertex from workers, after parallel computation (see calc_χγ_par).

source
LadderDGA.collect_χMethod
collect_χ(type::Symbol, [kG::KGrid, mP::ModelParameters, sP::SimulationParameters] OR [h::lDΓAHelper])

Collects susceptibility from workers, after parallel computation (see calc_χγ_par).

source
LadderDGA.collect_χ₀Method
collect_χ₀(kG::KGrid, mP::ModelParameters, sP::SimulationParameters)

Collect non-local bubble $\chi_0^{\omega}(q)$ from workers. Values first need to be calculated using calc_bubble_par.

source
LadderDGA.conv_tmp_add_rpa!Method
conv_tmp_add_rpa!(res::AbstractVector{ComplexF64}, kG::KGrid, arr1::Vector{ComplexF64}, GView::AbstractArray{ComplexF64,N})::Nothing where N

Expect both input arrays already in fouriertransformed.

source
LadderDGA.coreMethod
core(χ₀::χ₀T)

Select core region (without asymptotic shell) from bubble term.

source
LadderDGA.correction_termMethod
correction_term(mP::ModelParameters, kG::KGrid, χm::χT, χ_m_sum::Union{Float64,ComplexF64}, grid::AbstractArray{Int64,1})

Calculates the so called tail correcion term of the ladder self energy. The purpose of this term is to enforce the limit

\lim_{n\rightarrow\infty}i\nu_n\Sigma_{\mathbf{q}}^{\nu_n}=U^2\frac{n}{2}\left(1-\frac{n}{2} \right ).

This can be archived by adding the term * RPA: -\frac{U^2}{i\nu}\sum_{\omega,\mathbf{q}}\left( \chi_{m,\mathbf{q}}^{\omega}-\chi_{0,\mathbf{q}}^{\omega}\right ) * ladder-DGA: -\frac{U^2}{i\nu}\left(\sum_{\omega,\mathbf{q}}\chi_{m,\mathbf{q}}^{\omega}-\chi_{m,loc} \right ) from the ladder self energy.

Arguments

  • mP : ModelParameters
  • kG : KGrid
  • χm : χT
  • χ_m_sum : Union{Float64,ComplexF64}. RPA: \sum_{\omega,\mathbf{q}}\chi_{0,\mathbf{q}}^{\omega}, lDGA: 'χmsum'.
  • grid : AbstractArray{Int64,1}
source
LadderDGA.eom_ν_cutoffMethod
eom_ν_cutoff(Niν::Int, grid_shifted::Bool)::Int
eom_ν_cutoff(sP::SimulationParameters)
eom_ν_cutoff(h::lDΓAHelper)

Returns number of positive fermionic frequencies to be used in self-energy after calculation of EoM (as a function of available positive frequency from DMFT Niν).

This is especially necessary for shifted grids, since there fewer bosonic frequencies available for large ν, leading to an error in the high frequency tail of the self energy.

source
LadderDGA.estimate_connected_efMethod
estimate_connected_ef(Σ_ladder::OffsetMatrix, kG::KGrid, μ::Float64, β::Float64; ν0_estimator::Function=lin_fit)

Estimates connected fermi surface. See also estimate_ef and fermi_surface_connected. Returns fermi surface indices and relax_zero_condition (values substantially larger than 1 indicate appearance of fermi arcs).

source
LadderDGA.estimate_efMethod
estimate_ef(Σ_ladder::OffsetMatrix, kG::KGrid, μ::Float64, β::Float64; ν0_estimator::Function=lin_fit, relax_zero_condition::Float64=10.0)

Estimate fermi surface of Σ_ladder, using extrapolation to $\nu = 0$ with the function ν0_estimator and the condition $\lim_{\nu \to 0} \Sigma (\nu, k_f) = \mu - \epsilon_{k_f}$.

source
LadderDGA.expand_ωMethod
expand_ω(χ₀qω)

Helper function for reading RPA input. It holds χ₀(q,ω)=χ₀(q,-ω). Take an array for χ₀(q,ω) with ω-integers {0, 1, ..., m} and map onto array with ω-integers {-m, -(m-1), ..., -1, 0, 1, ..., m-1, m}.
source
LadderDGA.fermi_surface_connectedMethod
fermi_surface_connected(ef_ind::BitVector, kG::KGrid, D::Int)

Checks for connected fermi surface of kG dimensions, given a BitVector of points on the fermi surface. Returns < 0 if fermi surface is not connected, == 0 if it is exactly a line, > 0 if the line is multiple points thick.

source
LadderDGA.fillingMethod
filling(G::Vector{ComplexF64}, [kG::KGrid, ] β::Float64)
filling(G::Vector, U::Float64, μ::Float64, β::Float64, [shell::Float64])

Computes filling of (non-) local Green's function.

If U, μ and β are provided, asymptotic corrections are used. The shell sum can be precomputed using shell_sum_fermionic If G is defined only over positive Matsubara frequencies filling_pos can be used.

source
LadderDGA.filling_posMethod
filling_pos(G::Vector, U::Float64, μ::Float64, β::Float64[, shell::Float64, improved_sum::Bool=true])::Float64
filling_pos(G::AbstractMatrix{ComplexF64},kG::KGrid,U::Float64,μ::Float64,β::Float64; improved_sum::Bool = true)::Float64
filling_pos(G::AbstractMatrix{ComplexF64},kG::KGrid,)::Float64

Returns filling from G only defined over positive Matsubara frequencies. See filling for further documentation.

source
LadderDGA.filter_KZMethod
filter_KZ(m::Int, k::Int, X::AbstractArray{T,1}) where T <: Number

Iterated moving average noise filter for inut data. See also filter_MA.

source
LadderDGA.filter_MAMethod
filter_MA(m::Int, X::AbstractArray{T,1}) where T <: Number
filter_MA!(res::AbstractArray{T,1}, m::Int, X::AbstractArray{T,1}) where T <: Number

Iterated moving average noise filter for inut data. See also filter_KZ.

source
LadderDGA.find_usable_χ_intervalMethod
find_usable_χ_interval(χ_ω::Array{Float64,1/2}; sum_type::Union{Symbol,Tuple{Int,Int}}=:common, reduce_range_prct::Float64 = 0.1)

Determines usable range for physical susceptibilities $\chi^\omega$ or $\chi^\omega$ and additionally cut away reduce_range_prct % of the range. The unusable region is given whenever the susceptibility becomes negative, or the first derivative changes sign.

Returns:

range::AbstractVector{Float64} : Usable $\omega$ range for $\chi$

Arguments:

  • χ_ω : $\chi^\omega$
  • sum_type : Optional, default :common. Can be set to :full to enforce full range, or a ::Tuple{Int,Int} to enforce a specific interval size.
  • reduce_range_prct : Optional, default 0.1. After finding the usable interval it is reduced by an additional percentage given by this value.
source
LadderDGA.gen_ν_partMethod

genνpart(νGrid::AbstractVector{Int}, sP::SimulationParameters, N::Int)

Returns partition of fermionic frequencies grid, according to the number of workers N. The partition is given as a list (of length N) of lists with 4-Tuples (ωi, ωn, νi, νn). νi and ωi are the indices for the Matsubara frequencies νn and ωn.

source
LadderDGA.gen_ν_part_slicesMethod
gen_ν_part_slices(data::Array{ComplexF64,3}, index_list::Vector{NTuple{4,Int}})

Rearragnes data over q, ν and ω axes, for EoM (see calc_Σ_par) given index_list, which is one element of the list of lists obtained from gen_ν_part.

Returns three arrays: - datares: Rearranged data, only containes values for ν, given in `indexlist, ω values not contained indataare set to 0. - νn_list: Has lengthsize(datares,3)`. Contained fermionic Matsubara frequency for each index. - ωnranges: Has length size(data_res,3). Containes bosonic Matsubara frequencies for each ν value.

source
LadderDGA.gen_νω_partMethod
gen_νω_part(sP::SimulationParameters, N::Int)

Returns partition of frequency grid, according to the number of workers N.

source
LadderDGA.gen_ω_partMethod
gen_ω_part(sP::SimulationParameters, N::Int)

Returns partition of bosonic frequencies grid, according to the number of workers N.

source
LadderDGA.initialize_EoMMethod
function initialize_EoM([G_fft_reverse, λ₀::Array{ComplexF64,3}, νGrid::AbstractVector{Int}, 
                    kG::KGrid, mP::ModelParameters, sP::SimulationParameters]; 
                    OR [h::lDΓAHelper, λ₀, νGrid];
                    force_reinit = false,
                    χm::χT = collect_χ(:sp, kG, mP, sP),
                    γm::γT = collect_γ(:sp, kG, mP, sP),
                    χd::χT = collect_χ(:ch, kG, mP, sP),
                    γd::γT = collect_γ(:ch, kG, mP, sP))

Worker cache initialization. Must be called before calc_Σ_par.

source
LadderDGA.is_okayMethod

is_okay(χ₀qω)

check whether the given χ₀qω Array satisfies a set of expected conditions.

source
LadderDGA.iν_arrayMethod
iν_array(β::Real, grid::AbstractArray{Int64,1})::Vector{ComplexF64}
iν_array(β::Real, size::Int)::Vector{ComplexF64}

Computes list of fermionic Matsubara frequencies. If length size is given, the grid will have indices 0:size-1. Bosonic arrays can be generated with iω_array.

Returns:

Vector of fermionic Matsubara frequencies, given either a list of indices or a length.

source
LadderDGA.iω_arrayMethod
iω_array(β::Real, grid::AbstractArray{Int64,1})::Vector{ComplexF64}
iω_array(β::Real, size::Int)::Vector{ComplexF64}

Computes list of bosonic Matsubara frequencies. If length size is given, the grid will have indices 0:size-1. Fermionic arrays can be generated with iν_array.

Returns:

Vector of bosonic Matsubara frequencies, given either a list of indices or a length.

source
LadderDGA.log_q0_χ_checkMethod
log_q0_χ_check(kG::KGrid, sP::SimulationParameters, χ::AbstractArray{_eltype,2}, type::Symbol)

TODO: documentation

source
LadderDGA.par_partitionMethod
par_partition(set::AbstractVector, N::Int)

Returns list of indices for partition of set into N (almost) equally large segements.

source
LadderDGA.read_χ₀_RPAMethod
read_χ₀_RPA(file::String)

Nω :: Int, Number of positive bosonic frequencies to be used. Make sure that the given χ₀-file has at least this many bosonic frequencies!
source
LadderDGA.reduce_rangeMethod
reduce_range(range::AbstractArray, red_prct::Float64)

Returns indices for 1D array slice, reduced by red_prct % (compared to initial range). Range is symmetrically reduced fro mstart and end.

source
LadderDGA.setup_LDGAMethod
setup_LDGA(kGridStr::Tuple{String,Int}, mP::ModelParameters, sP::SimulationParameters, env::EnvironmentVars [;silent=false])

Computes all needed objects for DΓA calculations.

Returns: lDΓAHelper

source
LadderDGA.setup_LDGAaMethod
setup_LDGAa(kGridStr::Tuple{String,Int}, mP::ModelParameters, sP::SimulationParameters, env::EnvironmentVars [;silent=false])

Computes all needed objects for DΓA-asymptotic calculations.

Returns: lDΓAaHelper

source
LadderDGA.shell_sum_fermionicMethod
shell_sum_fermionic(N::Int, β::Float64, power::Int)::Float64

Calculate $\frac{1}{\beta} \sum_{n \in \Omega_\mathrm{shell}} \frac{1}{(i \nu_n)^power}$ N-1 is the largest frequency index (i.e. $\sum_{n=-N}^(N-1) u_n$ is in the core region)

source
LadderDGA.subtract_tail!Method
subtract_tail!(outp::AbstractArray{T,1}, inp::AbstractArray{T,1}, c::Float64, iω::Array{ComplexF64,1}, power::Int) where T <: Number

subtract the c/(iω)^power high frequency tail from inp and store in outp. See also subtract_tail

source
LadderDGA.subtract_tailMethod
subtract_tail(inp::AbstractArray{T,1}, c::Float64, iω::Array{ComplexF64,1}, power::Int) where T <: Number

subtract the $\frac{c}{(i\omega)^\text{power}}$ high frequency tail from input array inp.

source
LadderDGA.sum_kωMethod
sum_kω(kG::kGrid, χ::χT; ωn_arr=ωn_grid(χ), force_full_range=false, [transform::Function])
sum_kω(kG::kGrid, χ::χT; ωn_arr=ωn_grid(χ), force_full_range=false, [λ::Float64])
sum_kω(kG::KGrid, χ::AbstractMatrix{Float64}, β::Float64, ωn2_tail::Vector{Float64}; transform=nothing)::Float64

Returns $\int_\mathrm{BZ} dk \sum_\omega \chi^\omega_k$. The bosonic Matsubara grid can be precomputed and given with ωn_arr to increase performance.

TODO: for now this is only implemented for tail correction in the $1 / \omega^2_n$ term! Sums first over k, then over ω (see also sum_ω), see sum_kω for the reverse order (results can differ, due to inaccuracies in the asymptotic tail treatment). The transform function needs to have the signature f(in::Float64)::Float64 and will be applied before summation. Alternatively, λ can be given directly as Float64, if the usual λ-correction should be applied.

source
LadderDGA.sum_ωMethod
sum_ω(χ::χT)
sum_ω!(res::Vector{ComplexF64}, ωn_arr::Vector{ComplexF64}, χ::χT; force_full_range=false)::Nothing
sum_ω!(ωn_arr::Vector{T}, χ::AbstractVector{T}, tail_c::Vector{Float64}, β::Float64; force_full_range=false)::T where T <: Union{Float64,ComplexF64}

Sums the physical susceptibility over all usable (if `force_full_range` is not set to `true`) bosonic frequencies, including improvd tail summation, if `χ.tail_c` is set.

WARNING: This function might be buggy!
source
LadderDGA.sum_ωkMethod
sum_ωk(kG::KGrid, χ::χT; force_full_range=false)::Float64

WARNING: This function is a non optimized debugging function! See sum_kω, which should return the same result if the asymptotics are captured correctly. Optional function f transforms χ before summation.

WARNING: This function might be buggy!

source
LadderDGA.tail_correction_termMethod
tail_correction_term(χm_nl::Float64, χm_loc::Float64, tail_factor::Vector{ComplexF64})

tail_correction_term(U::Float64, β::Float64, n::Float64, χm_nl::Float64, χm_loc::Float64,
                          Σ_loc::OffsetVector{ComplexF64}, iν::Vector{ComplexF64}; 
                          δ::Real=10.0*length(iν))

Calculates correction term for high frequency behavior of self energy.

$w_\nu = e^{(-\Delta^2_{\nu}/\delta)}$ with $\Delta_{\nu} = \nu \cdot \Sigma^\nu_\mathrm{DMFT} - U^2 \frac{n}{2} (1 - \frac{n}{2})$. See also tail_factor.

source
LadderDGA.tail_factorMethod
tail_factor(U::Float64, β::Float64, n::Float64, Σ_loc::OffsetVector{ComplexF64}, iν::Vector{ComplexF64}; 
                          δ::Real=min(0.01, 1 ./ length(iν)))

Calculates the tail factor for tail_correction_term.

source
LadderDGA.update_tail!Method
update_tail!(coeffs::Vector{Float64})

Updates the Ekin/ω^2 tail of physical susceptibilities on all workers.

source
LadderDGA.update_tail!Method
update_tail!(χ::χT, new_tail_c::Array{Float64}, ωnGrid::Array{ComplexF64})

Updates the $\frac{c_i}{\omega_n^i}$ tail for all coefficients given in new_tail_c (index 1 corresponds to $i=0$). #TODO: ONLY UPDATES 1/w^2 AT THE MOMENT!!!

source
LadderDGA.update_wcache!Method
update_wcache!(name::Symbol, val; override=true)

Updates worker cache with given name and value. Typically used through remotecall() on specific worker.

source
LadderDGA.usable_ωindicesMethod
usable_ωindices(sP::SimulationParameters, χ_sp::χT, χ_ch::χT)

Helper function, returning the indices n for $\omega_n$ ranges of multiple channels. If dbg_full_eom_omega is set to true in the config, the full range will be returned, otherwise an intersection of the usable ranges obtained from find_usable_χ_interval.

source
LadderDGA.ΔMethod
Δ(ϵₖ::Vector{Float64}, Vₖ::Vector{Float64}, νₙ::Vector{ComplexF64})::Vector{ComplexF64}

Computes hybridization function $\Delta(i\nu_n) = \sum_k \frac{|V_k|^2}{\nu_n - \epsilon_k}$ from Anderson parameters (for example obtained through exact diagonalization).

Returns:

Hybridization function over list of given fermionic Matsubara frequencies.

Arguments:

  • ϵₖ : list of bath levels
  • Vₖ : list of hopping amplitudes
  • νₙ : Vector of fermionic Matsubara frequencies, see also: iν_array.
source
LadderDGA.Σ_DysonMethod
Σ_Dyson(GBath::Vector{ComplexF64}, GImp::Vector{ComplexF64})::Vector{ComplexF64}
Σ_Dyson!(Σ::Vector{ComplexF64}, GBath::Vector{ComplexF64}, GImp::Vector{ComplexF64})::Vector{ComplexF64}

Calculates $\Sigma = 1 / G_\text{bath} - 1 / G_\text{imp}$.

source
LadderDGA.Σ_hartreeMethod
Σ_hartree(mP::ModelParameters)

Calculates the hartree term of the self energy

\Sigma_{hartree}=\frac{U\cdot n}{2}.

Arguments

  • mP : ModelParameters

Returns

Float64 : Hartree term

source
LadderDGA.ν0Index_of_ωIndexMethod
ν0Index_of_ωIndex(ωi::Int[, sP])::Int

Calculates index of zero fermionic Matsubara frequency (which may depend on the bosonic frequency). ωi is the index (i.e. starting with 1) of the bosonic Matsubara frequency.

source
LadderDGA.νi_healthMethod
νi_health(νGrid::AbstractArray{Int}, sP::SimulationParameters)

Returns a list of available bosonic frequencies for each fermionic frequency, given in νGrid. This can be used to estimate the maximum number of usefull frequencies for the equation of motion.

source
LadderDGA.νi_νngrid_posMethod
νi_νngrid_pos(ωi::Int, νmax::Int, sP::SimulationParameters)

Indices for positive fermionic Matsubara frequencies, depinding on ωi, the index of the bosonic Matsubara frequency.

source
LadderDGA.νnGridMethod
νnGrid(ωn::Int, sP::SimulationParameters)

Calculates grid of fermionic Matsubara frequencies for given bosonic frequency ωn (including shift, if set through sP).

source
LadderDGA.χ₀AsymMethod
χ₀Asym(c1::Float64, c2::Vector{Float64}, c3::Float64, ωnGrid::AbstractVector{Int}, n_iν::Int, shift::Int, β::Float64)

Builds asymtotic helper array. See calc_bubble implementation for details.

c1, c2 and c3 are the coefficients for the asymtotic tail expansion and can be obtained through χ₀Asym_coeffs. n_iν is the number of positive fermionic Matsubara frequencies, shift is either 1 or 0, depending on the type of frequency grid.

source
LadderDGA.χ₀Asym_coeffsMethod
χ₀Asym_coeffs(type::Symbol, kG::KGrid, mP::ModelParameters; sVk=NaN)

Builds tail coefficients for the χ₀ asymptotic helper, obtained through χ₀Asym.

TODO: full documentation

source
LadderDGA.ω0_indexMethod
ω0_index(sP::SimulationParameters)
ω0_index(χ::[χT or AbstractMatrix])

Index of ω₀ frequency.

source
LadderDGA.ω2_tailMethod
ω2_tail(χ, h)

Computes bosonic frequency tail for χ: $\mathrm{tail}(n) = \frac{1}{(2 i \pi n / \beta)^2}$. Sets $\mathrm{tail}(n) = 0$.

source
LadderDGA.ω_tailMethod
ω_tail(ωindices::AbstractVector{Int}, coeffs::AbstractVector{Float64}, sP::SimulationParameters) 
ω_tail(χ_sp::χT, χ_ch::χT, coeffs::AbstractVector{Float64}, β::Float64, sP::SimulationParameters)
source

LambdaCorrection

This sub-module contains function related to the $\lambda$-correction.

LadderDGA.LambdaCorrection.λ_resultType
λ_result

Containes result and auxilliary information of λ correction, is returned by λ_correction, should not be constructed explicitly!

Fields

  • λm : Float64, Magnetic channel correction parameter.
  • λd : Float64, Density channel correction parameter.
  • type : CorrectionMethod, Type of λ correction:
    • :m, only magnetic channel
    • :dm, magnetic and density channel
    • :m_sc, only magnetic channel, partial self-consistency in EoM
    • :dm_sc, magnetic and density channel, partial self-consistency in EoM
    • :m_tsc, only magnetic channel, partial self-consistency in EoM, updated kinetic energy term in susceptibility tail
    • :dm_tsc, magnetic and density channel, partial self-consistency in EoM, updated kinetic energy term in susceptibility tail
  • sc_converged : Bool, convergence parameter for self-consistency methods. Always True for non self-consist methods. See also sc_converged
  • eps_abs : Float64, Threshold for convergence. Convergence is assumed when the potential energies and Pauli principle values (depending on method both or one) are equal up to this value.
  • sc_eps_abs : Float64, Threshold for sc convergence. Convergence is assumed when the potential energies and Pauli principle values (for 1- and 2-particle quantities) individually change by less than sc_eps_abs.
  • EKin : Float64, 2-Particle kinetic energy
  • EPot_p1 : Float64, 1-Particle potential energy, $G^\mathbf{\lambda}_\mathrm{ladder} \Sigma^\mathbf{\lambda}_\mathrm{ladder}$, see calc_E
  • EPot_p2 : Float64, 2-Particle potential energy, $\frac{U}{2} \sum_{\omega,q} (\chi^{\lambda_\mathrm{d},\omega}_{\mathrm{d},q} - \chi^{\lambda_\mathrm{m},\omega}_{\mathrm{m},q} + U\frac{n^2}{2}$
  • PP_p1 : Float64, 1-Particle Pauli principle, $\frac{n}{2} (1 - \frac{n}{2})$
  • PP_p2 : Float64, 2-Particle Pauli principle, $\frac{1}{2} \sum_{\omega,q} (\chi^{\lambda_\mathrm{d},\omega}_{\mathrm{d},q} + \chi^{\lambda_\mathrm{m},\omega}_{\mathrm{m},q}$
  • trace : DataFrame/Nothing, intermediate values of λ_result (Σ_ladder and G_ladder are only stored as checksums) for each self-consistency iteration.
  • G_ladder : Nothing/OffsetMatrix, Green's function after covnergence of λ-correction
  • Σ_ladder : Nothing/OffsetMatrix, self-energy after λ-correction
  • μ : Float64, chemical potential after λ-correction
  • n : Float64, electron density. This is used as check, μ should have been internally adjustet to keep this value fixed (i.e. n ≈ n_dmft)
  • n_dmft : Float64, input electron density
source
LadderDGA.LambdaCorrection.λ_resultMethod
λ_result(χm::χT,γm::γT,χd::χT, γd::γT, λ₀::Array{ComplexF64,3}, λm, λd, h; 
              validation_threshold::Float64 = 1e-8, max_steps_m::Int = 2000)
λ_result(χm::χT,γm::γT,χd::χT, γd::γT, λ₀::Array{ComplexF64,3}, μ_new, G_ladder, Σ_ladder, λm, λd, h; 
              validation_threshold::Float64 = 1e-8, max_steps_m::Int = 2000)

Constructs λ_result object, runs all checks and stores them.

source
LadderDGA.LambdaCorrection.bisectMethod
bisect(λl::T, λm::T, λr::T, Fm::T)::Tuple{T,T} where T <: Union{Float64, Vector{Float64}}

WARNING: Not properly tested! Bisection root finding algorithm. This is a very crude adaption of the 1D case. The root may therefore lie outside the given region and the search space has to be corrected using correct_margins.

Returns:

(Vector of) new interval borders, according to Fm.

Arguments:

  • λl : (Vector of) left border(s) of bisection area
  • λm : (Vector of) central border(s) of bisection area
  • λr : (Vector of) right border(s) of bisection area
  • Fm : (Vector of) Poincare-Miranda condition (s)
source
LadderDGA.LambdaCorrection.calc_G_ΣMethod
calc_G_Σ(χm::χT, γm::γT, χd::χT, γd::γT, λ₀::AbstractArray{ComplexF64,3}, 
         λm::Float64, λd::Float64,
         h::RunHelper, sP::SimulationParameters, mP::ModelParameters; 
         tc::Bool = true, fix_n::Bool = true

)

Returns μ_new, G_ladder, Σ_ladder with λ correction according to function parameters.

source
LadderDGA.LambdaCorrection.get_λ_minMethod
get_λ_min(χr::AbstractArray{Float64,2})::Float64

Computes the smallest possible $\lambda$-correction parameter (i.e. first divergence of $\chi(q)$), given as $\lambda_\text{min} = - \min_{q}(1 / \chi^{\omega_0}_q)$.

source
LadderDGA.LambdaCorrection.newton_rightMethod
newton_right(f::Function, [df::Function,] start::[Float64,Vector{Float64},MVector{Float64}], min::[Float64,Vector{Float64},MVector{Float64}]; nsteps=5000, atol=1e-11)

Computes root of function f but under the condition that each compontent of the root is larger than the corresponding component of the start vector. This algorithm also assumes, that f is stricly monotonically decreasing in each component. nsteps sets the maximum number of newton-steps, atol sets the convergence tolerance. df can be omitted. In this case it is approximated using finite differences.

This is a legacy method. For better convergence performance and reliability please consider using newton_secular.

source
LadderDGA.LambdaCorrection.newton_secularMethod
newton_secularEq(f::Function, [df::Function,], pole::Float64)

Computes largest root of function f, assuming it corresponds to a secular equaiton $f(x) = 1 + \sum_j \frac{b_j}{d_j - x}$. Adapted from Example 2, https://doi.org/10.48550/arXiv.2204.02326 Given the largest pole $x_p$ we transform the input according to $w(x_i) = \frac{1}{x} + x_p$ and then procede with the modified Newton algorithm (using the chain rule): $x_{(n+1)} = x_{(n)} + f(w(x_i)) \cdot (f'(w(x_i)))^{-1} (w'(x_i))^{-1}$

For debugging purposes, there are also newton_secular_trace and trace_f available.

Arguments:

  • f : function, with structure as given above.
  • df : derivative function, will be constructed by finite differences, if not provided.
  • xp : largest pole, it is guaranteed, that there is exactly one root larger than this, which will be returned by the algorithm.
  • nsteps : maximum number of steps
  • atol : convergence criterion, i.e. $|f(x_0)| <$ atol will return root x0.
source
LadderDGA.LambdaCorrection.sample_fMethod
sample_f(f::Function, xmin::T, xmax::T; feps_abs::Float64=1e-8, xeps_abs::Float64=1e-8, maxit::Int=1000) where T

Sample a function $f: \mathbb{R} \to \mathbb{R}$ over the interval $[xmin, xmax]$ by repeatedly bisecting intervals, that cannot be approximated linearly.

$x$ values will be sampled with a distance of at least ϵ. $\delta$ is the bisection criterion. i.e. if $|f(x_i) L_f(x_i)| | <$ feps_abs for a proposed bisection point, the interval is supposed to be converged. Algorithm will stop bisection after maxit samples

source
LadderDGA.LambdaCorrection.validateMethod
validation(r::λ_result)

Returns Tuple with check for (density, Pauli-principle, potential energy), both checked between one- and two-particle level against λ_result.eps_abs.

source
LadderDGA.LambdaCorrection.λ_correctionMethod
λ_correction(type::Symbol, χm::χT, γm::γT, χd::χT, γd::γT, λ₀, h::lDΓAHelper; 
             λm_rhs_type::Symbol=:native, fit_μ::Bool=true, 
             νmax::Int=eom_ν_cutoff(h), λ_min_δ::Float64 = 0.0001,
             maxit::Int=100, mixing::Float64=0.2, conv_abs::Float64=1e-8, trace::Bool=false,
             λ_val_only::Bool=false, verbose::Bool=false, validation_threshold::Float64=1e-8, tc::Bool=true)

Executes λ-correction. TODO: finish docu

Arguments

  • type : Symbol, options are :m, :dm, :m_sc, :dm_sc, :m_tsc and :dm_tsc
  • χm :
  • γm :
  • χd :
  • γd :
source
LadderDGA.LambdaCorrection.λdm_correctionMethod
λdm_correction(χm::χT,γm::γT,χd::χT, γd::γT,λ₀::Array{ComplexF64,3}, h;
                    validation_threshold::Float64 = 1e-8, max_steps_m::Int = 2000, max_steps_dm::Int = 2000, log_io = devnull
)

Computes the λm and λd parameters for the consistency of Pauli principle and potential energie on one- and two-particle level. Returns a λ_result object.

source
LadderDGA.LambdaCorrection.λdm_correction_valMethod
λdm_correction_val(χm::χT,γm::γT,χd::χT, γd::γT,λ₀::Array{ComplexF64,3}, h;
                    validation_threshold::Float64 = 1e-8, max_steps_m::Int = 2000, max_steps_dm::Int = 2000, log_io = devnull
)

Computes the λm and λd parameters for the consistency of Pauli principle and potential energie on one- and two-particle level. Returns the bare λ-values, usually one should run λdm_correction, which returns a λ_result object that stores additional consistency checks.

source
LadderDGA.LambdaCorrection.λdm_sc_correction_cleanMethod
λdm_sc_correction(χm::χT,γm::γT,χd::χT, γd::γT,λ₀::λ₀T, h;
                       validation_threshold::Float64 = 1e-8,
                       max_steps_m::Int = 2000, max_steps_dm::Int = 2000, max_steps_sc::Int = 2000,
                       log_io = devnull, tc = true)

Runs partial self-consistency loop (update of propagators in equation of motion) within λdm correction

source
LadderDGA.LambdaCorrection.λm_correctionMethod
λm_correction(χm::χT,γm::γT,χd::χT,γd::γT,λ₀::Array{ComplexF64,3},h::lDΓAHelper;
                   νmax::Int = eom_ν_cutoff(h), fit_μ::Bool = true, tc = true, 
                   validation_threshold::Float64 = 1e-8, log_io = devnull
source
LadderDGA.LambdaCorrection.λm_correction_valMethod
λm_correction_val(χm::χT, rhs::Float64, h::lDΓAHelper)
λm_correction_val(χm::χT, rhs::Float64, kG::KGrid, ωn2_tail)

Used internally for performance reasons (because the $\lambda_\mathrm{d}$ correction needs this calculation repeatedly), see λm_correction for the user-sided version. Calculates $\lambda_\mathrm{m}$ value, by fixing $\sum_{q,\omega} \chi^{\lambda,\omega}_{\uparrow\uparrow}(q,i\omega) = \frac{n}{2}(1-\frac{n}{2})$. This is only calculates the value and validation numbers and does not return a full λ_result object.

TODO: finish docu

Arguments

  • χm :
  • rhs :
  • h :
  • ωn2_tail :
  • verbose :
  • ωn2_tail :
source
LadderDGA.LambdaCorrection.λm_rhsMethod
λm_rhs(χm::χT, χd::χT, h::RunHelper; λd::Float64=NaN, λ_rhs = :native, verbose=false)
λm_rhs(imp_density::Float64, χm::χT, χd::χT, λd::Float64, kG::KGrid, mP::ModelParameters, sP::SimulationParameters, λ_rhs = :native)

Helper function for the right hand side of the Pauli principle conditions (λm correction). imp_density can be set to NaN, if the rhs ($\frac{n}{2}(1-\frac{n}{2})$) should not be error-corrected (not ncessary or usefull when asymptotic improvement are active). TODO: write down formula, explain imp_density as compensation to DMFT.

source
LadderDGA.LambdaCorrection.λm_sc_correctionMethod
λm_sc_correction(χm::χT,γm::γT,χd::χT, γd::γT,λ₀::λ₀T, h;
                       validation_threshold::Float64 = 1e-8,
                       max_steps_m::Int = 2000, max_steps_dm::Int = 2000, max_steps_sc::Int = 2000,
                       log_io = devnull, tc = true)

Runs partial self-consistency loop (update of propagators in equation of motion) within λdm correction

source
LadderDGA.LambdaCorrection.χ_λ!Method
χ_λ!(χ_destination::[AbstractArray,χT], [χ::[AbstractArray,χT], ] λ::Float64)

Inplace version of χ_λ. If the second argument is omitted, results are stored in the input χ.

source
LadderDGA.LambdaCorrection.χ_λMethod
χ_λ(χ::[Float64,ComplexF64,AbstractArray,χT], λ::Float64)

Computes the λ-corrected susceptibility: $\chi^{\lambda,\omega}_q = \frac{1}{1 / \chi^{\lambda,\omega}_q + \lambda}$. The susceptibility $\chi$ can be either given element wise, or as χT See also χT in LadderDGA.jl.

source