3#ifndef WILSON_PLAQUETTE_ACTION_H_
4#define WILSON_PLAQUETTE_ACTION_H_
19 U[d2].start_gather(d1,
ALL);
20 U[d1].start_gather(d2, par);
24 onsites(opp_parity(par)) {
25 lower[X] = (U[d1][X] * U[d2][X + d1]).
dagger() * U[d2][X];
32 staples[X] = U[d2][X + d1] * (U[d2][X] * U[d1][X + d2]).
dagger() + lower[X - d2];
37 staples[X] += U[d2][X + d1] * (U[d2][X] * U[d1][X + d2]).
dagger() + lower[X - d2];
43template <
typename group,
typename atype = hila::arithmetic_type<group>>
49 U[dir2].start_gather(dir1,
ALL);
50 U[dir1].start_gather(dir2,
ALL);
52 plaq += 1.0 -
real(trace(U[dir1][X] * U[dir2][X + dir1] *
53 (U[dir2][X] * U[dir1][X + dir2]).
dagger())) /
57 return (atype)plaq.
value();
60template <
typename group,
typename atype = hila::arithmetic_type<group>>
67 rstaplesum(U, staple, d);
69 K[d][X] -= (U[d][X] * staple[X]).project_to_algebra_scaled(eps);
95template <
typename group,
typename atype = hila::arithmetic_type<group>>
100 rstaplesum(U, staple, d);
102 K[d][X] = (U[d][X] * staple[X]).project_to_algebra_scaled(-eps);
Array< n, m, hila::arithmetic_type< T > > real(const Array< n, m, T > &arg)
Return real part of Array.
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
Special reduction class: enables delayed and non-blocking reductions, which are not possible with the...
const T value()
Return value of the reduction variable. Wait for the comms if needed.
Reduction & allreduce(bool b=true)
allreduce(bool) turns allreduce on or off. By default on.
Reduction & delayed(bool b=true)
deferred(bool) turns deferred on or off. By default turns on.
Complex< T > dagger(const Complex< T > &val)
Return dagger of Complex number.
Parity
Parity enum with values EVEN, ODD, ALL; refers to parity of the site. Parity of site (x,...
#define foralldir(d)
Macro to loop over (all) Direction(s)
Direction
Enumerator for direction that assigns integer to direction to be interpreted as unit vector.
constexpr Parity ALL
bit pattern: 011