Support for QPE coding

“I have just started exploring quantum chemistry combined with quantum computing. I am learning how to determine the ground-state energy of the H₂ molecule using QPE. Can someone help me write the code? Thank you!”

Hi @Van_Anh_Ph_m , welcome to the Forum! Are you already familiar with how QPE works?

If not then I’d recommend that you go through our demo on intro to QPE and the Codebook module on QPE. Both of these include code together with good explanations and pictures that will help you apply QPE to your problem.

If you’re new to quantum computing in general you can explore other Codebook modules in case you have some gaps.

Specifically for your question on the ground-state energy of the H₂ molecule, note QPE will give you the phase of the eigenvalue for a specific state, so you will first need to encode the right state into your circuit. The conclusion of the intro to QPE demo suggests two ways to do this.

I hope this helps!

“I want to ask about converting phase into energy. Is it (-\Phi \cdot 2\pi)? I wrote a code to test it, but for some reason, the energy only reaches (-0.93) Hartree, while the actual value is (-1.137) Hartree. Please help me!”

Hi @Van_Anh_Ph_m , can you please share the code you used? Your formula doesn’t seem correct.