10namespace triqs_ctint {
21 class lazy_det_operation_t {
25 std::vector<det_t> *dets;
30 std::vector<c_t> c_lst = {};
31 std::vector<cdag_t> cdag_lst = {};
34 void lazy_add_c(c_t
const &c_) { c_lst.emplace_back(c_); }
37 void lazy_add_cdag(cdag_t
const &cdag_) { cdag_lst.emplace_back(cdag_); }
50 std::vector<one_block> lazy_op_lst;
53 lazy_det_operation_t(std::vector<det_t> *dets) : dets(dets), lazy_op_lst(dets->size()) {}
57 for (
auto &l : lazy_op_lst) {
75 g_tau_scalar_t det_ratio = 1.0;
76 for (
auto i : range(dets->size())) det_ratio *= lazy_op_lst[i].execute_try_insert(&(*dets)[i]);
83 g_tau_scalar_t det_ratio = 1.0;
84 for (
auto i : range(dets->size())) det_ratio *= lazy_op_lst[i].execute_try_remove(&(*dets)[i]);
91 g_tau_scalar_t det_ratio = 1.0;
92 for (
auto i : range(dets->size())) det_ratio *= lazy_op_lst[i].execute_try_change_col_row(&(*dets)[i]);
g_tau_scalar_t execute_try_insert()
Tries to perform the insertions into all dets, returning the det ratio.
g_tau_scalar_t execute_try_change_col_row()
Tries to perform the removal from all dets, returning the det ratio.
lazy_det_operation_t & operator<<(vertex_t const &v)
Register a vertex for insertion/removal into the configuration.
g_tau_scalar_t execute_try_remove()
Tries to perform the removal from all dets, returning the det ratio.
void reset()
Clean all registered moves.
int b2
Second operator of the vertex (ingoing, c): block index, non-block.
int b4
Fourth operator of the vertex (ingoing, c): block index, non-block.
int b1
First operator of the vertex (outgoing, c^\dagger): block index, non-block.
int b3
Third operator of the vertex (outgoing, c^\dagger): block index, non-block.
vertex_idx_t idx
Object containing discrete quantum numbers for external legs, i.e. block and non-block index.
int s
Value of auxiliary spin.
int vertex_label
The label of the vertex (position in h_int).
tau_t tau1
Imaginary times for all four external legs (c^\dagger, c, c^\dagger, c).