Internals
Lattice
HartreeFockBogoliubov.Lattice.CarteCoord
— TypeCarteCoord
Cartesian coordinates. Vector{Float64}
.
HartreeFockBogoliubov.Lattice.FractCoord
— TypeFractCoord
Fractional 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 usingString
or tuple ofString
andInt
for 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π * reducedreciprocallatticevectors
orbitals ::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
— Methodcarte2fract
Arguments
latticevectors ::AbstractArray{<:AbstractFloat, 2}
: square matrix whose columns are lattice vectors.cc ::CarteCoord
: cartesian coordinatestol ::Real=sqrt(eps(Float64))
: tolerance
HartreeFockBogoliubov.Lattice.carte2fract
— Methodcarte2fract
Arguments
latticevectors ::Array{Float64, 2}
cc ::CarteCoord
HartreeFockBogoliubov.Lattice.dimension
— Methoddimension
Dimension of the fractional coordinates
Arguments
fc ::FractCoord
: Fractional coordinates.
HartreeFockBogoliubov.Lattice.dimension
— Methoddimension
Spatial dimension of the unit cell.
HartreeFockBogoliubov.Lattice.fract2carte
— Methodfract2carte
Arguments
latticevectors ::AbstractArray{<:AbstractFloat, 2}
: square matrix whose columns are lattice vectors.fc ::FractCoord
: fractional coordinates
HartreeFockBogoliubov.Lattice.fract2carte
— Methodfract2carte
Arguments
latticevectors ::Array{Float64, 2}
fc ::FractCoord
HartreeFockBogoliubov.Lattice.getorbital
— Methodgetorbital
Arguments
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
— Methodgetorbitalcoord
Arguments
uc ::UnitCell
idx ::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
— Methodgetorbitalindex
Get index of the given orbital.
Arguments
uc ::UnitCell{O}
name ::O
HartreeFockBogoliubov.Lattice.getorbitalindexcoord
— Methodgetorbitalindexcoord
Arguments
uc ::UnitCell{T}
name ::T
Return
(index, fractcoord)
HartreeFockBogoliubov.Lattice.getorbitalname
— Methodgetorbitalname
Arguments
uc ::UnitCell
index ::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
— Methodmomentumpath
Generate a list of momenta
Arguments
anchorpoints
- (Optional)
nseg
- number of points in each segment
HartreeFockBogoliubov.Lattice.make_unitcell
— MethodUnitCell
Construct an n-dimensional lattice.
Arguments
latticevectors ::AbstractArray{<:AbstractFloat, 2}
: Lattice vectorsOrbitalType::DataType
Optional Arguments
tol=sqrt(eps(Float64))
: Epsilon
HartreeFockBogoliubov.Lattice.make_unitcell
— MethodUnitCell
Construct a one-dimensional lattice.
Arguments
latticeconstant ::Float64
: Lattice constantOrbitalType
: List of orbitals
Optional Arguments
tol=sqrt(eps(Float64))
: Tolerance
HartreeFockBogoliubov.Lattice.momentumgrid
— Methodmomentumgrid
Generate an n-dimensional grid of momenta of given shape
HartreeFockBogoliubov.Lattice.momentumpath
— Methodmomentumpath
The anchorpoints are given in units of the reciprocal lattice vectors.
HartreeFockBogoliubov.Lattice.numorbital
— Methodnumorbital
Number of orbitals of the unit cell.
Arguments
uc ::UnitCell
HartreeFockBogoliubov.Lattice.whichunitcell
— Methodwhichunitcell
Return
R ::Vector{Int}
: which unit cell the specificied orbital/cartesian coordinates belongs to.
HartreeFockBogoliubov.Lattice.whichunitcell
— Methodwhichunitcell
Return
R ::Vector{Int}
: which unit cell the specificied orbital/cartesian coordinates belongs to.
Spec
HartreeFockBogoliubov.Spec
— ModuleSubmodule `Spec`
HartreeFockBogoliubov.Spec.Hopping
— TypeHopping
HartreeFockBogoliubov.Spec.Interaction
— TypeInteraction
HartreeFockBogoliubov.Spec.FullHamiltonian
— TypeFullHamiltonian
Members
unitcell ::UnitCell
hoppings ::Vector{Hopping}
interactions ::Vector{Interaction}
HartreeFockBogoliubov.Spec.FullHamiltonian
— MethodHamiltonian
Create an empty Hamiltonian
Arguments
unitcell ::UnitCell
HartreeFockBogoliubov.Spec.HoppingDiagonal
— TypeHoppingDiagonal{R<:Real}
Represents
\[ t c_{i}^{*} c_{i}\]
Members
amplitude ::R
i ::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 ::C
i, j ::T
Ri, Rj ::Vector{Int}
HartreeFockBogoliubov.Spec.InteractionDiagonal
— TypeInteractionDiagonal{R<:Real}
Represents
\[ U c_{i}^{*} c_{j}^{*} c_{j} c_{i}\]
Members
amplitude ::R
i, j ::Int
Ri, 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 ::C
i, j, k, l ::Int
Ri, Rj, Rk, Rl ::Vector{Int}
HartreeFockBogoliubov.Spec.addhopping!
— Methodaddhopping!
Arguments
hamiltonian ::Hamiltonian
hopping ::HoppingOffdiagonal
HartreeFockBogoliubov.Spec.addhopping!
— Methodaddhopping!
Arguments
hamiltonian ::Hamiltonian
hopping ::HoppingDiagonal
HartreeFockBogoliubov.Spec.addinteraction!
— Methodaddinteraction!
Arguments
hamiltonian ::Hamiltonian
interaction ::InteractionOffdiagonal
HartreeFockBogoliubov.Spec.addinteraction!
— Methodaddinteraction!
Arguments
hamiltonian ::Hamiltonian
interaction ::InteractionDiagonal
HartreeFockBogoliubov.Spec.hoppingbycarte
— Methodhoppingbycarte{T}
Make a hopping element with cartesian coordinates.
Arguments
uc ::UnitCell{T}
amplitude ::Number
i ::T
j ::T
ri ::CarteCoord
rj ::CarteCoord
tol ::Real
: Optional. Defaults tosqrt(eps(Float64))
HartreeFockBogoliubov.Spec.hoppingbycarte
— Methodhoppingbycarte{T}
Make a hopping element with cartesian coordinates.
Arguments
uc ::UnitCell{T}
amplitude ::Real
i ::T
ri ::CarteCoord
tol ::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
— Methodislocal
Check if the hopping element is local (i.e. Ri is zero)
HartreeFockBogoliubov.Spec.localized
— Methodlocalized
Return a hopping element that is local (i.e. Ri is zero)
Generator
HartreeFockBogoliubov.Generator
— ModuleGenerator submodule
HartreeFockBogoliubov.Generator.hopping_inplace
— Methodhopping_inplace
HartreeFockBogoliubov.Generator.hopping_inplace
— Methodhopping_inplace
HartreeFockBogoliubov.Generator.hopping_inplace
— Methodhopping_inplace
HartreeFockBogoliubov.Generator.hopping_inplace
— Methodhopping_inplace
HartreeFockBogoliubov.Generator.hopping_inplace
— Methodhopping_inplace
HartreeFockBogoliubov.Generator.hopping_inplace
— Methodhopping_inplace
HartreeFockBogoliubov.Generator.hopping_inplace
— Methodhopping_inplace
Topology
HartreeFockBogoliubov.Topology.chernnumber
— Methodchernnumber
Compute chern number of the band structure defined by the hoppings and the selected bands.
HartreeFockBogoliubov.Topology.squarify
— Methodsquarify
Arguments
uc::HFB.HFBHamiltonian{O}
HartreeFockBogoliubov.Topology.squarify
— Methodsquarify
Arguments
uc::Spec.FullHamiltonian{O}
HartreeFockBogoliubov.Topology.squarify
— Methodsquarify
In 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::AbstractMatrix
n1 ::Integer
n2 ::Integer
selectpairs::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
— Methodloop
Perform selfconsistency loop a number of times with the given precondition and given update functions.
Arguments
solver ::HFBSolver{T}
sol::HFBAmplitude
run::Integer
Optional Arguments
update::Function=simpleupdate
precondition::Function=identity
: on target fieldcallback::Function=_noop
: Function called after every update as
callback(i, run)
HartreeFockBogoliubov.HFB.loop_threaded
— Methodloop
Perform selfconsistency loop a number of times with the given precondition and given update functions.
Arguments
solver ::HFBSolver{T}
sf::HFBAmplitude
run::Integer
Optional Arguments
update::Function=simpleupdate
precondition::Function=identity
callback::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_greencollector
Returns 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 Δ = Γ⋅Δ