schrodinger.application.jaguar.nmr_basis module

exception schrodinger.application.jaguar.nmr_basis.BasisSizeException

Bases: Exception

class schrodinger.application.jaguar.nmr_basis.Basis(conmatrix: numpy.ndarray[Any, numpy.dtype[numpy.float64]], mults: numpy.ndarray[Any, numpy.dtype[int]], nspins: int, max_subgraph_size: int, sym_groups: Optional[List[str]] = None, sym_spins: Optional[List[List[int]]] = None, use_symmetry: bool = False)

Bases: object

__init__(conmatrix: numpy.ndarray[Any, numpy.dtype[numpy.float64]], mults: numpy.ndarray[Any, numpy.dtype[int]], nspins: int, max_subgraph_size: int, sym_groups: Optional[List[str]] = None, sym_spins: Optional[List[List[int]]] = None, use_symmetry: bool = False)
build_irreps(nspins: int)

Destructive workflow for reducing the basis by removing states identical by permutational symmetry. Then generate the respective projectors for later manipulation.

This function builds and populates self.irrep_projector and self.irrep_dimension.

NOTE: This algorithm works by building every permutation then screening duplicate states. This is both wasteful in runtime and its memory use explodes with system size and symmetry order. As such, we cannot use it in production and it remains here for reference.

If required, we should implement a constructive algorithm instead that builds the symmetry-unique states directly, avoiding the wasteful create-and-filter.

Parameters

nspins – Number of spins in the system.

static remove_subset_clusters(mat: scipy.sparse._arrays.csr_array) scipy.sparse._arrays.csr_array

Remove clusters that are subsets of other clusters.

If a cluster is purely a subset of another cluster, it does not add any value to the simulation.

Parameters

mat – matrix with rows that may be subsets

Returns

matrix with subset rows removed