#include <triqs/hilbert_space.hpp>


template<typename Lambda>
void foreach (state<type-parameter-0-0, type-parameter-0-1, true> const & st, Lambda l)

Apply a callable object to non-vanishing amplitudes of a state

The callable must take two arguments, 1) index of the basis Fock state in the associated Hilbert space, and 2) the corresponding amplitude.

Template parameters

  • Lambda Type of the callable object


  • st State object

  • l Callable object