quantax.state.State#
- class quantax.state.State#
Abstract class for quantum states
- __init__(symm: Symmetry | None = None)#
- Parameters:
symm – The symmetry of the state, default to
quantax.symmetry.Identity
- __call__(fock_states: ndarray | Array) ndarray | Array #
Evaluate the wave function \(\psi(s) = \left<s|\psi\right>\) by
state(s)
- Parameters:
fock_states – A batch of fock states with entries \(\pm 1\)
- __getitem__(basis_ints: ndarray | Array) ndarray | Array #
Evaluate the wave function \(\psi(s) = \left<s|\psi\right>\) by
state[s]
- Parameters:
basis_ints – A batch of basis integers
- __matmul__(other: State) Number #
Compute the contraction \(\left< \psi|\phi \right>\) by
self @ other
. This is implemented by convertingself
andother
toDenseState
.
- property N: int#
Number of sites
- property nsymm: int#
Number of symmetry group elements
- property basis: spin_basis_general#
Quspin basis of the state
- property Nparticle: Tuple[int, int] | None#
Number of particle convervation of the state
- todense(symm: Symmetry | None = None) DenseState #
Obtain the
quantax.state.DenseState
corresponding to the current state- Parameters:
symm – The symmetry of the state, default to the current symmetry of the state
Warning
Users are responsible to ensure that the state satisfies the given
symm
.