API

Correlation Measurements

JDQMCMeasurements.greens!Function
measure_greens!(G::AbstractArray{C}, a::Int, b::Int, 
                unit_cell::UnitCell, lattice::Lattice,
                Gτ0::AbstractArray{T,3}) where {C<:Complex, T<:Number}

Measure the unequal time Green's function averaged over translation symmetry

\[G_{\sigma,\mathbf{r}}^{a,b}(\tau)=\frac{1}{N}\sum_{\mathbf{i}}G_{\sigma,\mathbf{i}+\mathbf{r},\mathbf{i}}^{a,b}(\tau,0) =\frac{1}{N}\sum_{\mathbf{i}}\langle\hat{\mathcal{T}}\hat{a}_{\sigma,\mathbf{i}+\mathbf{r}}^{\phantom{\dagger}}(\tau)\hat{b}_{\sigma,\mathbf{i}}^{\dagger}(0)\rangle,\]

with the result being added to G.

greens!(G::AbstractArray{C}, a::Int, b::Int, 
        unit_cell::UnitCell, lattice::Lattice,
        G00::AbstractMatrix{T}) where {C<:Complex, T<:Number}

Measure the equal time Green's function averaged over translation symmetry

\[G_{\sigma,\mathbf{r}}^{a,b}=\frac{1}{N}\sum_{\mathbf{i}}G_{\sigma,\mathbf{i}+\mathbf{r},\mathbf{i}}^{a,b}(0,0) =\frac{1}{N}\sum_{\mathbf{i}}\langle\hat{a}_{\sigma,\mathbf{i}+\mathbf{r}}^{\phantom{\dagger}}\hat{b}_{\sigma,\mathbf{i}}^{\dagger}\rangle,\]

with the result being added to G.

JDQMCMeasurements.density_correlation!Function
density_correlation!(DD::AbstractArray{C}, a::Int, b::Int,
                     unit_cell::UnitCell, lattice::Lattice,
                     Gτ0up::AbstractArray{T,3}, Gτ0dn::AbstractArray{T,3},
                     Gττup::AbstractArray{T,3}, Gττdn::AbstractArray{T,3}) where {C<:Complex, T<:Number}

Calculate the unequal time density-density (charge) correlation function

\[\mathcal{D}_{\mathbf{r}}^{a,b}(\tau) = \frac{1}{N}\sum_{\mathbf{i}}\mathcal{D}_{\mathbf{i}+\mathbf{r},\mathbf{i}}^{a,b}(\tau,0) = \frac{1}{N}\sum_{\mathbf{i}}\langle\hat{n}_{a,\mathbf{i}+\mathbf{r}}(\tau)\hat{n}_{b,\mathbf{i}}(0)\rangle,\]

where $\hat{n}_{b,\mathbf{i}} = (\hat{n}_{\uparrow, b, \mathbf{i}} + \hat{n}_{\downarrow, b, \mathbf{i}})$ and $\hat{n}_{\sigma, b,\mathbf{i}} = \hat{b}^\dagger_{\sigma, \mathbf{i}} \hat{b}_{\sigma, \mathbf{i}}$ is the number operator for an electron with spin $\sigma$ on orbital $b$ in unit cell $\mathbf{i}$, with the result being added to the array DD.

The arrays Gτ0up and Gτ0dn represent the unequal time Green's functions $G_{\uparrow}(\tau,0)$ and $G_{\downarrow}(\tau,0)$ respectively. The arrays Gττup and Gττdn represent the equal time Green's functions $G_{\uparrow}(\tau,\tau)$ and $G_{\downarrow}(\tau,\tau)$ for all imaginary time slices $\tau = \Delta\tau\cdot l$ respectively.

density_correlation!(DD::AbstractArray{C}, a::Int, b::Int,
                     unit_cell::UnitCell, lattice::Lattice,
                     Gup::AbstractMatrix{T}, Gdn::AbstractMatrix{T}) where {C<:Complex, T<:Number}

Calculate the equaltime density-density (charge) correlation funciton

