triqs::hilbert_space::state

#include <triqs/hilbert_space/state.hpp>

template<typename HilbertSpace, typename ScalarType, bool BasedOnMap> class state

Many-body state as a list of amplitudes in a basis of Fock states

The amplitudes can either be stored using a map (only non-vanishing elements are stored) or in a nda::vector. In order to make this class model [[statevector_concept]] free function [[make_zero_state]] is defined. Specializations on BasedOnMap provide different extensions of the concept, and are documented separately:

  • state, map-based storage

  • state, vector-based storage

Function [[project]] can be used to project a state from one Hilbert space to another Hilbert space/subspace.

Template parameters

  • HilbertSpace: Hilbert space type, one of [[hilbert_space]] and [[sub_hilbert_space]]

  • ScalarType: Amplitude type, normally double or std::complex<double>

  • BasedOnMap: Use the implementation based on a map