8#include <unordered_set>
19template <
typename Kind,
typename Scalar_>
22template <
typename Kind_,
typename Scalar__>
25 constexpr static int Nq = 1;
37template <
typename Kind,
typename Scalar_ =
double>
41 static constexpr size_t Nq = 1;
47 static constexpr std::array<bool, Nq>
ABELIAN = {
true};
48 static constexpr std::array<bool, Nq>
IS_TRIVIAL = {
false};
49 static constexpr std::array<bool, Nq>
IS_MODULAR = {
false};
53 static constexpr std::array<int, Nq>
MOD_N = {1};
78 if constexpr(
IS_SPIN[0]) {
return true; }
84 if constexpr(not
IS_SPIN[0]) {
return true; }
96 inline static constexpr std::array<qType, 2>
lowest_qs()
98 return std::array<qType, 2>{{
qarray<1>(std::array<int, 1>{{-1}}),
qarray<1>(std::array<int, 1>{{+1}})}};
102 inline static constexpr std::array<KIND, Nq>
kind() {
return {Kind::name}; }
133 return (q[0] % 2 != 0) ? -1. : 1.;
138 template <
typename PlainLib>
141 typedef typename PlainLib::Indextype IndexType;
142 auto T = PlainLib::template construct<Scalar>(std::array<IndexType, 2>{1, 1}, world);
143 std::array<IndexType, 2> index = {0, 0};
144 PlainLib::template setVal<Scalar, 2>(
T, index,
Scalar(1.));
155 template <
typename PlainLib>
165 return coeff_6j(q1, q2, Q12, q3, Q, Q23);
178 bool parity = (ql[0] % 2 != 0) and (qr[0] % 2 != 0);
179 sign = parity ? -1. : 1.;
188template <
typename Kind,
typename Scalar_>
191 std::vector<qType> vout;
192 vout.push_back({ql[0] + qr[0]});
196template <
typename Kind,
typename Scalar_>
197template <
typename PlainLib>
201 typedef typename PlainLib::Indextype IndexType;
202 auto T = PlainLib::template construct<Scalar>(std::array<IndexType, 3>{1, 1, 1}, world);
203 if(triangle(q1, q2, q3)) {
204 std::array<IndexType, 3> index = {0, 0, 0};
205 PlainLib::template setVal<Scalar, 3>(
T, index,
Scalar(1.));
207 std::array<IndexType, 3> index = {0, 0, 0};
208 PlainLib::template setVal<Scalar, 3>(
T, index,
Scalar(0.));
213template <
typename Kind,
typename Scalar_>
216 if(triangle(q1, q2, q3) and triangle(q1, q6, q5) and triangle(q2, q4, q6) and triangle(q3, q4, q5)) {
return Scalar(1.); }
220template <
typename Kind,
typename Scalar_>
224 if(q1[0] + q2[0] == q3[0]) {
return true; }
Definition: CombSym.hpp:8
@ FN
Definition: functions.hpp:38
@ M
Definition: functions.hpp:39
@ T
Definition: functions.hpp:35
@ N
Definition: functions.hpp:37
XpedWorld & getUniverse()
Definition: Mpi.hpp:49
int threadSafeRandUniform< int, int >(int min, int max, bool FIXED_SEED)
Definition: Random.hpp:32
CTF::Tensor< Scalar > TType
Definition: PlainInterface_Cyclops_impl.cpp:13
Definition: SymBase.hpp:14
Scalar__ Scalar
Definition: U1.hpp:27
qarray< Nq > qType
Definition: U1.hpp:26
Definition: SymBase.hpp:10
static Scalar coeff_twist(const qType &q)
Definition: U1.hpp:130
static constexpr std::array< bool, Nq > IS_MODULAR
Definition: U1.hpp:49
static constexpr bool IS_CHARGE_SU2()
Definition: U1.hpp:73
static constexpr std::array< bool, Nq > IS_BOSONIC
Definition: U1.hpp:51
static std::string name()
Definition: U1.hpp:101
static std::size_t multiplicity(const qType &q1, const qType &q2, const qType &q3)
Definition: U1.hpp:119
static constexpr bool NO_SPIN_SYM()
Definition: U1.hpp:82
qarray< Nq > qType
Definition: U1.hpp:43
static constexpr size_t Nq
Definition: U1.hpp:41
U1()
Definition: U1.hpp:93
static constexpr bool IS_SPIN_U1()
Definition: U1.hpp:76
static Scalar coeff_recouple(const qType &q1, const qType &q2, const qType &q3, const qType &Q, const qType &Q12, const qType &Q23)
Definition: U1.hpp:163
static constexpr bool ALL_HAS_MULTIPLICITIES
Definition: U1.hpp:64
static constexpr std::array< bool, Nq > IS_SPIN
Definition: U1.hpp:52
static constexpr bool ALL_IS_MODULAR
Definition: U1.hpp:68
static constexpr bool ALL_ABELIAN
Definition: U1.hpp:66
static constexpr bool ANY_NON_ABELIAN
Definition: U1.hpp:56
static Scalar coeff_FS(const qType &)
Definition: U1.hpp:136
static constexpr bool ANY_IS_TRIVIAL
Definition: U1.hpp:58
static constexpr bool ALL_IS_SPIN
Definition: U1.hpp:71
static constexpr bool ANY_IS_MODULAR
Definition: U1.hpp:59
static bool triangle(const qType &q1, const qType &q2, const qType &q3)
Definition: U1.hpp:221
static constexpr std::array< int, Nq > MOD_N
Definition: U1.hpp:53
static std::vector< qType > basis_combine(const qType &ql, const qType &qr)
Definition: U1.hpp:189
static qType random_q()
Definition: U1.hpp:107
static constexpr bool ANY_HAS_MULTIPLICITIES
Definition: U1.hpp:55
static PlainLib::template TType< Scalar_, 3 > CGC(const qType &q1, const qType &q2, const qType &q3, const std::size_t, const mpi::XpedWorld &world=mpi::getUniverse())
Definition: U1.hpp:199
static qType conj(const qType &q)
Definition: U1.hpp:104
static constexpr bool IS_SPIN_SU2()
Definition: U1.hpp:74
static constexpr bool ANY_IS_SPIN
Definition: U1.hpp:62
static Scalar coeff_swap(const qType &ql, const qType &qr, const qType &qf)
Definition: U1.hpp:174
static constexpr bool ALL_IS_TRIVIAL
Definition: U1.hpp:67
static constexpr bool ALL_IS_BOSONIC
Definition: U1.hpp:70
static Scalar coeff_3j(const qType &q1, const qType &q2, const qType &q3, int, int, int)
Definition: U1.hpp:150
static constexpr std::array< bool, Nq > HAS_MULTIPLICITIES
Definition: U1.hpp:45
static Scalar coeff_rightOrtho(const qType &, const qType &)
Definition: U1.hpp:148
static constexpr bool ANY_IS_BOSONIC
Definition: U1.hpp:61
static Scalar coeff_turn(const qType &ql, const qType &qr, const qType &qf)
Definition: U1.hpp:159
static constexpr std::array< bool, Nq > NON_ABELIAN
Definition: U1.hpp:46
static constexpr bool ALL_IS_FERMIONIC
Definition: U1.hpp:69
static constexpr std::array< qType, 2 > lowest_qs()
Definition: U1.hpp:96
static constexpr std::array< KIND, Nq > kind()
Definition: U1.hpp:102
static constexpr bool NO_CHARGE_SYM()
Definition: U1.hpp:87
static PlainLib::template TType< Scalar_, 2 > one_j_tensor(const qType &, const mpi::XpedWorld &world=mpi::getUniverse())
Definition: U1.hpp:139
static constexpr bool ANY_ABELIAN
Definition: U1.hpp:57
static Scalar coeff_6j(const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
Definition: U1.hpp:214
static constexpr std::array< bool, Nq > ABELIAN
Definition: U1.hpp:47
static Scalar coeff_dot(const qType &)
Definition: U1.hpp:128
static int degeneracy(const qType &)
Definition: U1.hpp:105
static constexpr qType qvacuum()
Definition: U1.hpp:95
static constexpr std::array< bool, Nq > IS_FERMIONIC
Definition: U1.hpp:50
static constexpr std::array< bool, Nq > IS_TRIVIAL
Definition: U1.hpp:48
Scalar_ Scalar
Definition: U1.hpp:40
static constexpr bool ALL_NON_ABELIAN
Definition: U1.hpp:65
static constexpr bool ANY_IS_FERMIONIC
Definition: U1.hpp:60
static Scalar coeff_9j(const qType &, const qType &, const qType &, const qType &, const qType &, const qType &, const qType &, const qType &, const qType &)
Definition: U1.hpp:169
Definition: qarray.hpp:30