quspin.basis.get_basis_type
- quspin.basis.get_basis_type(N, Np, sps)
Returns minimum dtype to represent manybody state.
Given the system size, number of particles and states per site, this function calculates the minimum type required to represent those states.
- Parameters:
- Nint
total number of sites on lattice
- NpNone, int, list[int]
number of particles on the lattice. For a list, the largest particle sector is chosen for the representation.
- sps: int
number of possible states allowed per site. e.g. spin-1/2 has 2 possible states per site.
- Returns:
- numpy.dtype object
the appropriate dtype size to represent the system. will be one of: uint32, uint64, uint256, uint1024, uint4096, or uint16384.
Examples
>>> dtype = get_basis_type(10,5,2)