\[\mathcal{D}_{\mathbf{r}}^{a,b} = \frac{1}{N}\sum_{\mathbf{i}}\mathcal{D}_{\mathbf{i}+\mathbf{r},\mathbf{i}}^{a,b} = \frac{1}{N}\sum_{\mathbf{i}}\langle\hat{n}_{a,\mathbf{i}+\mathbf{r}}\hat{n}_{b,\mathbf{i}}\rangle,\]

with the result being added to the array DD.

The array Gup and Gdn are the eqaultime Green's functions $G_{\uparrow}(0,0)$ and $G_{\downarrow}(0,0)$ respectively.

JDQMCMeasurements.spin_x_correlation!Function
spin_x_correlation!(SxSx::AbstractArray{C}, a::Int, b::Int,
                    unit_cell::UnitCell, lattice::Lattice,
                    Gτ0up::AbstractArray{T,3}, Gτ0dn::AbstractArray{T,3},
                    Gττup::AbstractArray{T,3}, Gττdn::AbstractArray{T,3}) where {C<:Complex, T<:Number}

Calculate the unequal-time spin-spin correlation function in the $\hat{x}$ direction, given by

\[\mathcal{S}_{x,\mathbf{r}}^{a,b}(\tau)=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{S}_{x,\mathbf{i}+\mathbf{r},\mathbf{i}}^{ab}(\tau,0) =\frac{1}{N}\sum_{\mathbf{i}}\big\langle\hat{S}_{x,a,\mathbf{i}+\mathbf{r}}(\tau)\hat{S}_{x,b,\mathbf{i}}(0)\big\rangle,\]

where the spin-$\hat{x}$ operator is given by

\[\begin{align*} \hat{S}_{x,\mathbf{i},a}= & (\hat{a}_{\uparrow,\mathbf{i}}^{\dagger},\hat{a}_{\downarrow,\mathbf{i}}^{\dagger})\left[\begin{array}{cc} 0 & 1\\ 1 & 0 \end{array}\right]\left(\begin{array}{c} \hat{a}_{\uparrow,\mathbf{i}}\\ \hat{a}_{\downarrow,\mathbf{i}} \end{array}\right)\\ = & \hat{a}_{\uparrow,\mathbf{i}}^{\dagger}\hat{a}_{\downarrow,\mathbf{i}}+\hat{a}_{\downarrow,\mathbf{i}}^{\dagger}\hat{a}_{\uparrow,\mathbf{i}}. \end{align*}\]

spin_x_correlation!(SxSx::AbstractArray{C}, a::Int, b::Int,
                    unit_cell::UnitCell, lattice::Lattice,
                    Gup::AbstractMatrix{T}, Gdn::AbstractMatrix{T}) where {C<:Complex, T<:Number}

Calculate the equal-time spin-spin correlation function in the $\hat{x}$ direction, given by

\[\mathcal{S}_{x,\mathbf{r}}^{a,b}=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{S}_{x,\mathbf{i}+\mathbf{r},\mathbf{i}}^{ab} =\frac{1}{N}\sum_{\mathbf{i}}\big\langle\hat{S}_{x,a,\mathbf{i}+\mathbf{r}}\hat{S}_{x,b,\mathbf{i}}\big\rangle.\]

JDQMCMeasurements.spin_y_correlation!Function
spin_y_correlation!(SySy::AbstractArray{C}, a::Int, b::Int,
                    unit_cell::UnitCell, lattice::Lattice,
                    Gτ0up::AbstractArray{T,3}, Gτ0dn::AbstractArray{T,3},
                    Gττup::AbstractArray{T,3}, Gττdn::AbstractArray{T,3}) where {C<:Complex, T<:Number}

Calculate the unequal-time spin-spin correlation function in the $\hat{y}$ direction, given by

\[\mathcal{S}_{y,\mathbf{r}}^{a,b}(\tau)=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{S}_{y,\mathbf{i}+\mathbf{r},\mathbf{i}}^{ab}(\tau,0) =\frac{1}{N}\sum_{\mathbf{i}}\big\langle\hat{S}_{y,a,\mathbf{i}+\mathbf{r}}(\tau)\hat{S}_{y,b,\mathbf{i}}(0)\big\rangle,\]

where the spin-$\hat{y}$ operator is given by

