Hi,
Neat work!
I just tried to do some benchmark of Quiqbox.jl
against openfermion, but got some unit issues. For H2 molecule with bond length of 0.275 angstrom, the Hartree Fock energy calculated from openfermion is -0.46576 Ha, while the result I got from Quiqbox.jl
is -2.53861 Ha. I think it must be a unit issues, but I'm not sure where it is. The piece of code I used for the calculation is as below:
using Quiqbox
function calc_H2()
bond_length = 0.275
nuc = ["H", "H"]
nucCoords = [[0.0, 0.0, 0.0], [0.0, 0.0, bond_length]]
bs = genBasisFunc.(nucCoords, ("STO-3G", "H") |> Ref) |> flatten
resRHF = runHF(bs, nuc, nucCoords)
println("Quiqbox:")
println("bond length = ", bond_length)
@show resRHF.Ehf
println()
end
using PyCall
py"""
from openfermion.chem import MolecularData
from openfermionpyscf import run_pyscf
def get_H2():
bond_length = 0.275
geometry = [
["H", [0.0, 0.0, 0.0]],
["H", [0.0, 0.0, bond_length]],
]
basis = "sto3g"
spin = 0
molecule_of = MolecularData(
geometry,
basis,
multiplicity=2 * spin + 1
)
molecule_of = run_pyscf(
molecule_of,
run_scf=1,
run_ccsd=0,
run_fci=0
)
print("openfermion:")
print('At bond length of {} angstrom, molecular hydrogen has:'.format(
bond_length))
print('Hartree-Fock energy of {} Hartree.'.format(molecule_of.hf_energy))
"""
calc_H2()
py"get_H2"()
The result is as below:
Quiqbox:
bond length = 0.275
resRHF.Ehf = -2.538611549467369
openfermion:
At bond length of 0.275 angstrom, molecular hydrogen has:
Hartree-Fock energy of -0.46576369202200985 Hartree.
For more detailed examples of openfermion, please refer to this
Thanks a lot in advance!