qc2.algorithms.utils.active_space ================================= .. py:module:: qc2.algorithms.utils.active_space .. autoapi-nested-parse:: Module containing active space helper functions. Classes ------- .. autoapisummary:: qc2.algorithms.utils.active_space.ActiveSpace Functions --------- .. autoapisummary:: qc2.algorithms.utils.active_space.get_active_space_idx Module Contents --------------- .. py:function:: get_active_space_idx(nao: int, nelectron: Union[int, Tuple[int, int]], n_active_orbitals: int, n_active_electrons: Union[int, Tuple[int, int]]) -> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray] Calculates indices for occ, active, and virt orbitals in an active space. :param nao: Total number of atomic orbitals. :type nao: int :param nelectron: A list representing the number of electrons in each atom. :type nelectron: Union[int, Tuple[int, int]] :param n_active_orbitals: Number of orbitals in the active space. :type n_active_orbitals: int :param n_active_electrons: A list representing the number of active electrons in each atom. :type n_active_electrons: Union[int, Tuple[int, int]] :returns: Three numpy arrays representing the indices of occupied, active, and virtual orbitals, respectively. :rtype: Tuple[np.ndarray, np.ndarray, np.ndarray] :raises ValueError: If the number of core electrons is odd. .. py:class:: ActiveSpace A data class representing the active space. .. py:attribute:: num_active_electrons :type: tuple[int, int] .. py:attribute:: num_active_spatial_orbitals :type: int