BraKetSpace

Represents a set of pairs of states that can be fed into a Representation or Operator to efficiently tell it what terms it need to calculate. This basically just implements a bunch of stuff for generating a Graph defining the connections between states.

aggressive_caching_enabled: bool
preindex_trie_enabled: bool
OrthogoIndexerTrie: OrthogoIndexerTrie
CachingOrthogonalIndexCalculator: CachingOrthogonalIndexCalculator
OrthogonalIndexSparseCalculator: OrthogonalIndexSparseCalculator
OrthogonalIndexCalculator: OrthogonalIndexCalculator
use_change_indices: bool

 

__init__(self, bra_space, ket_space, changes=None): 
  • bra_space: BasisStateSpace
  • ket_space: BasisStateSpace

 

@property
state_pairs(self): 

 

@classmethod
from_indices(cls, inds, basis=None, quanta=None): 

 

__len__(self): 

 

__repr__(self): 

 

remove_duplicates(self, assume_symmetric=True): 

 

load_space_diffs(self): 

 

load_non_orthog(self, use_aggressive_caching=None, use_preindex_trie=None, preindex_trie_depth=None, shared_memory_manager=None): 

 

share(self, shared_memory_manager): 

Creates a shared memory version of the BraKetSpace

  • shared_memory_manager: Any
  • :returns: _

 

unshare(self, shared_memory_manager): 

 

clear_cache(self): 

 

free(self): 

 

get_non_orthog(self, inds, assume_unique=False, use_aggressive_caching=None, use_preindex_trie=None, preindex_trie_depth=None, shared_memory_manager=None): 

Returns whether the states are non-orthogonal under the set of indices.

  • inds: Any
  • :returns: _

 

get_sel_rules_from1d(self, inds, rules): 

 

get_sel_rule_filter(self, rules): 

 

take_subspace(self, sel): 

 

take_subdimensions(self, inds): 

 

apply_non_orthogonality(self, inds, use_aggressive_caching=None, use_preindex_trie=None, preindex_trie_depth=None, assume_unique=False, use_change_indices=None): 

Takes the bra-ket pairs that are non-orthogonal under the indices inds

  • inds: Any
  • assume_unique: Any
  • :returns: _

 

apply_sel_rules_along(self, rules, inds, permute=True, dim=None): 

 

apply_sel_sums(self, rules, inds): 

We reckon it’s fast enough to just determine if the number of quanta in the bra is compatible with the number of quanta in the ket…

  • rules: Any
  • inds: Any
  • :returns: _

 

apply_sel_rules(self, rules): 

Applies selections rules

  • rules: Any
  • :returns: _

 

adjacency_matrix(self, total_space=None): 

Generates the (sparse) unweighted adjacency matrix for the bras & kets

  • :returns: _

 

split(self, chunksize): 

splits the brakets into blocks of at max chunksize

  • chunksize: int
  • :returns: Iterable[BraKetSpace]

 

concatenate(self, other): 

Feedback

Examples

Templates

Documentation