75 inline static void accumulate(ContainerOverSubrelations& evals,
78 const FF& scaling_factor)
81 using CoefficientAccumulator =
typename Accumulator::CoefficientAccumulator;
94 static const FF half =
FF(2).invert();
95 auto two_minus_q_cp = -q_cp_m +
FF(2);
96 auto q_cp_minus_1 = q_cp_m -
FF(1);
97 auto bilinear_gate = q_cp_m * two_minus_q_cp;
98 auto batched_eq_gate = q_cp_m * q_cp_minus_1 * half;
102 auto scaled_bilinear_gate = bilinear_gate * scaling_factor;
103 auto scaled_batched_eq_gate = batched_eq_gate * scaling_factor;
120 auto linears = (q_l_m * w_l_m) + (q_r_m * w_r_m) + (q_o_m * w_o_m) + (q_4_m * w_4_m) + q_c_m;
123 auto batched_eq_half_1 = (q_l_m * w_l_m) + (q_r_m * w_r_m) + q_c_m;
133 auto batched_eq_half_2 = (q_o_m * w_o_m) + (q_4_m * w_4_m) + q_m_m;
134 std::get<1>(evals) += ShortAccumulator(scaled_batched_eq_gate) * ShortAccumulator(batched_eq_half_2);