hsdim

State (Hilbert) space dimension of a spin system.

Syntax
N = hsdim(SpinSys)
Description

hsdim returns the dimension of the state space (which is a Hilbert space) of the spin system given in SpinSys. SpinSys can be either a vector containing the spin quantum numbers of the spins constituting the system or a complete spin system structure.

Examples

The state space dimension of a spin system of one spin-1/2 and four spin-1 is

N = hsdim([1/2 1 1 1 1])
N =
   162
Algorithm

The dimension of the state space is equal to the number of energy eigenstates of the system and is

[eqn]
See also

spinvec, sop, stev