TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
MC utilities

Detailed Description

Various utilities used with MC tools.

This group collects auxiliary building blocks used by the MC framework, most prominently the random number generator:

  • triqs::mc_tools::random_generator is a type-erased wrapper around a pseudo-random engine. The engine is selected at construction by name ("mt19937", several "lagged_fibonacci..." variants, "ranlux3", and the built-in Mersenne Twister); samples are produced in batches into an internal buffer for efficiency. Overloaded operator() returns either a uniform double in \( [0,1) \) or a uniform integer in \( \{0, ..., i-1 \} \), and the generator state can be serialised to HDF5 for reproducible restarts.

The list of available engine names is exposed at runtime via triqs::mc_tools::random_generator_names_list.

Classes

class  triqs::mc_tools::random_generator
 Random number generator with a selectable underlying engine. More...

Functions

std::string triqs::mc_tools::random_generator_names (std::string const &sep=" ")
 Get a string containing the names of all available RNGs.
std::vector< std::string > triqs::mc_tools::random_generator_names_list ()
 Get a list of all available RNG names.

Function Documentation

◆ random_generator_names()

std::string triqs::mc_tools::random_generator_names ( std::string const & sep = " ")
nodiscard

#include <triqs/mc_tools/random_generator.cpp>

Get a string containing the names of all available RNGs.

Parameters
sepSeparator between the names.
Returns
String containing the available RNGs separated by the given separator.

Definition at line 77 of file random_generator.cpp.