Namespace qdk::chemistry::algorithms::detail
-
namespace detail
Functions
-
std::vector<size_t> _get_inactive_space_indices(size_t nelec, const std::vector<size_t> &active_space_indices)
Helper function to determine inactive space indices for restricted orbitals.
- Parameters:
nelec – Number of electrons
active_space_indices – Active space orbital indices
- Returns:
Vector of inactive space orbital indices
-
std::pair<std::vector<size_t>, std::vector<size_t>> _get_inactive_space_indices(size_t nelec_a, size_t nelec_b, const std::vector<size_t> &active_space_indices_a, const std::vector<size_t> &active_space_indices_b)
Helper function to determine inactive space indices for unrestricted orbitals.
- Parameters:
nelec_a – Number of alpha electrons
nelec_b – Number of beta electrons
active_space_indices_a – Alpha active space orbital indices
active_space_indices_b – Beta active space orbital indices
- Returns:
Pair of vectors containing (alpha_inactive_space_indices, beta_inactive_space_indices)
Helper function to sort entropies and their corresponding orbital indices in descending order.
- Parameters:
wavefunction – The wavefunction containing orbital entropies and indices.
normalize_entropies – If true, normalize entropies by the maximum entropy value.
- Throws:
std::runtime_error – if the wavefunction does not have single orbital entropies.
- Returns:
A pair containing a vector of sorted orbital indices and a vector of sorted entropies.
Create a new Orbitals object with the specified active space indices.
- Parameters:
wavefunction – The wavefunction containing the orbitals.
active_space_indices_a – The active space orbital indices for alpha electrons.
active_space_indices_b – The active space orbital indices for beta electrons (optional for restricted orbitals).
- Returns:
A new Orbitals object with the specified active space indices.
Create a new Wavefunction object with updated orbitals.
Generate a new Wavefunction by replacing the orbitals of the given wavefunction with the provided new orbitals, keeping the identical total, determinants.
- Parameters:
wavefunction – The original wavefunction.
new_orbitals – The new orbitals to set in the wavefunction.
- Returns:
A new Wavefunction object with the updated orbitals.
-
std::vector<size_t> _get_inactive_space_indices(size_t nelec, const std::vector<size_t> &active_space_indices)