-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-consistent mean fields #229
Comments
Small correction: since the mean field terms need both the site indices and site positions, we need something a bit more general, like
where |
Thank you for the nice write up. Some thoughts I have on the proposal:
|
This is the centerpiece of this discussion: should we create a new structure that represents a totally general self-energy or should we treat the specific case of a Hartree-Fock mean field self-energy differently? One would think it is advisable to generalize things as much as possible. However, there are a number of distinct cases that can be difficult to merge into a single representation, I think
So here we are interested in case 4. Currently we have support for case 1 via I could go on, but it seems to me that trying too hard to unify all kinds of self-energies is probably not a good strategy. For the particular case of case 4, a The design space of a more general
If we think generally, we need to consider unbounded systems. Then Hartree-Fock probably only makes sense with a range cutoff, i.e. case 4, but not 5. If we have a Coulomb interaction without any cutoff, the Fock term in a metal would yield hoppings of infinite range. I don't know how to deal with that. So I actually constrain the Hartree-Fock problem to a Hartree-Fock-with-cutoff in my head. The cutoff, moreover, determines the degree of sparsity of the mean field Hamiltonian, so it is critical to choose a balance between performance and accuracy. For simple models, such as Hubbard, the cutoff is extreme, and it needn't even appear (we just have an onsite mean field term), but more generally, it must be provided.
My vision here is to be able to mix and match as much functionality as we can. The current GreenSolvers are pretty powerful. The self-consistency step and the GreenSolver step (to compute the density matrix) are independent, so it makes sense to decouple them. Our GreenSolvers should be able to work with The only tricky thing in the proposal is how to define the parametric terms and ρ itself to make
Maybe none. In fact, GreenFunction represents the retarded and advanced Keldysh components (depending on imag(ω)), while the density matrix is the lesser/greater component. And that exhausts everything. Even in a future real-time extension of Quantica.jl, we should probably build everything on top of the full Keldysh Green function, so What I was really trying to introduce with
In equilibrium we can compute the density matrix as an ω integral of the spectral function, using the fluctuation-dissipation theorem. This is a fallback method that works for all GreenFunctions, regardless of the solver used. By integrating over the analytical continuation in the complex plane, the integral is rather efficient (we do that for the critical current already, using QuadGK). However, certain solvers could also implement other specialized methods, so that if we do
I fully agree. When designing a roadmap to mean fields in my head, the first step is to refactor the different BlockStructure objects so that we can build an Feel free to open a separate issue for that to discuss the implementation of
No, it would be a new, very simple type, that the user would not need to worry about: struct Site{T,E,L}
r::SVector{E,T} # position
i::Int # site index
n::SVector{L,Int} # cell
s::Int # sublat
end The user would only interact with |
In order of relevance:
I completelly agree with this. I think that the most important thing is to be able to use the indexing machenery of Hamiltonian with general matrices. If we have a general matrix
Such that the
Completelly agree! I think this is really important to enable extensions of Quantica by users. And once we have this the mean-field part becomes trivial.
I know that. But doing so is not very efficient. In that way what you are doing is first computing the spectral function (imag part of GF) and then integrating it over omega. The best way of computing the integral over chebyshev polynomials is via a FFT, but that is equivalent to just compute the Chebyshev series of the Fermi function using ApproxFun.jl of FastTransforms.jl (which use FFTW). So the Green's function step is unnecessary. |
Yes, let's focus first on this. I'll open a separate issue about it. EDIT: see #230
Extending
I think we both understand each other, probably. What I mean here is that in an unbounded, translationally invariant system, you have Bloch's theorem, yes. But you can still have hoppings that are infinite-range (e.g. Fock term in a metal with Coulomb potential, without a cutoff), or finite range (e.g. Fock term in an extended Hubbard model, which is a nearest neighbor mean-field hopping). In the former case,
Yes, I agree. This functionality at least should be part of base Quantica.
This is a very valid concern. How far should we extend Quantica, and when should we just write a new downstream package? I believe the current feature-set of Quantica should more or less be its full scope (modulo adding new solvers, fixing bugs, or polishing/enhancing functionality that is currently present). In other words, in principle I'm considering here just those features that can be squeezed out from the current design with only minor generalizations. Hence, I'm hesitant to introduce new structures representing general many-body self-energies, but I'm more favorable to self-energies that can fit into the current ParametricHamiltonian paradigm. The thing is that once the proposed representation of ρ is in place, iteration till self-consistency is such a minor addition that it might make sense to add it. It would probably be a very simple Things beyond this, such as a real-time Quantica integrator, is probably better as a subpackage.
Absolutely. I didn't mean to have ρ computed always as a numerical integral, only as a general fallback method that works for any GreenFunction (any solver). Of course, if your solver of choice is KPM, |
An important next step in Quantica is to start introducing the ability to model electronic interactions. In this issue we discuss possible designs to implement them at a mean-field level.
Introduction
We consider an interaction of the form$$\hat V = \sum_{ij} \hat n_i V(r_i-r_j) \hat n_j$$ for some interaction potential $$\hat n_i=\sum_{\alpha\beta}c^\dagger_{i\alpha}K_{\alpha\beta}c_{i\beta}$$ is some single-particle operator acting on site
V(r)
and wherei
(hereα
andβ
are orbital indices). Usually this is simply the electronic charge, soK=I
.Note: we actually assume a normal-ordered version of the above interaction when deriving the Hartree-Fock expressions below.
The simplest approach to describe this interaction is (self-consistent) mean field approximation, i.e. Hartree-Fock. This corresponds to introducing a single-particle self-energy$$\Sigma^{HF} = \Sigma^H + \Sigma^F$$ that is ω-independent, and where $$\Sigma^H_{ij} = K \delta_{ij}\sum_kV(r_k-r_i)\mathrm{Tr}[K\rho_{kk}] $$ $$\Sigma^F_{ij} = -V(r_i-r_j) K \rho_{ij}K $$ $$\rho_{ij} = \langle c^\dagger_jc_i\rangle$$ (note the switched site indices, and the fact that
Here the trace is taken over orbital degrees of freedom, and the density matrix is defined as
ρ_{ij}
itself is a matrix over orbital indices in sitesi
andj
).The key non-trivial aspect of the above is that the self energy which enters the Green function, and which is therefore used to compute
ρ
itself depends onρ
. This is the self-consistent aspect of the mean field. It is typically solved by iteration with an initial guess until convergence.What form should a mean field take in Quantica?
Since the Hatree-Fock
Σ
is in fact a self-energy, one's first instinct could be to introduce it in the same way in which we introduce embedding self energies from leads or other models, i.e. usingattach
on anAbstractHamiltonian
. That could actually work except for a crucial limitation of embedding self-energies: they act by definition on a finite set of sites in a given system. However, the Hatree-FockΣ
acts on any pairs of sitesij
for whichV(r_i - r_j)
is finite. If the system is itself finite, that is not a problem: just useattach
to every site, without contraints. However, if the system is unbounded we cannot do this.The underlying reason that embedding self-energies are assumed bounded is that they need to be composable with one another, which is easy to do when all of them are bounded: just use a T-matrix to dress the Green's function$$G=g+gTg$$ where $$T = (1-\Sigma g)^{-1}\Sigma$$ has support only on the finite collection of sites with a self energy
g
without self-energies,Σ
.If all self-energies are unbounded, they could also be composed: just do$$G = (ω-H-\Sigma)^{-1}$$ where
Σ
is the total lattice-periodic self energy. ThisΣ
could even beω
-dependent for some specific solvers (e.g. Schur), but with other solvers (KPM, band solvers...)Σ
needs to beω
-independent. Luckily, this is the case of Hartree-FockSo the general strategy seems clear: we should not mix the mean-field self-energy with the embedding self-energies. The former should be viewed as a special type of (ω-independent) term in the Hamiltonian, and should hence be incorporated as a parametric model that depends on a parameter
ρ
.Note: for bounded systems we do have the option, if we so wish, to add a Hartree-Fock (even a more sophisticated ω-dependent interaction self-energy) using attach on all sites. The general approach proposed below can also be specialized to do this, using in this case an
attach(parametric_model)
syntax.Mean field as a parametric model
So, imagine we define a ParametricHamiltonian
h
with a mean field like thisThen,
h
would have a parameterρ
, and we could perhaps doh0 = h(; ρ = 0)
to get the Hamiltonian without the mean field, use it to obtainρ0 = ρs(h0)
, and then doh1 = h(; ρ = ρ0)
and so on, until convergence.There is a crucial problem with the above idea:
HatreeFock(ρ,V,K)
cannot be defined as a function purely ofr
anddr
, becauseρ
is actually a matrix over sites insome_region
, not position. SoHartreeFock
should be a function of site indices, a possibility that we explicitly avoided when designingTightbindingModel
s. So now we see that we need to extend support to allow site indexing in models. This need was also anticipated when considering how to approach #4, so doing this now could ease addressing Wannier90 interfaces.The proposed syntax for indexing in models is the following
The syntax
[i; kw...] -> ...
is not valid Julia syntax, but it is parseable, so it can be transformed by the@onsite
and@hopping
macros into a new type ofAbstractParametricTerm
which we may callIndexedOnsite
andIndexedHopping
, which wrap an index function(i; kw...) -> ...
or(i,j,dn; kw...) -> ...
instead. The difference with a normalParametricOnsite
andParametricHopping
is that when callingapplyterms
on them, we will evaluate the wrapped function with indices instead of positions.One potential problem with the above is that the Hartree part of the$$\mathrm{Tr}[K\rho_{kk}]$$ is periodic over the lattice, i.e. it is the same inside each unit cell, so one can restrict the sum over $$W_{ik} = \sum_n V(r_i - r_k - R_n)$$ where
mean_field
model actually contains a sum over unit cells that should probably be precomputed for performance. This is perhaps not immediately obvious from theΣ^H
definition. One should just realize thatk
to sites within a single unit cell, as long as we replaceV(rᵢ - rₖ)
withn
is summed over all unit cells. But this is an optional optimization, that can be solved simply by adding another method likeHatreeFock(ρ,V,W,K)
, andW
could be computed with some functionsum_cells(V, some_lattice)
that returns perhaps a Matrix over the unit cell ofsome_lattice
.Another issue is what kind of object is
ρ
, obtained with the functiondensity
(which doesn't exist in Quantica yet). It cannot simply be a matrix over aLatticeSlice
(which is what we currently get when we slice aGreenSolution
over some sites for example), because it needs to know what is the actualLatticeSlice
to be able to return the correct value (or throw aBoundsError
) when indexed withρ[i]
orρ[i,j,dn]
, sincei, j
are actual site indices in the unit cell (perhaps included in the LatticeSlice or perhaps not). So we need to define a new type of object, that wraps a matrix and a LatticeSlice, and probably some extra BlockStructure object to allow indexing multiorbital densities.In fact, we should probably wrap also the output of slicing a
GreenSolution
in that new type, so that we can make better use of the result (which we currently cannot). Let's call this new typeObservable
. It would represents in general things of the form<P_s A P_s>
, whereP_s
is a projector over some finite set of sites, andA
is anyOperator
(bounded or unbounded, see #227). In particular we would haveρ::Observable
andgs(ω)::Observable
(the latter would be a breaking change, by the way). And thatObservable
type should implement indexing over sites and unit cells, returning views of the wrapped matrix, or throw aBoundsError
(it should therefore also implementhaskey
or similar).The details of the
Observable
implementation I leave for another post.CC: @BacAmorim
The text was updated successfully, but these errors were encountered: