# How much does it cost (RAM and CPU) to calculate the energy of H2?

I have recently come across this very intriguing paper “The Fundamental Vibration of Molecular Hydrogen”.

I have asked the authors the following naïve questions directly via email:

1. What was the amount of computer memory used by the full ab initio calculation?
2. What was the time-to-solution of the full ab initio calculation?

While I wait for their response, could anyone help me to make a ball park estimate of those two answers?

• It's less than it would cost a quantum computer. That calculation has been done far more accurately now (see papers by Krzysztof Pachucki) and there's an open access code for H2 that you can run by yourself. May 11, 2022 at 13:08
• @NikeDattani, thanks for your responses. May I know what reference are you using for comparing with the cost of quantum computer? For example, this link (aws.amazon.com/braket/pricing) has rates like \$0.30000 per task or \$0.01000 per quantum circuit run. Is this something you have in mind? Thanks. May 11, 2022 at 16:00
• In computing, "cost" typically means RAM (space cost) or CPU/GPU usage (time cost). Things become more complicated when we switch to QPUs, but the answer remains the same: trying to do this on a QPU will cost more than it would for a classical computer. I mentioned quantum computers because your profile suggests that you're working at IonQ. The sad truth for most quantum computing enthusiasts is that there's no hope for quantum computers to outperform classical computers for solving chemistry problems any time soon. See also my answer here: mattermodeling.stackexchange.com/q/423/5 May 11, 2022 at 16:28

Out of all authors on that paper, most of them are experimentalists, but Krzysztof Pachucki is known as the "King of H2 calculations".

Three years after the paper you mentioned, Pachucki made the software freely available here. The abstract of the associated paper mentions that the paper provides benchmark results up to 18 digits, for example see this table of $$\ce{H2}$$ energies (it actually looks like the energies are converged even if rounded at the 19th or 20th digits):

In terms of RAM, the paper says:

"RAM: From several Mbytes to 512 Gbytes, depending on the size of the basis."

In terms of CPU time the paper says:

"Running time: From seconds to days, depending on the size of the basis."

But keep in mind that the paper is talking about converging to energy to 18+ a.u. digits in the most extreme cases, whereas the 2013 paper mentioned in your question is only talking about precision on the $$10^{-4}$$ cm$$^{-1}$$ scale, which means no more than 11 a.u. digits. So I would ignore the "512GB of RAM" and "days of CPU time" which are listed as the upper limits of the algorithm's cost, and I'd just focus on the lower limits which are "several MB of RAM" and "seconds of CPU time".

Also, the paper says:

"The parallelization of the calculation of integrals in H2SOLV is almost 100% efficient, so that the evaluation time is inversely proportional to the number of available cores (threads)."

So whatever the CPU time is, you can make it half of that by doubling the number of cores (something that's usually quite easy to do these days).

The one place where "CPU" appears in the paper is here:

"The computation time of H2SOLV with the input example specified above is about a minute on a dual processor Intel Xeon CPU E5-2680 v3 2.50GHz."