SpinhalfDistributed
A block in a spin \(S=1/2\) Hilbert space with distributed computing capabilities.
Sources spinhalf_distributed.hpp, spinhalf_distributed.cpp
Constructors
Name | Description | Default |
---|---|---|
nsites | number of sites (integer) | |
nup | number of "up" spin setting spin (integer) | |
backend | backend used for coding the basis states | auto |
The parameter backend
chooses how the block is coded internally. By using the default parameter auto
the backend is chosen automatically. Alternatives are 32bit
, 64bit
.
Iteration
An SpinhalfDistributed block can be iterated over, where at each iteration a ProductState representing the corresponding basis state is returned.
Methods
index
Returns the index of a given ProductState in the basis of the SpinhalfDistributed block.
nsites
Returns the number of sites of the block.
size
Returns the size of the block on a local process.
dim
Returns the dimension of the block, i.e. the sum of all sizes across all processes.
isreal
Returns whether the block can be used with real arithmetic. Complex arithmetic is needed when a Representation is genuinely complex.