jDMFT.jl Documentation
Small demonstration of a Dynamical Mean Field Theory (DMFT) solver with some examples of impurity solvers included. For now there is a IteratedPerturbation Theory (IPT) and continuous time quantum Monte Carlo, interaction expansion (CT-INT), solver available.
TODO: at some point I should provide some actual documentation here.
Index
jDMFT.CTInt_ConfsjDMFT.MatsubaraFunctionjDMFT.MeasurementsjDMFT.MeasurementsjDMFT.SampleMatrixjDMFT.τFunctionjDMFT.accumulate!jDMFT.draw_GτjDMFT.fast_update_decr!jDMFT.fast_update_incr!jDMFT.gaussradaujDMFT.impSolve_IPTjDMFT.measure_GImp_τjDMFT.riemannjDMFT.subtract_tail!jDMFT.τGridTransformjDMFT.τIndexjDMFT.τIntegratejDMFT.τ_to_ωjDMFT.ω_to_τ
Autodocs
jDMFT.CTInt_Confs — TypeCTInt_ConfsFields
β:Float64, inverse temperatureU:Float64, interaction strenghtδ:Float64, numerical stabilization parameter for sample matrixGWeiss:τFunction, noninteracting impurity Green's functionτList:Array{Float64}, τ values on which the Green's function is evaluatedτiList:Array{Float64}, sampled τ, i-th entry corresponds to i-th row/column inSampleMatrixsiList:Array{Int}, external ising field, i-th entry corresponds to i-th row/column inSampleMatrix
jDMFT.MatsubaraFunction — TypeMatsubaraFunctionHolds data for a function over Matsubara frequencies and associated information.
Fields
data:Vector{ComplexF64}, dataβ:Float64, inverse temperaturefGrid:Vector{ComplexF64}, x-values (i.e., frequence grid), $\frac{(2n+1) \pi}{\beta}$ for fermionic grids and $\frac{(2n) \pi}{\beta}$ for bosonic grids.tail_coeffs:AbstractVector, firstNtail coefficients of the high frequency expansion $\sum_{i=0}^N\frac{c_i}{i\nu^i_n}$.
jDMFT.Measurements — TypeMeasurementsAccumulation helper, see Gull et al., 2008.
#TODO: this should be generalized to allow histograms and bootstrapping, e.g. dict of functors
Fields
samples:Vector{ComplexF64}, List of all samplesτGrid:Vector{Float64}, sampling points for τNSamples:Int, number of samplestotalSign:Int, total Monte Carlo sign.totalExpOrder:Int, sum of expansion orders
jDMFT.Measurements — MethodMeasurements(NBins::Int, β::Float64, type::Symbol)Generates a Measurements struct for a temperature β with NBins bins and of grid type type which may be:
- 'GaussQuad' : generates a Gauss Radau grid and its corresponding τWeights
- 'Riemann' : generates an evenly distriubted grid where each point has equal weight
jDMFT.SampleMatrix — TypeSampleMatrixHolds samples data for f(τij) in each matrix entry. f depends on the algrithm (Weiss GF for CT-INT, Δ for CTHYB). This should be used in conjunction with the config struct (wich saves the τ_ij and additional data) for the specific sampler.
Fields
data:Matrix{ComplexF64}, Data for sample matrixrowCache:Vector{ComplexF64}, Row cache for potential new sizecolCache:Vector{ComplexF64}, Column cache for potential new sizeS:Complex64, Cache for bottom right entry (remaining new value besides row and colum cache)N:Int, Used matrix dimension, this differs from the actual data size, due to caching, see alsoupdate_cache!
jDMFT.τFunction — TypeτFunctionHolds data for a function over imaginary time and associated information.
Fields
data:Vector{ComplexF64}, dataβ:Float64, inverse temperatureτGrid:AbstractVector{Float64}, $\tau$-grid,τWeights:AbstractVector{Float64}, wheights for each $f(\tau)$ point, used for integration methods.tail_coeffs:AbstractVector, firstNtail coefficients of the high frequency expansion $\sum_{i=0}^N\frac{c_i}{\tau}$.
jDMFT.accumulate! — Methodaccumulate!(rng::AbstractRNG, m::Measurements, sign::Int, confs::CTInt_Confs, M::SampleMatrix; with_τshift=true)Updates Monte Carlo estimate by measuring impurity Green's function for given configuration stored in M.
jDMFT.draw_Gτ — Methoddraw_Gτ(Gτ::τFunction, τi::Float64)::ComplexF64
draw_Gτ(data::Vector{ComplexF64}, τi::Float64, τGrid::Vector{Float64}, β::Float64)::ComplexF64Obtain f(\tau) data for a function, either given as τFunction or as Vector{ComplexF64} at imaginary time τi. Data is linearly interpolated from the given grid.
TODO: test and implement fast-version (only draw random indices) TODO: replace linear interpolation by some cubic lin. inter, using legndre grid
jDMFT.fast_update_decr! — Methodfast_update_decr!(M::SampleMatrix, N::Int)Compute fast inverse update, using Woodbury matrix idenity: M_inv = inv(M) Mnew_inv =M_inv after deleting right column and bottom row Mnew = inv(Mnew_inv)
N is the new size. TODO: currently only rank 1 updates supported, so N = M.N-1.
jDMFT.fast_update_incr! — Methodfast_update_incr!(M::SampleMatrix, N::Int)Compute fast inverse update, using Woodbury matrix idenity: M_inv = inv(M) Mnew_inv = M_inv after inserting row/col/corner obtained from M.rowCach, M.colCache, M.S Mnew = inv(Mnew_inv)
M.rowCache, M.colCache and M.S must be set to the new values, before calling this function! N is the new size. TODO: currently only rank 1 updates supported, so N = M.N+1.
jDMFT.gaussradau — Methodgaussradau(start::Real, stop::Real, N::Int)Generate grid for gaussradau sum integration from start to stop with N points. Returns (weights, grid), this is a wrapper around gaussradau from FastGaussQuadrature.
jDMFT.impSolve_IPT — MethodimpSolve_IPT(GWeiss_up::τFunction, GWeiss_do::τFunction, νnGrid::Vector{ComplexF64}, U::Float64, n::Float64)TODO: Documentation
jDMFT.measure_GImp_τ — Methodmeasure_GImp_τ(m::Measurements, GWeiss::τFunction)Measure impurity Green's function, after Monte Carlo samples have been accumulated in m, see also Measurements.
jDMFT.riemann — Methodriemann(start::Real, stop::Real, N::Int)Generate grid for Riemann sum integration from start to stop with N points. Returns (weights, grid)
jDMFT.subtract_tail! — Methodsubtract_tail(inp::AbstractVector{T}, c::Vector{Float64}, iω::Vector{ComplexF64})
subtract_tail!(outp::AbstractVector{Number}, inp::AbstractVector{Number}, c::Vector{Float64}, iω::Vector{ComplexF64})Subtract high frequency tail of function, i.e. $f(i\omega_n) - \sum_l \frac{c_l}{i\omega_n^l}$, with tail coefficients c_l and tail iω. One can use iν_array or iω_array to generate the grid. the inplace version stores the resulting data in outp.
TODO: this function is not optimized for performance
jDMFT.τGridTransform — MethodτGridTransform(start::Float64, stop::Float64, grid::Vector{Float64})Transform integration grid from [-1,1] to [start, stop].
jDMFT.τIndex — MethodτIndex(τ::Float64, τGrid::Vector{Float64}, β::Float64)::Tuple{Int,Int}Internal function to determine nearest imaginary time value for τGrid of Green's function. Find index for given τ that matches nearest value in τGrid. Returns Tuple with sign (since ``G(\tau + \beta) = - G(\tau)) and index.
TODO: no guaranteed to find nearest solution at index 1 and N
jDMFT.τIntegrate — MethodτIntegrate(f::AbstractVector, τWeights::Vector, τGrid::Vector{Float64})
τIntegrate(f::Function, τWeights::Vector, τGrid::Vector{Float64})
τIntegrate(f::τFunction)Integrates Vector of values, Function or τFunction over τGrid, given τWeights. Note, that you hav to transform any τ-spacing from the [-1,1] interval using τGridTransform.
jDMFT.τ_to_ω — Methodτ_to_ω(F::τFunction, fGrid::Vector{ComplexF64})Fourier transform from imaginary time to Matsubara space with a grid given bei fGrid.
jDMFT.ω_to_τ — Methodω_to_τ(F::MatsubaraFunction, τWeights::AbstractVector, τGrid::AbstractVector)Fourier transform from Matsubara frequencies to imaginary time with given τGrid and τWeights (for integration such as Gauss quadrature. See τGridTransform, gaussradau and riemann).