VPTStateSpace
Provides a helper to make it easier to set up the input state spaces/degenerate spaces to run the perturbation theory
__init__(self, states, degeneracy_specs=None, system=None, frequencies=None, evaluator=None):
states:list | intA list of states or a number of quanta to target
degeneracy_specs:'auto' | list | dictA specification of degeneracies, either as polyads, explicit groups of states, or parameters to a method. (see Details for more info)
@classmethod
from_system_and_spec(cls, system, spec, **opts):
@classmethod
from_system_and_quanta(cls, system, quanta, target_modes=None, only_target_modes=False, **opts):
Takes a system and a number of quanta and constructs a state space based on that
system:Anyquanta:Anyopts:Anyany of the options supported by
:returns:_
@classmethod
get_state_list_from_quanta(cls, n_quanta, n_modes, target_modes=None, only_target_modes=False):
Gets states up to n_quanta over n_modes
n_quanta:int | Iterable[int]the number of quanta to provide excitations for
n_modes:intthe number of modes in the system
target_modes:Iterable[int]modes that must be excited
only_target_modes:boolwhether or not to only support excitations in the
target_modes:returns:_
build_degenerate_state_spaces(self, degeneracy_specs, states, system=None, evaluator=None, freqs=None) -> '(None|DegeneracySpec, None|list[np.ndarray])':
degeneracy_specs:Any:returns:_
filter_generator(self, target_property, order=2, initial_states=None, postfilters=None):
get_filter(self, target_property, order=2, initial_states=None, postfilters=None):
Obtains a state space filter for the given target property using the states we want to get corrections for
target_property:Anyorder:Any:returns:_
@classmethod
get_state_space_filter(cls, states, initial_states=None, n_modes=None, order=2, target='wavefunctions', postfilters=None, **opts):
Gets state_space_filters for the input states targeting some property
states:Anythe input states
n_modes:inttarget:strthe property to target, one of
('frequencies', 'intensities', 'wavefunctions'):returns:_
There are multiple possible values for the degeneracy_specs.
The simplest is to use the automatic approach, in which we supply a numeric type (int, float, etc.) to use as the WFC threshold.
The next simplest is to explicitly supply the groups we want, like
[
[ # the first resonant space
state_1,
state_2,
state_3
],
[ # the second
state_5, state_11, ...
],
...
]
We can also supply pairs of relations for determining resonances, like
[
[state_1, state_2], # A first relation
[state_3, state_4], # another relation
...
]
To allow for extra options, you can also supply a dict. If you wanted to have a different wfc_threshold and you wanted to do the secondary resonant space splitting step with a very large threshold, you could do that by supplying
{
'wfc_threshold':.1,
'energy_cutoff':1.0 # in Hartree
}
or you can explicitly add extra groups to the pairs of polyad rules by saying
{
'polyads':[
[state_1, state_2], # A first relation
[state_3, state_4], # another relation
...
],
'extra_groups': [
[ # the first resonant space
state_a,
state_b,
state_c
],
[ # the second
state_d, state_e, ...
],
...
]
}
This also allows us to define more resonance handling strategies.
The Martin Test is supported,
{
'martin_threshold':.1/219465, #in Hartree
}
As are total quanta vectors/polyads
{
'nT': [1, 1, 1, 0, 2, 2, 0] # e.g.
}