\[\begin{align*} \hat{S}_{y,\mathbf{i},a}= & (\hat{a}_{\uparrow,\mathbf{i}}^{\dagger},\hat{a}_{\downarrow,\mathbf{i}}^{\dagger})\left[\begin{array}{cc} 0 & -i\\ i & 0 \end{array}\right]\left(\begin{array}{c} \hat{a}_{\uparrow,\mathbf{i}}\\ \hat{a}_{\downarrow,\mathbf{i}} \end{array}\right)\\ = & -i(\hat{a}_{\uparrow,\mathbf{i}}^{\dagger}\hat{a}_{\downarrow,\mathbf{i}}-\hat{a}_{\downarrow,\mathbf{i}}^{\dagger}\hat{a}_{\uparrow,\mathbf{i}}). \end{align*}\]

spin_y_correlation!(SySy::AbstractArray{C}, a::Int, b::Int,
                    unit_cell::UnitCell, lattice::Lattice,
                    Gup::AbstractMatrix{T}, Gdn::AbstractMatrix{T}) where {C<:Complex, T<:Number}

Calculate the equal-time spin-spin correlation function in the $\hat{y}$ direction, given by

\[\mathcal{S}_{y,\mathbf{r}}^{a,b}=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{S}_{y,\mathbf{i}+\mathbf{r},\mathbf{i}}^{ab} =\frac{1}{N}\sum_{\mathbf{i}}\big\langle\hat{S}_{y,a,\mathbf{i}+\mathbf{r}}\hat{S}_{y,b,\mathbf{i}}\big\rangle.\]

JDQMCMeasurements.spin_z_correlation!Function
spin_z_correlation!(SzSz::AbstractArray{C}, a::Int, b::Int,
                    unit_cell::UnitCell, lattice::Lattice,
                    Gτ0up::AbstractArray{T,3}, Gτ0dn::AbstractArray{T,3},
                    Gττup::AbstractArray{T,3}, Gττdn::AbstractArray{T,3}) where {C<:Complex, T<:Number}

Calculate the unequal-time spin-spin correlation function in the $\hat{z}$ direction, given by

\[\mathcal{S}_{z,\mathbf{r}}^{a,b}(\tau)=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{S}_{z,\mathbf{i}+\mathbf{r},\mathbf{i}}^{ab}(\tau,0) =\frac{1}{N}\sum_{\mathbf{i}}\big\langle\hat{S}_{z,a,\mathbf{i}+\mathbf{r}}(\tau)\hat{S}_{z,b,\mathbf{i}}(0)\big\rangle,\]

where the spin-$\hat{z}$ operator is given by

\[\begin{align*} \hat{S}_{z,a,\mathbf{i}}= & (\hat{a}_{\uparrow,\mathbf{i}}^{\dagger},\hat{a}_{\downarrow,\mathbf{i}}^{\dagger})\left[\begin{array}{cc} 1 & 0\\ 0 & -1 \end{array}\right]\left(\begin{array}{c} \hat{a}_{\uparrow,\mathbf{i}}\\ \hat{a}_{\downarrow,\mathbf{i}} \end{array}\right)\\ = & \hat{n}_{\uparrow,a,\mathbf{i}}-\hat{n}_{\downarrow,a,\mathbf{i}}. \end{align*}\]

spin_z_correlation!(SzSz::AbstractArray{C}, a::Int, b::Int,
                    unit_cell::UnitCell, lattice::Lattice,
                    Gup::AbstractMatrix{T}, Gdn::AbstractMatrix{T}) where {C<:Complex, T<:Number}

Calculate the equal-time spin-spin correlation function in the $\hat{z}$ direction, given by

\[\mathcal{S}_{z,\mathbf{r}}^{a,b}=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{S}_{z,\mathbf{i}+\mathbf{r},\mathbf{i}}^{ab} =\frac{1}{N}\sum_{\mathbf{i}}\big\langle\hat{S}_{z,a,\mathbf{i}+\mathbf{r}}\hat{S}_{z,b,\mathbf{i}}\big\rangle.\]

JDQMCMeasurements.pair_correlation!Function
pair_correlation!(ΔΔᵀ::AbstractArray{C}, b″::Bond, b′::Bond,
                  unit_cell::UnitCell, lattice::Lattice,
                  Gτ0up::AbstractArray{T,3}, Gτ0dn::AbstractArray{T,3}) where {C<:Complex, T<:Number}

