#include <triqs/hilbert_space.hpp>


template<typename Lambda>
void foreach (space_partition<StateType, OperatorType> & SP, Lambda L)

Apply a callable object to all basis Fock states in a given space partition

The callable must take two arguments, 1) index of the basis Fock state in the considered full Hilbert space, and 2) index of the subspace this basis state belongs to.

Template parameters

  • Lambda Type of the callable object


  • SP Subject space partition
  • L Callable object