API reference
RAS_DMFT
RAS_DMFT.AbstractPoles — Type
AbstractPoles{A, B}Supertype which represents a function on the real axis as a collection of poles.
The locations are described by A, the weights/amplitudes by B.
RAS_DMFT.AbstractPolesContinuedFraction — Type
AbstractPolesContinuedFraction{A, B} <: AbstractPoles{A, B}Supertype which represents a (block) function on the real axis as a continued fraction.
RAS_DMFT.AbstractPolesSum — Type
AbstractPolesSum{A, B} <: AbstractPoles{A, B}Supertype which represents a (block) function on the real axis as a sum of poles.
The canonical representation requires the locations to be strictly increasing (sorted with no duplicates).
RAS_DMFT.NaturalImpurityOrbital — Type
NaturalImpurityOrbital{T<:Real}Natural impurity orbital representation of a single-particle Hamiltonian.
The ordering is [i, b, v_1, ..., v_(n_v), c_1, ..., c_(n_c)], where i is the impurity, b its mirror, v_1...v_(n_v) the fully occupied valence chain, and c_1...c_(n_c) the empty conduction chain.
Fields
H_ib: 2×2 impurity-mirror Hamiltonian blocki_v: Impurity ↔ valence coupling (i↔v₁)i_c: Impurity ↔ conduction coupling (i↔c₁)b_v: Mirror ↔ valence coupling (b↔v₁)b_c: Mirror ↔ conduction coupling (b↔c₁)e_v: Valence on-site energiest_v: Valence hoppings (v₁↔v₂↔...)e_c: Conduction on-site energiest_c: Conduction hoppings (c₁↔c₂↔...)
See also
natural_impurity_orbital to construct.
RAS_DMFT.PolesContinuedFraction — Type
PolesContinuedFraction{A <: Real, B <: Real} <: AbstractPolesContinuedFraction{A, B}Representation of poles on the real axis as a continued fraction with locations $a_i$ of type A and amplitudes $b_i$ of type B.
The scale factor $s$ of type B rescales the whole object.
\[P(z) = \frac{s^2}{z - a_1 - \frac{b_1^2}{z - a_2 - …}}\]
RAS_DMFT.PolesContinuedFraction — Method
PolesContinuedFraction(
locs::AbstractVector{A}, amps::AbstractVector{B}, scl=one(B)
) where {A,B}Create a new instance of PolesContinuedFraction by supplying locations locs, amplitudes amps, and scale scl.
By default the scale is set to $1$.
RAS_DMFT.PolesContinuedFractionBlock — Type
PolesContinuedFractionBlock{A <: Number, B <: Number} <:
AbstractPolesContinuedFraction{A, B}Representation of poles on the real axis with as a continued fraction with locations $A_i$ of type A and amplitudes $B_i$ of type B.
All matrices must be Hermitian. The scale factor $S$ rescales the whole object.
\[P(z) = S \frac{1}{z - A_1 - B_1 \frac{1}{z - A_2 - …} B_1} S\]
RAS_DMFT.PolesContinuedFractionBlock — Method
PolesContinuedFractionBlock(
locs::AbstractVector{<:AbstractMatrix{<:A}},
amps::AbstractVector{<:AbstractMatrix{<:B}},
[scl::AbstractMatrix{<:B},]
) where {A,B}Create a new instance of PolesContinuedFractionBlock by supplying locations locs, amplitudes amps, and scale scl.
By default the scale is set to the identity matrix $I$.
RAS_DMFT.PolesSum — Type
PolesSum{A <: Real, B <: Number} <: AbstractPolesSum{A, B}Representation of poles on the real axis with locations $a_i$ of type A and weights $w_i$ of type B
\[P(z) = ∑_i \frac{w_i}{z-a_i}.\]
For a block variant see PolesSumBlock.
RAS_DMFT.PolesSum — Method
PolesSum(P::PolesSumBlock, i::Integer, j::Integer)Take the $P_{i,j}$ element.
RAS_DMFT.PolesSum — Method
PolesSum(locs::AbstractVector{A}, wgts::AbstractVector{B}) where {A,B}Create a new instance of PolesSum by supplying the locations locs and weights wgts.
julia> locs = 0:5;
julia> wgts = 5:10;
julia> P = PolesSum(locs, wgts)
PolesSum{Int64, Int64} with 6 poles
julia> locations(P) == locs
true
julia> weights(P) == wgts
trueRAS_DMFT.PolesSumBlock — Type
PolesSumBlock{A <: Real, B <: Number} <: AbstractPolesSum{A, B}Representation of block of poles on the real axis with locations $a_i$ of type A and weights $W_i$ of type Matrix{B}.
\[P(z) = ∑_i \frac{W_i}{z-a_i}.\]
For $W_i$ to be physical, it needs to be Hermitian ($W_i^† = W_i$) and positive semidefinite $W_i ⪰ 0$. The latter is not enforced at construction to reduce computational cost.
For a scalar variant see PolesSum.
RAS_DMFT.PolesSumBlock — Method
PolesSumBlock(locs::AbstractVector{A}, amps::AbstractMatrix{B}) where {A, B}Create a new instance of PolesSumBlock by supplying locations locs and amplitudes amps.
The $i$-th column of amps is interpreted as the vector $\vec{b}_i$ and the weight as the outer product $W_i = \vec{b}_i \vec{b}^†_i$.
Weights of equal locations are summed. To merge nearby locations, call merge_degenerate_poles! afterwards.
julia> locs = 0:1;
julia> amps = [1+2im 3im; 4 5+6im];
julia> P = PolesSumBlock(locs, amps)
PolesSumBlock{Int64, Complex{Int64}} with 2 poles of size 2×2
julia> locations(P) == locs
true
julia> weights(P) == [[5 4+8im; 4-8im 16], [9 18+15im; 18-15im 61]]
trueRAS_DMFT.PolesSumBlock — Method
PolesSumBlock(locs::AbstractVector{A}, wgts::Vector{<:AbstractMatrix{B}}) where {A, B}Create a new instance of PolesSumBlock by supplying locations locs and weights wgts.
julia> locs = 0:2;
julia> wgts = [[1 0; 0 1], [2 1; 1 2], [2 -1; -1 2]];
julia> P = PolesSumBlock(locs, wgts)
PolesSumBlock{Int64, Int64} with 3 poles of size 2×2
julia> locations(P) == locs
true
julia> weights(P) == wgts
trueRAS_DMFT.RASWavefunction_singlet — Method
RASWavefunction_singlet(
D::Type, L_v::Integer, L_c::Integer, V_v::Integer, V_c::Integer, excitation::Integer
)Initialize a RASWavefunction with singlet in impurity and mirror site and all valence sites filled.
RAS_DMFT.Wavefunction_singlet — Method
Wavefunction_singlet(
D::Type, L_v::Integer, L_c::Integer, V_v::Integer, V_c::Integer
)Initialize a Wavefunction with singlet in impurity and mirror site and all valence sites filled.
RAS_DMFT._orthogonalize_states! — Method
_orthogonalize_states!(
M1::AbstractMatrix, Q_new::AbstractMatrix, Q_old::AbstractMatrix
)Orthogonalize Q_new against Q_old.
Overwrites M1.
RAS_DMFT._orthonormalize_lowdin — Method
_orthonormalize_lowdin(M::AbstractMatrix)Löwdin orthonormalization for given states M by diagonalizing their overlap matrix.
Calculate overlap matrix $S = M^† M$ and diagonalize
\[\begin{aligned} S &= U Λ U^† \\ S^{1/2} &= U Λ^{1/2} U^† \\ S^{-1/2} &= U Λ^{-1/2} U^†. \end{aligned}\]
Return $Q = M S^{-1/2}$ and $B = S^{1/2}$, such that $M = Q B$.
This serves states without a singular value decomposition, such as RASWavefunction. Forming $S$ squares the condition number $κ$ of M, so the columns of Q are orthonormal only up to about $ϵ κ^2$.
RAS_DMFT.add_pole_at_zero! — Method
add_pole_at_zero!(P::PolesSum)Add a pole at location zero with weight 0 inside P.
RAS_DMFT.amplitude — Function
amplitude(P::AbstractPoles, i::Integer)Return the amplitude B_i of P at index i, satisfying $B_i B_i^† = W_i$ for the weight W_i.
See also amplitudes.
RAS_DMFT.amplitude — Method
amplitude(
P::PolesSumBlock,
i::Integer;
thin::Bool = false,
tol_weight::Real = thin ? tol_weight_default(P) : 0,
)Compute the amplitude from an eigendecomposition of the weight.
Given $W = U Σ^2 U^†$, eigenvalues $σ_j^2$ at or below tol_weight are chopped off.
The principal square root (thin = false) $B = U Σ U^†$ results in $B B = W$, the thin rectangular amplitude (thin = true) $B = U Σ$ in $B B^† = W$. Only the latter has a rank to determine, so only it chops by default.
RAS_DMFT.amplitudes — Function
RAS_DMFT.amplitudes — Method
amplitudes(
P::PolesSumBlock;
thin::Bool = false,
tol_weight::Real = thin ? tol_weight_default(P) : 0,
)Forward the keywords to amplitude(::PolesSumBlock, ::Integer).
RAS_DMFT.anderson_matrix — Function
anderson_matrix(P::AbstractPolesSum)Calculate scaling factor $B_0$ and Anderson matrix $H_\mathrm{A}$ given a sum of poles P.
Throw an ArgumentError for a PolesSumBlock whose amplitudes have lower rank than the block size, where no orthonormal impurity basis exists.
Reference: DOI, appendix A3d
RAS_DMFT.arrowhead_matrix — Function
arrowhead_matrix(P::AbstractPolesSum)Calculate the (block) arrowhead matrix representation of
\[\frac{1}{z - \mathbb{0} - P(z)} .\]
julia> P = PolesSum(1:2, [4, 9])
PolesSum{Int64, Int64} with 2 poles
julia> arrowhead_matrix(P)
3×3 Matrix{Float64}:
0.0 2.0 3.0
2.0 1.0 0.0
3.0 0.0 2.0RAS_DMFT.arrowhead_matrix — Method
arrowhead_matrix(P::PolesSumBlock; kwargs...)Forward kwargs... to amplitude(::PolesSumBlock, ::Integer).
RAS_DMFT.block_lanczos — Method
block_lanczos(
H::RASOperator, Q1::AbstractMatrix{<:WF}, N::Integer
) where {WF <: RASWavefunction}Block Lanczos algorithm for given operator H, start states Q1 and N Krylov cycles.
Returns main diagonal A and subdiagonal B.
RAS_DMFT.block_lanczos_full_ortho — Method
block_lanczos_full_ortho(
H::AbstractMatrix{T1}, Q1::Matrix{T2}, N::Integer
) where {T1<:Number,T2<:Number}Block Lanczos $\mathrm{span}\{Q_1, H Q_1, …, H^{N-1} Q_1\}$ with full reorthogonalization.
If the off-diagonal element $B_i$ gets small, the algorithm is stopped early and not all N steps are run.
Returns main diagonal A, lower diagonal B and states Q.
RAS_DMFT.correlator — Method
correlator(
H::RASOperator, ψ0::RASWavefunction, O::AbstractVector{<:Operator}, n_kryl::Int
)Calculate the block correlator
\[C(z) = \left⟨ ψ_0 O^† \frac{1}{z - H} O ψ_0 \right⟩.\]
RAS_DMFT.correlator — Method
correlator(
H::RASOperator, ψ0::RASWavefunction, O::Operator, n_kryl::Int
)Calculate the correlator
\[C(z) = \left⟨ ψ_0 O^† \frac{1}{z - H} O ψ_0 \right⟩.\]
RAS_DMFT.correlator_minus — Method
correlator_minus(
H::RASOperator, ψ0::RASWavefunction, O, n_kryl::Int
)Calculate the negative spectrum of the (block) correlator.
\[C^-(z) = \left⟨ ψ_0 O^† \frac{1}{z + H} O ψ_0 \right⟩\]
For a single operator a scalar PolesSum is returned, for a vector of operators a block PolesSumBlock.
See also correlator_plus.
RAS_DMFT.correlator_plus — Method
correlator_plus(
H::RASOperator, ψ0::RASWavefunction, O, n_kryl::Int
)Calculate the positive spectrum of the (block) correlator.
\[C^+(z) = \left⟨ ψ_0 O^† \frac{1}{z - H} O ψ_0 \right⟩\]
For a single operator a scalar PolesSum is returned, for a vector of operators a block PolesSumBlock.
See also correlator_minus.
RAS_DMFT.evaluate — Function
evaluate(P::AbstractPoles, z)Evaluate P at the complex variable z.
See also evaluate_gaussian, evaluate_lorentzian.
RAS_DMFT.evaluate_gaussian — Function
evaluate_gaussian(P::AbstractPoles, ω, σ)Evaluate P with Gaussian broadening $σ$.
RAS_DMFT.evaluate_lorentzian — Method
evaluate_lorentzian(P::AbstractPoles, ω, δ)Evaluate P with Lorentzian broadening $P(ω + \mathrm{i}δ)$.
RAS_DMFT.filling — Function
filling(P::AbstractPolesSum, μ::Real=0)Calculate
\[-\frac{1}{π} \int_{-∞}^μ \mathrm{d}ω~\mathrm{Im} P(ω+\mathrm{i}0^+) .\]
If a pole exists at exactly $μ$, its weight is counted half.
RAS_DMFT.find_chemical_potential — Method
find_chemical_potential(
H_ks::Vector{<:AbstractMatrix},
Σ_stat::AbstractMatrix,
Σ_dyn::PolesSumBlock,
idx::AbstractVector{<:Integer},
n_fill::Real;
<keyword arguments>
)Find chemical potential $μ$, such that desired filling $n_\mathrm{fill}$ is fulfilled
\[\begin{aligned} n_\mathrm{fill} & ≡ ∫_{-∞}^0 \mathrm{d}ω~\mathrm{Tr} \left[ -\frac{1}{π}\mathrm{Im}~G_\mathrm{loc}(ω + \mathrm{i}0^+) \right] \\ & = ∫_{-∞}^0 \mathrm{d}ω~\mathrm{Tr} \left[ -\frac{1}{π}\mathrm{Im}~ \frac{1}{N_k} ∑_k \frac{1}{ω + \mathrm{i}0^+ + μ - H_k - Σ_\mathrm{stat} - P Σ_\mathrm{dyn} P^†} \right] \, . \end{aligned}\]
The self-energy is split into a static part Σ_stat spanning the whole space, and dynamic part Σ_dyn which is only active on some orbitals idx. Using the projector $P$, the expression $P Σ_\mathrm{dyn} P^†$ is the upfolded self-energy.
A bisection algorithm is used which stops once Δμ < μ_tol or b_max iterations are surpassed.
Returns the calculated chemical potential and effective filling.
Arguments
H_ks::Vector{<:AbstractMatrix}: Hermitiann_b × n_bHamiltonian per k-pointΣ_stat::AbstractMatrix: static self-energy,n_b × n_bΣ_dyn::PolesSumBlock: dynamic self-energy on the correlated block,n_c × n_cidx::AbstractVector{<:Integer}: then_ccorrelated orbitalsn_fill::Real: target fillingμ_tol::Real = 1.0e-7: stop once the bisection bracket is narrower than thisb_max::Int = 40: maximum number of bisection stepsμ_min::Union{Real, Nothing} = nothing: lower end of the initial bracket,nothingtakes the lowest eigenvalue of allH_k + Σ_statμ_max::Union{Real, Nothing} = nothing: upper end of the initial bracket,nothingtakes the highest eigenvalue of allH_k + Σ_statn_tol::Real = 1.0e-8: absolute tolerance of the filling integral
RAS_DMFT.flip_spectrum! — Method
flip_spectrum!(P::AbstractPolesSum)Reverse P and flip the sign of locations(P).
See also flip_spectrum.
RAS_DMFT.flip_spectrum — Method
flip_spectrum(P::AbstractPolesSum)Reverse P and flip the sign of locations(P).
See also flip_spectrum!.
RAS_DMFT.greens_function_bethe_analytic — Function
greens_function_bethe_analytic(z::Number, D::Real=1.0)
greens_function_bethe_analytic(Z::AbstractVector{<:Number}, D::Real=1.0)Calculate the Green's function for a Bethe lattice given a frequency z in the upper complex plane, and half-bandwidth D.
\[G(z) = \frac{2}{D^2} \left(z - \mathrm{sgn}(\mathrm{Re}(z)) \sqrt{z^2 - D^2}\right)\]
with $\mathrm{sgn}(0) = \mathrm{sgn}(0^+)$, the only branch with $\mathrm{Im} G \leq 0$.
RAS_DMFT.greens_function_bethe_grid — Function
greens_function_bethe_grid(grid::AbstractVector{<:Real}, D::Real=1.0)Return the PolesSum representation of the semicircular density of states with half-bandwidth D with poles given in grid.
See also greens_function_bethe_simple.
RAS_DMFT.greens_function_bethe_grid_hubbard3 — Function
greens_function_bethe_grid_hubbard3(
grid::AbstractVector{<:Real}, U::Real=0.0, D::Real=1.0
)Return the PolesSum representation of the Hubbard III approximation with half-bandwidth D and poles given in grid.
Created using two semicircles at $±U/2$.
RAS_DMFT.greens_function_bethe_simple — Function
greens_function_bethe_simple(n_bath::Int, D::Real=1.0)Return the PolesSum representation of the semicircular density of states with half-bandwidth D on n_bath poles.
Poles are found by diagonalizing a tridiagonal matrix with hopping $t=D/2$.
See also greens_function_bethe_grid.
RAS_DMFT.greens_function_local — Function
greens_function_local(
H_k::AbstractVector{<:AbstractMatrix},
μ::Real = 0,
)Calculate the non-interacting local Green's function for a dispersion relation $H_k$.
\[G_{\mathrm{loc},0}(z) = \frac{1}{N_k} ∑_k \frac{1}{z + μ - H_k}\]
Returns a PolesSumBlock.
RAS_DMFT.greens_function_local — Method
greens_function_local(
H_k::Vector{<:AbstractMatrix},
Σ_stat::AbstractMatrix,
Σ_dyn::PolesSumBlock,
μ::Real;
tol_weight::Real = tol_weight_default(Σ_dyn),
)Calculate the interacting local Green's function for a given dispersion relation $H_k$ and self-energy $Σ(z)$.
\[G_\mathrm{loc}(z) = \frac{1}{N_k} ∑_k \frac{1}{z + μ - H_k - Σ(z)} .\]
Only equal locations are merged; merge nearby ones with merge_degenerate_poles!.
Arguments
tol_weight::Real = tol_weight_default(Σ_dyn): treat weights inΣ_dynat or below this value as zero
RAS_DMFT.grid_interpolate — Method
grid_interpolate(a::AbstractVector{<:R}, n::Int) where {R<:Real}For each point $a_i$ linearly interpolate n points in the interval
\[\left[\frac{a_{i-1} + a_i}{2}, \frac{a_i + a_{i+1}}{2}\right] \,.\]
RAS_DMFT.grid_log — Method
grid_log(ω_max::Real, Λ::Real, n::Int)Create n sorted poles on a logarithmic grid with highest value ω_max.
The poles have constant ratio
\[\frac{ω_i}{ω_{i+1}} = \frac{1}{Λ}.\]
RAS_DMFT.ground_state! — Method
ground_state!(
H::RASOperator,
ψ_start::RASWavefunction,
n_kryl::Integer,
n_max_restart::Integer,
variance::Real,
)Shift $H → H - E_0$ in-place and return $E_0$, $|ψ_0⟩$.
Get approximate ground state and energy using steps of n_kryl Krylov cycles and at most n_max_restart restarts. Calculation is stopped early if ⟨H^2⟩ <= variance.
RAS_DMFT.hybridization_function_bethe_analytic — Function
hybridization_function_bethe_analytic(z::Number, D::Real = 1.0)
hybridization_function_bethe_analytic(Z::AbstractVector{<:Number}, D::Real = 1.0)Calculate the hybridization function for a Bethe lattice given a frequency z in the upper complex plane, and half-bandwidth D.
\[Δ(z) = \frac{1}{2} \left(z - \mathrm{sgn}(\mathrm{Re}(z)) \sqrt{z^2 - D^2}\right)\]
with $\mathrm{sgn}(0) = \mathrm{sgn}(0^+)$.
RAS_DMFT.hybridization_function_bethe_grid — Function
hybridization_function_bethe_grid(grid::AbstractVector{<:Real}, D::Real = 1.0)Return the PolesSum representation of the semicircular density of states with half-bandwidth D with poles given in grid.
See also hybridization_function_bethe_simple.
RAS_DMFT.hybridization_function_bethe_grid_hubbard3 — Function
hybridization_function_bethe_grid_hubbard3(
grid::AbstractVector{<:Real}, U::Real = 0.0, D::Real = 1.0
)Return the PolesSum representation of the Hubbard III approximation with half-bandwidth D and poles given in grid.
Created using two semicircles at $±U/2$.
RAS_DMFT.hybridization_function_bethe_simple — Function
hybridization_function_bethe_simple(n_bath::Int, D::Real = 1.0)Return the PolesSum representation of the semicircular density of states with half-bandwidth D on n_bath poles.
Poles are found by diagonalizing a tridiagonal matrix with hopping $t=D/2$.
See also hybridization_function_bethe_grid.
RAS_DMFT.hybridization_function_local — Method
hybridization_function_local(
H_ks::Vector{<:AbstractMatrix},
Σ_stat::AbstractMatrix,
Σ_dyn::PolesSumBlock,
idx::AbstractVector{<:Integer},
μ::Real,
grid::AbstractVector{<:Real};
tol::Real = 1.0e-8,
)Calculate the mean-field level and hybridization function from the lattice.
The correlated orbitals idx form the impurity, with mean-field level $ϵ_\mathrm{mf}$ and hybridization function $Δ$ on the locations grid, obtained without building the pole representation of the local Green's function.
The impurity Green's function is the correlated block of the local one,
\[G_\mathrm{imp}(z) = P^† \left\langle \frac{1}{z - M_k - P Σ_\mathrm{dyn}(z) P^†} \right\rangle P = \frac{1}{z - ϵ_\mathrm{mf} - Σ_\mathrm{dyn}(z) - Δ(z)} \, ,\]
with $M_k = H_k + Σ_\mathrm{stat} - μ$ and the k-average $\langle A_k \rangle = \frac{1}{N_k} ∑_k A_k$. The mean-field level is the first moment of $G_\mathrm{imp}$,
\[ϵ_\mathrm{mf} = P^† \langle M_k \rangle P \, .\]
$Δ(z)$ is evaluated in the upper half-plane through the n_c × n_c correction of the correlated block and projected onto grid like to_grid, i.e. every pole is split between its two neighbors conserving the zeroth and the first moment, and poles outside of grid land on the outermost location. The weights follow from the cumulative distribution $F_0(x) = ∫_{-∞}^x A_Δ$ and its first moment $F_1(x) = ∫_{-∞}^x ω A_Δ$, both computed along the vertical line $x + \mathrm{i}y$ as
\[F_0(x) = \frac{m_0}{2} + \frac{1}{π} ∫_0^∞ \mathrm{d}y~\mathrm{Re}~Δ(x + \mathrm{i}y) \, .\]
The total weight of $Δ$ is $m_0 = F_0(∞)$, known exactly from the moments of $G_\mathrm{imp}$,
\[m_0 = P^† \langle M_k^2 \rangle P - \left(P^† \langle M_k \rangle P\right)^2 \, ,\]
so the weights sum to it by construction.
Returns (ϵ_mf::Matrix, Δ::PolesSumBlock), both n_c × n_c. Take the scalar hybridization with PolesSum(::PolesSumBlock, ::Integer, ::Integer).
Arguments
H_ks::Vector{<:AbstractMatrix}: Hermitiann_b × n_bHamiltonian per k-pointΣ_stat::AbstractMatrix: static self-energy,n_b × n_bΣ_dyn::PolesSumBlock: dynamic self-energy on the correlated block,n_c × n_cidx::AbstractVector{<:Integer}: then_ccorrelated orbitalsμ::Real: chemical potentialgrid::AbstractVector{<:Real}: sorted locations of the returned polestol::Real = 1.0e-8: absolute tolerance of the weight integrals
See also greens_function_local.
RAS_DMFT.init_system — Method
init_system(
Δ::PolesSum,
H_int::Operator{Float64},
ϵ_imp::Float64,
ϵ_mf::Real,
L_v::Int,
L_c::Int,
p::Int,
var::Real;
n_kryl::Int = 50,
n_max_restart::Int = 20,
)Return Hamiltonian, ground state energy, and ground state.
ϵ_imp is the bare impurity level entering the Hamiltonian, ϵ_mf the mean-field level defining the basis, see natural_impurity_orbital.
The ground state is found by ground_state! with n_kryl Lanczos vectors per restart and at most n_max_restart restarts.
RAS_DMFT.inverse — Method
inverse(P::PolesSum)Return the Anderson/star decomposition (a0::Real, D::PolesSum) by inverting the input:
\[P(z) = \frac{1}{z - a0 - D(z)}\]
for a normalized P.
RAS_DMFT.lanczos! — Method
lanczos!(
a::Vector{Float64},
b::Vector{Float64},
states::Vector{WF},
H::RASOperator,
q::WF,
M::Integer,
) where {WF<:RASWavefunction}Calculate M Lanczos steps storing coefficients in a, b and intermediate states in states.
RAS_DMFT.location — Method
RAS_DMFT.locations — Method
RAS_DMFT.mask_fe — Method
mask_fe(slaterdet::Type{<:Unsigned}, nbit::Int, nfilled::Int, nempty::Int)Return masks of filled/empty sites in vector of RASWavefunction.
Arguments
slaterdet: Type of the mask.nbit: Number of sites in bit component ofRASWavefunction.nfilled: Number of filled sites in vector ofRASWavefunction.nempty: Number of empty sites in vector ofRASWavefunction.
RAS_DMFT.merge_degenerate_poles! — Function
merge_degenerate_poles!(P::AbstractPolesSum, tol::Real=0)Merge poles whose locations are ≤ tol apart.
RAS_DMFT.merge_negative_locations_to_zero! — Method
merge_negative_locations_to_zero!(P::AbstractPolesSum)Find all locations(P) <= 0 and merge them.
RAS_DMFT.merge_negative_weight! — Method
merge_negative_weight!(P::PolesSum)Remove negative weights of P such that the zeroth $m_0$ (total weight) and first moment $m_1$ are conserved.
The locations are kept, only weight is moved between them by the law of levers. A negative interior pole is split onto its two neighbors, a negative outermost pole onto the next two poles by extrapolation.
The first moment is conserved iff $a_1 ≤ m_1 / m_0 ≤ a_n$, where $a_1$ and $a_n$ are the outermost locations.
Poles with zero weight after merging are removed.
RAS_DMFT.merge_small_weight! — Method
merge_small_weight!(P::AbstractPolesSum, tol::Real)Merge poles with weight <= tol to its neighbors.
A given pole is split onto its two neighbors using the law of levers, which conserves the zeroth and first moment. The first and last pole have one neighbor only and are added to it, which conserves the zeroth moment only. For block weights, the pole size is measured by the largest eigenvalue. A single remaining pole is kept, as it has no neighbor to take its weight.
RAS_DMFT.moment — Function
moment(P::AbstractPolesSum, n::Int=0)Return the n-th moment.
RAS_DMFT.moments — Method
moments(P::AbstractPolesSum, ns)Return the n-th moment for each n in ns.
RAS_DMFT.natural_impurity_orbital — Method
natural_impurity_orbital(Δ::PolesSum, ϵ_mf::Real; tol::Real = 1.0e-8)Transform the hybridization function Δ and mean-field impurity energy ϵ_mf to the natural impurity orbital basis.
The basis is built from the mean-field reference $G(z) = 1/(z - ϵ_mf - Δ(z))$. Weight within tol of zero is shared evenly between valence and conduction sites.
RAS_DMFT.natural_impurity_orbital_operator — Method
natural_impurity_orbital_operator(
H_nat::NaturalImpurityOrbital{T},
H_int::Operator{T},
ϵ_imp::T,
fs::FockSpace,
n_v_bit::Int = 1,
n_c_bit::Int = 1,
) where {T <: Real}Convert natural impurity orbital Hamiltonian to Operator.
Ordering is [i, b, n_v[1...n_v_bit], n_c[1...n_c_bit], n_v[n_v_bit+1...end], n_c[n_c_bit+1...end].
Arguments
H_nat::NaturalImpurityOrbital{T}: natural impurity orbital representationH_int::Operator{T}: interacting Hamiltonianϵ_imp::T: on-site energy of impurityfs::FockSpace: Fock Space used for the systemn_v_bit::Int=1: number of valence bath sites in bit componentn_c_bit::Int=1: number of conduction bath sites in bit component
RAS_DMFT.natural_impurity_orbital_ras_operator — Method
natural_impurity_orbital_ras_operator(
H_nat::NaturalImpurityOrbital{T},
H_int::Operator{T},
ϵ_imp::T,
fs::FockSpace,
n_v_bit::Int = 1,
n_c_bit::Int = 1,
p::Int = 1,
) where {T <: Real}Convert natural impurity orbital Hamiltonian to RASOperator.
Arguments
H_nat::NaturalImpurityOrbital{T}: natural impurity orbital representationH_int::Operator{T}: interacting Hamiltonianϵ_imp::T: on-site energy of impurityfs::FockSpace: Fock Space used for the systemn_v_bit::Int=1: number of valence bath sites in bit componentn_c_bit::Int=1: number of conduction bath sites in bit componentp::Int=1: maximum excitation in vector component
See also RASOperator.
RAS_DMFT.quasiparticle_weight — Method
quasiparticle_weight(Σ::PolesSum; tol::Real = 0, λ::Real = 0)Obtain the quasiparticle weight on the real axis.
\[\begin{aligned} Z &= \left(1 - \frac{∂\mathrm{Re}~Σ(0)}{∂ω}\right)^{-1} \\ &= \left(1 - \sum_i w_i \frac{∂}{∂ω}\left.\frac{1}{ω-a_i}\right|_{ω=0}\right)^{-1} \\ &= \left(1 + \sum_{w_i ≥ \mathrm{tol}} w_i\frac{1}{a_i^2 + λ^2}\right)^{-1} \\ \end{aligned}\]
Skip all weights $w_i< \mathrm{tol}$. The variable $λ$ serves as a regularization parameter.
RAS_DMFT.quasiparticle_weight_optimum_regularization — Method
quasiparticle_weight_optimum_regularization(
Σ::PolesSum;
tol::Real = 0,
λmin::Real = eps(),
λmax::Real = 1,
prominence::Real = 10,
)Return the regularization parameter $λ$ of the first plateau of quasiparticle_weight in $[λ_\mathrm{min}, λ_\mathrm{max}]$.
A plateau is a minimum of the slope on a logarithmic $λ$ axis: $∂^2Z/∂(\ln λ)^2 = 0$. It only counts if the rise separating it from the plateau at $λ → 0$ is at least prominence times steeper than the plateau itself, which discards wiggles. Return zero if there is no such plateau, as $Z(0)$ is then optimal.
Examples
julia> Σ = PolesSum([1.0e-4, 1.0], [1.0e-7, 2.0]); # tiny pole close to zero
julia> quasiparticle_weight_optimum_regularization(Σ)
0.014951703474155864
julia> quasiparticle_weight_optimum_regularization(PolesSum([1.0], [2.0]))
0.0See also quasiparticle_weight.
RAS_DMFT.read_hdf5 — Function
RAS_DMFT.remove_zero_weight — Function
remove_zero_weight(P::AbstractPolesSum, remove_zero::Bool=true)Remove all poles which have zero weight.
If remove_zero, the pole at $a_i = 0$ with zero weight is also removed.
See also remove_zero_weight!.
RAS_DMFT.remove_zero_weight! — Function
remove_zero_weight!(P::AbstractPolesSum, remove_zero::Bool=true)Remove all poles which have zero weight.
If remove_zero, the pole at $a_i = 0$ with zero weight is also removed.
See also remove_zero_weight.
RAS_DMFT.scale — Method
scale(P::AbstractPolesContinuedFraction)Return the scale of P.
RAS_DMFT.self_energy_dyson — Function
self_energy_dyson(
ϵ_imp::Real,
Δ0::PolesSum,
G_imp::PolesSum,
grid::AbstractVector{<:Real}=locations(Δ0),
)Calculate the self-energy purely in PolesSum representation using the Dyson equation.
\[Σ(ω) = G_{\mathrm{imp},0}(ω)^{-1} - G_\mathrm{imp}(ω)^{-1} = ω - ϵ_\mathrm{imp} - Δ_0(ω) - G_\mathrm{imp}(ω)^{-1}\]
Poles with negative weight are moved into neighbors such that the zeroth and first moment is conserved locally.
RAS_DMFT.self_energy_schur — Function
self_energy_schur(C::PolesSumBlock, block::Int = 1)Given a block sum of poles $C$, calculate the dynamic part of the self-energy by inverting $C$, projecting onto the block $b$, and inverting again,
\[Σ(z) = \left( \left[C^{-1}(z) \right]_{bb} \right)^{-1} \.,\]
which is the Schur complement of $C$ with respect to the other block.
The block argument chooses $b$ as either the top left component (default 1) or bottom right (2) component.
Returns a PolesSumBlock object.
Reference: https://doi.org/10.1103/PhysRevB.105.245132
RAS_DMFT.shift_spectrum! — Method
shift_spectrum!(P::AbstractPolesSum, μ::Real)Shift locations of P by $a_i → a_i - μ$.
RAS_DMFT.slater_start — Method
slater_start(
slaterdet::Type{<:Unsigned},
bi::UInt8,
nfilled_bit::Int,
nempty_bit::Int,
nfilled::Int,
nempty::Int,
)Return Slater determinant with impurity and bath site b filling given by bi, valence bath sites filled fully.
For impurity and b the last four bits of bi are taken for occupation. If 0bwxyz is given the occupation are taken as:
n[b, 2] = wn[i, 2] = xn[b, 1] = yn[i, 1] = z
E.g. for opposite occupation: 0b1001, 0b0110.
RAS_DMFT.spectral_function_loggaussian — Method
spectral_function_loggaussian(P::PolesSum, ω, b::Real)Calculate the spectral function $A(ω) = -1/π \mathrm{Im}[P(ω)]$ with a lognormal broadening.
Each pole is broadened as in NRG
\[b_i δ(ω - a_i) → b_i \frac{\mathrm{e}^{-b^2/4}}{\sqrt{π}|a_i|b} \exp\left(-\frac{\ln^2(ω/a_i)}{b^2}\right).\]
The lognormal kernel yields nothing at $ω = 0$, so a pole $a_i = 0$ is instead broadened with a Gaussian whose width is the resolution floor of the poles
\[b_i δ(ω) → \frac{b_i}{\sqrt{2π} σ} \exp\left(-\frac{ω^2}{2σ^2}\right), \qquad σ = \min_{a_i ≠ 0} |a_i| \,.\]
RAS_DMFT.temperature_kondo — Method
temperature_kondo(U::Real, ϵ::Real, Δ0::Real)Calculate the Kondo temperature for an interaction U, on-site with energy ϵ, and hybridization Δ0.
\[T_\mathrm{K} = \sqrt{\frac{UΔ_0}{2}} \exp(\frac{π ϵ(ϵ+U)}{2UΔ_0})\]
Δ0 is the hybridization at the Fermi level, i.e. the half-width of the non-interacting impurity resonance, $Δ_0 = -\mathrm{Im}~Δ(0 + \mathrm{i}0^+)$.
RAS_DMFT.to_grid — Method
to_grid(P::AbstractPolesSum, grid::AbstractVector{<:Real})Create a new AbstractPolesSum from P with locations given by grid.
A given pole is split locally conserving the zeroth and first moment. If a pole is outside of grid, only the zeroth moment is conserved.
RAS_DMFT.tol_weight_default — Method
tol_weight_default(P::AbstractPolesSum)Return the weight below which a weight of P is indistinguishable from the noise of its decomposition.
julia> tol_weight_default(PolesSum(1:2, [0.25, 0.75])) ≈ 1000 * eps()
trueRAS_DMFT.tridiagonal_matrix — Function
tridiagonal_matrix(P::AbstractPolesContinuedFraction)Calculate the (block) tridiagonal representation of P
\[\begin{pmatrix} A_1 & B_1 & & & \\ B_1 & A_2 & B_2 & & \\ & B_2 & ⋱ & ⋱ & \\ & & ⋱ & ⋱ & B_{N-1} \\ & & & B_{N-1} & A_N \end{pmatrix} .\]
The overall scale of P is not part of the matrix.
RAS_DMFT.update_hybridization_function — Method
update_hybridization_function(
Δ0::PolesSum{R,R}, μ::R, Σ_H::R, Σ::PolesSum{R,R}
) where {R<:Real}Calculate the new hybridization function in PolesSum representation from the Hartree term Σ_H and the dynamic self-energy Σ,
\[Δ(ω) = Δ_0(ω + μ - Σ_\mathrm{H} - Σ(ω)) \, .\]
The relation holds for the Bethe lattice only, see hybridization_function_local for a general lattice.
RAS_DMFT.weight — Function
RAS_DMFT.weights — Function
RAS_DMFT.write_hdf5 — Function
write_hdf5(filename::AbstractString, content)Write content to filename in HDF5 format.
If the file already exists, it will be overwritten.
See also read_hdf5.
RAS_DMFT.Combinatorics
RAS_DMFT.Combinatorics.ndet — Method
ndet(nbit::Int, nup::Int, ndown::Int, excitation::Int, nfilled::Int, nempty::Int)Number of Slater determinants for given excitation.
Parameters:
nbit::Int: number of bath sites in $|ψ_\mathrm{I}⟩$nup::Int: number of up-electrons in $|ψ_\mathrm{I}⟩$ndown::Int: number of down-electrons in $|ψ_\mathrm{I}⟩$excitation::Int: number of excitations in $|ψ_\mathrm{II}⟩$nfilled::Int: number of valence bath sites in $|ψ_\mathrm{II}⟩$nempty::Int: number of conduction bath sites in $|ψ_\mathrm{II}⟩$
RAS_DMFT.Combinatorics.ndet0 — Method
ndet0(nbit::Int, nup::Int, ndown::Int, ::Int, ::Int)Number of Slater determinants for zero excitation.
RAS_DMFT.Combinatorics.ndet0_bit — Method
ndet0_bit(nbit::Int, nup::Int, ndown::Int)Number of Slater determinants for zero excitation in the bit component.
RAS_DMFT.Combinatorics.ndet1 — Method
ndet1(nbit::Int, nup::Int, ndown::Int, nfilled::Int, nempty::Int)Number of Slater determinants for single excitation.
RAS_DMFT.Combinatorics.ndet1_bit — Method
ndet1_bit(nbit::Int, nup::Int, ndown::Int)Number of Slater determinants for single excitation in the bit component.
RAS_DMFT.Combinatorics.ndet2 — Method
ndet2(nbit::Int, nup::Int, ndown::Int, nfilled::Int, nempty::Int)Number of Slater determinants for double excitation.
RAS_DMFT.Combinatorics.ndet2_bit — Method
ndet2_bit(nbit::Int, nup::Int, ndown::Int)Number of Slater determinants for double excitation in the bit component.
RAS_DMFT.Combinatorics.ndet_bit — Method
ndet_bit(nbit::Int, nup::Int, ndown::Int, excitation::Int)Number of Slater determinants for given excitation in the bit component.