Main Module
Lehmann.DLRGrid
— Typefunction DLRGrid(Euv, β, rtol, isFermi::Bool; symmetry::Symbol = :none, rebuild = false, folder = nothing, algorithm = :functional, verbose = false)
function DLRGrid(; isFermi::Bool, β = -1.0, beta = -1.0, Euv = 1.0, symmetry::Symbol = :none, rtol = 1e-14, rebuild = false, folder = nothing, algorithm = :functional, verbose = false)
Create DLR grids
#Arguments:
Euv
: the UV energy scale of the spectral densityβ
orbeta
: inverse temepratureisFermi
: bool is fermionic or bosonicsymmetry
: particle-hole symmetric :ph, or particle-hole asymmetric :pha, or :nonertol
: tolerance absolute errorrebuild
: set false to load DLR basis from the file, set true to recalculate the DLR basis on the flyfolder
: if rebuild is true and folder is set, then dlrGrid will be rebuilt and saved to the specified folder if rebuild is false and folder is set, then dlrGrid will be loaded from the specified folderalgorithm
: if rebuild = true, then set :functional to use the functional algorithm to generate the DLR basis, or set :discrete to use the matrix algorithm.verbose
: false not to print DLRGrid to terminal, or true to print
Lehmann.DLRGrid
— Typestruct DLRGrid
DLR grids for imaginary-time/Matsubara frequency correlators
#Members:
isFermi
: bool is fermionic or bosonicsymmetry
: particle-hole symmetric :ph, or particle-hole asymmetric :pha, or :noneEuv
: the UV energy scale of the spectral densityβ
orbeta
: inverse temepratureΛ
orlambda
: cutoff = UV Energy scale of the spectral density * inverse temperaturertol
: tolerance absolute errorsize
: number of DLR basisω
oromega
: selected representative real-frequency gridn
: selected representative Matsubara-frequency grid (integer)ωn
oromegaN
: (2n+1)π/βτ
ortau
: selected representative imaginary-time grid
Lehmann.dlr2matfreq
— Methodfunction dlr2matfreq(dlrGrid::DLRGrid, dlrcoeff, nGrid = dlrGrid.n; axis = 1, verbose = true)
DLR representation to Matsubara-frequency representation
#Members:
dlrGrid
: DLRGriddlrcoeff
: DLR coefficientsnGrid
: expected fine Matsubara-freqeuncy grids (integer)axis
: Matsubara-frequency axis in the datadlrcoeff
verbose
: true to print warning information
Lehmann.dlr2tau
— Methodfunction dlr2tau(dlrGrid::DLRGrid, dlrcoeff, τGrid = dlrGrid.τ; axis = 1, verbose = true)
DLR representation to imaginary-time representation
#Members:
dlrGrid
: DLRGriddlrcoeff
: DLR coefficientsτGrid
: expected fine imaginary-time gridsaxis
: imaginary-time axis in the datadlrcoeff
verbose
: true to print warning information
Lehmann.matfreq2dlr
— Methodfunction matfreq2dlr(dlrGrid::DLRGrid, green, nGrid = dlrGrid.n; error = nothing, axis = 1, sumrule = nothing, verbose = true)
Matsubara-frequency representation to DLR representation
#Members:
dlrGrid
: DLRGrid struct.green
: green's function in Matsubara-frequency domainnGrid
: the n grid that Green's function is defined on.error
: error the Green's function.axis
: the Matsubara-frequency axis in the datagreen
sumrule
: enforce the sum ruleverbose
: true to print warning information
Lehmann.matfreq2matfreq
— Functionfunction matfreq2matfreq(dlrGrid, green, nNewGrid, nGrid = dlrGrid.n; error = nothing, axis = 1, sumrule = nothing, verbose = true)
Fourier transform from Matsubara-frequency to imaginary-time using the DLR representation
#Members:
dlrGrid
: DLRGridgreen
: green's function in Matsubara-freqeuncy repsentationnNewGrid
: expected fine Matsubara-freqeuncy grids (integer)nGrid
: the n grid that Green's function is defined on.error
: error the Green's function.axis
: Matsubara-frequency axis in the datagreen
sumrule
: enforce the sum ruleverbose
: true to print warning information
Lehmann.matfreq2tau
— Functionfunction matfreq2tau(dlrGrid, green, τNewGrid = dlrGrid.τ, nGrid = dlrGrid.n; error = nothing, axis = 1, sumrule = nothing, verbose = true)
Fourier transform from Matsubara-frequency to imaginary-time using the DLR representation
#Members:
dlrGrid
: DLRGridgreen
: green's function in Matsubara-freqeuncy repsentationτNewGrid
: expected fine imaginary-time gridsnGrid
: the n grid that Green's function is defined on.error
: error the Green's function.axis
: Matsubara-frequency axis in the datagreen
sumrule
: enforce the sum ruleverbose
: true to print warning information
Lehmann.rank
— Methodrank(dlrGrid::DLRGrid) = length(dlrGrid.ω)
Base.size(dlrGrid::DLRGrid) = (length(dlrGrid.ω),)
Base.length(dlrGrid::DLRGrid) = length(dlrGrid.ω)
get the rank of the DLR grid, namely the number of the DLR coefficients.
Lehmann.tau2dlr
— Methodfunction tau2dlr(dlrGrid::DLRGrid, green, τGrid = dlrGrid.τ; error = nothing, axis = 1, sumrule = nothing, verbose = true)
imaginary-time domain to DLR representation
#Members:
dlrGrid
: DLRGrid struct.green
: green's function in imaginary-time domain.τGrid
: the imaginary-time grid that Green's function is defined on.error
: error the Green's function.axis
: the imaginary-time axis in the datagreen
.sumrule
: enforce the sum ruleverbose
: true to print warning information
Lehmann.tau2matfreq
— Methodfunction tau2matfreq(dlrGrid, green, nNewGrid = dlrGrid.n, τGrid = dlrGrid.τ; error = nothing, axis = 1, sumrule = nothing, verbose = true)
Fourier transform from imaginary-time to Matsubara-frequency using the DLR representation
#Members:
dlrGrid
: DLRGridgreen
: green's function in imaginary-time domainnNewGrid
: expected fine Matsubara-freqeuncy grids (integer)τGrid
: the imaginary-time grid that Green's function is defined on.error
: error the Green's function.axis
: the imaginary-time axis in the datagreen
sumrule
: enforce the sum ruleverbose
: true to print warning information
Lehmann.tau2tau
— Functionfunction tau2tau(dlrGrid, green, τNewGrid, τGrid = dlrGrid.τ; error = nothing, axis = 1, sumrule = nothing, verbose = true)
Interpolation from the old imaginary-time grid to a new grid using the DLR representation
#Members:
dlrGrid
: DLRGridgreen
: green's function in imaginary-time domainτNewGrid
: expected fine imaginary-time gridsτGrid
: the imaginary-time grid that Green's function is defined on.error
: error the Green's function.axis
: the imaginary-time axis in the datagreen
sumrule
: enforce the sum ruleverbose
: true to print warning information