VMPS++
Loading...
Searching...
No Matches
Sym::SU2< Kind, Scalar > Class Template Reference

Detailed Description

template<typename Kind, typename Scalar = double>
class Sym::SU2< Kind, Scalar >

Class for handling a SU(2) symmetry of a Hamiltonian without explicitly store the Clebsch-Gordon coefficients but with computing $(3n)j$-symbols.

Template Parameters
Scalar: double or complex<double>
Note
An implementation for the basic $(3n)j$ symbols is used from SU2Wrappers.h. Currently, only the gsl-implementation can be used, but any library which calculates the symbols can be included. Just add a wrapper in SU2Wrappers.h.

Definition at line 35 of file SU2.h.

#include <SU2.h>

Public Types

typedef Scalar Scalar_
 
typedef qarray< NqqType
 

Public Member Functions

 SU2 ()
 
template<std::size_t M>
bool compare (const std::array< SU2< Kind, Scalar >::qType, M > &q1, const std::array< SU2< Kind, Scalar >::qType, M > &q2)
 
template<std::size_t M>
bool validate (const std::array< SU2< Kind, Scalar >::qType, M > &qs)
 

Static Public Member Functions

static constexpr bool IS_CHARGE_SU2 ()
 
static constexpr bool IS_SPIN_SU2 ()
 
static constexpr bool IS_SPIN_U1 ()
 
static constexpr bool NO_SPIN_SYM ()
 
static constexpr bool NO_CHARGE_SYM ()
 
static std::string name ()
 
static constexpr std::array< KIND, Nqkind ()
 
static constexpr std::array< int, Nqmod ()
 
static constexpr qType qvacuum ()
 
static constexpr std::array< qType, 1 > lowest_qs ()
 
static qType flip (const qType &q)
 
static int degeneracy (const qType &q)
 
static int spinorFactor ()
 
template<std::size_t M>
static bool compare (const std::array< qType, M > &q1, const std::array< qType, M > &q2)
 
template<std::size_t M>
static bool validate (const std::array< qType, M > &qs)
 
static bool triangle (const std::array< qType, 3 > &qs)
 
static bool pair (const std::array< qType, 2 > &qs)
 
static std::vector< qTypereduceSilent (const qType &ql, const qType &qr)
 
static std::vector< qTypereduceSilent (const qType &ql, const qType &qm, const qType &qr)
 
static std::vector< qTypereduceSilent (const std::vector< qType > &ql, const qType &qr)
 
static std::vector< qTypereduceSilent (const std::vector< qType > &ql, const std::vector< qType > &qr, bool UNIQUE=false)
 
static vector< tuple< qarray< 1 >, size_t, qarray< 1 >, size_t, qarray< 1 > > > tensorProd (const std::vector< qType > &ql, const std::vector< qType > &qr)
 
static Scalar coeff_unity ()
 
static Scalar coeff_dot (const qType &q1)
 
static Scalar coeff_rightOrtho (const qType &q1, const qType &q2)
 
static Scalar coeff_leftSweep (const qType &q1, const qType &q2)
 
static Scalar coeff_swapPhase (const qType &q1, const qType &q2, const qType &q3)
 
static Scalar coeff_leftSweep2 (const qType &q1, const qType &q2, const qType &q3)
 
static Scalar coeff_leftSweep3 (const qType &q1, const qType &q2, const qType &q3)
 
static Scalar coeff_adjoint (const qType &q1, const qType &q2, const qType &q3)
 
static Scalar coeff_splitAA (const qType &q1, const qType &q2, const qType &q3)
 
static Scalar coeff_3j (const qType &q1, const qType &q2, const qType &q3, int q1_z, int q2_z, int q3_z)
 
static Scalar coeff_CGC (const qType &q1, const qType &q2, const qType &q3, int q1_z, int q2_z, int q3_z)
 
static Scalar coeff_6j (const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
 
static Scalar coeff_Apair (const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
 
static Scalar coeff_splitAA (const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
 
static Scalar coeff_prod (const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
 
static Scalar coeff_MPOprod6 (const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
 
static Scalar coeff_twoSiteGate (const qType &q1, const qType &q2, const qType &q3, const qType &q4, const qType &q5, const qType &q6)
 
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 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)
 
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)
 
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)
 
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)
 
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)
 
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)
 

Static Public Attributes

static constexpr std::size_t Nq =1
 
static constexpr bool HAS_CGC = false
 
static constexpr bool NON_ABELIAN = true
 
