SelectionRuleStateSpace

A BasisMultiStateSpace subclass that is only built from applying selection rules to an initial space This really should have been called TransformedStateSpace but I am dumb

track_change_positions: bool
direct_sum_chunk_size: int

 

__init__(self, init_space, excitations, selection_rules=None, ignore_shapes=False, changes=None): 
  • init_space: Any
  • excitations: Any
  • selection_rules: Any

 

to_state(self, serializer=None): 

 

from_state(data, serializer=None): 

 

as_indices(self): 

Pulls the full set indices out of all of the held spaces and returns them as a flat vector

  • :returns: _

 

as_excitations(self): 

Pulls the full set excitations out of all of the held spaces and returns them as a flat vector

  • :returns: _

 

@property
representative_space(self): 

 

@property
nstates(self): 

 

check_indices(self): 

 

take_states(self, states, track_excitations=True, track_indices=True): 

Takes the intersection of each held space and the specified states

  • states: Any
  • :returns: _

 

take_subspace(self, states): 

Takes the intersection of each held space and the specified states

  • states: Any
  • :returns: _

 

take_subdimensions(self, inds): 

Takes the subdimensions from each space

  • inds: Any
  • :returns: _

 

drop_states(self, states): 

Takes the intersection of each held space and the specified states

  • states: Any
  • :returns: _

 

drop_subspace(self, inds): 

Takes the intersection of each held space and the specified states

  • states: Any
  • :returns: _

 

drop_subdimensions(self, inds): 

Takes the subdimensions from each space

  • inds: Any
  • :returns: _

 

get_representation_indices(self, other=None, freqs=None, freq_threshold=None, selection_rules=None, filter=None, return_filter=False): 

This is where this pays dividends, as we know that only the init_space and the held excitations can couple which reduces the combinatoric work by a factor of like 2.

  • :returns: _

 

filter_representation_inds(self, ind_pairs, q_changes): 

Filters representation indices by the allowed #quantum changes. Not sure I’ll even need this, if get_representation_indices is tight enough.

  • ind_pairs: Any
  • q_changes: Any
  • :returns: _

 

get_representation_brakets(self, freqs=None, freq_threshold=None, other=None, selection_rules=None, filter=None, return_filter=False): 

 

from_rules(space, selection_rules, target_dimensions=None, filter_space=None, iterations=1, method='new', parallelizer=None, chunk_size=None, logger=None, track_excitations=True, track_indices=True, full_basis=None): 
  • space: BasisStateSpace | BasisMultiStateSpace

    initial space to which to apply the transformations

  • selection_rules: Iterable[Iterable[int]]

    different possible transformations

  • iterations: int

    number of times to apply the transformations

  • filter_space: BasisStateSpace | None

    a space within which all generated BasisStateSpace objects must be contained

  • :returns: SelectionRuleStateSpace

 

filter_transitions(self, excluded_transitions, in_place=False): 

 

union(self, other, handle_subspaces=True, track_excitations=True, track_indices=True): 

Returns a merged version of self and other, adding any states in other to self and merging where they intersect

  • other: SelectionRuleStateSpace
  • :returns: _

 

intersection(self, other, handle_subspaces=True, use_indices=False, track_excitations=True, track_indices=True): 

Returns an intersected self and other

  • other: SelectionRuleStateSpace
  • :returns: _

 

difference(self, other, handle_subspaces=True): 

Returns an diff’ed self and other. We get fundamentally different behaviour for handle_subspaces than without it. If we have it on then differences are computed for each states in the intersection of the primary (key) states. If we have it off then the difference in the key states is computed and nothing more is done.

  • other: SelectionRuleStateSpace
  • :returns: SelectionRuleStateSpace

 

__getitem__(self, item): 

 

__setitem__(self, item, vals): 

 

map(self, f): 

 

__repr__(self): 

Feedback

Examples

Templates

Documentation