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.

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

source
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 block
  • i_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 energies
  • t_v: Valence hoppings (v₁↔v₂↔...)
  • e_c: Conduction on-site energies
  • t_c: Conduction hoppings (c₁↔c₂↔...)

See also

natural_impurity_orbital to construct.

source
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 - …}}\]

source
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\]

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

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

source
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
true
source
RAS_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.

source
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]]
true
source
RAS_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
true
source
RAS_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.

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

source
RAS_DMFT._orthogonalize_states! — Method
_orthogonalize_states!(
    M1::AbstractMatrix, Q_new::AbstractMatrix, Q_old::AbstractMatrix
)

Orthogonalize Q_new against Q_old.

Overwrites M1.

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

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

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

source
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

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

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

source
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⟩.\]

source
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⟩.\]

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

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

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

source
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}: Hermitian n_b × n_b Hamiltonian per k-point
  • Σ_stat::AbstractMatrix: static self-energy, n_b × n_b
  • Σ_dyn::PolesSumBlock: dynamic self-energy on the correlated block, n_c × n_c
  • idx::AbstractVector{<:Integer}: the n_c correlated orbitals
  • n_fill::Real: target filling
  • μ_tol::Real = 1.0e-7: stop once the bisection bracket is narrower than this
  • b_max::Int = 40: maximum number of bisection steps
  • μ_min::Union{Real, Nothing} = nothing: lower end of the initial bracket, nothing takes the lowest eigenvalue of all H_k + Σ_stat
  • μ_max::Union{Real, Nothing} = nothing: upper end of the initial bracket, nothing takes the highest eigenvalue of all H_k + Σ_stat
  • n_tol::Real = 1.0e-8: absolute tolerance of the filling integral
source
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$.

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

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

source
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 Σ_dyn at or below this value as zero
source
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] \,.\]

source
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}{Λ}.\]

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

source
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^+)$.

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

source
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}: Hermitian n_b × n_b Hamiltonian per k-point
  • Σ_stat::AbstractMatrix: static self-energy, n_b × n_b
  • Σ_dyn::PolesSumBlock: dynamic self-energy on the correlated block, n_c × n_c
  • idx::AbstractVector{<:Integer}: the n_c correlated orbitals
  • μ::Real: chemical potential
  • grid::AbstractVector{<:Real}: sorted locations of the returned poles
  • tol::Real = 1.0e-8: absolute tolerance of the weight integrals

See also greens_function_local.

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

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

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

source
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 of RASWavefunction.
  • nfilled: Number of filled sites in vector of RASWavefunction.
  • nempty: Number of empty sites in vector of RASWavefunction.
source
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.

Warning

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.

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

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

source
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 representation
  • H_int::Operator{T}: interacting Hamiltonian
  • ϵ_imp::T: on-site energy of impurity
  • fs::FockSpace: Fock Space used for the system
  • n_v_bit::Int=1: number of valence bath sites in bit component
  • n_c_bit::Int=1: number of conduction bath sites in bit component
source
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 representation
  • H_int::Operator{T}: interacting Hamiltonian
  • ϵ_imp::T: on-site energy of impurity
  • fs::FockSpace: Fock Space used for the system
  • n_v_bit::Int=1: number of valence bath sites in bit component
  • n_c_bit::Int=1: number of conduction bath sites in bit component
  • p::Int=1: maximum excitation in vector component

See also RASOperator.

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

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

See also quasiparticle_weight.

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

source
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

source
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] = w
  • n[i, 2] = x
  • n[b, 1] = y
  • n[i, 1] = z

E.g. for opposite occupation: 0b1001, 0b0110.

source
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| \,.\]

source
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^+)$.

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

source
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()
true
source
RAS_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.

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

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

source

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}⟩$
source