StateSpaceMatrix

A SparseArray that holds onto a BasisStateSpace that keeps track of the total set of states involved. By default is assumed real-symmetric. This can be relaxed in the future.

TODO: The idea is good, but calculating what is “in” the array and what is “out” every single time this is applied could be slow… We’ll need to test to see how slow

 

__init__(self, initial_basis, initial_vals=None, column_space=None, symmetric=True): 
  • initial_basis: BasisStateSpace | RepresentationBasis

 

@property
shape(self): 

 

@property
basis(self): 

Returns the basis for the matrix rep

  • :returns: _

 

@property
brakets(self): 

Returns the BraKetSpace for the held indices

  • :returns: _

 

@classmethod
identity_from_space(cls, space, column_space=None): 

Returns a StateSpaceMatrix where the diagonal is filled with 1s

  • space: Any
  • column_space: Any
  • :returns: _

 

extend_basis(self, states, extend_columns=True): 

Extends the held state space and resizes the held array if need be

  • states: BasisStateSpace
  • :returns: _

 

compute_values(self, func, brakets): 

Computes new values into the held SparseArray based on the function and brakets provided and returns the entire array of values

  • func: Any

    A function that can take a braket spec and compute values

  • brakets: Any

    A set of brakets to compute values for

  • :returns: _

 

dot(self, other): 

Performs a dot product between the held SparseArray and another StateSpaceMatrix

  • other: StateSpaceMatrix

    other matrix

  • :returns: _

 

__getitem__(self, item): 

 

__setitem__(self, item, vals): 

 

__repr__(self): 

Feedback

Examples

Templates

Documentation