static constexpr bool ABELIAN = false
 
static constexpr bool IS_TRIVIAL = false
 
static constexpr bool IS_MODULAR = false
 
static constexpr int MOD_N = 1
 
static constexpr size_t lowest_qs_size = 1
 

Member Typedef Documentation

◆ qType

template<typename Kind , typename Scalar = double>
typedef qarray<Nq> Sym::SU2< Kind, Scalar >::qType

Definition at line 57 of file SU2.h.

◆ Scalar_

template<typename Kind , typename Scalar = double>
typedef Scalar Sym::SU2< Kind, Scalar >::Scalar_

Definition at line 38 of file SU2.h.

Constructor & Destructor Documentation

◆ SU2()

template<typename Kind , typename Scalar = double>
Sym::SU2< Kind, Scalar >::SU2 ( )
inline

Definition at line 59 of file SU2.h.

Member Function Documentation

◆ coeff_3j()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_3j ( const qType q1,
const qType q2,
const qType q3,
int  q1_z,
int  q2_z,
int  q3_z 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 354 of file SU2.h.

◆ coeff_6j()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_6j ( const qType q1,
const qType q2,
const qType q3,
const qType q4,
const qType q5,
const qType q6 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 379 of file SU2.h.

◆ coeff_9j()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, 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

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 444 of file SU2.h.

◆ coeff_adjoint()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_adjoint ( const qType q1,
const qType q2,
const qType q3 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 335 of file SU2.h.

◆ coeff_Apair()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_Apair ( const qType q1,
const qType q2,
const qType q3,
const qType q4,
const qType q5,
const qType q6 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 389 of file SU2.h.

◆ coeff_AW()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, 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 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 522 of file SU2.h.

◆ coeff_buildL()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, 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 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 482 of file SU2.h.

◆ coeff_buildR()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, 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 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 495 of file SU2.h.

◆ coeff_CGC()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_CGC ( const qType q1,
const qType q2,
const qType q3,
int  q1_z,
int  q2_z,
int  q3_z 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 364 of file SU2.h.

◆ coeff_dot()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_dot ( const qType q1)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 285 of file SU2.h.

◆ coeff_HPsi()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, 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 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 509 of file SU2.h.

◆ coeff_leftSweep()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_leftSweep ( const qType q1,
const qType q2 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 301 of file SU2.h.

◆ coeff_leftSweep2()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_leftSweep2 ( const qType q1,
const qType q2,
const qType q3 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 309 of file SU2.h.

◆ coeff_leftSweep3()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_leftSweep3 ( const qType q1,
const qType q2,
const qType q3 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 318 of file SU2.h.

◆ coeff_MPOprod6()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_MPOprod6 ( const qType q1,
const qType q2,
const qType q3,
const qType q4,
const qType q5,
const qType q6 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 422 of file SU2.h.

◆ coeff_MPOprod9()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, 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 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 469 of file SU2.h.

◆ coeff_prod()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_prod ( const qType q1,
const qType q2,
const qType q3,
const qType q4,
const qType q5,
const qType q6 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 411 of file SU2.h.

◆ coeff_rightOrtho()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_rightOrtho ( const qType q1,
const qType q2 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 293 of file SU2.h.

◆ coeff_splitAA() [1/2]

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_splitAA ( const qType q1,
const qType q2,
const qType q3 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 344 of file SU2.h.

◆ coeff_splitAA() [2/2]

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_splitAA ( const qType q1,
const qType q2,
const qType q3,
const qType q4,
const qType q5,
const qType q6 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 400 of file SU2.h.

◆ coeff_swapPhase()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_swapPhase ( const qType q1,
const qType q2,
const qType q3 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 327 of file SU2.h.

◆ coeff_tensorProd()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, 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 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 456 of file SU2.h.

◆ coeff_twoSiteGate()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_twoSiteGate ( const qType q1,
const qType q2,
const qType q3,
const qType q4,
const qType q5,
const qType q6 
)
static

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 433 of file SU2.h.

◆ coeff_unity()

template<typename Kind , typename Scalar >
Scalar Sym::SU2< Kind, Scalar >::coeff_unity
inlinestatic

Various coeffecients, all resulting from contractions or traces of the Clebsch-Gordon coefficients.

Definition at line 277 of file SU2.h.

◆ compare() [1/2]

template<typename Kind , typename Scalar = double>
template<std::size_t M>
static bool Sym::SU2< Kind, Scalar >::compare ( const std::array< qType, M > &  q1,
const std::array< qType, M > &  q2 
)
static

This function defines a strict order for arrays of quantum-numbers.

Note
The implementation is arbritary, as long as it defines a strict order.

◆ compare() [2/2]

template<typename Kind , typename Scalar = double>
template<std::size_t M>
bool Sym::SU2< Kind, Scalar >::compare ( const std::array< SU2< Kind, Scalar >::qType, M > &  q1,
const std::array< SU2< Kind, Scalar >::qType, M > &  q2 
)

Definition at line 536 of file SU2.h.

◆ degeneracy()

template<typename Kind , typename Scalar = double>
static int Sym::SU2< Kind, Scalar >::degeneracy ( const qType q)
inlinestatic

Definition at line 71 of file SU2.h.

◆ flip()

template<typename Kind , typename Scalar = double>
static qType Sym::SU2< Kind, Scalar >::flip ( const qType q)
inlinestatic

Definition at line 70 of file SU2.h.

◆ IS_CHARGE_SU2()

template<typename Kind , typename Scalar = double>
static constexpr bool Sym::SU2< Kind, Scalar >::IS_CHARGE_SU2 ( )
inlinestaticconstexpr

Definition at line 49 of file SU2.h.

◆ IS_SPIN_SU2()

template<typename Kind , typename Scalar = double>
static constexpr bool Sym::SU2< Kind, Scalar >::IS_SPIN_SU2 ( )
inlinestaticconstexpr

Definition at line 50 of file SU2.h.

◆ IS_SPIN_U1()

template<typename Kind , typename Scalar = double>
static constexpr bool Sym::SU2< Kind, Scalar >::IS_SPIN_U1 ( )
inlinestaticconstexpr

Definition at line 52 of file SU2.h.

◆ kind()

template<typename Kind , typename Scalar = double>
static constexpr std::array< KIND, Nq > Sym::SU2< Kind, Scalar >::kind ( )
inlinestaticconstexpr

Definition at line 62 of file SU2.h.

◆ lowest_qs()

template<typename Kind , typename Scalar = double>
static constexpr std::array< qType, 1 > Sym::SU2< Kind, Scalar >::lowest_qs ( )
inlinestaticconstexpr

Definition at line 68 of file SU2.h.

◆ mod()

template<typename Kind , typename Scalar = double>
static constexpr std::array< int, Nq > Sym::SU2< Kind, Scalar >::mod ( )
inlinestaticconstexpr

Definition at line 63 of file SU2.h.

◆ name()

template<typename Kind , typename Scalar = double>
static std::string Sym::SU2< Kind, Scalar >::name ( )
inlinestatic

Definition at line 61 of file SU2.h.

◆ NO_CHARGE_SYM()

template<typename Kind , typename Scalar = double>
static constexpr bool Sym::SU2< Kind, Scalar >::NO_CHARGE_SYM ( )
inlinestaticconstexpr

Definition at line 55 of file SU2.h.

◆ NO_SPIN_SYM()

template<typename Kind , typename Scalar = double>
static constexpr bool Sym::SU2< Kind, Scalar >::NO_SPIN_SYM ( )
inlinestaticconstexpr

Definition at line 54 of file SU2.h.

◆ pair()

template<typename Kind , typename Scalar = double>
bool Sym::SU2< Kind, Scalar >::pair ( const std::array< qType, 2 > &  qs)
static

Definition at line 557 of file SU2.h.

◆ qvacuum()

template<typename Kind , typename Scalar = double>
static constexpr qType Sym::SU2< Kind, Scalar >::qvacuum ( )
inlinestaticconstexpr

Definition at line 65 of file SU2.h.

◆ reduceSilent() [1/4]

template<typename Kind , typename Scalar >
std::vector< typename SU2< Kind, Scalar >::qType > Sym::SU2< Kind, Scalar >::reduceSilent ( const qType ql,
const qType qm,
const qType qr 
)
static

Calculate the irreps of the tensor product of ql and qr.

Definition at line 186 of file SU2.h.

◆ reduceSilent() [2/4]

template<typename Kind , typename Scalar >
std::vector< typename SU2< Kind, Scalar >::qType > Sym::SU2< Kind, Scalar >::reduceSilent ( const qType ql,
const qType qr 
)
static

Calculate the irreps of the tensor product of ql and qr.

Definition at line 175 of file SU2.h.

◆ reduceSilent() [3/4]

template<typename Kind , typename Scalar >
std::vector< typename SU2< Kind, Scalar >::qType > Sym::SU2< Kind, Scalar >::reduceSilent ( const std::vector< qType > &  ql,
const qType qr 
)
static

Calculate the irreps of the tensor product of all entries of ql with qr.

Warning
: Returns not only unique irreps. Not sure, if we should return only the unique values here. Probably, that should be at least added as an option.

Definition at line 194 of file SU2.h.

◆ reduceSilent() [4/4]

template<typename Kind , typename Scalar >
std::vector< typename SU2< Kind, Scalar >::qType > Sym::SU2< Kind, Scalar >::reduceSilent ( const std::vector< qType > &  ql,
const std::vector< qType > &  qr,
bool  UNIQUE = false 
)
static

Calculate the irreps of the tensor product of all entries of ql with all entries of qr.

Warning
: Returns only unique irreps. Better: Put an option for unique or non-unique irreps in the return vector.

Definition at line 208 of file SU2.h.

◆ spinorFactor()

template<typename Kind , typename Scalar = double>
static int Sym::SU2< Kind, Scalar >::spinorFactor ( )
inlinestatic

Definition at line 73 of file SU2.h.

◆ tensorProd()

template<typename Kind , typename Scalar >
vector< tuple< qarray< 1 >, size_t, qarray< 1 >, size_t, qarray< 1 > > > Sym::SU2< Kind, Scalar >::tensorProd ( const std::vector< qType > &  ql,
const std::vector< qType > &  qr 
)
static

Calculate the irreps of the tensor product of ql and qr.

Definition at line 242 of file SU2.h.

◆ triangle()

template<typename Kind , typename Scalar = double>
bool Sym::SU2< Kind, Scalar >::triangle ( const std::array< qType, 3 > &  qs)
static

Definition at line 548 of file SU2.h.

◆ validate() [1/2]

template<typename Kind , typename Scalar = double>
template<std::size_t M>
static bool Sym::SU2< Kind, Scalar >::validate ( const std::array< qType, M > &  qs)
static

This function checks if the array qs contains quantum-numbers which match together, with respect to the flow equations.

Cosmetic Todo:
Write multiple functions, for different sizes of the array and rename them, to have a more clear interface. Example: For 3-array: triangular(...) or something similar.

◆ validate() [2/2]

template<typename Kind , typename Scalar = double>
template<std::size_t M>
bool Sym::SU2< Kind, Scalar >::validate ( const std::array< SU2< Kind, Scalar >::qType, M > &  qs)

Definition at line 567 of file SU2.h.

Member Data Documentation

◆ ABELIAN

template<typename Kind , typename Scalar = double>
constexpr bool Sym::SU2< Kind, Scalar >::ABELIAN = false
staticconstexpr

Definition at line 44 of file SU2.h.

◆ HAS_CGC

template<typename Kind , typename Scalar = double>
constexpr bool Sym::SU2< Kind, Scalar >::HAS_CGC = false
staticconstexpr

Definition at line 42 of file SU2.h.

◆ IS_MODULAR

template<typename Kind , typename Scalar = double>
constexpr bool Sym::SU2< Kind, Scalar >::IS_MODULAR = false
staticconstexpr

Definition at line 46 of file SU2.h.

◆ IS_TRIVIAL

template<typename Kind , typename Scalar = double>
constexpr bool Sym::SU2< Kind, Scalar >::IS_TRIVIAL = false
staticconstexpr

Definition at line 45 of file SU2.h.

◆ lowest_qs_size

template<typename Kind , typename Scalar = double>
constexpr size_t Sym::SU2< Kind, Scalar >::lowest_qs_size = 1
inlinestaticconstexpr

Definition at line 67 of file SU2.h.

◆ MOD_N

template<typename Kind , typename Scalar = double>
constexpr int Sym::SU2< Kind, Scalar >::MOD_N = 1
staticconstexpr

Definition at line 47 of file SU2.h.

◆ NON_ABELIAN

template<typename Kind , typename Scalar = double>
constexpr bool Sym::SU2< Kind, Scalar >::NON_ABELIAN = true
staticconstexpr

Definition at line 43 of file SU2.h.

◆ Nq

template<typename Kind , typename Scalar = double>
constexpr std::size_t Sym::SU2< Kind, Scalar >::Nq =1
staticconstexpr

Definition at line 40 of file SU2.h.


The documentation for this class was generated from the following file: