Internals
Lattice
HartreeFockBogoliubov.Lattice.CarteCoord — TypeCarteCoordCartesian coordinates. Vector{Float64}.
HartreeFockBogoliubov.Lattice.FractCoord — TypeFractCoordFractional coordinates.
Members
whole ::Vector{Int}: Integer part of fractional coordinatesfraction ::Vector{Float64}: [0,1) part of fractional coordinates
HartreeFockBogoliubov.Lattice.UnitCell — TypeUnitCell{O}Parameters
O: type of "orbital". Any type can be used, but we recommend usingStringor tuple ofStringandIntfor compatibility with JSON.
Members
latticevectors ::Array{Float64, 2}: Lattice vectorsreducedreciprocallatticevectors ::Array{Float64, 2}: Reduced reciprocal lattice vectors (transpose of inverse oflatticevectors)reciprocallatticevectors ::Array{Float64, 2}: Reciprocal lattice vectors.2π * reducedreciprocallatticevectorsorbitals ::Vector{Tuple{T, FractCoord}}: List of orbitals within unit cellorbitalindices ::Dict{T, Int}: Indices of orbitals
Base.isapprox — Methodisapprox(x, y; rtol::Real=atol>0 ? 0 : √eps, atol::Real=0, nans::Bool=false, norm::Function)HartreeFockBogoliubov.Lattice.addorbital! — Methodaddorbital!Add an orbital to the unit cell.
Arguments
uc ::UnitCell{T}orbitalname ::{T}orbitalcoord ::FractCoord
HartreeFockBogoliubov.Lattice.carte2fract — Methodcarte2fractArguments
latticevectors ::AbstractArray{<:AbstractFloat, 2}: square matrix whose columns are lattice vectors.cc ::CarteCoord: cartesian coordinatestol ::Real=sqrt(eps(Float64)): tolerance
HartreeFockBogoliubov.Lattice.carte2fract — Methodcarte2fractArguments
latticevectors ::Array{Float64, 2}cc ::CarteCoord
HartreeFockBogoliubov.Lattice.dimension — MethoddimensionDimension of the fractional coordinates
Arguments
fc ::FractCoord: Fractional coordinates.
HartreeFockBogoliubov.Lattice.dimension — MethoddimensionSpatial dimension of the unit cell.
HartreeFockBogoliubov.Lattice.fract2carte — Methodfract2carteArguments
latticevectors ::AbstractArray{<:AbstractFloat, 2}: square matrix whose columns are lattice vectors.fc ::FractCoord: fractional coordinates
HartreeFockBogoliubov.Lattice.fract2carte — Methodfract2carteArguments
latticevectors ::Array{Float64, 2}fc ::FractCoord
HartreeFockBogoliubov.Lattice.getorbital — MethodgetorbitalArguments
uc ::UnitCell{T}index ::Integer
Return
(orbitalname, fractcoord)
HartreeFockBogoliubov.Lattice.getorbital — Methodgetorbital
Get the orbital (its orbital name and its fractional coordinates) with the given name.Arguments
uc ::UnitCell{O}name ::O
Return
(orbitalname, fractcoord)
HartreeFockBogoliubov.Lattice.getorbitalcoord — MethodgetorbitalcoordArguments
uc ::UnitCellidx ::Integer
Return
fractcoord
HartreeFockBogoliubov.Lattice.getorbitalcoord — Methodgetorbitalcoord
Get the fractional coordinates of the orbital with the given name.Arguments
uc ::UnitCell{O}name ::O
Return
fractcoord
HartreeFockBogoliubov.Lattice.getorbitalindex — MethodgetorbitalindexGet index of the given orbital.
Arguments
uc ::UnitCell{O}name ::O
HartreeFockBogoliubov.Lattice.getorbitalindexcoord — MethodgetorbitalindexcoordArguments
uc ::UnitCell{T}name ::T
Return
(index, fractcoord)
HartreeFockBogoliubov.Lattice.getorbitalname — MethodgetorbitalnameArguments
uc ::UnitCellindex ::Integer
Return
orbitalname
HartreeFockBogoliubov.Lattice.hasorbital — Methodhasorbital{T}Test whether the unit cell contains the orbital of given name.
Arguments
uc ::UnitCell{O}name ::O
HartreeFockBogoliubov.Lattice.linpath — MethodmomentumpathGenerate a list of momenta
Arguments
anchorpoints- (Optional)
nseg- number of points in each segment
HartreeFockBogoliubov.Lattice.make_unitcell — MethodUnitCellConstruct an n-dimensional lattice.
Arguments
latticevectors ::AbstractArray{<:AbstractFloat, 2}: Lattice vectorsOrbitalType::DataType
Optional Arguments
tol=sqrt(eps(Float64)): Epsilon
HartreeFockBogoliubov.Lattice.make_unitcell — MethodUnitCellConstruct a one-dimensional lattice.
Arguments
latticeconstant ::Float64: Lattice constantOrbitalType: List of orbitals
Optional Arguments
tol=sqrt(eps(Float64)): Tolerance
HartreeFockBogoliubov.Lattice.momentumgrid — MethodmomentumgridGenerate an n-dimensional grid of momenta of given shape
HartreeFockBogoliubov.Lattice.momentumpath — MethodmomentumpathThe anchorpoints are given in units of the reciprocal lattice vectors.
HartreeFockBogoliubov.Lattice.numorbital — MethodnumorbitalNumber of orbitals of the unit cell.
Arguments
uc ::UnitCell
HartreeFockBogoliubov.Lattice.whichunitcell — MethodwhichunitcellReturn
R ::Vector{Int}: which unit cell the specificied orbital/cartesian coordinates belongs to.
HartreeFockBogoliubov.Lattice.whichunitcell — MethodwhichunitcellReturn
R ::Vector{Int}: which unit cell the specificied orbital/cartesian coordinates belongs to.
Spec
HartreeFockBogoliubov.Spec — ModuleSubmodule `Spec`HartreeFockBogoliubov.Spec.Hopping — TypeHoppingHartreeFockBogoliubov.Spec.Interaction — TypeInteractionHartreeFockBogoliubov.Spec.FullHamiltonian — TypeFullHamiltonianMembers
unitcell ::UnitCellhoppings ::Vector{Hopping}interactions ::Vector{Interaction}
HartreeFockBogoliubov.Spec.FullHamiltonian — MethodHamiltonianCreate an empty Hamiltonian
Arguments
unitcell ::UnitCell
HartreeFockBogoliubov.Spec.HoppingDiagonal — TypeHoppingDiagonal{R<:Real}Represents
\[ t c_{i}^{*} c_{i}\]
Members
amplitude ::Ri ::Int: index of orbitalRi ::Vector{Int}: which unit cell? (indexed by a1, and a2)
HartreeFockBogoliubov.Spec.HoppingDiagonal — MethodHartreeFockBogoliubov.Spec.HoppingOffdiagonal — TypeHoppingOffdiagonal{C<:Number}Represents
\[ t c_{i}^{*} c_{j} + t^* c_{j}^{*} c_{i}\]
t, i, j and the unitcell-coordinates Ri and Rj are stored. Require that (i, Ri) <= (j, Rj)
Members
amplitude ::Ci, j ::TRi, Rj ::Vector{Int}
HartreeFockBogoliubov.Spec.InteractionDiagonal — TypeInteractionDiagonal{R<:Real}Represents
\[ U c_{i}^{*} c_{j}^{*} c_{j} c_{i}\]
Members
amplitude ::Ri, j ::IntRi, Rj ::Vector{Int}
HartreeFockBogoliubov.Spec.InteractionOffdiagonal — TypeInteractionOffdiagonal{C<:Number}
i < j, k < l, i < k or (i == k and j < l)Represents
\[ U c_{i}^{*} c_{j}^{*} c_{l} c_{k} + U^{*} c_{k}^{*} c_{l}^{*} c_{j} c_{i}\]
Only keep the first term (and require i < j, k < l, i <= k)
Ordering of orbitals by (i, Ri)
Members
amplitude ::Ci, j, k, l ::IntRi, Rj, Rk, Rl ::Vector{Int}
HartreeFockBogoliubov.Spec.addhopping! — Methodaddhopping!Arguments
hamiltonian ::Hamiltonianhopping ::HoppingOffdiagonal
HartreeFockBogoliubov.Spec.addhopping! — Methodaddhopping!Arguments
hamiltonian ::Hamiltonianhopping ::HoppingDiagonal
HartreeFockBogoliubov.Spec.addinteraction! — Methodaddinteraction!Arguments
hamiltonian ::Hamiltonianinteraction ::InteractionOffdiagonal
HartreeFockBogoliubov.Spec.addinteraction! — Methodaddinteraction!Arguments
hamiltonian ::Hamiltonianinteraction ::InteractionDiagonal
HartreeFockBogoliubov.Spec.hoppingbycarte — Methodhoppingbycarte{T}Make a hopping element with cartesian coordinates.
Arguments
uc ::UnitCell{T}amplitude ::Numberi ::Tj ::Tri ::CarteCoordrj ::CarteCoordtol ::Real: Optional. Defaults tosqrt(eps(Float64))
HartreeFockBogoliubov.Spec.hoppingbycarte — Methodhoppingbycarte{T}Make a hopping element with cartesian coordinates.
Arguments
uc ::UnitCell{T}amplitude ::Reali ::Tri ::CarteCoordtol ::Real: Optional. Defaults tosqrt(eps(Float64))
HartreeFockBogoliubov.Spec.interactionbycarte — Methodinteractionbycarte{T}Make an interaction element with cartesian coordinates.
Arguments
* `uc ::UnitCell{T}`
* `amplitude ::Number`
* `i ::T`
* `j ::T`
* `k ::T`
* `l ::T`
* `ri ::CarteCoord`
* `rj ::CarteCoord`
* `rk ::CarteCoord`
* `rl ::CarteCoord`
* `tol ::Real` : Optional. Defaults to `sqrt(eps(Float64))`HartreeFockBogoliubov.Spec.interactionbycarte — Methodinteractionbycarte{T}Make an interaction element with cartesian coordinates.
Arguments
* `uc ::UnitCell{T}`
* `amplitude ::Number`
* `i ::T`
* `j ::T`
* `ri ::CarteCoord`
* `rj ::CarteCoord`
* `tol ::Real` : Optional. Defaults to `sqrt(eps(Float64))`HartreeFockBogoliubov.Spec.islocal — MethodislocalCheck if the hopping element is local (i.e. Ri is zero)
HartreeFockBogoliubov.Spec.localized — MethodlocalizedReturn a hopping element that is local (i.e. Ri is zero)
Generator
HartreeFockBogoliubov.Generator — ModuleGenerator submodule
HartreeFockBogoliubov.Generator.hopping_inplace — Methodhopping_inplaceHartreeFockBogoliubov.Generator.hopping_inplace — Methodhopping_inplaceHartreeFockBogoliubov.Generator.hopping_inplace — Methodhopping_inplaceHartreeFockBogoliubov.Generator.hopping_inplace — Methodhopping_inplaceHartreeFockBogoliubov.Generator.hopping_inplace — Methodhopping_inplaceHartreeFockBogoliubov.Generator.hopping_inplace — Methodhopping_inplaceHartreeFockBogoliubov.Generator.hopping_inplace — Methodhopping_inplaceTopology
HartreeFockBogoliubov.Topology.chernnumber — MethodchernnumberCompute chern number of the band structure defined by the hoppings and the selected bands.
HartreeFockBogoliubov.Topology.squarify — MethodsquarifyArguments
uc::HFB.HFBHamiltonian{O}
HartreeFockBogoliubov.Topology.squarify — MethodsquarifyArguments
uc::Spec.FullHamiltonian{O}
HartreeFockBogoliubov.Topology.squarify — MethodsquarifyIn order to make the Hamiltoinian a periodic function of momentum, bring all the sites to the origin. In addition, make the unitcell into a square.
Arguments
uc::Lattice.UnitCell{O}
HartreeFockBogoliubov.Topology.z2index — Methodz2index
Compute Z₂ index of time-reversal-invariant Hamiltonian.
Arguments
uc::UnitCell{O}hops::AbstractVector{Hopping}timereversal::AbstractMatrixn1 ::Integern2 ::Integerselectpairs::AbstractVector{<:Integer}
Optional Arguments
tol ::Real = sqrt(eps(Float64))
Returns
(The Z2 index, max| Hₖ - T⁻¹HₖT | for k in TRIMs)
HFB
HartreeFockBogoliubov.HFB.CollectRow — TypeCollectRow is holds info on how to compute ρ or t. Its elements are:
- Is diagonal? (only for rho)
- row orbital
- col orbital
- displacement r(col) - r(row)
HartreeFockBogoliubov.HFB.DeployRow — TypeDeployRow is holds info on how to compute Γ or Δ. Its elements are:
- Is diagonal
- row orbital
- col orbital
- displacement r(col) - r(row)
- list of sources, each of which is a tuple of
- index of ρ or t from which to compute this Γ or Δ.
- amplitude (coefficient to multiply to ρ or t)
- boolean indicating whether (1) conjugation is needed (for ρ/Γ) or (2) minus sign is needed (for t/Δ).
HartreeFockBogoliubov.HFB.HFBComputer — TypeHFBConmputer is a type holding the ρ, t and Γ, Δ of a Hartree-Fock-Bogoliubov Hamiltonian.
HartreeFockBogoliubov.HFB.HFBComputer — MethodHartreeFockBogoliubov.HFB.HFBHamiltonian — TypeHartreeFockBogoliubov.HFB.HFBHamiltonian — MethodHartreeFockBogoliubov.HFB.HFBHamiltonian — MethodHartreeFockBogoliubov.HFB.HFBSolver — TypeHartreeFockBogoliubov.HFB.HFBSolver — MethodHartreeFockBogoliubov.HFB.HoppingMeanField — TypeHartreeFockBogoliubov.HFB.PairingMeanField — TypeHartreeFockBogoliubov.HFB.addinteraction! — MethodAdd offdiagonal interaction
HartreeFockBogoliubov.HFB.addinteraction! — Methodaddinteraction!Add diagonal interaction
HartreeFockBogoliubov.HFB.compute_hfbfield! — MethodCompute Γ and Δ from ρ and t.
HartreeFockBogoliubov.HFB.isvalid — MethodHartreeFockBogoliubov.HFB.isvalid — MethodHartreeFockBogoliubov.HFB.loop — MethodloopPerform selfconsistency loop a number of times with the given precondition and given update functions.
Arguments
solver ::HFBSolver{T}sol::HFBAmplituderun::Integer
Optional Arguments
update::Function=simpleupdateprecondition::Function=identity: on target fieldcallback::Function=_noop: Function called after every update as
callback(i, run)
HartreeFockBogoliubov.HFB.loop_threaded — MethodloopPerform selfconsistency loop a number of times with the given precondition and given update functions.
Arguments
solver ::HFBSolver{T}sf::HFBAmplituderun::Integer
Optional Arguments
update::Function=simpleupdateprecondition::Function=identitycallback::Function=_noop: Function called after every update as
callback(i, run)
HartreeFockBogoliubov.HFB.make_Deltamatrix — MethodReturn a generator of Δ matrix (which is a function of momentum)
HartreeFockBogoliubov.HFB.make_Gammamatrix — MethodReturn a generator of Γ matrix (which is a function of momentum)
HartreeFockBogoliubov.HFB.make_greencollector — Methodmake_greencollectorReturns a function which has the following signature
collector(k, eigenvalues, eigenvectors, ρout, tout)HartreeFockBogoliubov.HFB.make_hamiltonian — MethodHartreeFockBogoliubov.HFB.make_hfbamplitude — Methodfunc : (idx, i, j, r) -> val
HartreeFockBogoliubov.HFB.make_hfbamplitude — Methodfunc : (idx, i, j, r) -> 0
HartreeFockBogoliubov.HFB.make_hfbamplitude — MethodCheck if hint contains ρHartreeFockBogoliubov.HFB.make_hfbfield — MethodCompute Γ and Δ from ρ and t.
HartreeFockBogoliubov.HFB.make_hfbfield — MethodCompute Γ and Δ from ρ and t.
HartreeFockBogoliubov.HFB.make_hint — MethodHartreeFockBogoliubov.HFB.make_hoppingmatrix — MethodReturn a generator of hopping matrix (which is a function of momentum)
HartreeFockBogoliubov.HFB.make_particleholeregistry — MethodHartreeFockBogoliubov.HFB.make_particleparticleregistry — MethodHartreeFockBogoliubov.HFB.next_hfbamplitude! — MethodHartreeFockBogoliubov.HFB.next_hfbamplitude — MethodHartreeFockBogoliubov.HFB.next_hfbamplitude — MethodHartreeFockBogoliubov.HFB.next_hfbamplitude_threaded! — MethodHartreeFockBogoliubov.HFB.next_hfbamplitude_threaded — MethodHartreeFockBogoliubov.HFB.next_hfbfield — MethodHartreeFockBogoliubov.HFB.randomize! — MethodRandomize a hfbamplitude
LinearizedGap
HartreeFockBogoliubov.LinearizedGap.linearizedpairingkernel — Methodlinearizedpairingkernel
Compute the kernel Γ of the linearized gap equation in the pairing channel which is written as Δ = Γ⋅Δ