PerturbationTheoryCorrections
Represents a set of corrections from perturbation theory. Can be used to correct other operators in the basis of the original calculation.
__init__(self, states, coupled_states, total_basis, energy_corrs, wfn_corrections, all_energy_corrections=None, degenerate_states=None, degenerate_transformation=None, degenerate_energies=None, degenerate_hamiltonians=None, nondeg_hamiltonian_precision=3, logger=None):
states:BasisStateSpacecoupled_states:BasisMultiStateSpacetotal_basis:BasisMultiStateSpaceenergy_corrs:np.ndarraywfn_corrections:Iterable[SparseArray]degenerate_states:None | np.ndarraydegenerate_transformation:None | np.ndarraydegenerate_energies:None | np.ndarray
@classmethod
from_dicts(cls, states, corrections, **opts):
states:dicta dict with the states described by the corrections, the set of states coupled, and the size of the overall basis
corrections:dictthe corrections generated, including the corrections for the energies, wavefunctions, and a transformation from degenerate PT
@property
degenerate(self):
:returns:_
@property
energies(self):
:returns:_
@property
order(self):
:returns:_
take_subspace(self, space):
Takes only those elements that are in space
space:Any:returns:_
@classmethod
create_coupling_matrix(cls, corrs, states: Psience.BasisReps.StateSpaces.BasisStateSpace, flat_total_space: Psience.BasisReps.StateSpaces.BasisStateSpace, nstates, order, filters=None, non_zero_cutoff=1e-14, logger=None):
corrs:Anystates:Anyflat_total_space:Anynstates:Anyorder:Anyfilters:Anynon_zero_cutoff:Any:returns:_
prune(self, threshold=0.1, in_place=False):
Returns corrections with couplings less than the given cutoff set to zero
threshold:Any:returns:_
get_transformed_Hamiltonians(self, hams, deg_group=None):
corrs:Anydeg_group:Any:returns:_
get_degenerate_rotation(self, deg_group, hams, label=None, zero_point_energy=None, local_coupling_hamiltonian=None, local_coupling_order=None):
deg_group:Anycorrs:Any:returns:_
get_degenerate_transformation(self, group, hams, gaussian_resonance_handling=False, label=None, zero_point_energy=None, local_coupling_hamiltonian=None, local_coupling_order=None):
@staticmethod
default_state_filter(state, couplings, energy_cutoff=None, energies=None, basis=None, target_modes=None):
Excludes modes that differ in only one position, prioritizing states with fewer numbers of quanta (potentially add restrictions to high frequency modes…?)
input_state:Anycouplings:Any:returns:_
find_strong_couplings(self, threshold=0.1, state_filter=None):
Finds positions in the expansion matrices where the couplings are too large
threshold:Any:returns:_
format_strong_couplings_report(self, couplings=None, threshold=0.1, int_fmt='{:>3.0f}', padding='{:<8}', join=True, use_excitations=True):
collapse_strong_couplings(self, sc: dict):
sc:Any:returns:_
operator_representation(self, operator_expansion, order=None, subspace=None, contract=True, logger_symbol='A', logger_conversion=None):
Generates the representation of the operator in the basis of stored states
operator_expansion:Iterable[float] | Iterable[np.ndarray]the expansion of the operator
order:Iterable[float] | Iterable[np.ndarray]the order of correction to go up to
subspace:None | BasisStateSpacethe subspace of terms in which the operator expansion is defined
:returns:Iterable[np.ndarray]t h e
s e t
o f
r e p r e s e n t a t i o n
m a t r i c e s
f o r
t h i s
o p e r a t o r
get_overlap_matrices(self):
Returns the overlap matrices for the set of corrections at each order of correction
:returns:_
savez(self, file):
@classmethod
loadz(cls, file):
to_state(self, serializer=None):
@classmethod
from_state(cls, data, serializer=None):