10#include "ClebschGordan.hpp"
19template <std::
size_t N,
typename Kind,
typename Scalar_>
22template <std::
size_t N,
typename Kind_,
typename Scalar__>
25 constexpr static int Nq = 1;
40template <std::
size_t N_,
typename Kind,
typename Scalar_ =
double>
43 static constexpr std::size_t
N = N_;
47 static constexpr std::size_t
Nq = 1;
51 static constexpr std::array<bool, Nq>
ABELIAN = {
false};
52 static constexpr std::array<bool, Nq>
IS_TRIVIAL = {
false};
53 static constexpr std::array<bool, Nq>
IS_MODULAR = {
false};
57 static constexpr std::array<int, Nq>
MOD_N = {1};
84 if constexpr(not
IS_SPIN[0]) {
return true; }
97 inline static std::string
name()
100 if(
N == 2) {
return prefix +
"SUâ‚‚"; }
101 if(
N == 3) {
return prefix +
"SU₃"; }
102 if(
N == 4) {
return prefix +
"SUâ‚„"; }
103 if(
N == 5) {
return prefix +
"SUâ‚…"; }
104 if(
N == 6) {
return prefix +
"SU₆"; }
105 return prefix +
"SU(" + std::to_string(
N) +
")";
107 inline static constexpr std::array<KIND, Nq>
kind() {
return {Kind::name}; }
111 clebsch::weight vac(
N);
112 for(
auto& w : vac) { w = 0; }
119 clebsch::weight con(
N);
120 for(std::size_t i = 0; i <
N; ++i) {
121 con(i) = q(0) - q(
N - 1 - i);
136 clebsch::decomposition comp(q1, q2);
137 return comp.multiplicity(q3);
147 template <
typename PlainLib>
159 template <
typename PlainLib>
177 return std::sqrt(Q12[0] * Q23[0]) * phase<Scalar>((q1[0] + q2[0] + q3[0] + Q[0]) / 2.) *
coeff_6j(q1, q2, Q12, q3, Q, Q23);
182 return triangle(ql, qr, qf) ? phase<Scalar>((ql[0] + qr[0] - qf[0] - 1) / 2) :
Scalar(0.);
191#ifndef XPED_COMPILED_LIB
Definition: CombSym.hpp:8
@ T
Definition: functions.hpp:35
@ FT
Definition: functions.hpp:36
@ N
Definition: functions.hpp:37
@ S
Definition: functions.hpp:33
XpedWorld & getUniverse()
Definition: Mpi.hpp:49
CTF::Tensor< Scalar > TType
Definition: PlainInterface_Cyclops_impl.cpp:13
static std::string name()
Definition: SUN.hpp:97
static constexpr bool NO_SPIN_SYM()
Definition: SUN.hpp:82
static constexpr bool ANY_IS_TRIVIAL
Definition: SUN.hpp:62
static constexpr std::array< bool, Nq > HAS_MULTIPLICITIES
Definition: SUN.hpp:49
std::size_t multiplicity(const qType &q1, const qType &q2, const qType &q3)
Definition: SUN.hpp:134
static constexpr bool ALL_IS_SPIN
Definition: SUN.hpp:75
static constexpr std::size_t Nq
Definition: SUN.hpp:47
static Scalar coeff_swap(const qType &ql, const qType &qr, const qType &qf)
Definition: SUN.hpp:180
static constexpr bool ANY_NON_ABELIAN
Definition: SUN.hpp:60
static constexpr bool ANY_IS_FERMIONIC
Definition: SUN.hpp:64
static constexpr bool IS_CHARGE_SU2()
Definition: SUN.hpp:77
static constexpr bool ANY_IS_SPIN
Definition: SUN.hpp:66
static constexpr bool NO_CHARGE_SYM()
Definition: SUN.hpp:87
static constexpr bool ALL_NON_ABELIAN
Definition: SUN.hpp:69
static constexpr std::array< bool, Nq > IS_BOSONIC
Definition: SUN.hpp:55
static constexpr std::array< KIND, Nq > kind()
Definition: SUN.hpp:107
static constexpr std::array< bool, Nq > NON_ABELIAN
Definition: SUN.hpp:50
static constexpr bool ANY_IS_BOSONIC
Definition: SUN.hpp:65
static Scalar coeff_FS(const qType &q1)
static constexpr bool IS_SPIN_U1()
Definition: SUN.hpp:80
static PlainLib::template TType< Scalar_, 3 > CGC(const qType &q1, const qType &q2, const qType &q3, const std::size_t, mpi::XpedWorld &world=mpi::getUniverse())
Definition: SUN.cpp:47
static constexpr bool ANY_HAS_MULTIPLICITIES
Definition: SUN.hpp:59
static constexpr bool IS_SPIN_SU2()
Definition: SUN.hpp:78
static constexpr std::array< bool, Nq > IS_MODULAR
Definition: SUN.hpp:53
static Scalar coeff_6j(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
static constexpr std::array< bool, Nq > ABELIAN
Definition: SUN.hpp:51
static std::vector< qType > basis_combine(const qType &ql, const qType &qr)
Definition: SUN.cpp:19
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)
static qType random_q()
Definition: SUN.cpp:10
static Scalar coeff_dot(const qType &q1)
Definition: SUN.cpp:28
static constexpr std::array< int, Nq > MOD_N
Definition: SUN.hpp:57
static constexpr std::size_t N
Definition: SUN.hpp:43
static constexpr bool ALL_HAS_MULTIPLICITIES
Definition: SUN.hpp:68
static qType conj(const qType &q)
Definition: SUN.hpp:117
static constexpr bool ALL_IS_BOSONIC
Definition: SUN.hpp:74
static Scalar coeff_rightOrtho(const qType &q1, const qType &q2)
Definition: SUN.hpp:150
static constexpr bool ALL_ABELIAN
Definition: SUN.hpp:70
static constexpr bool ANY_IS_MODULAR
Definition: SUN.hpp:63
static constexpr bool ANY_ABELIAN
Definition: SUN.hpp:61
Scalar_ Scalar
Definition: SUN.hpp:44
static constexpr bool ALL_IS_FERMIONIC
Definition: SUN.hpp:73
static constexpr std::array< bool, Nq > IS_FERMIONIC
Definition: SUN.hpp:54
static constexpr std::array< bool, Nq > IS_SPIN
Definition: SUN.hpp:56
static constexpr qType qvacuum()
Definition: SUN.hpp:109
static bool triangle(const qType &q1, const qType &q2, const qType &q3)
Definition: SUN.cpp:128
static Scalar coeff_3j(const qType &q1, const qType &q2, const qType &q3, int q1_z, int q2_z, int q3_z)
static constexpr std::array< bool, Nq > IS_TRIVIAL
Definition: SUN.hpp:52
static Scalar coeff_recouple(const qType &q1, const qType &q2, const qType &q3, const qType &Q, const qType &Q12, const qType &Q23)
Definition: SUN.hpp:175
static Scalar coeff_turn(const qType &ql, const qType &qr, const qType &qf)
Definition: SUN.hpp:154
clebsch::weight qType
Definition: SUN.hpp:93
SymBase< SUN< N, Kind, Scalar > > Base
Definition: SUN.hpp:45
static PlainLib::template TType< Scalar_, 2 > one_j_tensor(const qType &q1, mpi::XpedWorld &world=mpi::getUniverse())
Definition: SUN.cpp:35
static int degeneracy(const qType &q)
Definition: SUN.hpp:125
static constexpr bool ALL_IS_TRIVIAL
Definition: SUN.hpp:71
static constexpr bool ALL_IS_MODULAR
Definition: SUN.hpp:72
Definition: SymBase.hpp:14
Scalar__ Scalar
Definition: SUN.hpp:27
clebsch::weight qType
Definition: SUN.hpp:26
Definition: SymBase.hpp:10