Calculate the unequal-time pair correlation function

\[\mathcal{P}_{\mathbf{r}}^{(a,b,r''),(c,d,r')}(\tau)=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{P}_{\mathbf{i}+\mathbf{r},\mathbf{i}}^{(a,b,r''),(c,d,r')}(\tau,0) =\frac{1}{N}\sum_{\mathbf{i}}\langle\hat{\Delta}_{\mathbf{i}+\mathbf{r},a,b,\mathbf{r}''}(\tau)\hat{\Delta}_{\mathbf{i},c,d,\mathbf{r}'}^{\dagger}(0)\rangle,\]

where the bond b″ defines the pair creation operator

\[\hat{\Delta}_{\mathbf{i},a,b,\mathbf{r}''}^{\dagger}=\hat{a}_{\uparrow,\mathbf{i}+\mathbf{r}''}^{\dagger}\hat{b}_{\downarrow,\mathbf{i}}^{\dagger},\]

and the bond b′ defines the pair creation operator

\[\hat{\Delta}_{\mathbf{i},c,d,\mathbf{r}'}^{\dagger}=\hat{c}_{\uparrow,\mathbf{i}+\mathbf{r}'}^{\dagger}\hat{d}_{\downarrow,\mathbf{i}}^{\dagger}.\]

pair_correlation!(ΔΔᵀ::AbstractArray{C}, b″::Bond, b′::Bond,
                  unit_cell::UnitCell, lattice::Lattice,
                  Gup::AbstractMatrix{T}, Gdn::AbstractMatrix{T}) where {C<:Complex, T<:Number}

Calculate the equal-time pair correlation function

\[\mathcal{P}_{\mathbf{r}}^{(a,b,r''),(c,d,r')}=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{P}_{\mathbf{i}+\mathbf{r},\mathbf{i}}^{(a,b,r''),(c,d,r')} =\frac{1}{N}\sum_{\mathbf{i}}\langle\hat{\Delta}_{\mathbf{i}+\mathbf{r},a,b,\mathbf{r}''}\hat{\Delta}_{\mathbf{i},c,d,\mathbf{r}'}^{\dagger}\rangle,\]

where the bond b″ defines the pair creation operator

\[\hat{\Delta}_{\mathbf{i},a,b,\mathbf{r}''}^{\dagger}=\hat{a}_{\uparrow,\mathbf{i}+\mathbf{r}''}^{\dagger}\hat{b}_{\downarrow,\mathbf{i}}^{\dagger},\]

and the bond b′ defines the pair creation operator

\[\hat{\Delta}_{\mathbf{i},c,d,\mathbf{r}'}^{\dagger}=\hat{c}_{\uparrow,\mathbf{i}+\mathbf{r}'}^{\dagger}\hat{d}_{\downarrow,\mathbf{i}}^{\dagger}.\]

JDQMCMeasurements.bond_correlation!Function
bond_correlation!(BB::AbstractArray{C}, b″::Bond, b′::Bond,
                  unit_cell::UnitCell, lattice::Lattice,
                  Gτ0up::AbstractArray{T,3}, Gτ0dn::AbstractArray{T,3},
                  Gττup::AbstractArray{T,3}, Gττdn::AbstractArray{T,3}) where {C<:Complex, T<:Number}

Calculate the uneqaul-time bond correlation function

\[\mathcal{B}_{\mathbf{r}}^{(a,b,\mathbf{r}''),(c,d,\mathbf{r'})}(\tau)=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{B}_{\mathbf{i}+\mathbf{r},\mathbf{i}}^{(a,b,\mathbf{r}''),(c,d,\mathbf{r'})}(\tau,0) =\frac{1}{N}\sum_{\mathbf{i},\sigma,\sigma'}\langle\hat{B}_{\sigma,\mathbf{i}+\mathbf{r},\mathbf{r}''}^{a,b}(\tau)\hat{B}_{\sigma',\mathbf{i},\mathbf{r'}}^{c,d}(0)\rangle,\]

where bond b″ defines the bond operators

\[\hat{B}_{\sigma,\mathbf{i}+\mathbf{r},\mathbf{r}''}^{a,b}=\hat{a}_{\sigma,\mathbf{i}+\mathbf{r}+\mathbf{r}''}^{\dagger}\hat{b}_{\sigma,\mathbf{i}+\mathbf{r}}^{\phantom{\dagger}}\]

and bond b′ defines the operators

\[\hat{B}_{\sigma',\mathbf{i},\mathbf{r}'}^{c,d}=\hat{c}_{\sigma',\mathbf{i}+\mathbf{r}'}^{\dagger}\hat{d}_{\sigma',\mathbf{i}}^{\phantom{\dagger}}.\]

bond_correlation!(BB::AbstractArray{C}, b″::Bond, b′::Bond,
                  unit_cell::UnitCell, lattice::Lattice,
                  Gup::AbstractMatrix{T}, Gdn::AbstractMatrix{T}) where {C<:Complex, T<:Number}

Calculate the eqaul-time bond correlation function

\[\mathcal{B}_{\mathbf{r}}^{(a,b,\mathbf{r}''),(c,d,\mathbf{r'})}=\frac{1}{N}\sum_{\mathbf{i}}\mathcal{B}_{\mathbf{i}+\mathbf{r},\mathbf{i}}^{(a,b,\mathbf{r}''),(c,d,\mathbf{r'})} =\frac{1}{N}\sum_{\mathbf{i},\sigma,\sigma'}\langle\hat{B}_{\sigma,\mathbf{i}+\mathbf{r},\mathbf{r}''}^{a,b}\hat{B}_{\sigma',\mathbf{i},\mathbf{r'}}^{c,d}\rangle,\]

where bond b″ defines the bond operators

\[\hat{B}_{\sigma,\mathbf{i}+\mathbf{r},\mathbf{r}''}^{a,b}=\hat{a}_{\sigma,\mathbf{i}+\mathbf{r}+\mathbf{r}''}^{\dagger}\hat{b}_{\sigma,\mathbf{i}+\mathbf{r}}^{\phantom{\dagger}}\]

and bond b′ defines the operators

\[\hat{B}_{\sigma',\mathbf{i},\mathbf{r}'}^{c,d}=\hat{c}_{\sigma',\mathbf{i}+\mathbf{r}'}^{\dagger}\hat{d}_{\sigma',\mathbf{i}}^{\phantom{\dagger}}.\]

Scalar Measurements

JDQMCMeasurements.measure_nFunction
measure_n(G::AbstractMatrix{T}) where {T}

Measure the average density $\langle \hat{n}_\sigma \rangle$ given the equal-time Green's function matrix $G_\sigma(\tau,\tau).$

measure_n(G::AbstractMatrix{T}, a::Int, unit_cell::UnitCell) where {T}

Measure the average density $\langle \hat{n}_{\sigma,a} \rangle$ for orbital species $a,$ given the equal-time Green's function matrix $G_\sigma(\tau,\tau).$

JDQMCMeasurements.measure_double_occFunction
measure_double_occ(Gup::AbstractMatrix{T}, Gdn::AbstractMatrix{T}) where {T}

Measure the double-occupancy $\langle \hat{n}_\uparrow \hat{n}_\downarrow \rangle$ given both the spin-up and spin-down equal-time Green's function matrices $G_\uparrow(\tau,\tau)$ and $G_\downarrow(\tau,\tau)$ respectively.

measure_double_occ(Gup::AbstractMatrix{T}, Gdn::AbstractMatrix{T}, a::Int, unit_cell::UnitCell) where {T}

Measure the double-occupancy $\langle \hat{n}_{\uparrow,a} \hat{n}_{\downarrow,a} \rangle$ for orbital species $a,$ given both the spin-up and spin-down equal-time Green's function matrices $G_\uparrow(\tau,\tau)$ and $G_\downarrow(\tau,\tau)$ respectively.

JDQMCMeasurements.measure_NFunction
measure_N(G::AbstractMatrix{T}) where {T}

Measure the total particle number $\langle \hat{N}_\sigma \rangle$ given an equal-time Green's function matrix $G_\sigma(\tau,\tau).$

measure_N(G::AbstractMatrix{T}, a::Int, unit_cell::UnitCell) where {T}

Measure the total particle number $\langle \hat{N}_{\sigma,a} \rangle$ in orbital species $a,$ given an equal-time Green's function matrix $G_\sigma(\tau,\tau).$

JDQMCMeasurements.measure_N²Function
measure_N²(Gup::AbstractMatrix{T}, Gdn::AbstractMatrix{T}) where {T}

Measure the expectation value of the total particle number squared $\langle \hat{N}^2 \rangle$ given both the spin-up and spin-down equal-time Green's function matrices $G_\uparrow(\tau,\tau)$ and $G_\downarrow(\tau,\tau)$ respectively.

Utility Functions

JDQMCMeasurements.fourier_transform!Function
fourier_transform!(C::AbstractArray{Complex{T}}, a::Int, b::Int, dim::Int,
                  unit_cell::UnitCell{T}, lattice::Lattice) where {T<:AbstractFloat}

fourier_transform!(C::AbstractArray{Complex{T}}, a::Int, b::Int,
                   unit_cell::UnitCell{T}, lattice::Lattice) where {T<:AbstractFloat}

Calculate the fourier transform from position to momentum space

\[\begin{align*} C_{\mathbf{k}}^{a,b}= & \sum_{\mathbf{r}}e^{{\rm -i}\mathbf{k}\cdot(\mathbf{r}+\mathbf{r}_{a}-\mathbf{r}_{b})}C_{\mathbf{r}}^{a,b} \end{align*}\]

where $a$ and $b$ specify orbital species in the unit cell. Note that the array C is modified in-place. If dim is passed, iterate over this dimension of the array, performing a fourier transform on each slice.

JDQMCMeasurements.susceptibility!Function
susceptibility!(χ::AbstractArray{T}, S::AbstractArray{T}, Δτ::E, dim::Int) where {T<:Number, E<:AbstractFloat}

Calculate the susceptibilities

\[\chi_\mathbf{n} = \int_0^\beta S_\mathbf{n}(\tau) d\tau,\]

where the $\chi_\mathbf{n}$ susceptibilities are written to χ, and S contains the $S_\mathbf{n}(\tau)$ correlations that need to be integrated over. The parameter Δτ is the discretization in imaginary time $\tau,$ and is the step size used in Simpson's method to numerically evaluate the integral over imaginary time. The argument dim specifies which dimension of S corresponds to imaginary time, and needs to be integrated over. Accordingly,

ndim(χ)+1 == ndim(S)

and

size(χ) == size(selectdim(S, dim, 1))

must both be true.

JDQMCMeasurements.susceptibilityFunction
susceptibility(S::AbstractVector{T}, Δτ::E) where {T<:Number, E<:AbstractFloat}

Calculate the suceptibility

\[\chi = \int_0^\beta S(\tau) d\tau,\]

where the correlation data is stored in S. The integration is performed using Simpson's method using a step size of Δτ.

Developer API

JDQMCMeasurements.contract_Gr0!Function
contract_Gr0!(S::AbstractArray{C}, G::AbstractMatrix{T}, r′::Bond, α::Int,
              unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma,\mathbf{i}+\mathbf{r}+\mathbf{r}_{1},\mathbf{i}}^{a,b}(\tau,0)\]

for all $\mathbf{r},$ where the bond r′ represents the static displacement $\mathbf{r}_1+(\mathbf{r}_a-\mathbf{r}_b).$

JDQMCMeasurements.contract_G00!Function
contract_G00!(S::AbstractArray{C}, G::AbstractMatrix{T}, a::Int, b::Int, α::Int,
              unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[\begin{align*} S_{\mathbf{r}} := S_{\mathbf{r}} + \frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma,\mathbf{i},\mathbf{i}}^{a,b}(\tau,0) \end{align*}\]

for all $\mathbf{r}.$

JDQMCMeasurements.contract_δGr0!Function
contract_δGr0!(S::AbstractArray{C}, G::AbstractMatrix{T}, δ::Bond, α::Int,
               unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}\delta_{a,b}\delta_{\mathbf{r},\mathbf{r}_{2}}G_{\sigma,\mathbf{i}+\mathbf{r}+\mathbf{r}_{1},\mathbf{i}}^{c,d}(\tau,0)\]

for all $\mathbf{r},$ where the bond δ represents the static displacement $\mathbf{r}_2+(\mathbf{r}_a-\mathbf{r}_b),$ and the bond r′ represents the static displacement $\mathbf{r}_1+(\mathbf{r}_c-\mathbf{r}_d).$

JDQMCMeasurements.contract_Grr_G00!Function
contract_Grr_G00!(S::AbstractArray{C}, G₂::AbstractMatrix{T}, G₁::AbstractMatrix{T}, b₂::Bond, b₁::Bond,
                  α::Int, unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma_{2},\mathbf{i}+\mathbf{r}+\mathbf{r}_{2},\mathbf{i}+\mathbf{r}}^{a,b}(\tau_{2},0)\cdot G_{\sigma_{1},\mathbf{i}+\mathbf{r}_{1},\mathbf{i}}^{c,d}(\tau_{1},0)\]

for all $\mathbf{r},$ where the bond b₂ represents the static displacement $\mathbf{r}_2 + (\mathbf{r}_a - \mathbf{r}_b),$ and the bond b₁ represents the static displacement $\mathbf{r}_1 + (\mathbf{r}_c - \mathbf{r}_d).$

contract_Grr_G00!(S::AbstractArray{C}, G₂::AbstractMatrix{T}, G₁::AbstractMatrix{T},
                  a::Int, b::Int, c::Int, d::Int,
                  r₄::AbstractVector{Int}, r₃::AbstractVector{Int}, r₂::AbstractVector{Int}, r₁::AbstractVector{Int},
                  α::Int, unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma_{2},\mathbf{i}+\mathbf{r}+\mathbf{r}_{4},\mathbf{i}+\mathbf{r}+\mathbf{r}_{3}}^{a,b}(\tau_{2},0)\cdot G_{\sigma_{1},\mathbf{i}+\mathbf{r}_{2},\mathbf{i}+\mathbf{r}_{1}}^{c,d}(\tau_{1},0)\]

for all $\mathbf{r}.$

JDQMCMeasurements.contract_G00_Grr!Function
contract_G00_Grr!(S::AbstractArray{C}, G₂::AbstractMatrix{T}, G₁::AbstractMatrix{T},
                  a::Int, b::Int, c::Int, d::Int,
                  r₄::AbstractVector{Int}, r₃::AbstractVector{Int}, r₂::AbstractVector{Int}, r₁::AbstractVector{Int},
                  α::Int, unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma_{2},\mathbf{i}+\mathbf{r}_{4},\mathbf{i}+\mathbf{r}_{3}}^{a,b}(\tau_{2},0)\cdot G_{\sigma_{1},\mathbf{i}+\mathbf{r}+\mathbf{r}_{2},\mathbf{i}+\mathbf{r}+\mathbf{r}_{1}}^{c,d}(\tau_{1},0)\]

for all $\mathbf{r}.$

JDQMCMeasurements.contract_Gr0_Gr0!Function
contract_Gr0_Gr0!(S::AbstractArray{C}, G₂::AbstractMatrix{T}, G₁::AbstractMatrix{T}, b₂::Bond, b₁::Bond,
                  α::Int, unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma_{2},\mathbf{i}+\mathbf{r}+\mathbf{r}_{2},\mathbf{i}+\mathbf{r}_{1}}^{a,c}(\tau_{2},0)\cdot G_{\sigma_{1},\mathbf{i}+\mathbf{r},\mathbf{i}}^{b,d}(\tau_{1},0)\]

for all $\mathbf{r},$ where the bond b₂ represents the static displacement $\mathbf{r}_2 + (\mathbf{r}_a - \mathbf{r}_b),$ and the bond b₁ represents the static displacement $\mathbf{r}_1 + (\mathbf{r}_c - \mathbf{r}_d).$

contract_Gr0_Gr0!(S::AbstractArray{C}, G₂::AbstractMatrix{T}, G₁::AbstractMatrix{T},
                  a::Int, b::Int, c::Int, d::Int,
                  r₄::AbstractVector{Int}, r₃::AbstractVector{Int}, r₂::AbstractVector{Int}, r₁::AbstractVector{Int},
                  α::Int, unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma_{2},\mathbf{i}+\mathbf{r}+\mathbf{r}_{4},\mathbf{i}+\mathbf{r}_{3}}^{a,b}(\tau_{2},0)\cdot G_{\sigma_{1},\mathbf{i}+\mathbf{r}+\mathbf{r}_{2},\mathbf{i}+\mathbf{r}_{1}}^{c,d}(\tau_{1},0)\]

for all $\mathbf{r}.$

JDQMCMeasurements.contract_G0r_G0r!Function
contract_G0r_G0r!(S::AbstractArray{C}, G₂::AbstractMatrix{T}, G₁::AbstractMatrix{T},
                  a::Int, b::Int, c::Int, d::Int,
                  r₄::AbstractVector{Int}, r₃::AbstractVector{Int}, r₂::AbstractVector{Int}, r₁::AbstractVector{Int},
                  α::Int, unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma_{2},\mathbf{i}+\mathbf{r}_{4},\mathbf{i}+\mathbf{r}+\mathbf{r}_{3}}^{a,b}(\tau_{2},0)\cdot G_{\sigma_{1},\mathbf{i}+\mathbf{r}_{2},\mathbf{i}+\mathbf{r}+\mathbf{r}_{1}}^{c,d}(\tau_{1},0)\]

for all $\mathbf{r}.$

JDQMCMeasurements.contract_G0r_Gr0!Function
contract_G0r_Gr0!(S::AbstractArray{C}, G₂::AbstractMatrix{T}, G₁::AbstractMatrix{T}, b₂::Bond, b₁::Bond,
                  α::Int, unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma_{2},\mathbf{i}+\mathbf{r}_{2},\mathbf{i}+\mathbf{r}}^{a,b}(\tau_{2},0)\cdot G_{\sigma_{1},\mathbf{i}+\mathbf{r}+\mathbf{r}_{1},\mathbf{i}}^{c,d}(\tau_{1},0)\]

for all $\mathbf{r},$ where the bond b₂ represents the static displacement $\mathbf{r}_2 + (\mathbf{r}_a - \mathbf{r}_b),$ and the bond b₁ represents the static displacement $\mathbf{r}_1 + (\mathbf{r}_c - \mathbf{r}_d).$

contract_G0r_Gr0!(S::AbstractArray{C}, G₂::AbstractMatrix{T}, G₁::AbstractMatrix{T},
                  a::Int, b::Int, c::Int, d::Int,
                  r₄::AbstractVector{Int}, r₃::AbstractVector{Int}, r₂::AbstractVector{Int}, r₁::AbstractVector{Int},
                  α::Int, unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma_{2},\mathbf{i}+\mathbf{r}_{4},\mathbf{i}+\mathbf{r}+\mathbf{r}_{3}}^{a,b}(\tau_{2},0)\cdot G_{\sigma_{1},\mathbf{i}+\mathbf{r}+\mathbf{r}_{2},\mathbf{i}+\mathbf{r}_{1}}^{c,d}(\tau_{1},0)\]

for all $\mathbf{r}.$

JDQMCMeasurements.contract_Gr0_G0r!Function
contract_Gr0_G0r!(S::AbstractArray{C}, G₂::AbstractMatrix{T}, G₁::AbstractMatrix{T},
                  a::Int, b::Int, c::Int, d::Int,
                  r₄::AbstractVector{Int}, r₃::AbstractVector{Int}, r₂::AbstractVector{Int}, r₁::AbstractVector{Int},
                  α::Int, unit_cell::UnitCell{E}, lattice::Lattice) where {C<:Complex, T<:Number, E<:AbstractFloat}

Evaluate the sum

\[S_{\mathbf{r}}:=S_{\mathbf{r}}+\frac{\alpha}{N}\sum_{\mathbf{i}}G_{\sigma_{2},\mathbf{i}+\mathbf{r}+\mathbf{r}_{4},\mathbf{i}+\mathbf{r}_{3}}^{a,b}(\tau_{2},0)\cdot G_{\sigma_{1},\mathbf{i}+\mathbf{r}_{2},\mathbf{i}+\mathbf{r}+\mathbf{r}_{1}}^{c,d}(\tau_{1},0)\]

for all $\mathbf{r}.$

JDQMCMeasurements.simpsonFunction
simpson(f::AbstractVector{T}, dx::E) where {T<:Number, E<:AbstractFloat}

Applying Simpson's rule, integrate over the vector f using a stepsize dx.