Internals

Lattice

HartreeFockBogoliubov.Lattice.UnitCellType
UnitCell{O}

Parameters

  • O: type of "orbital". Any type can be used, but we recommend using String or tuple of String and Int for compatibility with JSON.

Members

  • latticevectors ::Array{Float64, 2}: Lattice vectors
  • reducedreciprocallatticevectors ::Array{Float64, 2}: Reduced reciprocal lattice vectors (transpose of inverse of latticevectors)
  • reciprocallatticevectors ::Array{Float64, 2}: Reciprocal lattice vectors. 2π * reducedreciprocallatticevectors
  • orbitals ::Vector{Tuple{T, FractCoord}}: List of orbitals within unit cell
  • orbitalindices ::Dict{T, Int}: Indices of orbitals
source
Base.isapproxMethod
isapprox(x, y; rtol::Real=atol>0 ? 0 : √eps, atol::Real=0, nans::Bool=false, norm::Function)
source
HartreeFockBogoliubov.Lattice.carte2fractMethod
carte2fract

Arguments

  • latticevectors ::AbstractArray{<:AbstractFloat, 2}: square matrix whose columns are lattice vectors.
  • cc ::CarteCoord: cartesian coordinates
  • tol ::Real=sqrt(eps(Float64)): tolerance
source
HartreeFockBogoliubov.Lattice.make_unitcellMethod
UnitCell

Construct an n-dimensional lattice.

Arguments

  • latticevectors ::AbstractArray{<:AbstractFloat, 2}: Lattice vectors
  • OrbitalType::DataType

Optional Arguments

  • tol=sqrt(eps(Float64)): Epsilon
source

Spec

HartreeFockBogoliubov.Spec.HoppingOffdiagonalType
HoppingOffdiagonal{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}
source
HartreeFockBogoliubov.Spec.InteractionOffdiagonalType
InteractionOffdiagonal{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}
source
HartreeFockBogoliubov.Spec.hoppingbycarteMethod
hoppingbycarte{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 to sqrt(eps(Float64))
source
HartreeFockBogoliubov.Spec.hoppingbycarteMethod
hoppingbycarte{T}

Make a hopping element with cartesian coordinates.

Arguments

  • uc ::UnitCell{T}
  • amplitude ::Real
  • i ::T
  • ri ::CarteCoord
  • tol ::Real : Optional. Defaults to sqrt(eps(Float64))
source
HartreeFockBogoliubov.Spec.interactionbycarteMethod
interactionbycarte{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))`
source
HartreeFockBogoliubov.Spec.interactionbycarteMethod
interactionbycarte{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))`
source

Generator

Topology

HartreeFockBogoliubov.Topology.squarifyMethod
squarify

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}
source
HartreeFockBogoliubov.Topology.z2indexMethod

z2index

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)

source

HFB

HartreeFockBogoliubov.HFB.DeployRowType

DeployRow is holds info on how to compute Γ or Δ. Its elements are:

  1. Is diagonal
  2. row orbital
  3. col orbital
  4. displacement r(col) - r(row)
  5. list of sources, each of which is a tuple of
  6. index of ρ or t from which to compute this Γ or Δ.
  7. amplitude (coefficient to multiply to ρ or t)
  8. boolean indicating whether (1) conjugation is needed (for ρ/Γ) or (2) minus sign is needed (for t/Δ).
source
HartreeFockBogoliubov.HFB.loopMethod
loop

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 field
  • callback::Function=_noop: Function called after every update as

callback(i, run)

source
HartreeFockBogoliubov.HFB.loop_threadedMethod
loop

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)

source

LinearizedGap