forte2._forte2 ============== .. py:module:: forte2._forte2 Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/forte2/_forte2/cpp_helpers/index /autoapi/forte2/_forte2/dsrg_utils/index /autoapi/forte2/_forte2/ints/index Package Contents ---------------- .. py:class:: DeterminantVector DeterminantVector(arg: DeterminantVector) DeterminantVector(arg: collections.abc.Iterable[Determinant], /) .. py:method:: clear() -> None Remove all items from list. .. !! processed by numpydoc !! .. py:method:: append(arg: Determinant, /) -> None Append `arg` to the end of the list. .. !! processed by numpydoc !! .. py:method:: insert(arg0: int, arg1: Determinant, /) -> None Insert object `arg1` before index `arg0`. .. !! processed by numpydoc !! .. py:method:: pop(index: int = -1) -> Determinant Remove and return item at `index` (default last). .. !! processed by numpydoc !! .. py:method:: extend(arg: DeterminantVector, /) -> None Extend `self` by appending elements from `arg`. .. !! processed by numpydoc !! .. py:method:: count(arg: Determinant, /) -> int Return number of occurrences of `arg`. .. !! processed by numpydoc !! .. py:method:: remove(arg: Determinant, /) -> None Remove first occurrence of `arg`. .. !! processed by numpydoc !! .. py:class:: CIStrings(na: int, nb: int, symmetry: int, orbital_symmetry: collections.abc.Sequence[collections.abc.Sequence[int]], gas_min: collections.abc.Sequence[int], gas_max: collections.abc.Sequence[int]) .. py:property:: alpha_address :type: std::__1::shared_ptr .. py:property:: na :type: int .. py:property:: nb :type: int .. py:property:: symmetry :type: int .. py:property:: nas :type: int .. py:property:: nbs :type: int .. py:property:: ndet :type: int .. py:property:: ngas_spaces :type: int .. py:property:: gas_size :type: list[int] .. py:property:: gas_alpha_occupations :type: list[list[int]] .. py:property:: gas_beta_occupations :type: list[list[int]] .. py:property:: gas_occupations :type: list[tuple[int, int]] .. py:method:: determinant(address: int) -> Determinant .. py:method:: determinant_index(d: Determinant) -> int .. py:method:: make_determinants() -> DeterminantVector .. py:class:: CISigmaBuilder(lists: CIStrings, E: float, H: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))], V: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))], log_level: int = 3) .. py:method:: set_algorithm(algorithm: str) -> None Set the sigma build algorithm (options = kh, hz) .. !! processed by numpydoc !! .. py:method:: get_algorithm() -> str Get the current sigma build algorithm .. !! processed by numpydoc !! .. py:method:: set_memory(memory: int) -> None Set the memory limit for the builder (in MB) .. !! processed by numpydoc !! .. py:method:: form_Hdiag_csf(dets: DeterminantVector, spin_adapter: CISpinAdapter, spin_adapt_full_preconditioner: bool = False) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))] .. py:method:: energy_csf(dets: DeterminantVector, spin_adapter: CISpinAdapter, I: int) -> float Compute the energy of a CSF .. !! processed by numpydoc !! .. py:method:: form_H_csf(dets: DeterminantVector, spin_adapter: CISpinAdapter) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Form the full Hamiltonian matrix in the CSF basis .. !! processed by numpydoc !! .. py:method:: slater_rules_csf(dets: DeterminantVector, spin_adapter: CISpinAdapter, I: int, J: int) -> float .. py:method:: Hamiltonian(basis: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], sigma: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> None .. py:method:: make_sparse_state(C: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], threshold: float = 1e-12) -> SparseState Convert a CI vector to a sparse state .. !! processed by numpydoc !! .. py:method:: sf_1rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the spin-free one-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: sf_2rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the spin-free two-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: sf_3rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None))] Compute the spin-free three-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: sf_2cumulant(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the spin-free two-electron cumulant .. !! processed by numpydoc !! .. py:method:: sf_3cumulant(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None))] Compute the spin-free three-electron cumulant .. !! processed by numpydoc !! .. py:method:: a_1rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the alpha one-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: b_1rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the beta one-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: aa_2rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the alpha-alpha two-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: bb_2rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the beta-beta two-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: ab_2rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the alpha-beta two-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: aaa_3rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the alpha-alpha-alpha three-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: aab_3rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the alpha-alpha-beta three-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: abb_3rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the alpha-beta-beta three-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: bbb_3rdm(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the beta-beta-beta three-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: a_1trdm(sigmabuilder_right: CISigmaBuilder, C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the alpha one-electron transition reduced density matrix .. !! processed by numpydoc !! .. py:method:: b_1trdm(sigmabuilder_right: CISigmaBuilder, C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the beta one-electron transition reduced density matrix .. !! processed by numpydoc !! .. py:method:: sf_1trdm(sigmabuilder_right: CISigmaBuilder, C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the spin-free one-electron transition reduced density matrix .. !! processed by numpydoc !! .. py:method:: avg_build_time() -> list[float] .. py:method:: set_log_level(level: int) -> None Set the logging level for the class .. !! processed by numpydoc !! .. py:method:: a_1rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], alpha: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] .. py:method:: aa_2rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], alpha: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the two-electron same-spin reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: ab_2rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the two-electron mixed-spin reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: aaa_3rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], alpha: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the three-electron same-spin reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: aab_3rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the aab mixed-spin three-electron reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: abb_3rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the abb mixed-spin three-electron reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: aaaa_4rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], alpha: bool) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the four-electron same-spin reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: aaab_4rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the aaab mixed-spin four-electron reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: aabb_4rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the aabb mixed-spin four-electron reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: abbb_4rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the abbb mixed-spin four-electron reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: sf_1rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the spin-free one-electron reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: sf_2rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the spin-free two-electron reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: sf_3rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None))] Compute the spin-free three-electron reduced density matrix for debugging purposes .. !! processed by numpydoc !! .. py:method:: sf_2cumulant_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the spin-free two-electron cumulant for debugging purposes .. !! processed by numpydoc !! .. py:method:: sf_3cumulant_debug(C_left: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None))] Compute the spin-free three-electron cumulant for debugging purposes .. !! processed by numpydoc !! .. py:class:: SelectedCIHelper(norb: int, dets: collections.abc.Sequence[Determinant], c: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))], E: float, H: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))], V: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))], log_level: int = 3) .. py:method:: set_Hamiltonian(E: float, H: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))], V: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))]) -> None Set the Hamiltonian integrals .. !! processed by numpydoc !! .. py:method:: Hamiltonian(basis: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], sigma: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> None Apply the Hamiltonian to the basis and store the result in sigma .. !! processed by numpydoc !! .. py:method:: Hdiag() -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))] Return the diagonal of the Hamiltonian matrix .. !! processed by numpydoc !! .. py:method:: set_c(c: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))]) -> None Set the CI coefficients .. !! processed by numpydoc !! .. py:method:: set_num_threads(n: int) -> None Set the number of threads to use in parallel sections .. !! processed by numpydoc !! .. py:method:: set_num_batches_per_thread(n: int) -> None Set the number of batches each thread will process in parallel sections .. !! processed by numpydoc !! .. py:method:: set_energies(e: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> None Set the energies of the roots .. !! processed by numpydoc !! .. py:method:: set_frozen_creation(frozen_creation: collections.abc.Sequence[int]) -> None Set orbitals excluded from creation in selection .. !! processed by numpydoc !! .. py:method:: set_frozen_annihilation(frozen_annihilation: collections.abc.Sequence[int]) -> None Set orbitals excluded from annihilation in selection .. !! processed by numpydoc !! .. py:method:: set_screening_criterion(criterion: str) -> None Set the screening criterion for selection ('hbci' or 'ehbci') .. !! processed by numpydoc !! .. py:method:: set_energy_correction(correction: str) -> None Set the energy correction method for selection ('variational' or 'pt2') .. !! processed by numpydoc !! .. py:method:: set_pt2_regularizer(regularizer: str, strength: float = 0.5) -> None Set the PT2 regularization method ('none', 'shift', 'dsrg') and its strength .. !! processed by numpydoc !! .. py:method:: select_hbci_ref(var_threshold: float, pt2_threshold: float) -> None Perform HBCI selection with the given threshold .. !! processed by numpydoc !! .. py:method:: select_hbci(var_threshold: float, pt2_threshold: float) -> None Perform HBCI selection with the given thresholds .. !! processed by numpydoc !! .. py:method:: compute_spin2() -> list[float] Compute the expectation value of S^2 for each root and return as a list .. !! processed by numpydoc !! .. py:method:: a_1rdm(left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the alpha-spin 1-RDM between two roots .. !! processed by numpydoc !! .. py:method:: b_1rdm(left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the beta-spin 1-RDM between two roots .. !! processed by numpydoc !! .. py:method:: sf_1rdm(left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the spin-free 1-RDM between two roots .. !! processed by numpydoc !! .. py:method:: aa_2rdm(left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the alpha-alpha 2-RDM between two roots .. !! processed by numpydoc !! .. py:method:: bb_2rdm(left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the beta-beta 2-RDM between two roots .. !! processed by numpydoc !! .. py:method:: ab_2rdm(left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the alpha-beta 2-RDM between two roots .. !! processed by numpydoc !! .. py:method:: sf_2rdm(left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the spin-free 2-RDM between two roots .. !! processed by numpydoc !! .. py:method:: a_1trdm(right_helper: SelectedCIHelper, left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the alpha-spin 1-transition RDM between two roots in different helpers .. !! processed by numpydoc !! .. py:method:: b_1trdm(right_helper: SelectedCIHelper, left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the beta-spin 1-transition RDM between two roots in different helpers .. !! processed by numpydoc !! .. py:method:: sf_1trdm(right_helper: SelectedCIHelper, left_root: int, right_root: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the spin-free 1-transition RDM between two roots in different helpers .. !! processed by numpydoc !! .. py:method:: dets() -> list[Determinant] Return the determinants in the variational space .. !! processed by numpydoc !! .. py:method:: ndets() -> int Return the number of determinants in the variational space .. !! processed by numpydoc !! .. py:method:: energies() -> list[float] Return the energies of the roots .. !! processed by numpydoc !! .. py:method:: ept2_var() -> list[float] Return the variational part of the Epstein-Nesbet second-order energy correction .. !! processed by numpydoc !! .. py:method:: ept2_pt() -> list[float] Return the perturbative part of the Epstein-Nesbet second-order energy correction .. !! processed by numpydoc !! .. py:method:: num_new_dets_var() -> int Return the number of new variational determinants added in the last selection .. !! processed by numpydoc !! .. py:method:: num_new_dets_pt2() -> int Return the number of new perturbative determinants added in the last selection .. !! processed by numpydoc !! .. py:method:: selection_time() -> float Return the total selection time .. !! processed by numpydoc !! .. py:class:: RelCISigmaBuilder(lists: CIStrings, E: float, H: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None))], V: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None, None, None))], log_level: int = 3, use_asym_ints: bool = False) .. py:method:: set_algorithm(algorithm: str) -> None Set the sigma build algorithm (options = kh, hz) .. !! processed by numpydoc !! .. py:method:: get_algorithm() -> str Get the current sigma build algorithm .. !! processed by numpydoc !! .. py:method:: set_memory(memory: int) -> None Set the memory limit for the builder (in MB) .. !! processed by numpydoc !! .. py:method:: form_Hdiag(dets: DeterminantVector) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))] .. py:method:: slater_rules(dets: DeterminantVector, I: int, J: int) -> complex .. py:method:: Hamiltonian(basis: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))], sigma: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))]) -> None .. py:method:: so_1rdm(C_left: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None))] Compute the spin-orbital one-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: so_2rdm(C_left: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None, None, None))] Compute the spin-orbital two-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: so_2cumulant(C_left: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None, None, None))] Compute the spin-orbital two-electron cumulant .. !! processed by numpydoc !! .. py:method:: so_3rdm(C_left: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None, None, None, None, None))] Compute the spin-orbital three-electron reduced density matrix .. !! processed by numpydoc !! .. py:method:: so_3cumulant(C_left: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None, None, None, None, None))] Compute the spin-orbital three-electron cumulant .. !! processed by numpydoc !! .. py:method:: so_1rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None))] .. py:method:: so_2rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None, None, None))] .. py:method:: so_3rdm_debug(C_left: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))], C_right: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, ))]) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None, None, None, None, None))] .. py:class:: CISpinAdapter(twoS: int, twoMs: int, norb: int) .. py:method:: prepare_couplings(dets: DeterminantVector) -> None .. py:method:: csf_C_to_det_C(csf_C: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], det_C: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> None .. py:method:: det_C_to_csf_C(det_C: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))], csf_C: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))]) -> None .. py:property:: nconf :type: int .. py:property:: ncsf :type: int .. py:method:: set_log_level(level: int) -> None Set the logging level for the class .. !! processed by numpydoc !! .. py:class:: Determinant(arg: Determinant) Determinant(str: Determinant.__init__.str) .. py:method:: zero() -> Determinant :staticmethod: Create a zero determinant with no electrons .. !! processed by numpydoc !! .. py:attribute:: maxnorb :type: int :value: Ellipsis The maximum number of orbitals supported by the Determinant class .. !! processed by numpydoc !! .. py:method:: set_na(n: int, value: bool) -> None Set the occupation of an alpha orbital .. !! processed by numpydoc !! .. py:method:: set_nb(n: int, value: bool) -> None Set the occupation of a beta orbital .. !! processed by numpydoc !! .. py:method:: na(n: int) -> bool Is orbital n occupied by an alpha electron? .. !! processed by numpydoc !! .. py:method:: nb(n: int) -> bool Is orbital n occupied by a beta electron? .. !! processed by numpydoc !! .. py:method:: count_alpha() -> int Count the number of alpha electrons .. !! processed by numpydoc !! .. py:method:: count_beta() -> int Count the number of beta electrons .. !! processed by numpydoc !! .. py:method:: count() -> int Count the total number of electrons .. !! processed by numpydoc !! .. py:method:: create_alpha(n: int) -> float Apply an alpha creation operator to the determinant at the specified orbital index and return the sign .. !! processed by numpydoc !! .. py:method:: create_beta(n: int) -> float Apply a beta creation operator to the determinant at the specified orbital index and return the sign .. !! processed by numpydoc !! .. py:method:: destroy_alpha(n: int) -> float Apply an alpha destruction operator to the determinant at the specified orbital index and return the sign .. !! processed by numpydoc !! .. py:method:: destroy_beta(n: int) -> float Apply a beta destruction operator to the determinant at the specified orbital index and return the sign .. !! processed by numpydoc !! .. py:method:: excitation_connection(arg: Determinant, /) -> tuple[list[int], list[int], list[int], list[int]] Describe the excitation connection of a determinant d, relative to this one.The excitation connection is defined as the creation and annihilation operators that need to be applied to this determinant to obtain d. The excitation connection is a vector of 4 vectors:[[alfa annihilation], [alfa creation],[beta annihilation], [beta creation]] .. !! processed by numpydoc !! .. py:method:: spin_flip() -> Determinant Spin flip the determinant, i.e., swap alpha and beta orbitals .. !! processed by numpydoc !! .. py:method:: str(n: int = 64) -> str Get the string representation of the Slater determinant .. !! processed by numpydoc !! .. py:function:: hilbert_space(nmo: int, na: int, nb: int, nirrep: int = 1, mo_symmetry: collections.abc.Sequence[int] = [], symmetry: int = 0) -> list[Determinant] hilbert_space(nmo: int, na: int, nb: int, ref: Determinant, truncation: int, nirrep: int = 1, mo_symmetry: collections.abc.Sequence[int] = [], symmetry: int = 0) -> list[Determinant] Generate the Hilbert space for a given number of electrons, orbitals, and the truncation level.If information about the symmetry of the MOs is not provided, it assumes that all MOs have symmetry 0.A reference determinant must be provided to establish the excitation rank. .. !! processed by numpydoc !! .. py:function:: spin2(arg0: Determinant, arg1: Determinant, /) -> float spin2(arg0: SparseState, arg1: SparseState, /) -> complex Calculate the expectation value .. !! processed by numpydoc !! .. py:class:: Configuration Configuration(arg: Determinant, /) .. py:method:: str(n: int = 64) -> str Get the string representation of the Slater determinant .. !! processed by numpydoc !! .. py:method:: is_empty(n: int) -> bool Is orbital n empty? .. !! processed by numpydoc !! .. py:method:: is_docc(n: int) -> bool Is orbital n doubly occupied? .. !! processed by numpydoc !! .. py:method:: is_socc(n: int) -> bool Is orbital n singly occupied? .. !! processed by numpydoc !! .. py:method:: set_occ(n: int, value: int) -> None Set the occupation value of an orbital .. !! processed by numpydoc !! .. py:method:: count_docc() -> int Count the number of doubly occupied orbitals .. !! processed by numpydoc !! .. py:method:: count_socc() -> int Count the number of singly occupied orbitals .. !! processed by numpydoc !! .. py:method:: get_docc_vec() -> list[int] Get a list of the doubly occupied orbitals .. !! processed by numpydoc !! .. py:method:: get_socc_vec() -> list[int] Get a list of the singly occupied orbitals .. !! processed by numpydoc !! .. py:function:: set_log_level(arg: int, /) -> None Set the logging verbosity level (0=NONE, 1=ERROR, 2=WARNING, 3=INFO, 4=DEBUG) .. !! processed by numpydoc !! .. py:function:: get_log_level() -> int Get the current logging verbosity level .. !! processed by numpydoc !! .. py:class:: SlaterRules(norb: int, scalar_energy: float, one_electron_integrals: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))], two_electron_integrals: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))]) .. py:method:: energy(arg: Determinant, /) -> float .. py:method:: energies(dets: DeterminantVector) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))] Compute the energies of a vector of determinants .. !! processed by numpydoc !! .. py:method:: slater_rules(lhs: Determinant, rhs: Determinant) -> float .. py:class:: RelSlaterRules(nspinor: int, scalar_energy: float, one_electron_integrals: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None))], two_electron_integrals: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None, None, None))], tei_is_asym: bool = False) .. py:method:: energy(arg: Determinant, /) -> float .. py:method:: energies(dets: DeterminantVector) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, ))] Compute the energies of a vector of determinants .. !! processed by numpydoc !! .. py:method:: slater_rules(lhs: Determinant, rhs: Determinant) -> complex .. py:class:: SparseState SparseState(arg: SparseState) SparseState(arg: collections.abc.Mapping[Determinant, complex], /) SparseState(det: Determinant, val: complex = 1) A class to represent a vector of determinants .. !! processed by numpydoc !! .. py:method:: items() -> collections.abc.Iterator[tuple[Determinant, complex]] .. py:method:: str(arg: int, /) -> str .. py:method:: size() -> int .. py:method:: norm(p: int = 2) -> float Calculate the p-norm of the SparseState (default p = 2, p = -1 for infinity norm) .. !! processed by numpydoc !! .. py:method:: add(arg0: Determinant, arg1: complex, /) -> None .. py:method:: map() -> ankerl::unordered_dense::v4_8_1::detail::table, std::__1::complex, std::__1::hash>, std::__1::equal_to>, std::__1::allocator, std::__1::complex>>, ankerl::unordered_dense::v4_8_1::bucket_type::standard, ankerl::unordered_dense::v4_8_1::detail::default_container_t, false> .. py:method:: elements() -> ankerl::unordered_dense::v4_8_1::detail::table, std::__1::complex, std::__1::hash>, std::__1::equal_to>, std::__1::allocator, std::__1::complex>>, ankerl::unordered_dense::v4_8_1::bucket_type::standard, ankerl::unordered_dense::v4_8_1::detail::default_container_t, false> .. py:method:: apply(arg: SparseOperator, /) -> SparseState Apply an operator to this SparseState and return a new SparseState .. !! processed by numpydoc !! .. py:method:: apply_antiherm(arg: SparseOperator, /) -> SparseState Apply the antihermitian combination of the operator (op - op^dagger) to this SparseState and return a new SparseState .. !! processed by numpydoc !! .. py:method:: number_project(arg0: int, arg1: int, /) -> SparseState .. py:method:: spin2() -> complex Calculate the expectation value of S^2 for this SparseState .. !! processed by numpydoc !! .. py:method:: overlap(arg: SparseState, /) -> complex Calculate the overlap between this SparseState and another SparseState .. !! processed by numpydoc !! .. py:function:: apply_op(sop: SparseOperator, state0: SparseState, screen_thresh: float = 1e-12) -> SparseState .. py:function:: apply_antiherm(sop: SparseOperator, state0: SparseState, screen_thresh: float = 1e-12) -> SparseState .. py:function:: apply_number_projector(arg0: int, arg1: int, arg2: SparseState, /) -> SparseState .. py:function:: get_projection(arg0: SparseOperatorList, arg1: SparseState, arg2: SparseState, /) -> list[complex] .. py:function:: overlap(arg0: SparseState, arg1: SparseState, /) -> complex .. py:function:: normalize(arg: SparseState, /) -> SparseState Returns a normalized version of the input SparseState .. !! processed by numpydoc !! .. py:class:: SparseOperator SparseOperator(arg: SparseOperator) SparseOperator(arg: collections.abc.Mapping[SQOperatorString, complex], /) SparseOperator(sqop: SQOperatorString, coefficient: complex = ...) A class to represent a sparse operator .. !! processed by numpydoc !! .. py:method:: add(sqop: SQOperatorString, coefficient: complex = ...) -> None add(str: SparseOperator.add.str, coefficient: complex = ..., allow_reordering: bool = False) -> None add(acre: collections.abc.Sequence[int], bcre: collections.abc.Sequence[int], aann: collections.abc.Sequence[int], bann: collections.abc.Sequence[int], coeff: complex = ...) -> None Add a term to the operator by passing lists of creation and annihilation indices. This version is faster than the string version and does not check for reordering .. !! processed by numpydoc !! .. py:method:: remove(arg: str, /) -> None Remove a term .. !! processed by numpydoc !! .. py:method:: coefficient(arg: str, /) -> complex Get the coefficient of a term .. !! processed by numpydoc !! .. py:method:: set_coefficient(arg0: str, arg1: complex, /) -> None Set the coefficient of a term .. !! processed by numpydoc !! .. py:method:: commutator(arg: SparseOperator, /) -> SparseOperator Compute the commutator of two SparseOperator objects .. !! processed by numpydoc !! .. py:method:: copy(arg: SparseOperator, /) -> None Create a copy of this SparseOperator .. !! processed by numpydoc !! .. py:method:: norm() -> float Compute the norm of the operator .. !! processed by numpydoc !! .. py:method:: str() -> list[str] Get a string representation of the operator .. !! processed by numpydoc !! .. py:method:: latex() -> str Get a LaTeX representation of the operator .. !! processed by numpydoc !! .. py:method:: adjoint() -> SparseOperator Get the adjoint .. !! processed by numpydoc !! .. py:method:: apply_to_state(state: SparseState, screen_thresh: float = 1e-12) -> SparseState Apply the operator to a state .. !! processed by numpydoc !! .. py:method:: matrix(dets: collections.abc.Sequence[Determinant], screen_thresh: float = 1e-12) -> Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None))] Compute the matrix elements of the operator between a list of determinants .. !! processed by numpydoc !! .. py:function:: sparse_operator(s: str, coefficient: complex = ..., allow_reordering: bool = False) -> SparseOperator sparse_operator(list: collections.abc.Sequence[tuple[str, complex]], allow_reordering: bool = False) -> SparseOperator sparse_operator(s: SQOperatorString, coefficient: complex = ...) -> SparseOperator sparse_operator(list: collections.abc.Sequence[tuple[SQOperatorString, complex]]) -> SparseOperator Create a SparseOperator object from a list of Tuple[SQOperatorString, complex] .. !! processed by numpydoc !! .. py:function:: new_product(arg0: SparseOperator, arg1: SparseOperator, /) -> SparseOperator .. py:function:: sparse_operator_hamiltonian(scalar_energy: float, one_electron_integrals: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))], two_electron_integrals: Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))], screen_thresh: float = 1e-12) -> SparseOperator sparse_operator_hamiltonian(scalar_energy: float, one_electron_integrals: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None))], two_electron_integrals: Annotated[numpy.typing.NDArray[numpy.complex128], dict(shape=(None, None, None, None))], screen_thresh: float = 1e-12) -> SparseOperator .. py:class:: SparseOperatorList SparseOperatorList(arg: SparseOperatorList) A class to represent a list of sparse operators .. !! processed by numpydoc !! .. py:method:: add(arg0: SQOperatorString, arg1: complex, /) -> None add(str: SparseOperatorList.add.str, coefficient: complex = ..., allow_reordering: bool = False) -> None add(acre: collections.abc.Sequence[int], bcre: collections.abc.Sequence[int], aann: collections.abc.Sequence[int], bann: collections.abc.Sequence[int], coeff: complex = ...) -> None Add a term to the operator by passing lists of creation and annihilation indices. This version is faster than the string version and does not check for reordering .. !! processed by numpydoc !! .. py:method:: add_term(op_list: collections.abc.Sequence[std::__1::tuple], value: float = 0.0, allow_reordering: bool = False) -> None .. py:method:: to_operator() -> SparseOperator .. py:method:: remove(arg: str, /) -> None Remove a specific element from the vector space .. !! processed by numpydoc !! .. py:method:: coefficients() -> list[complex] .. py:method:: set_coefficients(arg: collections.abc.Sequence[complex], /) -> None .. py:method:: reverse() -> SparseOperatorList Reverse the order of the operators .. !! processed by numpydoc !! .. py:method:: pop_left() -> SparseOperatorList Remove the leftmost operator .. !! processed by numpydoc !! .. py:method:: pop_right() -> SparseOperatorList Remove the rightmost operator .. !! processed by numpydoc !! .. py:method:: slice(start: int, end: int) -> SparseOperatorList Return a slice of the operator .. !! processed by numpydoc !! .. py:method:: apply_to_state(state: SparseState, screen_thresh: float = 1e-12) -> SparseState Apply the operator to a state .. !! processed by numpydoc !! .. py:function:: operator_list(s: str, coefficient: complex = ..., allow_reordering: bool = False) -> SparseOperatorList operator_list(list: collections.abc.Sequence[tuple[str, complex]], allow_reordering: bool = False) -> SparseOperatorList operator_list(s: SQOperatorString, coefficient: complex = ...) -> SparseOperatorList operator_list(list: collections.abc.Sequence[tuple[SQOperatorString, complex]]) -> SparseOperatorList Create a SparseOperatorList object from a list of Tuple[SQOperatorString, complex] .. !! processed by numpydoc !! .. py:class:: SparseExp(maxk: int = 19, screen_thresh: float = 1e-12) A class to compute the exponential of a sparse operator .. !! processed by numpydoc !! .. py:method:: apply_op(sop: SparseOperator, state: SparseState, scaling_factor: float = 1.0) -> SparseState apply_op(sop: SparseOperatorList, state: SparseState, scaling_factor: float = 1.0) -> SparseState Apply the exponential of a SparseOperatorList to a state: exp(scaling_factor * sop) |state> .. !! processed by numpydoc !! .. py:method:: apply_antiherm(sop: SparseOperator, state: SparseState, scaling_factor: float = 1.0) -> SparseState apply_antiherm(sop: SparseOperatorList, state: SparseState, scaling_factor: float = 1.0) -> SparseState Apply the antihermitian exponential of a SparseOperatorList to a state: exp(scaling_factor * (sop - sop^dagger)) |state .. !! processed by numpydoc !! .. py:class:: SparseFactExp(screen_thresh: float = 1e-12) A class to compute the product exponential of a sparse operator using factorization .. !! processed by numpydoc !! .. py:method:: apply_op(sop: SparseOperatorList, state: SparseState, inverse: bool = False, reverse: bool = False) -> SparseState Apply the factorized exponential of a SparseOperator to a state: ... exp(op2) exp(op1) |state>. inverse=True computes the inverse, and reverse=Trueapplies the operators in reverse order .. !! processed by numpydoc !! .. py:method:: apply_antiherm(sop: SparseOperatorList, state: SparseState, inverse: bool = False, reverse: bool = False) -> SparseState Apply the factorized antihermitian exponential of a SparseOperator to a state: ... exp(op2 - op2^dagger) exp(op1 - op1^dagger) |state>. inverse=True computes the inverse, and reverse=True applies the operators in reverse order .. !! processed by numpydoc !! .. py:method:: apply_antiherm_deriv(sqop: SQOperatorString, t: complex, state: SparseState) -> tuple[SparseState, SparseState] .. py:function:: compute_a_1rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the alpha 1-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_b_1rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None))] Compute the beta 1-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_aa_2rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the alpha-alpha 2-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_ab_2rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the alpha-beta 2-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_bb_2rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None))] Compute the beta-beta 2-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_aaa_3rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None))] Compute the alpha-alpha-alpha 3-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_aab_3rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None))] Compute the alpha-alpha-beta 3-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_abb_3rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None))] Compute the alpha-beta-beta 3-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_bbb_3rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None))] Compute the beta-beta-beta 3-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_aaaa_4rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None, None, None))] Compute the alpha-alpha-alpha-alpha 4-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_aaab_4rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None, None, None))] Compute the alpha-alpha-alpha-beta 4-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_aabb_4rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None, None, None))] Compute the alpha-alpha-beta-beta 4-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_abbb_4rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None, None, None))] Compute the alpha-beta-beta-beta 4-RDM between two SparseStates .. !! processed by numpydoc !! .. py:function:: compute_bbbb_4rdm(state_left: SparseState, state_right: SparseState, norb: int) -> Annotated[numpy.typing.NDArray[numpy.float64], dict(shape=(None, None, None, None, None, None, None, None))] Compute the beta-beta-beta-beta 4-RDM between two SparseStates .. !! processed by numpydoc !! .. py:class:: SQOperatorString(arg0: Determinant, arg1: Determinant, /) A class to represent a string of creation/annihilation operators .. !! processed by numpydoc !! .. py:method:: cre() -> Determinant Get the creation operator string .. !! processed by numpydoc !! .. py:method:: ann() -> Determinant Get the annihilation operator string .. !! processed by numpydoc !! .. py:method:: sign_mask() -> Determinant Get the precomputed sign mask .. !! processed by numpydoc !! .. py:method:: str() -> str Get the string representation of the operator string .. !! processed by numpydoc !! .. py:method:: count() -> int Get the number of operators .. !! processed by numpydoc !! .. py:method:: adjoint() -> SQOperatorString Get the adjoint operator string .. !! processed by numpydoc !! .. py:method:: spin_flip() -> SQOperatorString Get the spin-flipped operator string .. !! processed by numpydoc !! .. py:method:: number_component() -> SQOperatorString Get the number component of the operator string .. !! processed by numpydoc !! .. py:method:: non_number_component() -> SQOperatorString Get the non-number component of the operator string .. !! processed by numpydoc !! .. py:method:: latex() -> str Get the LaTeX representation of the operator string .. !! processed by numpydoc !! .. py:method:: latex_compact() -> str Get the compact LaTeX representation of the operator string .. !! processed by numpydoc !! .. py:method:: is_identity() -> bool Check if the operator string is the identity operator .. !! processed by numpydoc !! .. py:method:: is_nilpotent() -> bool Check if the operator string is nilpotent .. !! processed by numpydoc !! .. py:method:: op_tuple() -> std::__1::vector, std::__1::allocator>> Get the operator tuple .. !! processed by numpydoc !! .. py:function:: sqop(s: str, allow_reordering: bool = False) -> tuple[SQOperatorString, float] Create an operator string from a string representation (default: no not allow reordering) .. !! processed by numpydoc !! .. py:function:: compute_sign_mask(cre: Determinant, ann: Determinant) -> Determinant Compute the sign mask associated with a set of creation and annihilation operators .. !! processed by numpydoc !! .. py:class:: CommutatorType(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. !! processed by numpydoc !! .. py:attribute:: commute :value: 0 .. py:attribute:: anticommute :value: 1 .. py:attribute:: may_not_commute :value: 2 .. py:function:: commutator_type(lhs: SQOperatorString, rhs: SQOperatorString) -> CommutatorType Get the commutator type of two operator strings .. !! processed by numpydoc !!