VMPS++
Loading...
Searching...
No Matches
SU2.h
Go to the documentation of this file.
1#ifndef SU2_H_
2#define SU2_H_
3
5#include <array>
6#include <cstddef>
7#include <unordered_set>
8#include <unordered_map>
9#include <functional>
10
11#include <boost/rational.hpp>
13
14
15#include "DmrgTypedefs.h"
16// #include "DmrgExternal.h"
17//include "qarray.h"
18#include "symmetry/functions.h"
20
21namespace Sym{
22
34template<typename Kind, typename Scalar=double>
35class SU2
36{
37public:
38 typedef Scalar Scalar_;
39
40 static constexpr std::size_t Nq=1;
41
42 static constexpr bool HAS_CGC = false;
43 static constexpr bool NON_ABELIAN = true;
44 static constexpr bool ABELIAN = false;
45 static constexpr bool IS_TRIVIAL = false;
46 static constexpr bool IS_MODULAR = false;
47 static constexpr int MOD_N = 1;
48
49 static constexpr bool IS_CHARGE_SU2() { if constexpr (SU2<Kind,Scalar>::kind()[0] == KIND::T) {return true;} return false; }
50 static constexpr bool IS_SPIN_SU2() { if constexpr (SU2<Kind,Scalar>::kind()[0] == KIND::S) {return true;} return false; }
51
52 static constexpr bool IS_SPIN_U1() { return false; }
53
54 static constexpr bool NO_SPIN_SYM() { if (SU2<Kind,Scalar>::kind()[0] != KIND::S) {return true;} return false;}
55 static constexpr bool NO_CHARGE_SYM() { if (SU2<Kind,Scalar>::kind()[0] != KIND::T) {return true;} return false;}
56
58
59 SU2() {};
60
61 inline static std::string name() { return "SU2"; }
62 inline static constexpr std::array<KIND,Nq> kind() { return {Kind::name}; }
63 inline static constexpr std::array<int,Nq> mod() { return {MOD_N}; }
64
65 inline static constexpr qType qvacuum() { return {1}; }
66
67 inline static constexpr size_t lowest_qs_size = 1; // for compatibility with g++-8
68 inline static constexpr std::array<qType,1> lowest_qs() { return std::array<qType,1> {{ qarray<1>(std::array<int,1>{{2}}) }}; }
69
70 inline static qType flip( const qType& q ) { return q; }
71 inline static int degeneracy( const qType& q ) { return q[0]; }
72
73 inline static int spinorFactor() { return -1; }
75
78 static std::vector<qType> reduceSilent(const qType& ql, const qType& qr);
79
80 static std::vector<qType> reduceSilent(const qType& ql, const qType& qm, const qType& qr);
81
87 static std::vector<qType> reduceSilent( const std::vector<qType>& ql, const qType& qr);
93 static std::vector<qType> reduceSilent( const std::vector<qType>& ql, const std::vector<qType>& qr, bool UNIQUE=false);
94
95 static vector<tuple<qarray<1>,size_t,qarray<1>,size_t,qarray<1> > > tensorProd ( const std::vector<qType>& ql, const std::vector<qType>& qr );
97
99
102 inline static Scalar coeff_unity();
103
104 static Scalar coeff_dot(const qType& q1);
105
106 static Scalar coeff_rightOrtho(const qType& q1, const qType& q2);
107 static Scalar coeff_leftSweep(const qType& q1, const qType& q2);
108
109 static Scalar coeff_swapPhase(const qType& q1, const qType& q2, const qType& q3);
110 static Scalar coeff_leftSweep2(const qType& q1, const qType& q2, const qType& q3);
111 static Scalar coeff_leftSweep3(const qType& q1, const qType& q2, const qType& q3);
112 static Scalar coeff_adjoint(const qType& q1, const qType& q2, const qType& q3);
113 static Scalar coeff_splitAA(const qType& q1, const qType& q2, const qType& q3);
114 static Scalar coeff_3j(const qType& q1, const qType& q2, const qType& q3,
115 int q1_z, int q2_z, int q3_z);
116 static Scalar coeff_CGC(const qType& q1, const qType& q2, const qType& q3,
117 int q1_z, int q2_z, int q3_z);
118
119 static Scalar coeff_6j(const qType& q1, const qType& q2, const qType& q3,
120 const qType& q4, const qType& q5, const qType& q6);
121 static Scalar coeff_Apair(const qType& q1, const qType& q2, const qType& q3,
122 const qType& q4, const qType& q5, const qType& q6);
123 static Scalar coeff_splitAA(const qType& q1, const qType& q2, const qType& q3,
124 const qType& q4, const qType& q5, const qType& q6);
125 static Scalar coeff_prod(const qType& q1, const qType& q2, const qType& q3,
126 const qType& q4, const qType& q5, const qType& q6);
127 static Scalar coeff_MPOprod6(const qType& q1, const qType& q2, const qType& q3,
128 const qType& q4, const qType& q5, const qType& q6);
129 static Scalar coeff_twoSiteGate(const qType& q1, const qType& q2, const qType& q3,
130 const qType& q4, const qType& q5, const qType& q6);
131
132 static Scalar coeff_9j(const qType& q1, const qType& q2, const qType& q3,
133 const qType& q4, const qType& q5, const qType& q6,
134 const qType& q7, const qType& q8, const qType& q9);
135 static Scalar coeff_tensorProd(const qType& q1, const qType& q2, const qType& q3,
136 const qType& q4, const qType& q5, const qType& q6,
137 const qType& q7, const qType& q8, const qType& q9);
138 static Scalar coeff_MPOprod9(const qType& q1, const qType& q2, const qType& q3,
139 const qType& q4, const qType& q5, const qType& q6,
140 const qType& q7, const qType& q8, const qType& q9);
141 static Scalar coeff_buildL(const qType& q1, const qType& q2, const qType& q3,
142 const qType& q4, const qType& q5, const qType& q6,
143 const qType& q7, const qType& q8, const qType& q9);
144 static Scalar coeff_buildR(const qType& q1, const qType& q2, const qType& q3,
145 const qType& q4, const qType& q5, const qType& q6,
146 const qType& q7, const qType& q8, const qType& q9);
147 static Scalar coeff_HPsi(const qType& q1, const qType& q2, const qType& q3,
148 const qType& q4, const qType& q5, const qType& q6,
149 const qType& q7, const qType& q8, const qType& q9);
150 static Scalar coeff_AW(const qType& q1, const qType& q2, const qType& q3,
151 const qType& q4, const qType& q5, const qType& q6,
152 const qType& q7, const qType& q8, const qType& q9);
154
159 template<std::size_t M>
160 static bool compare ( const std::array<qType,M>& q1, const std::array<qType,M>& q2 );
161
167 template<std::size_t M>
168 static bool validate( const std::array<qType,M>& qs );
169
170 static bool triangle( const std::array<qType,3>& qs );
171 static bool pair( const std::array<qType,2>& qs );
172};
173
174template<typename Kind, typename Scalar>
175std::vector<typename SU2<Kind,Scalar>::qType> SU2<Kind,Scalar>::
176reduceSilent( const qType& ql, const qType& qr )
177{
178 std::vector<qType> vout;
179 int qmin = std::abs(ql[0]-qr[0]) +1;
180 int qmax = std::abs(ql[0]+qr[0]) -1;
181 for ( int i=qmin; i<=qmax; i+=2 ) { vout.push_back({i}); }
182 return vout;
183}
184
185template<typename Kind, typename Scalar>
186std::vector<typename SU2<Kind,Scalar>::qType> SU2<Kind,Scalar>::
187reduceSilent( const qType& ql, const qType& qm, const qType& qr )
188{
189 auto qtmp = reduceSilent(ql,qm);
190 return reduceSilent(qtmp,qr);
191}
192
193template<typename Kind, typename Scalar>
194std::vector<typename SU2<Kind,Scalar>::qType> SU2<Kind,Scalar>::
195reduceSilent( const std::vector<qType>& ql, const qType& qr )
196{
197 std::vector<typename SU2<Kind,Scalar>::qType> vout;
198 for (std::size_t q=0; q<ql.size(); q++)
199 {
200 int qmin = std::abs(ql[q][0]-qr[0]) +1;
201 int qmax = std::abs(ql[q][0]+qr[0]) -1;
202 for ( int i=qmin; i<=qmax; i+=2 ) { vout.push_back({i}); }
203 }
204 return vout;
205}
206
207template<typename Kind, typename Scalar>
208std::vector<typename SU2<Kind,Scalar>::qType> SU2<Kind,Scalar>::
209reduceSilent( const std::vector<qType>& ql, const std::vector<qType>& qr, bool UNIQUE )
210{
211 if (UNIQUE)
212 {
213 std::unordered_set<qType> uniqueControl;
214 std::vector<qType> vout;
215 for (std::size_t q1=0; q1<ql.size(); q1++)
216 for (std::size_t q2=0; q2<qr.size(); q2++)
217 {
218 int qmin = std::abs(ql[q1][0]-qr[q2][0]) +1;
219 int qmax = std::abs(ql[q1][0]+qr[q2][0]) -1;
220 for ( int i=qmin; i<=qmax; i+=2 )
221 {
222 if( auto it = uniqueControl.find({i}) == uniqueControl.end() ) {uniqueControl.insert({i}); vout.push_back({i});}
223 }
224 }
225 return vout;
226 }
227 else
228 {
229 std::vector<qType> vout;
230 for (std::size_t q1=0; q1<ql.size(); q1++)
231 for (std::size_t q2=0; q2<qr.size(); q2++)
232 {
233 int qmin = std::abs(ql[q1][0]-qr[q2][0]) +1;
234 int qmax = std::abs(ql[q1][0]+qr[q2][0]) -1;
235 for ( int i=qmin; i<=qmax; i+=2 ) { vout.push_back({i}); }
236 }
237 return vout;
238 }
239}
240
241template<typename Kind, typename Scalar>
242vector<tuple<qarray<1>,size_t,qarray<1>,size_t,qarray<1> > > SU2<Kind,Scalar>::
243tensorProd ( const std::vector<qType>& ql, const std::vector<qType>& qr )
244{
245// std::unordered_map<qarray3<1>,std::size_t> dout;
246// size_t j=0;
247// for (std::size_t q1=0; q1<ql.size(); q1++)
248// for (std::size_t q2=0; q2<qr.size(); q2++)
249// {
250// int qmin = std::abs(ql[q1][0]-qr[q2][0]) +1;
251// int qmax = std::abs(ql[q1][0]+qr[q2][0]) -1;
252// for ( int i=qmin; i<=qmax; i+=2 )
253// {
254// dout.insert(make_pair(qarray3<1>{ql[q1], qr[q2], qarray<1>{i}}, j));
255// ++j;
256//
257// }
258// }
259// return dout;
260
261 vector<tuple<qarray<1>,size_t,qarray<1>,size_t,qarray<1> > > out;
262
263 for (std::size_t q1=0; q1<ql.size(); q1++)
264 for (std::size_t q2=0; q2<qr.size(); q2++)
265 {
266 int qmin = std::abs(ql[q1][0]-qr[q2][0]) + 1;
267 int qmax = std::abs(ql[q1][0]+qr[q2][0]) - 1;
268 for (int i=qmin; i<=qmax; i+=2)
269 {
270 out.push_back(make_tuple(ql[q1], q1, qr[q2], q2, qarray<1>{i}));
271 }
272 }
273 return out;
274}
275
276template<typename Kind, typename Scalar>
279{
280 Scalar out = Scalar(1.);
281 return out;
282}
283
284template<typename Kind, typename Scalar>
286coeff_dot(const qType& q1)
287{
288 Scalar out = static_cast<Scalar>(q1[0]);
289 return out;
290}
291
292template<typename Kind, typename Scalar>
294coeff_rightOrtho(const qType& q1, const qType& q2)
295{
296 Scalar out = static_cast<Scalar>(q1[0]) / static_cast<Scalar>(q2[0]);
297 return out;
298}
299
300template<typename Kind, typename Scalar>
302coeff_leftSweep(const qType& q1, const qType& q2)
303{
304 Scalar out = std::sqrt(static_cast<Scalar>(q1[0]) / static_cast<Scalar>(q2[0]));
305 return out;
306}
307
308template<typename Kind, typename Scalar>
310coeff_leftSweep2(const qType& q1, const qType& q2, const qType& q3)
311{
312 Scalar out = phase<Scalar>((q1[0]-q2[0]+q3[0]-1) / 2) *
313 std::sqrt(static_cast<Scalar>(q1[0])) / std::sqrt(static_cast<Scalar>(q2[0]));
314 return out;
315}
316
317template<typename Kind, typename Scalar>
319coeff_leftSweep3(const qType& q1, const qType& q2, const qType& q3)
320{
321 Scalar out = phase<Scalar>((q1[0]-q2[0]-q3[0]-1) / 2) *
322 std::sqrt(static_cast<Scalar>(q1[0])) / std::sqrt(static_cast<Scalar>(q2[0]));
323 return out;
324}
325
326template<typename Kind, typename Scalar>
328coeff_swapPhase(const qType& q1, const qType& q2, const qType& q3)
329{
330 Scalar out = phase<Scalar>((q1[0]+q2[0]-q3[0]-3) /2);
331 return out;
332}
333
334template<typename Kind, typename Scalar>
336coeff_adjoint(const qType& q1, const qType& q2, const qType& q3)
337{
338 Scalar out = phase<Scalar>((q3[0]+q1[0]-q2[0]-1) / 2) *
339 std::sqrt(static_cast<Scalar>(q1[0])) / std::sqrt(static_cast<Scalar>(q2[0]));
340 return out;
341}
342
343template<typename Kind, typename Scalar>
345coeff_splitAA(const qType& q1, const qType& q2, const qType& q3)
346{
347 Scalar out = phase<Scalar>((q1[0]-q2[0]-q3[0]-3) / 2) *
348 std::sqrt(static_cast<Scalar>(q1[0])) / std::sqrt(static_cast<Scalar>(q2[0]));
349 // Scalar out = std::sqrt(static_cast<Scalar>(q1[0])) / std::sqrt(static_cast<Scalar>(q2[0]));
350 return out;
351}
352
353template<typename Kind, typename Scalar>
355coeff_3j(const qType& q1, const qType& q2, const qType& q3,
356 int q1_z, int q2_z, int q3_z)
357{
358 Scalar out = coupling_3j(q1[0],q2[0],q3[0],
359 q1_z ,q2_z ,q3_z);
360 return out;
361}
362
363template<typename Kind, typename Scalar>
365coeff_CGC(const qType& q1, const qType& q2, const qType& q3,
366 int q1_z, int q2_z, int q3_z)
367{
368 // Scalar out = coupling_3j(q1[0], q2[0], q3[0],
369 // q1_z , q2_z , -q3_z) *
370 // phase<Scalar>((-q1[0]+q2[0]-q3_z-2)/2) * sqrt(q3[0]);
371 Scalar out = coupling_3j(q1[0], q2[0], q3[0],
372 q1_z , q2_z , -q3_z) *
373 phase<Scalar>((q1[0]-q2[0]+q3_z)/2) * sqrt(q3[0]);
374
375 return out;
376}
377
378template<typename Kind, typename Scalar>
380coeff_6j(const qType& q1, const qType& q2, const qType& q3,
381 const qType& q4, const qType& q5, const qType& q6)
382{
383 Scalar out = coupling_6j(q1[0],q2[0],q3[0],
384 q4[0],q5[0],q6[0]);
385 return out;
386}
387
388template<typename Kind, typename Scalar>
390coeff_Apair(const qType& q1, const qType& q2, const qType& q3,
391 const qType& q4, const qType& q5, const qType& q6)
392{
393 Scalar out = coupling_6j(q1[0],q2[0],q3[0],q4[0],q5[0],q6[0])*
394 std::sqrt(static_cast<Scalar>(q3[0]*q6[0]))
395 *phase<Scalar>((q1[0]+q2[0]+q4[0]+q5[0]-4)/2);
396 return out;
397}
398
399template<typename Kind, typename Scalar>
401coeff_splitAA(const qType& q1, const qType& q2, const qType& q3,
402 const qType& q4, const qType& q5, const qType& q6)
403{
404 Scalar out = coupling_6j(q1[0],q2[0],q3[0],q4[0],q5[0],q6[0])*
405 std::sqrt(static_cast<Scalar>(q2[0]*q3[0]))
406 *phase<Scalar>((q1[0]+q5[0]+q6[0]-3)/2);
407 return out;
408}
409
410template<typename Kind, typename Scalar>
412coeff_prod(const qType& q1, const qType& q2, const qType& q3,
413 const qType& q4, const qType& q5, const qType& q6)
414{
415 Scalar out = coupling_6j(q1[0],q2[0],q3[0],q4[0],q5[0],q6[0])*
416 std::sqrt(static_cast<Scalar>(q3[0]*q6[0]))*
417 phase<Scalar>((q1[0]+q5[0]+q6[0]-3)/2);
418 return out;
419}
420
421template<typename Kind, typename Scalar>
423coeff_MPOprod6(const qType& q1, const qType& q2, const qType& q3,
424 const qType& q4, const qType& q5, const qType& q6)
425{
426 Scalar out = coupling_6j(q1[0],q2[0],q3[0],q4[0],q5[0],q6[0])*
427 std::sqrt(static_cast<Scalar>(q3[0]*q6[0]))*
428 phase<Scalar>((q1[0]+q2[0]+q4[0]+q5[0]-4)/2);
429 return out;
430}
431
432template<typename Kind, typename Scalar>
434coeff_twoSiteGate(const qType& q1, const qType& q2, const qType& q3,
435 const qType& q4, const qType& q5, const qType& q6)
436{
437 Scalar out = coupling_6j(q1[0],q2[0],q3[0],q4[0],q5[0],q6[0])*
438 std::sqrt(static_cast<Scalar>(q3[0]*q6[0]))
439 *phase<Scalar>((q1[0]+q2[0]+q4[0]+q5[0]-4)/2);
440 return out;
441}
442
443template<typename Kind, typename Scalar>
445coeff_9j(const qType& q1, const qType& q2, const qType& q3,
446 const qType& q4, const qType& q5, const qType& q6,
447 const qType& q7, const qType& q8, const qType& q9)
448{
449 Scalar out = coupling_9j(q1[0],q2[0],q3[0],
450 q4[0],q5[0],q6[0],
451 q7[0],q8[0],q9[0]);
452 return out;
453}
454
455template<typename Kind, typename Scalar>
457coeff_tensorProd(const qType& q1, const qType& q2, const qType& q3,
458 const qType& q4, const qType& q5, const qType& q6,
459 const qType& q7, const qType& q8, const qType& q9)
460{
461 Scalar out = coupling_9j(q1[0],q2[0],q3[0],
462 q4[0],q5[0],q6[0],
463 q7[0],q8[0],q9[0])*
464 std::sqrt(static_cast<Scalar>(q7[0]*q8[0]*q3[0]*q6[0]));
465 return out;
466}
467
468template<typename Kind, typename Scalar>
470coeff_MPOprod9(const qType& q1, const qType& q2, const qType& q3,
471 const qType& q4, const qType& q5, const qType& q6,
472 const qType& q7, const qType& q8, const qType& q9)
473{
474 Scalar out = coupling_9j(q1[0],q2[0],q3[0],
475 q4[0],q5[0],q6[0],
476 q7[0],q8[0],q9[0]) *
477 std::sqrt(static_cast<Scalar>(q7[0]*q8[0]*q3[0]*q6[0]));
478 return out;
479}
480
481template<typename Kind, typename Scalar>
483coeff_buildL(const qType& q1, const qType& q2, const qType& q3,
484 const qType& q4, const qType& q5, const qType& q6,
485 const qType& q7, const qType& q8, const qType& q9)
486{
487 Scalar out = coupling_9j(q1[0],q2[0],q3[0],
488 q4[0],q5[0],q6[0],
489 q7[0],q8[0],q9[0]) *
490 std::sqrt(static_cast<Scalar>(q7[0]*q8[0]*q3[0]*q6[0]));
491 return out;
492}
493
494template<typename Kind, typename Scalar>
496coeff_buildR(const qType& q1, const qType& q2, const qType& q3,
497 const qType& q4, const qType& q5, const qType& q6,
498 const qType& q7, const qType& q8, const qType& q9)
499{
500 Scalar out = coupling_9j(q1[0],q2[0],q3[0],
501 q4[0],q5[0],q6[0],
502 q7[0],q8[0],q9[0]) *
503 std::sqrt(static_cast<Scalar>(q7[0]*q8[0]*q3[0]*q6[0])) *
504 static_cast<Scalar>(q9[0]) / static_cast<Scalar>(q7[0]);
505 return out;
506}
507
508template<typename Kind, typename Scalar>
510coeff_HPsi(const qType& q1, const qType& q2, const qType& q3,
511 const qType& q4, const qType& q5, const qType& q6,
512 const qType& q7, const qType& q8, const qType& q9)
513{
514 Scalar out = coupling_9j(q1[0],q2[0],q3[0],
515 q4[0],q5[0],q6[0],
516 q7[0],q8[0],q9[0]) *
517 std::sqrt(static_cast<Scalar>(q7[0]*q8[0]*q3[0]*q6[0]));
518 return out;
519}
520
521template<typename Kind, typename Scalar>
523coeff_AW(const qType& q1, const qType& q2, const qType& q3,
524 const qType& q4, const qType& q5, const qType& q6,
525 const qType& q7, const qType& q8, const qType& q9)
526{
527 Scalar out = coupling_9j(q1[0],q2[0],q3[0],
528 q4[0],q5[0],q6[0],
529 q7[0],q8[0],q9[0]) *
530 std::sqrt(static_cast<Scalar>(q7[0]*q8[0]*q3[0]*q6[0]));
531 return out;
532}
533
534template<typename Kind, typename Scalar>
535template<std::size_t M>
537compare ( const std::array<SU2<Kind,Scalar>::qType,M>& q1, const std::array<SU2<Kind,Scalar>::qType,M>& q2 )
538{
539 for (std::size_t m=0; m<M; m++)
540 {
541 if (q1[m][0] > q2[m][0]) { return false; }
542 else if (q1[m][0] < q2[m][0]) {return true; }
543 }
544 return false;
545}
546
547template<typename Kind, typename Scalar>
549triangle ( const std::array<SU2<Kind,Scalar>::qType,3>& qs )
550{
551 //check the triangle rule for angular momenta, but remark that we use the convention q=2S+1
552 if (qs[2][0]-1 >= abs(qs[0][0]-qs[1][0]) and qs[2][0]-1 <= qs[0][0]+qs[1][0]-2) { return true;}
553 return false;
554}
555
556template<typename Kind, typename Scalar>
558pair ( const std::array<SU2<Kind,Scalar>::qType,2>& qs )
559{
560 //check if two quantum numbers fulfill the flow equations: simply qin = qout
561 if (qs[0] == qs[1]) {return true;}
562 return false;
563}
564
565template<typename Kind, typename Scalar>
566template<std::size_t M>
568validate ( const std::array<SU2<Kind,Scalar>::qType,M>& qs )
569{
570 if constexpr( M == 1 ) { return true; }
571 else if constexpr( M == 2 ) { return SU2<Kind,Scalar>::pair(qs); }
572 else if constexpr( M==3 ) { return SU2<Kind,Scalar>::triangle(qs); }
573 else { cout << "This should not be printed out!" << endl; return true; }
574 // std::vector<SU2<Kind,Scalar>::qType> decomp = SU2<Kind,Scalar>::reduceSilent(qs[0],qs[1]);
575 // for (std::size_t i=2; i<M; i++)
576 // {
577 // decomp = SU2<Kind,Scalar>::reduceSilent(decomp,qs[i]);
578 // }
579 // for (std::size_t i=0; i<decomp.size(); i++)
580 // {
581 // if ( decomp[i] == SU2<Kind,Scalar>::qvacuum() ) { return true; }
582 // }
583 // return false;
584 // }
585}
586
587} //end namespace Sym
588
589#endif
double coupling_9j(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6, const int q7, const int q8, const int q9)
Definition: SU2Wrappers.h:201
double coupling_3j(const int q1, const int q2, const int q3, const int q1_z, const int q2_z, const int q3_z)
Definition: SU2Wrappers.h:217
double coupling_6j(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6)
Definition: SU2Wrappers.h:210
Definition: SU2.h:36
static constexpr int MOD_N
Definition: SU2.h:47
static vector< tuple< qarray< 1 >, size_t, qarray< 1 >, size_t, qarray< 1 > > > tensorProd(const std::vector< qType > &ql, const std::vector< qType > &qr)
Definition: SU2.h:243
static Scalar coeff_leftSweep2(const qType &q1, const qType &q2, const qType &q3)
Definition: SU2.h:310
static Scalar coeff_9j(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6, const qType &q7, const qType &q8, const qType &q9)
Definition: SU2.h:445
static bool compare(const std::array< qType, M > &q1, const std::array< qType, M > &q2)
static Scalar coeff_AW(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6, const qType &q7, const qType &q8, const qType &q9)
Definition: SU2.h:523
qarray< Nq > qType
Definition: SU2.h:57
static Scalar coeff_adjoint(const qType &q1, const qType &q2, const qType &q3)
Definition: SU2.h:336
static Scalar coeff_CGC(const qType &q1, const qType &q2, const qType &q3, int q1_z, int q2_z, int q3_z)
Definition: SU2.h:365
static constexpr std::array< qType, 1 > lowest_qs()
Definition: SU2.h:68
static bool triangle(const std::array< qType, 3 > &qs)
Definition: SU2.h:549
static constexpr bool HAS_CGC
Definition: SU2.h:42
static Scalar coeff_leftSweep(const qType &q1, const qType &q2)
Definition: SU2.h:302
static Scalar coeff_HPsi(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6, const qType &q7, const qType &q8, const qType &q9)
Definition: SU2.h:510
static int degeneracy(const qType &q)
Definition: SU2.h:71
static constexpr bool ABELIAN
Definition: SU2.h:44
static constexpr size_t lowest_qs_size
Definition: SU2.h:67
static constexpr bool IS_TRIVIAL
Definition: SU2.h:45
static constexpr qType qvacuum()
Definition: SU2.h:65
static qType flip(const qType &q)
Definition: SU2.h:70
static bool pair(const std::array< qType, 2 > &qs)
Definition: SU2.h:558
static Scalar coeff_6j(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
Definition: SU2.h:380
static Scalar coeff_dot(const qType &q1)
Definition: SU2.h:286
static bool validate(const std::array< qType, M > &qs)
static constexpr bool IS_SPIN_SU2()
Definition: SU2.h:50
static constexpr std::array< int, Nq > mod()
Definition: SU2.h:63
static int spinorFactor()
Definition: SU2.h:73
static Scalar coeff_Apair(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
Definition: SU2.h:390
static Scalar coeff_tensorProd(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6, const qType &q7, const qType &q8, const qType &q9)
Definition: SU2.h:457
static Scalar coeff_prod(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
Definition: SU2.h:412
static constexpr bool NO_CHARGE_SYM()
Definition: SU2.h:55
static constexpr bool NON_ABELIAN
Definition: SU2.h:43
static Scalar coeff_swapPhase(const qType &q1, const qType &q2, const qType &q3)
Definition: SU2.h:328
static constexpr bool NO_SPIN_SYM()
Definition: SU2.h:54
static constexpr bool IS_CHARGE_SU2()
Definition: SU2.h:49
static Scalar coeff_MPOprod6(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
Definition: SU2.h:423
static constexpr bool IS_MODULAR
Definition: SU2.h:46
static std::vector< qType > reduceSilent(const qType &ql, const qType &qr)
Definition: SU2.h:176
static Scalar coeff_buildL(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6, const qType &q7, const qType &q8, const qType &q9)
Definition: SU2.h:483
static Scalar coeff_MPOprod9(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6, const qType &q7, const qType &q8, const qType &q9)
Definition: SU2.h:470
static constexpr bool IS_SPIN_U1()
Definition: SU2.h:52
static std::string name()
Definition: SU2.h:61
SU2()
Definition: SU2.h:59
static Scalar coeff_leftSweep3(const qType &q1, const qType &q2, const qType &q3)
Definition: SU2.h:319
static constexpr std::array< KIND, Nq > kind()
Definition: SU2.h:62
static constexpr std::size_t Nq
Definition: SU2.h:40
static Scalar coeff_splitAA(const qType &q1, const qType &q2, const qType &q3)
Definition: SU2.h:345
static Scalar coeff_3j(const qType &q1, const qType &q2, const qType &q3, int q1_z, int q2_z, int q3_z)
Definition: SU2.h:355
static Scalar coeff_twoSiteGate(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
Definition: SU2.h:434
static Scalar coeff_buildR(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6, const qType &q7, const qType &q8, const qType &q9)
Definition: SU2.h:496
static Scalar coeff_unity()
Definition: SU2.h:278
static Scalar coeff_rightOrtho(const qType &q1, const qType &q2)
Definition: SU2.h:294
Scalar Scalar_
Definition: SU2.h:38
Definition: qarray.h:26