ORNL-QCI / xacc-vqe

DEPRECATED - Variational quantum eigensolver built on XACC
BSD 3-Clause "New" or "Revised" License
14 stars 6 forks source link

Implement an FCIDUMP FermionCompiler Preprocessor #5

Closed amccaskey closed 6 years ago

amccaskey commented 6 years ago

We should implement a new Preprocessor that takes FCIDUMP formatted kernels and produces our usual FermionCompiler format that can then be used in the rest of our workflow.

ndattani commented 6 years ago

Thank you @amccaskey ! This would be immensely useful for us, since we produce the integrals in this universal format.

I know at least the following programs can read in integrals in FCIDUMP format either natively or through an interface: MOLPRO, MOLCAS, DALTON, HORTON, NECI, HANDE, DICE, CHEMPS2, BLOCK, DIRAC, CP2K, ORCA, GAMESS, MPQC, Psi4 (through the CHEMPS2 interface), PySCF.

For a small molecule like Li_2 in a the basis set aug-cc-pCV7Z(i) in D2h, we already have 440GB of integrals to read in, so converting from FCIDUMP to another format would be cumbersome.

Below I show an example of the integrals and indices in FCIDUMP format for H2 / sto3g / r=1.401 in FCIDUMP format:

<ij|r_12|ab>, <i|h|a>

 &FCI NORB=  2,NELEC=  2,MS2= 0,
  ORBSYM=1,5,
  ISYM=0,
 /                         i   a   j   b
  0.6744931033260081E+00   1   1   1   1  
  0.6634720448605567E+00   2   2   1   1  
  0.6973979494693358E+00   2   2   2   2  
  0.1812875358123322E+00   2   1   2   1  
 -0.1252477303982147E+01   1   1   0   0  
 -0.4759344611440753E+00   2   2   0   0  
  0.7137758743754461E+00   0   0   0   0

These numbers are identical to those found in Table III of: https://arxiv.org/pdf/1208.5986.pdf

With best wishes, Nike Dattani

ndattani commented 6 years ago

Dear @amccaskey, I've been checking back here once in a while. I notice that you're the only contributor to this repo, is there any plan to support FCIDUMP formatted integrals, and if so how long do you expect it to take? I'd be very interested in doing a study to determine how many qubits, k-local interactions, etc. would be needed in order to do what's state-of-the-art on a classical computer using state-of-the-art quantum chemistry algorithms. For this it would be preferable to work with the integrals in the format we have, rather than convert to your format. Based on the H2 example in my previous comment, does it look easy to do? Let me know if you have any questions! NORB = # of spatial orbitals in the sto-3g basis set, NELEC = # of electrons in H2, MS2 is # of unpaired spins (0 in H2), ORBSYM=1,5 are the symmetries of the molecular orbitals in D2h (you don't have to worry about this).

amccaskey commented 6 years ago

Hey @ndattani, thanks for checking in. This is still a priority for me. Problem is that we just wrapped up end of FY performance review activities here at the Lab, and that takes up a chunk of time. It's over now, so I'm starting to get more time to focus on this. I hope to have this feature added soon. Once I start, I expect it to take a day to implement and get under test. I'll ping you as soon as its done.

amccaskey commented 6 years ago

Just getting the FCIDUMP format straight in my head...

for strings x i a j b, x a float/double, and i, a, j, b integers, and Hamiltonian H = h_nuclear + sum_{i,a} h_{i,a} c^_i c_a + 1/2 sum_{i,a,j,b} h_{i,a,j,b} c^_i c^_j c_a c_b, where ^ means dagger, c^ c are creation and annhilation operators

  1. if i = j = a = b = 0, then x = h_nuclear

  2. if a = j = b = 0, then x = single particle eigenvalue of ith orbital

  3. if j = b = 0, then x = <i|h|a> = h_{i,a}, the coefficient of c^_i c_a

  4. else x = < ij | 1/r12 | ab > = h_{i,a,j,b}, the coefficient of c^i c^j c_a c_b

@ndattani does this all sound correct? Can you explain condition 2 and what it looks like in the Hamiltonian?

ndattani commented 6 years ago

Dear @amccaskey , sorry for the late reply as it was a busy day at work. I believe you got these 4 lines from the documentation of the Psi4 FCIDUMP interface: https://github.com/hande-qmc/fcidump

image

Note that under the Condition 2 that you mention, it says "Warning: This is an extension and to the FCIDUMP format and is not be accepted by all codes" which is because this is an extension added by James Spencer for the HANDE Quantum Monte Carlo package. We don't need to worry about it, since neither the Jordan-Wigner transformation, nor the Bravyi-Kitaev, requires such lines in the FCIDUMP file.

In fact the numbers I gave you in the example are identical to the ones appearing in Table III of the paper I gave a link to in the earlier comment:

image

so the "unpacking of the symmetries", which you probably already did for the Psi4 interface and to get the correct H2 energies in the demonstration, was the hard part, and just reading the integrals in FCIDUMP should be the easy part!

ndattani commented 6 years ago

Dear @amccaskey , Based on our most recent e-mail correspondence, it seems we have this working via the CheMPS2 interface, can we be confident that it's working now and allow this issue to be closed?

With best wishes, Nike

amccaskey commented 6 years ago

Yes, reading in is now working through CheMPS2. Closing.