# qml.qchem.active_space¶

active_space(mol_name, hf_data, n_active_electrons=None, n_active_orbitals=None)[source]

Builds the active space by partitioning the set of Hartree-Fock molecular orbitals.

Example usage:

>>> d_occ_orbitals, active_orbitals = active_space('lih', './pyscf/sto-3g',
n_active_electrons=2, n_active_orbitals=2)
>>> d_occ_indices  # doubly-occupied molecular orbitals
[0]
>>> active_indices # active molecular orbitals
[1, 2]
>>> 2*len(active_indices) # number of qubits required for simulation
4


Note

The number of active spin-orbitals 2*n_active_orbitals determines the number of qubits to perform quantum simulations of the electronic structure of the molecule.

Parameters
• mol_name (str) – name of the molecule

• hf_data (str) – path to the directory containing the file with the Hartree-Fock electronic structure

• n_active_electrons (int) – Optional argument to specify the number of active electrons. If not specified, all electrons are treated as active

• n_active_orbitals (int) – Optional argument to specify the number of active orbitals. If not specified, all orbitals considered active

Returns

lists of indices for doubly-occupied and active orbitals

Return type

tuple