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

Autodocs

jDMFT.CTInt_ConfsType
CTInt_Confs

Fields

  • β : Float64, inverse temperature
  • U : Float64, interaction strenght
  • δ : Float64, numerical stabilization parameter for sample matrix
  • GWeiss : τ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 in SampleMatrix
  • siList : Array{Int}, external ising field, i-th entry corresponds to i-th row/column in SampleMatrix
source
jDMFT.MatsubaraFunctionType
MatsubaraFunction

Holds data for a function over Matsubara frequencies and associated information.

Fields

  • data : Vector{ComplexF64}, data
  • β : Float64, inverse temperature
  • fGrid : 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, first N tail coefficients of the high frequency expansion $\sum_{i=0}^N\frac{c_i}{i\nu^i_n}$.
source
jDMFT.MeasurementsType
Measurements

Accumulation 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 samples
  • totalSign : Int, total Monte Carlo sign.
  • totalExpOrder : Int, sum of expansion orders
source
jDMFT.MeasurementsMethod
Measurements(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
source
jDMFT.SampleMatrixType
SampleMatrix

Holds 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 matrix
  • rowCache : Vector{ComplexF64}, Row cache for potential new size
  • colCache : Vector{ComplexF64}, Column cache for potential new size
  • S : 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 also update_cache!
source
jDMFT.τFunctionType
τFunction

Holds 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, first N tail coefficients of the high frequency expansion $\sum_{i=0}^N\frac{c_i}{\tau}$.
source
jDMFT.accumulate!Method
accumulate!(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.

source
jDMFT.draw_GτMethod
draw_Gτ(Gτ::τFunction, τi::Float64)::ComplexF64 
draw_Gτ(data::Vector{ComplexF64}, τi::Float64, τGrid::Vector{Float64}, β::Float64)::ComplexF64

Obtain 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

source
jDMFT.fast_update_decr!Method
fast_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.

source
jDMFT.fast_update_incr!Method
fast_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.

source
jDMFT.gaussradauMethod
gaussradau(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.

source
jDMFT.impSolve_IPTMethod
impSolve_IPT(GWeiss_up::τFunction, GWeiss_do::τFunction, νnGrid::Vector{ComplexF64}, U::Float64, n::Float64)

TODO: Documentation

source
jDMFT.measure_GImp_τMethod
measure_GImp_τ(m::Measurements, GWeiss::τFunction)

Measure impurity Green's function, after Monte Carlo samples have been accumulated in m, see also Measurements.

source
jDMFT.riemannMethod
riemann(start::Real, stop::Real, N::Int)

Generate grid for Riemann sum integration from start to stop with N points. Returns (weights, grid)

source
jDMFT.subtract_tail!Method
subtract_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 . 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

source
jDMFT.τGridTransformMethod
τGridTransform(start::Float64, stop::Float64, grid::Vector{Float64})

Transform integration grid from [-1,1] to [start, stop].

source
jDMFT.τIndexMethod
τ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

source
jDMFT.τIntegrateMethod
τ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.

source
jDMFT.τ_to_ωMethod
τ_to_ω(F::τFunction, fGrid::Vector{ComplexF64})

Fourier transform from imaginary time to Matsubara space with a grid given bei fGrid.

source
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).

source