Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Non-spatial models allow us to build and solve mean-field Hartree-Fock problems when interactions are purely on-site. Otherwise, the Hartree potential on a site i depends on the density matrix on other sites, which cannot be expressed cleanly using the non-spatial model approach.
With the possibility of computing only a density matrix on a sparse or diagonal collection of site pairs (#315), it now becomes possible to tackle the above problem efficiently
Here we introduce a new
meanfield(g::GreenFunction,...)
constructor of aM::MeanField
object. This object can build a Hartree-Fock mean field stored in aΦ::OrbitalSliceMatrix
withΦ = M(µ, kBT; params...)
. Then, a non-spatial model such as@onsite((i; phi = missing) --> phi[i]) + @hopping((i, j; phi = missing) --> phi[i, j])
can be used to inject the mean field into a Hamiltonian. See updated documentation for a tutorial.