HFB: Hartree-Fock-Bogoliubov
HFBComputer
HFBComputer is a struct which is used to calculate the Hartree-Fock-Bogoliubov Hamiltonian from mean-field parameters, and the parameters from the eigenstates of Hartree-Fock-Bogoliubov Hamiltonian.
mutable struct HFBComputer{O}
    unitcell ::UnitCell{O}
    hoppings ::Vector{Spec.Hopping}
    temperature ::Float64
    fermi ::Function
    ρ_registry ::Vector{CollectRow}
    t_registry ::Vector{CollectRow}
    Γ_registry ::Vector{DeployRow}
    Δ_registry ::Vector{DeployRow}
endThe type CollectRow keeps record of the "observables" that need to be measured in order to calculate the mean-field parameters. They are the ρ(i,j) and t(i,j) as defined by Goodman.
const CollectRow = Tuple{Bool, Int, Int, Vector{Float64}}DeployRow contains necessary information to calculate Γ(i,j) and Δ(i,j), using the measured ρ(i,j) and t(i,j)
const DeployRow = Tuple{Bool, Int, Int, Vector{Float64}, Vector{Tuple{Int, ComplexF64, Bool}}}HFBSolver
HFBSolver is blah.
mutable struct HFBSolver{O}
    # Originals
    hamiltonian ::FullHamiltonian{O}
    size ::Vector{Int}
    temperature ::Float64
    # Derivatives
    momentumgrid ::Array{Vector{Float64}}
    hfbhamiltonian ::HFBHamiltonian{O}
    hfbcomputer ::HFBComputer{O}
    greencollector ::Function
endHFBSolver contains:
- The full interacting Hamiltonian,
- Size of the system (i.e. number of k-points in the Brillouin zone)
- Temperature (needed to calculate the ρ and t)
And using these properties, BLAH.
Using HFBSolver to Find Self-Consistent Solution
loop(solver, solution, 100)