Number of electrons in quantum chemistry

Hi everyone, I have a question about the number of electrons that are choose in the different tutorials of VQE in the quantum chemistry’s section. For context, I’m not an expert in chemistry, I’m in my last year of computer science, so my knowledge in chemistry is low, anyways the thing that i want to do is automatize the election of electron (given a list of symbols) in order to construct the correct Hartree fock state of the molecule (because i want to use VQE).
So, the question is if someone knows a rule, if there’s a formula or something that tell me how many I should choose, or this is more like a hint or miss process.
For example, in the LiH molecule (Adaptive circuits for quantum chemistry) they choose two electrons, but why not 4 (considering that H have one and Li have 3).

Thanks in advance.

1 Like

Hello and welcome @jnorambu!

I’ll return to you in a moment.

Meanwhile, I suggest taking a look at this demo. I think it will introduce this topic in a better way!

…the thing that i want to do is automatize the election of electron (given a list of symbols) in order to construct the correct Hartree fock state of the molecule (because i want to use VQE).

In that case, note that PennyLane provides a differentiable Hartree-Fock solver and the functionality to construct a fully-differentiable molecular Hamiltonian. :slight_smile:

1 Like

Hi @jnorambu,

When including all the electrons and orbitals makes the computations expensive, you can define an active space by selecting a number of electrons and orbitals, as explained in this demo. In general, defining an active space requires experience, specially when the molecule has a complicated electronic structure. There are several approaches for defining a proper active space, please see here for more context. However, as a general rule of thumb, you can construct your active space by considering the valence electrons only and exclude the core electrons. For example, in the case of LiH, the lithium atom has two electrons in the 1s orbital that can be excluded. Please note that when you define an active space, the number of orbitals should also be chosen carefully. If defining an active space is not easy for your molecule, you can simply include all of the electrons and orbitals. Please let us know if you have any other questions!

4 Likes

Thanks, I will take a look on the paper, and yeah, I will let you know if I have another questions.

1 Like