25#include <triqs/stat/histograms.hpp>
26#include <triqs/experimental/nfft_array.hpp>
28#include <triqs/utility/legendre.hpp>
30#include "../qmc_data.hpp"
34namespace triqs_cthyb {
37 using namespace triqs::experimental;
41 triqs::utility::legendre_generator l_gen;
44 tilde_p_gen(
double beta) : beta(beta) {}
45 void reset(time_pt
const &tau1, time_pt
const &tau2) {
46 l_gen.reset(2 *
double(tau1 - tau2) / beta - 1);
47 f = tau1 > tau2 ? 1 : -1;
49 double next() {
return f * l_gen.next(); }
53 template <G2_channel Channel>
struct measure_G2_iwll {
56 G2_iwll_t::view_type G2_iwll;
57 G2_measures_t G2_measures;
60 mc_weight_t average_sign;
63 array<nfft_array_t<1, 6>, 2> nfft_buf;
65 measure_G2_iwll(std::optional<G2_iwll_t> & G2_iwll_opt, qmc_data
const &data, G2_measures_t & G2_measures);
66 void accumulate(mc_weight_t s);
67 void collect_results(mpi::communicator
const &c);
70 double setup_times(tilde_p_gen & p_l1_gen, tilde_p_gen & p_l2_gen, op_t
const & i, op_t
const & j, op_t
const & k, op_t
const & l);