Grid 0.7.0
SUn.impl.h
Go to the documentation of this file.
1// This file is #included into the body of the class template definition of
2// GaugeGroup. So, image there to be
3//
4// template <int ncolour, class group_name>
5// class GaugeGroup {
6//
7// around it.
8//
9// Please note that the unconventional file extension makes sure that it
10// doesn't get found by the scripts/filelist during bootstrapping.
11
12private:
13
14template <ONLY_IF_SU>
15static int su2subgroups(GroupName::SU) { return (ncolour * (ncolour - 1)) / 2; }
17// There are N^2-1 generators for SU(N).
18//
19// We take a traceless hermitian generator basis as follows
20//
21// * Normalisation: trace ta tb = 1/2 delta_ab = T_F delta_ab
22// T_F = 1/2 for SU(N) groups
23//
24// * Off diagonal
25// - pairs of rows i1,i2 behaving like pauli matrices signma_x, sigma_y
26//
27// - there are (Nc-1-i1) slots for i2 on each row [ x 0 x ]
28// direct count off each row
29//
30// - Sum of all pairs is Nc(Nc-1)/2: proof arithmetic series
31//
32// (Nc-1) + (Nc-2)+... 1 ==> Nc*(Nc-1)/2
33// 1+ 2+ + + Nc-1
34//
35// - There are 2 x Nc (Nc-1)/ 2 of these = Nc^2 - Nc
36//
37// - We enumerate the row-col pairs.
38// - for each row col pair there is a (sigma_x) and a (sigma_y) like
39// generator
40//
41//
42// t^a_ij = { in 0.. Nc(Nc-1)/2 -1} => 1/2(delta_{i,i1} delta_{j,i2} +
43// delta_{i,i1} delta_{j,i2})
44// t^a_ij = { in Nc(Nc-1)/2 ... Nc(Nc-1) - 1} => i/2( delta_{i,i1}
45// delta_{j,i2} - i delta_{i,i1} delta_{j,i2})
46//
47// * Diagonal; must be traceless and normalised
48// - Sequence is
49// N (1,-1,0,0...)
50// N (1, 1,-2,0...)
51// N (1, 1, 1,-3,0...)
52// N (1, 1, 1, 1,-4,0...)
53//
54// where 1/2 = N^2 (1+.. m^2)etc.... for the m-th diagonal generator
55// NB this gives the famous SU3 result for su2 index 8
56//
57// N= sqrt(1/2 . 1/6 ) = 1/2 . 1/sqrt(3)
58//
59// ( 1 )
60// ( 1 ) / sqrt(3) /2 = 1/2 lambda_8
61// ( -2)
62//
64template <class cplx, ONLY_IF_SU>
65static void generator(int lieIndex, iGroupMatrix<cplx> &ta, GroupName::SU) {
66 // map lie index to which type of generator
67 int diagIndex;
68 int su2Index;
69 int sigxy;
70 int NNm1 = ncolour * (ncolour - 1);
71 if (lieIndex >= NNm1) {
72 diagIndex = lieIndex - NNm1;
73 generatorDiagonal(diagIndex, ta);
74 return;
75 }
76 sigxy = lieIndex & 0x1; // even or odd
77 su2Index = lieIndex >> 1;
78 if (sigxy)
79 generatorSigmaY(su2Index, ta);
80 else
81 generatorSigmaX(su2Index, ta);
82}
83
84template <class cplx, ONLY_IF_SU>
85static void generatorSigmaY(int su2Index, iGroupMatrix<cplx> &ta) {
86 ta = Zero();
87 int i1, i2;
88 su2SubGroupIndex(i1, i2, su2Index);
89 ta()()(i1, i2) = 1.0;
90 ta()()(i2, i1) = 1.0;
91 ta = ta * 0.5;
92}
93
94template <class cplx, ONLY_IF_SU>
95static void generatorSigmaX(int su2Index, iGroupMatrix<cplx> &ta) {
96 ta = Zero();
97 cplx i(0.0, 1.0);
98 int i1, i2;
99 su2SubGroupIndex(i1, i2, su2Index);
100 ta()()(i1, i2) = i;
101 ta()()(i2, i1) = -i;
102 ta = ta * 0.5;
103}
104
105template <class cplx, ONLY_IF_SU>
106static void generatorDiagonal(int diagIndex, iGroupMatrix<cplx> &ta) {
107 // diag ({1, 1, ..., 1}(k-times), -k, 0, 0, ...)
108 ta = Zero();
109 int k = diagIndex + 1; // diagIndex starts from 0
110 for (int i = 0; i <= diagIndex; i++) { // k iterations
111 ta()()(i, i) = 1.0;
112 }
113 ta()()(k, k) = -k; // indexing starts from 0
114 RealD nrm = 1.0 / std::sqrt(2.0 * k * (k + 1));
115 ta = ta * nrm;
116}
117
119// Map a su2 subgroup number to the pair of rows that are non zero
121static accelerator_inline void su2SubGroupIndex(int &i1, int &i2, int su2_index, GroupName::SU) {
122 assert((su2_index >= 0) && (su2_index < (ncolour * (ncolour - 1)) / 2));
123
124 int spare = su2_index;
125 for (i1 = 0; spare >= (ncolour - 1 - i1); i1++) {
126 spare = spare - (ncolour - 1 - i1); // remove the Nc-1-i1 terms
127 }
128 i2 = i1 + 1 + spare;
129}
130
131public:
133// Pull out a subgroup and project on to real coeffs x pauli basis
135template <class vcplx, ONLY_IF_SU>
137 Lattice<iSU2Matrix<vcplx> > &subgroup,
138 const Lattice<iGroupMatrix<vcplx> > &source,
139 int su2_index) {
140 GridBase *grid(source.Grid());
141 conformable(subgroup, source);
142 conformable(subgroup, Determinant);
143 int i0, i1;
144 su2SubGroupIndex(i0, i1, su2_index);
145
146 autoView(subgroup_v, subgroup, AcceleratorWrite);
147 autoView(source_v, source, AcceleratorRead);
148 autoView(Determinant_v, Determinant, AcceleratorWrite);
149 accelerator_for(ss, grid->oSites(), 1, {
150 subgroup_v[ss]()()(0, 0) = source_v[ss]()()(i0, i0);
151 subgroup_v[ss]()()(0, 1) = source_v[ss]()()(i0, i1);
152 subgroup_v[ss]()()(1, 0) = source_v[ss]()()(i1, i0);
153 subgroup_v[ss]()()(1, 1) = source_v[ss]()()(i1, i1);
154
155 iSU2Matrix<vcplx> Sigma = subgroup_v[ss];
156
157 Sigma = Sigma - adj(Sigma) + trace(adj(Sigma));
158
159 subgroup_v[ss] = Sigma;
160
161 // this should be purely real
162 Determinant_v[ss] =
163 Sigma()()(0, 0) * Sigma()()(1, 1) - Sigma()()(0, 1) * Sigma()()(1, 0);
164 });
165}
166
168// Set matrix to one and insert a pauli subgroup
170template <class vcplx, ONLY_IF_SU>
171static void su2Insert(const Lattice<iSU2Matrix<vcplx> > &subgroup,
172 Lattice<iGroupMatrix<vcplx> > &dest, int su2_index) {
173 GridBase *grid(dest.Grid());
174 conformable(subgroup, dest);
175 int i0, i1;
176 su2SubGroupIndex(i0, i1, su2_index);
177
178 dest = 1.0; // start out with identity
179 autoView(dest_v, dest, AcceleratorWrite);
180 autoView(subgroup_v, subgroup, AcceleratorRead);
181 accelerator_for(ss, grid->oSites(), 1, {
182 dest_v[ss]()()(i0, i0) = subgroup_v[ss]()()(0, 0);
183 dest_v[ss]()()(i0, i1) = subgroup_v[ss]()()(0, 1);
184 dest_v[ss]()()(i1, i0) = subgroup_v[ss]()()(1, 0);
185 dest_v[ss]()()(i1, i1) = subgroup_v[ss]()()(1, 1);
186 });
187}
188
190// Generate e^{ Re Tr Staple Link} dlink
191//
192// *** Note Staple should be appropriate linear compbination between all
193// staples.
194// *** If already by beta pass coefficient 1.0.
195// *** This routine applies the additional 1/Nc factor that comes after trace
196// in action.
197//
199template <ONLY_IF_SU>
201 GridSerialRNG &sRNG, GridParallelRNG &pRNG,
202 RealD beta, // coeff multiplying staple in action (with no 1/Nc)
203 LatticeMatrix &link,
204 const LatticeMatrix &barestaple, // multiplied by action coeffs so th
205 int su2_subgroup, int nheatbath, LatticeInteger &wheremask) {
206 GridBase *grid = link.Grid();
207
208 const RealD twopi = 2.0 * M_PI;
209
210 LatticeMatrix staple(grid);
211
212 staple = barestaple * (beta / ncolour);
213
214 LatticeMatrix V(grid);
215 V = link * staple;
216
217 // Subgroup manipulation in the lie algebra space
218 LatticeSU2Matrix u(
219 grid); // Kennedy pendleton "u" real projected normalised Sigma
220 LatticeSU2Matrix uinv(grid);
221 LatticeSU2Matrix ua(grid); // a in pauli form
222 LatticeSU2Matrix b(grid); // rotated matrix after hb
223
224 // Some handy constant fields
225 LatticeComplex ones(grid);
226 ones = 1.0;
227 LatticeComplex zeros(grid);
228 zeros = Zero();
229 LatticeReal rones(grid);
230 rones = 1.0;
231 LatticeReal rzeros(grid);
232 rzeros = Zero();
233 LatticeComplex udet(grid); // determinant of real(staple)
234 LatticeInteger mask_true(grid);
235 mask_true = 1;
236 LatticeInteger mask_false(grid);
237 mask_false = 0;
238
239 /*
240 PLB 156 P393 (1985) (Kennedy and Pendleton)
241
242 Note: absorb "beta" into the def of sigma compared to KP paper; staple
243 passed to this routine has "beta" already multiplied in
244
245 Action linear in links h and of form:
246
247 beta S = beta Sum_p (1 - 1/Nc Re Tr Plaq )
248
249 Writing Sigma = 1/Nc (beta Sigma') where sum over staples is "Sigma' "
250
251 beta S = const - beta/Nc Re Tr h Sigma'
252 = const - Re Tr h Sigma
253
254 Decompose h and Sigma into (1, sigma_j) ; h_i real, h^2=1, Sigma_i complex
255 arbitrary.
256
257 Tr h Sigma = h_i Sigma_j Tr (sigma_i sigma_j) = h_i Sigma_j 2 delta_ij
258 Re Tr h Sigma = 2 h_j Re Sigma_j
259
260 Normalised re Sigma_j = xi u_j
261
262 With u_j a unit vector and U can be in SU(2);
263
264 Re Tr h Sigma = 2 h_j Re Sigma_j = 2 xi (h.u)
265
266 4xi^2 = Det [ Sig - Sig^dag + 1 Tr Sigdag]
267 u = 1/2xi [ Sig - Sig^dag + 1 Tr Sigdag]
268
269 xi = sqrt(Det)/2;
270
271 Write a= u h in SU(2); a has pauli decomp a_j;
272
273 Note: Product b' xi is unvariant because scaling Sigma leaves
274 normalised vector "u" fixed; Can rescale Sigma so b' = 1.
275 */
276
278 // Real part of Pauli decomposition
279 // Note a subgroup can project to zero in cold start
281 su2Extract(udet, u, V, su2_subgroup);
282
284 // Normalising this vector if possible; else identity
286 LatticeComplex xi(grid);
287
288 LatticeSU2Matrix lident(grid);
289
290 SU2Matrix ident = Complex(1.0);
291 SU2Matrix pauli1;
293 SU2Matrix pauli2;
295 SU2Matrix pauli3;
297 pauli1 = timesI(pauli1) * 2.0;
298 pauli2 = timesI(pauli2) * 2.0;
299 pauli3 = timesI(pauli3) * 2.0;
300
301 LatticeComplex cone(grid);
302 LatticeReal adet(grid);
303 adet = abs(toReal(udet));
304 lident = Complex(1.0);
305 cone = Complex(1.0);
306 Real machine_epsilon = 1.0e-7;
307 u = where(adet > machine_epsilon, u, lident);
308 udet = where(adet > machine_epsilon, udet, cone);
309
310 xi = 0.5 * sqrt(udet); // 4xi^2 = Det [ Sig - Sig^dag + 1 Tr Sigdag]
311 u = 0.5 * u * pow(xi, -1.0); // u = 1/2xi [ Sig - Sig^dag + 1 Tr Sigdag]
312
313 // Debug test for sanity
314 uinv = adj(u);
315 b = u * uinv - 1.0;
316 assert(norm2(b) < 1.0e-4);
317
318 /*
319 Measure: Haar measure dh has d^4a delta(1-|a^2|)
320 In polars:
321 da = da0 r^2 sin theta dr dtheta dphi delta( 1 - r^2 -a0^2)
322 = da0 r^2 sin theta dr dtheta dphi delta( (sqrt(1-a0^) - r)(sqrt(1-a0^) +
323 r) )
324 = da0 r/2 sin theta dr dtheta dphi delta( (sqrt(1-a0^) - r) )
325
326 Action factor Q(h) dh = e^-S[h] dh = e^{ xi Tr uh} dh // beta
327 enters through xi = e^{2 xi (h.u)} dh = e^{2 xi h0u0}.e^{2 xi h1u1}.e^{2
328 xi h2u2}.e^{2 xi h3u3} dh
329
330 Therefore for each site, take xi for that site
331 i) generate |a0|<1 with dist
332 (1-a0^2)^0.5 e^{2 xi a0 } da0
333
334 Take alpha = 2 xi = 2 xi [ recall 2 beta/Nc unmod staple norm];
335 hence 2.0/Nc factor in Chroma ] A. Generate two uniformly distributed
336 pseudo-random numbers R and R', R'', R''' in the unit interval; B. Set X =
337 -(ln R)/alpha, X' =-(ln R')/alpha; C. Set C = cos^2(2pi R"), with R"
338 another uniform random number in [0,1] ; D. Set A = XC; E. Let d = X'+A;
339 F. If R'''^2 :> 1 - 0.5 d, go back to A;
340 G. Set a0 = 1 - d;
341
342 Note that in step D setting B ~ X - A and using B in place of A in step E
343 will generate a second independent a 0 value.
344 */
345
347 // count the number of sites by picking "1"'s out of hat
349 Integer hit = 0;
350 LatticeReal rtmp(grid);
351 rtmp = where(wheremask, rones, rzeros);
352 RealD numSites = sum(rtmp);
353 RealD numAccepted;
354 LatticeInteger Accepted(grid);
355 Accepted = Zero();
356 LatticeInteger newlyAccepted(grid);
357
358 std::vector<LatticeReal> xr(4, grid);
359 std::vector<LatticeReal> a(4, grid);
360 LatticeReal d(grid);
361 d = Zero();
362 LatticeReal alpha(grid);
363
364 // std::cout<<GridLogMessage<<"xi "<<xi <<std::endl;
365 xi = 2.0 * xi;
366 alpha = toReal(xi);
367
368 do {
369 // A. Generate two uniformly distributed pseudo-random numbers R and R',
370 // R'', R''' in the unit interval;
371 random(pRNG, xr[0]);
372 random(pRNG, xr[1]);
373 random(pRNG, xr[2]);
374 random(pRNG, xr[3]);
375
376 // B. Set X = - ln R/alpha, X' = -ln R'/alpha
377 xr[1] = -log(xr[1]) / alpha;
378 xr[2] = -log(xr[2]) / alpha;
379
380 // C. Set C = cos^2(2piR'')
381 xr[3] = cos(xr[3] * twopi);
382 xr[3] = xr[3] * xr[3];
383
384 LatticeReal xrsq(grid);
385
386 // D. Set A = XC;
387 // E. Let d = X'+A;
388 xrsq = xr[2] + xr[1] * xr[3];
389
390 d = where(Accepted, d, xr[2] + xr[1] * xr[3]);
391
392 // F. If R'''^2 :> 1 - 0.5 d, go back to A;
393 LatticeReal thresh(grid);
394 thresh = 1.0 - d * 0.5;
395 xrsq = xr[0] * xr[0];
396 LatticeInteger ione(grid);
397 ione = 1;
398 LatticeInteger izero(grid);
399 izero = Zero();
400
401 newlyAccepted = where(xrsq < thresh, ione, izero);
402 Accepted = where(newlyAccepted, newlyAccepted, Accepted);
403 Accepted = where(wheremask, Accepted, izero);
404
405 // FIXME need an iSum for integer to avoid overload on return type??
406 rtmp = where(Accepted, rones, rzeros);
407 numAccepted = sum(rtmp);
408
409 hit++;
410
411 } while ((numAccepted < numSites) && (hit < nheatbath));
412
413 // G. Set a0 = 1 - d;
414 a[0] = Zero();
415 a[0] = where(wheremask, 1.0 - d, a[0]);
416
418 // ii) generate a_i uniform on two sphere radius (1-a0^2)^0.5
420
421 LatticeReal a123mag(grid);
422 a123mag = sqrt(abs(1.0 - a[0] * a[0]));
423
424 LatticeReal cos_theta(grid);
425 LatticeReal sin_theta(grid);
426 LatticeReal phi(grid);
427
428 random(pRNG, phi);
429 phi = phi * twopi; // uniform in [0,2pi]
430 random(pRNG, cos_theta);
431 cos_theta = (cos_theta * 2.0) - 1.0; // uniform in [-1,1]
432 sin_theta = sqrt(abs(1.0 - cos_theta * cos_theta));
433
434 a[1] = a123mag * sin_theta * cos(phi);
435 a[2] = a123mag * sin_theta * sin(phi);
436 a[3] = a123mag * cos_theta;
437
438 ua = toComplex(a[0]) * ident + toComplex(a[1]) * pauli1 +
439 toComplex(a[2]) * pauli2 + toComplex(a[3]) * pauli3;
440
441 b = 1.0;
442 b = where(wheremask, uinv * ua, b);
443 su2Insert(b, V, su2_subgroup);
444
445 // mask the assignment back based on Accptance
446 link = where(Accepted, V * link, link);
447
449 // Debug Checks
450 // SU2 check
451 LatticeSU2Matrix check(grid); // rotated matrix after hb
452 u = Zero();
453 check = ua * adj(ua) - 1.0;
454 check = where(Accepted, check, u);
455 assert(norm2(check) < 1.0e-4);
456
457 check = b * adj(b) - 1.0;
458 check = where(Accepted, check, u);
459 assert(norm2(check) < 1.0e-4);
460
461 LatticeMatrix Vcheck(grid);
462 Vcheck = Zero();
463 Vcheck = where(Accepted, V * adj(V) - 1.0, Vcheck);
464 // std::cout<<GridLogMessage << "SU3 check " <<norm2(Vcheck)<<std::endl;
465 assert(norm2(Vcheck) < 1.0e-4);
466
467 // Verify the link stays in SU(3)
468 // std::cout<<GridLogMessage <<"Checking the modified link"<<std::endl;
469 Vcheck = link * adj(link) - 1.0;
470 assert(norm2(Vcheck) < 1.0e-4);
472}
473
474template <ONLY_IF_SU>
476 Matrix ta;
477 Matrix tb;
478 std::cout << GridLogMessage
479 << "Fundamental - Checking trace ta tb is 0.5 delta_ab"
480 << std::endl;
481 for (int a = 0; a < AdjointDimension; a++) {
482 for (int b = 0; b < AdjointDimension; b++) {
483 generator(a, ta);
484 generator(b, tb);
485 Complex tr = TensorRemove(trace(ta * tb));
486 std::cout << GridLogMessage << "(" << a << "," << b << ") = " << tr
487 << std::endl;
488 if (a == b) assert(abs(tr - Complex(0.5)) < 1.0e-6);
489 if (a != b) assert(abs(tr) < 1.0e-6);
490 }
491 std::cout << GridLogMessage << std::endl;
492 }
493 std::cout << GridLogMessage << "Fundamental - Checking if hermitian"
494 << std::endl;
495 for (int a = 0; a < AdjointDimension; a++) {
496 generator(a, ta);
497 std::cout << GridLogMessage << a << std::endl;
498 assert(norm2(ta - adj(ta)) < 1.0e-6);
499 }
500 std::cout << GridLogMessage << std::endl;
501
502 std::cout << GridLogMessage << "Fundamental - Checking if traceless"
503 << std::endl;
504 for (int a = 0; a < AdjointDimension; a++) {
505 generator(a, ta);
506 Complex tr = TensorRemove(trace(ta));
507 std::cout << GridLogMessage << a << " " << std::endl;
508 assert(abs(tr) < 1.0e-6);
509 }
510 std::cout << GridLogMessage << std::endl;
511}
512
513
514template <int N, class vtype>
519
520template <class vtype>
524
525template <class vtype, int N>
529
530template <class vtype,int N, typename std::enable_if< GridTypeMapper<vtype>::TensorLevel == 0 >::type * =nullptr>
534
535template <typename LatticeMatrixType>
536static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out, GroupName::SU) {
537 out = Ta(in);
538}
539
540/*
541 * Fundamental rep gauge xform
542 */
543template<typename Fundamental,typename GaugeMat>
544static void GaugeTransformFundamental( Fundamental &ferm, GaugeMat &g){
545 GridBase *grid = ferm._grid;
546 conformable(grid,g._grid);
547 ferm = g*ferm;
548}
549/*
550 * Adjoint rep gauge xform
551 */
552
553template<typename Gimpl>
554static void GaugeTransform(typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g){
555 GridBase *grid = Umu.Grid();
556 conformable(grid,g.Grid());
557
558 typename Gimpl::GaugeLinkField U(grid);
559 typename Gimpl::GaugeLinkField ag(grid); ag = adj(g);
560
561 for(int mu=0;mu<Nd;mu++){
562 U= PeekIndex<LorentzIndex>(Umu,mu);
563 U = g*U*Gimpl::CshiftLink(ag, mu, 1); //BC-aware
565 }
566}
567template<typename Gimpl>
568static void GaugeTransform( std::vector<typename Gimpl::GaugeLinkField> &U, typename Gimpl::GaugeLinkField &g){
569 GridBase *grid = g.Grid();
570 typename Gimpl::GaugeLinkField ag(grid); ag = adj(g);
571 for(int mu=0;mu<Nd;mu++){
572 U[mu] = g*U[mu]*Gimpl::CshiftLink(ag, mu, 1); //BC-aware
573 }
574}
575template<typename Gimpl>
576static void RandomGaugeTransform(GridParallelRNG &pRNG, typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g){
577 LieRandomize(pRNG,g,1.0);
579}
580
#define accelerator_inline
#define accelerator_for(iterator, num, nsimd,...)
accelerator_inline void timesI(Grid_simd2< S, V > &ret, const Grid_simd2< S, V > &in)
accelerator_inline Grid_simd2< S, V > trace(const Grid_simd2< S, V > &arg)
accelerator_inline Grid_simd< S, V > cos(const Grid_simd< S, V > &r)
accelerator_inline Grid_simd< S, V > abs(const Grid_simd< S, V > &r)
accelerator_inline Grid_simd< S, V > sin(const Grid_simd< S, V > &r)
accelerator_inline Grid_simd< S, V > sqrt(const Grid_simd< S, V > &r)
accelerator_inline Grid_simd< S, V > log(const Grid_simd< S, V > &r)
void conformable(const Lattice< obj1 > &lhs, const Lattice< obj2 > &rhs)
void PokeIndex(Lattice< vobj > &lhs, const Lattice< decltype(peekIndex< Index >(vobj(), 0))> &rhs, int i)
auto PeekIndex(const Lattice< vobj > &lhs, int i) -> Lattice< decltype(peekIndex< Index >(vobj(), i))>
Lattice< typename vobj::Complexified > toComplex(const Lattice< vobj > &lhs)
Lattice< typename vobj::Realified > toReal(const Lattice< vobj > &lhs)
Lattice< vobj > adj(const Lattice< vobj > &lhs)
vobj::scalar_object sum(const vobj *arg, Integer osites)
RealD norm2(const Lattice< vobj > &arg)
void random(GridParallelRNG &rng, Lattice< vobj > &l)
Lattice< iScalar< iScalar< iScalar< Vec > > > > Determinant(const Lattice< iScalar< iScalar< iMatrix< Vec, N > > > > &Umu)
Lattice< obj > pow(const Lattice< obj > &rhs_i, RealD y)
#define autoView(l_v, l, mode)
GridLogger GridLogMessage(1, "Message", GridLogColours, "NORMAL")
@ AcceleratorRead
@ AcceleratorWrite
Lattice< vTReal > LatticeReal
Definition QCD.h:355
Lattice< vTInteger > LatticeInteger
Definition QCD.h:364
static constexpr int Nd
Definition QCD.h:52
iScalar< iScalar< iScalar< vtype > > > iSinglet
Definition QCD.h:102
Lattice< vTComplex > LatticeComplex
Definition QCD.h:359
static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out, GroupName::SU)
Definition SUn.impl.h:536
static Lattice< iScalar< iScalar< iMatrix< vtype, N > > > > ProjectOnGeneralGroup(const Lattice< iScalar< iScalar< iMatrix< vtype, N > > > > &Umu, GroupName::SU)
Definition SUn.impl.h:516
static void generatorSigmaX(int su2Index, iGroupMatrix< cplx > &ta)
Definition SUn.impl.h:95
static void su2Extract(Lattice< iSinglet< vcplx > > &Determinant, Lattice< iSU2Matrix< vcplx > > &subgroup, const Lattice< iGroupMatrix< vcplx > > &source, int su2_index)
Definition SUn.impl.h:136
static accelerator_inline void su2SubGroupIndex(int &i1, int &i2, int su2_index, GroupName::SU)
Definition SUn.impl.h:121
static int su2subgroups(GroupName::SU)
Definition SUn.impl.h:15
static void su2Insert(const Lattice< iSU2Matrix< vcplx > > &subgroup, Lattice< iGroupMatrix< vcplx > > &dest, int su2_index)
Definition SUn.impl.h:171
static void GaugeTransform(typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g)
Definition SUn.impl.h:554
static void SubGroupHeatBath(GridSerialRNG &sRNG, GridParallelRNG &pRNG, RealD beta, LatticeMatrix &link, const LatticeMatrix &barestaple, int su2_subgroup, int nheatbath, LatticeInteger &wheremask)
Definition SUn.impl.h:200
static void testGenerators(GroupName::SU)
Definition SUn.impl.h:475
static void generatorSigmaY(int su2Index, iGroupMatrix< cplx > &ta)
Definition SUn.impl.h:85
static void generator(int lieIndex, iGroupMatrix< cplx > &ta, GroupName::SU)
Definition SUn.impl.h:65
static void GaugeTransformFundamental(Fundamental &ferm, GaugeMat &g)
Definition SUn.impl.h:544
static void generatorDiagonal(int diagIndex, iGroupMatrix< cplx > &ta)
Definition SUn.impl.h:106
static void RandomGaugeTransform(GridParallelRNG &pRNG, typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g)
Definition SUn.impl.h:576
uint32_t Integer
Definition Simd.h:58
RealF Real
Definition Simd.h:65
std::complex< Real > Complex
Definition Simd.h:80
double RealD
Definition Simd.h:61
accelerator_inline iScalar< vtype > ProjectOnGroup(const iScalar< vtype > &r)
Definition Tensor_Ta.h:124
accelerator_inline iScalar< vtype > Ta(const iScalar< vtype > &r)
Definition Tensor_Ta.h:45
accelerator_inline std::enable_if<!isGridTensor< T >::value, T >::type TensorRemove(T arg)
static INTERNAL_PRECISION U
Definition Zolotarev.cc:230
#define M_PI
Definition Zolotarev.cc:41
static void generator(int lieIndex, iGroupMatrix< cplx > &ta, GroupName::SU)
Definition GaugeGroup.h:66
int oSites(void) const
Definition Simd.h:194