BenchmarkFreeFermions.jl
Contents
Numerical diagonalization
BenchmarkFreeFermions.SingleParticleSpectrum
— Function SingleParticleSpectrum(Tij::AbstractMatrix) -> ϵ::Vector{Float64}
Numerically diagonalize the hopping matrix Tij
to get the single particle spectrum ϵ
. Note the convention is H = - \sum_ij Tij c_i^dag c_j
.
BenchmarkFreeFermions.EigenModes
— Function EigenModes(Tij::AbstractMatrix{F}) -> ϵ::Vector{Float64}, V::Matrix{F}
Numerically diagonalize the hopping matrix Tij = - V diagm(ϵ) V'
to get the single particle spectrum ϵ
and the eigenvectors V
. Note the convention is H = - \sum_ij Tij c_i^dag c_j
and the decoupled Hamiltonian reads H = \sum_k ϵ_k f_k^dag f_k
where c_i = \sum_k V[i,k] f_k
.
Thermodynamics
BenchmarkFreeFermions.n_fermion
— Function n_fermion(x::Real, β::Real) -> ::Float64
n_fermion(x::Real, lsβ::AbstractVector{<:Real}) -> ::Vector{Float64}
n_fermion(lsx::AbstractVector{<:Real}, β::Real) -> ::Vector{Float64}
The Fermi-Dirac distribution x -> 1 / (e^{βx} + 1)
.
BenchmarkFreeFermions.ParticleNumber
— Function ParticleNumber(ϵ::Vector{Float64}, β::Real, μ::Real) -> Ntot::Float64
Return the total particle number Ntot = \sum_k nk
with given chemical potential μ
.
BenchmarkFreeFermions.LogPartition
— Function LogPartition(ϵ::Vector{Float64}, β::Real, μ::Real) -> lnZ::Float64
Return the logarithm of the partition function.
BenchmarkFreeFermions.Energy
— Function Energy(ϵ::Vector{Float64}, β::Real, μ::Real) -> E::Float64
Return the total inner energy E = \sum_k ϵk nk
.
BenchmarkFreeFermions.FreeEnergy
— Function FreeEnergy(ϵ::Vector{Float64}, β::Real, μ::Real) -> F::Float64
Return the free energy F = - lnZ/β + μN
.
BenchmarkFreeFermions.Entropy
— Function Entropy(ϵ::Vector{Float64}, β::Real, μ::Real)) -> S::Float64
Return the thermal entropy S = β(E - F)
.
BenchmarkFreeFermions.SpecificHeat_μ
— Function SpecificHeat_μ(ϵ::Vector{Float64}, β::Real, μ::Real) -> C_μ::Float64
Return the fixed-chemical-potential specific heat C_μ = (∂(E - μN) / ∂T)_μ
.
BenchmarkFreeFermions.SpecificHeat_N
— Function SpecificHeat_N(ϵ::Vector{Float64}, β::Real, μ::Real) -> C_N::Float64
Return the fixed-particle-number specific heat C_N = (∂E / ∂T)_N
.
BenchmarkFreeFermions.SolveChemicalPotential
— Function SolveChemicalPotential(ϵ::Vector{Float64},
β::Real,
n::Real) -> μ::Float64
Return the chemical potential μ
that leads to the given average particle number n ∈ (0, 1)
.
Observables
BenchmarkFreeFermions.GreenFunction
— Function GreenFunction(ξ::Vector{Float64}, V::Matrix{F}, β::Real; τ::Number=0.0) -> G::Matrix{F}
GreenFunction(ξ::Vector{Float64}, V::Matrix{F}, β::Real,
i::Int64, j::Int64;
τ::Number=0.0,
reverse::Bool = false) -> Gij::F
Compute the Green's funtion Gij(τ) = ⟨c_i(τ) c_j^dag⟩
(up to a coefficient) with the shifted single particle spectrum ξ = ϵ - μ
and the eigenvectors V
obtained from Tij = - V diagm(ϵ) V'
.
Kwargs
reverse::Bool = false
Return ⟨c_i^dag(τ) c_j⟩
instead if reverse = true
.
BenchmarkFreeFermions.ExpectationValue
— Function ExpectationValue(G::Matrix{F},
si::Vector{Int64},
dagidx::Vector{Int64}) -> ::F
Return the expectation value of severial fermionic operators. si
denotes the sites and dagidx
tells whether the operator is daggered or not. For example, si = [i, j]
and dagidx = [2]
means the single particle correlation c_i c_j^dag
and si = [i, j, k, l]
and dagidx = [3, 4]
means the pairing correlation c_i c_j c_k^dag c_l^dag
.
BenchmarkFreeFermions.TimeCorrelation
— Function TimeCorrelation(ξ::Vector{Float64},
V::Matrix,
β::Real,
si::Vector{Int64},
dagidx::Vector{Int64},
lsτ::AbstractVector{<:Number}) -> ::Float64(::ComplexF64)
Return the time correlation function with the shifted single particle spectrum ξ = ϵ - μ
and the eigenvectors V
obtained from Tij = - V diagm(ϵ) V'
. si
denotes the sites and dagidx
tells whether the operator is daggered or not. lsτ
has the same length as si
and tells the time of each operator. For example, si = [i, j, k, l]
, dagidx = [1, 3]
and lsτ = [τ1, τ2, 0, 0]
means c_i^dag(τ1) c_j(τ2) c_k^dag c_l
.
BenchmarkFreeFermions.Density
— Function Density(G::Matrix, si::Int64) -> ::Float64
Density(G::Matrix, lssi::AbstractVector{Int64}) -> ::Vector{Float64}
Return the local density n_i
with the green function G
.