quantumlib / OpenFermion

The electronic structure package for quantum computers.
Apache License 2.0
1.52k stars 375 forks source link

Proper Coulomb operators in two-dimensions #382

Open babbush opened 6 years ago

babbush commented 6 years ago

Our library currently contains code to generate molecular electronic structure Hamiltonians in 2D in the plane wave and dual bases. Such Hamiltonians are interesting in some contexts, for instance jellium in 2D is a canonical setting in which to study the fractional quantum Hall effect. These Hamiltonians are also useful for small scale experiments.

However, the way that we currently generate these Hamiltonians is not entirely correct because in two-dimensions the Coulomb operator behaves differently than in three dimensions and our Hamiltonians do not take this into account. It would useful for somebody to search the literature for (or derive for themselves) the correct form of the Coulomb operator discretized in two-dimensions in the plane wave basis. From that we could likely figure out the correct form in the dual basis.

@sheilaliuxl @Spaceenter is something that would interest you? @jarrodmcc do you have anything to add? @sunqm do you have any ideas about references that derives this Hamiltonian properly?

sunqm commented 6 years ago

James has implemented the analytical Fourier transform for 2D Coulomb kernel. The implementation is here https://github.com/sunqm/pyscf/blob/master/pyscf/pbc/gto/cell.py#L816

sheilaliuxl commented 6 years ago

I can probably investigate with limited context though.

kevinsung commented 6 years ago

I'm interested in this as well. The functions for generating the Hamiltonians (in hamiltonians/_jellium.py and hamiltonians/_plane_wave_hamiltonian.py) take as part of their input a Grid object, which can have any number of dimensions. Apparently they only give correct results when the Grid is three-dimensional, and the task here is to also have them give correct results when the Grid is two-dimensional. So if the Grid is not two- or three-dimensional, we should raise an error, right?

babbush commented 6 years ago

@sunqm what you reference here might be exactly what we want. Are you aware of on any write up which derives this? It might just be more straightforward to parse that way.

To everyone, I guess all that is required here is to solve Poisson's equation in 2D dimensions, obtain the Fourier transform of that (which I guess James has in that code) and then perform the integrals over the 2D plane wave basis functions of the Coulomb operator represented as a Fourier series (these integrals should be analytic).

I guess that we need to be careful about how we alias the frequencies (as was the case in 3D) to make sure we obtain a dual basis Hamiltonian with a diagonal Coulomb operator (hopefully that is possible).

sunqm commented 6 years ago

PRB, 73, 205119 documented the 0D, 1D and 2D truncated Coulomb. I didn't carefully whether they are commonly used in other packages. I think James' implementation of 2D case is the same to the equation in this paper.

On Tue, Aug 07, 2018 at 04:04:00PM -0700, Ryan Babbush wrote:

@sunqm what you reference here might be exactly what we want. Are you aware of on any write up which derives this? It might just be more straightforward to parse that way.

To everyone, I guess all that is required here is to solve Poisson's equation in 2D dimensions, obtain the Fourier transform of that (which I guess James has in that code) and then perform the integrals over the 2D plane wave basis functions of the Coulomb operator represented as a Fourier series (these integrals should be analytic).

I guess that we need to be careful about how we alias the frequencies (as was the case in 3D) to make sure we obtain a dual basis Hamiltonian with a diagonal Coulomb operator (hopefully that is possible).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.*

-- Dr. Qiming Sun Division of Chemistry and Chemical Engineering California Institute of Technology

babbush commented 6 years ago

Thanks Qiming. I found a PDF of that PRB here. It seems, however, that this work is discussing the Coulomb operator in 3D where it is only periodic in 0D, 1D or 2D. But what we're actually interested in here is not a 3D system with reduced periodicity, but rather a system that is intristically 2D. For instance, if we wished to approximate the surface of a metal as 2D jellium. The idea is that if you solve the Poisson equation in 2D instead of 3D, you get a different form of the Coulomb operator which is not simply 1 / |r1 - r2|. Then, one would need to Fourier transform whatever one does get, and perform the integrals to define the Hamiltonian. @jarrodmcc am I explaining this reasonably?

Does what I'm saying make sense? Perhaps you already understood that and what I'm looking for is in that PRB and that I'm just not looking in the right place!

kevinsung commented 6 years ago

But 1/|r| is a solution to Poisson's equation for a point charge, even in 2D, right?

kevinsung commented 6 years ago

Based on in-person discussions, if you start with Gauss's law for 2-d (~not sure how that is physically motivated~ the physical motivation is that the electric field lines are confined to a 2-d surface), you get a potential that's ln(|r|) instead of 1/|r| (because you integrate around a circle instead of a sphere so you get something proportional to r instead of r^2). These notes contain potentially related calculations around page 65.

I Googled "Fourier transform of log" and found this

babbush commented 6 years ago

https://physics.stackexchange.com/questions/28565/coulomb-potential-in-2d seems a little bit helpful. Note that its not just the electron-electron operator we're interested in, but also the external potential. The operators in the plane wave basis will come out looking quite similar but will have a different kernel. That is, instead of the term \sum{kpq} 1/k^2 a^\dagger{p+k} a^\dagger_{q-k} a_p aq we'll have something like \sum{kpq} f(k) a^\dagger{p+k} a^\dagger{q-k} a_p a_q where f(k) is the Fourier transform of the 2D Coulomb operator.

sunqm commented 6 years ago

James referred to another paper, PRB, 87, 165122 in our code. Some equations were documented in the appendix of that paper. I didn't check how they were derived. This is just the 2D problem with 3D interactions. If solving Poisson's equation in 2D, it will be the true 2D system with 2D interactions. This is actually beyond the capability of our code.

Although not available right now, I think implementing the 2D PW code with the 2D Possion's equation should not be too difficult. I don't think 1/r interaction can be used in the true 2D problem. The integrals of 1/r in 2D may be ill defined or only applicable with special boundary condition. Also, the variational principle may not be valid with 1/r in 2D.

On Tue, Aug 07, 2018 at 04:04:00PM -0700, Ryan Babbush wrote:

@sunqm what you reference here might be exactly what we want. Are you aware of on any write up which derives this? It might just be more straightforward to parse that way.

To everyone, I guess all that is required here is to solve Poisson's equation in 2D dimensions, obtain the Fourier transform of that (which I guess James has in that code) and then perform the integrals over the 2D plane wave basis functions of the Coulomb operator represented as a Fourier series (these integrals should be analytic).

I guess that we need to be careful about how we alias the frequencies (as was the case in 3D) to make sure we obtain a dual basis Hamiltonian with a diagonal Coulomb operator (hopefully that is possible).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.*

-- Dr. Qiming Sun Division of Chemistry and Chemical Engineering California Institute of Technology

HamletWantToCode commented 4 years ago

Hi @babbush , I find this paper list formulas for Fourier transform of Coulomb potential in 1d, 2d, and 3d (on page 2, eq. 2.9), but the result for 2d case isn't consistent with the stackoverflow link you provided. There is also a discussion for 1d case derivation here. Is there any progress in this problem now ?

babbush commented 4 years ago

I agree that stack overflow link from my post doesn't seem to provide what we want - I'm not sure what is going on with that (maybe I linked to the wrong thing or the content of the page changed, I don't know). The formulas from the paper you found seem reliable. Indeed, it would be nice to have code for these potentials incorporated in OpenFermion and no, I don't think anybody else has made progress on that.