quri_parts.pyscf.mol package#

class PySCFMolecularOrbitals(mol, mo_coeff)#

Bases: MolecularOrbitals

PySCFMolecularOrbitals represents a data of the molecule which consists of the PySCF Mole object Mole and the molecular orbital coefficients.

Parameters:
  • mol (Mole) – Mole the PySCF Mole object for the molecule.

  • mo_coeff (npt.NDArray[np.complex128]) – molecular orbital coefficients.

property mol: Mole#

Returns Mole the PySCF Mole object of the molecule.

property spin: int#

Returns the total spin of the electrons.

property n_electron: int#

Returns a number of electrons.

property n_spatial_orb: int#

Returns the number of spatial orbitals.

property mo_coeff: npt.NDArray[np.complex128]#

Returns molecular orbital coefficients.

get_nuc_energy(mo)#

Returns a nuclear repulsion energy of a given molecule.

Parameters:

mo (PySCFMolecularOrbitals) – PySCFMolecularOrbitals of the molecule.

Return type:

float

class PySCFAOeIntSet(mol: 'gto.Mole', constant: 'float', ao_1e_int: 'PySCFAO1eInt', ao_2e_int: 'PySCFAO2eInt')#

Bases: AOeIntSet

Parameters:
mol: Mole#
constant: float#

constant.

ao_1e_int: PySCFAO1eInt#

atomic orbital one-electron integral AO1eInt.

ao_2e_int: PySCFAO2eInt#

atomic orbital two-electron integral AO2eInt.

to_full_space_mo_int(mo)#

Returns the full space spin electon integrals.

Parameters:

mo (MolecularOrbitals) –

Return type:

SpinMOeIntSet

to_full_space_spatial_mo_int(mo)#

Returns the full space spatial electon integrals.

Parameters:

mo (MolecularOrbitals) –

Return type:

SpatialMOeIntSet

to_active_space_mo_int(active_space_mo)#

Returns the full space spin electon integrals.

Parameters:

active_space_mo (ActiveSpaceMolecularOrbitalsBase) –

Return type:

SpinMOeIntSet

to_active_space_spatial_mo_int(active_space_mo)#

Returns the full space spatial electon integrals.

Parameters:

active_space_mo (ActiveSpaceMolecularOrbitalsBase) –

Return type:

SpatialMOeIntSet

class PySCFAO1eInt(mol)#

Bases: AO1eInt

Parameters:

mol (gto.Mole) –

property array: ndarray[Any, dtype[complex128]]#

Computes the ao 1-electron integrals with pyscf.

to_spatial_mo1int(mo_coeff)#

Returns the corresponding spatial mo 1e integrals.

Parameters:

mo_coeff (ndarray[Any, dtype[complex128]]) –

Return type:

SpatialMO1eInt

to_mo1int(mo_coeff)#

Returns the corresponding spin mo 1e integrals.

Parameters:

mo_coeff (ndarray[Any, dtype[complex128]]) –

Return type:

SpinMO1eInt

class PySCFAO2eInt(mol)#

Bases: AO2eInt

Parameters:

mol (gto.Mole) –

property array: ndarray[Any, dtype[complex128]]#

Computes the ao 2-electron integrals in a memory effecient way, and returns the array in physicist’s notation.

to_spatial_mo2int(mo_coeff)#

Returns the corresponding spatial mo 2e integrals.

Parameters:

mo_coeff (ndarray[Any, dtype[complex128]]) –

Return type:

SpatialMO2eInt

to_mo2int(mo_coeff)#

Returns the corresponding spin mo 2e integrals.

Parameters:

mo_coeff (ndarray[Any, dtype[complex128]]) –

Return type:

SpinMO2eInt

class PySCFSpatialMO1eInt(mol, mo_coeff)#

Bases: SpatialMO1eInt

Parameters:
  • mol (gto.Mole) –

  • mo_coeff (npt.NDArray[np.complex128]) –

property array: ndarray[Any, dtype[complex128]]#

Computes the mo 1-electron integrals and returns the array in physicist’s notation.

class PySCFSpatialMO2eInt(mol, mo_coeff)#

Bases: SpatialMO2eInt

Parameters:
  • mol (gto.Mole) –

  • mo_coeff (npt.NDArray[np.complex128]) –

property array: ndarray[Any, dtype[complex128]]#

Computes the mo 2-electron integrals in a memory effecient way, and returns the array in physicist’s notation.

class PySCFSpinMO1eInt(mol, mo_coeff)#

Bases: SpinMO1eInt

Parameters:
  • mol (gto.Mole) –

  • mo_coeff (npt.NDArray[np.complex128]) –

property array: ndarray[Any, dtype[complex128]]#

Returns integral as numpy ndarray.

class PySCFSpinMO2eInt(mol, mo_coeff)#

Bases: SpinMO2eInt

Parameters:
  • mol (gto.Mole) –

  • mo_coeff (npt.NDArray[np.complex128]) –

property array: ndarray[Any, dtype[complex128]]#

Returns integral as numpy ndarray.

get_ao_1eint(mo)#

Returns a PySCFAO1eInt object.

Parameters:

mo (PySCFMolecularOrbitals) –

Return type:

PySCFAO1eInt

get_ao_2eint(mo)#

Returns a PySCFAO2eInt object.

Parameters:

mo (PySCFMolecularOrbitals) –

Return type:

PySCFAO2eInt

get_ao_eint_set(molecule, store_array_on_memory=False)#

Returns an instance of either PySCFAOeIntSet or AOeIntArraySet.

If store_array_on_memory == True, it computes the ao electron integrals and returns AOeIntArraySet that holds the electron integral arrays on memory.

If store_array_on_memory == False, it returns a PySCFAOeIntSet object that only holds the pyscf.gto.Mole object on memory.

Parameters:
Return type:

PySCFAOeIntSet | AOeIntArraySet

get_active_space_spatial_integrals(active_space_mo, electron_ints)#

Computes the active space electron integrals by pyscf.casci.

The output is the spatial mo electron integrals in physicists’ convention.

Parameters:
Return type:

SpatialMOeIntSet

get_active_space_spin_integrals(active_space_mo, electron_ints)#

Computes the active space electron integrals by pyscf.casci.

The output is the spin mo electron integrals in physicists’ convention.

Parameters:
Return type:

SpinMOeIntSet

get_spin_mo_integrals_from_mole(mole, mo_coeff, active_space=None)#

Computes the spin MO electron integrals and the corresponding ActiveSpace object.

Parameters:
  • mole (Mole) –

  • mo_coeff (ndarray[Any, dtype[complex128]]) –

  • active_space (ActiveSpace | None) –

Return type:

tuple[ActiveSpace, SpinMOeIntSet]

Submodules#