active_space(electrons, orbitals, mult=1, active_electrons=None, active_orbitals=None)[source]

Builds the active space for a given number of active electrons and active orbitals.

Post-Hartree-Fock (HF) electron correlation methods expand the many-body wave function as a linear combination of Slater determinants, commonly referred to as configurations. This configurations are generated by exciting electrons from the occupied to the unoccupied HF orbitals as sketched in the figure below. Since the number of configurations increases combinatorially with the number of electrons and orbitals this expansion can be truncated by defining an active space.

The active space is created by classifying the HF orbitals as core, active and external orbitals:

  • Core orbitals are always occupied by two electrons

  • Active orbitals can be occupied by zero, one, or two electrons

  • The external orbitals are never occupied



The number of active spin-orbitals 2*active_orbitals determines the number of qubits required to perform the quantum simulations of the electronic structure of the many-electron system.

  • electrons (int) – total number of electrons

  • orbitals (int) – total number of orbitals

  • mult (int) – Spin multiplicity \(\mathrm{mult}=N_\mathrm{unpaired} + 1\) for \(N_\mathrm{unpaired}\) unpaired electrons occupying the HF orbitals. Possible values for mult are \(1, 2, 3, \ldots\). If not specified, a closed-shell HF state is assumed.

  • active_electrons (int) – Number of active electrons. If not specified, all electrons are treated as active.

  • active_orbitals (int) – Number of active orbitals. If not specified, all orbitals are treated as active.


lists of indices for core and active orbitals

Return type



>>> electrons = 4
>>> orbitals = 4
>>> core, active = active_space(electrons, orbitals, active_electrons=2, active_orbitals=2)
>>> print(core) # core orbitals
>>> print(active) # active orbitals
[1, 2]