VMPS++
Loading...
Searching...
No Matches
SU2Wrappers.h File Reference

Detailed Description

In this file, the wrappers are defined to include different external libraries which compute $3nj$-symbols for $SU(2)$. The wrappers are called coupl_Xj_base. All of these functions take values in the format q=2S+1 and q_z=2M which is always of type integer. Internally these values are converted to the respective convention of the used library. For example gsl uses the convention q_gsl=2S and q_z_gsl=2M, so that we have to use q_gsl = q-1 and q_gsl_z = q_z. Currently, one can use three different libraries for the $3nj$-symbols:

  1. GSL (Default library): The Gnu Scientific libraries (GSL) provides methods for 3j-, 6j- and 9j-symbols. See https://www.gnu.org/software/gsl/manual/html_node/Coupling-Coefficients.html for reference.
    • Link parameter: -lgsl
    • macro: USE_GSL_SU2_COEFFS
  2. WIGXJPF: Specific implementation for 3j, 6j, and 9j-symbols using prime factorization and multiword integer arithmetic. Provides the coefficients for arbitrary angular momenta to machine precision. See http://fy.chalmers.se/subatom/wigxjpf for reference and download. The library needs to be compiled first.
    • Link parameter: -lwigxjpf (with /path_to_wig/lib in the library path -L/path_to_wig/lib)
    • macro: USE_WIG_SU2_COEFFS
      Note
      When extensively using this library you may cite the corresponding publication (See website above for details)
  3. FASTWIGXJ: A implementation wich uses hash-tables with precomputed symbols. This library builds up on top of WIGXJPF. See http://fy.chalmers.se/subatom/fastwigxj for reference and download. The library needs to be compiled first.
    • Link parameter: -lwigxjpf -lfastwigxj -lwigxjpf_quadmath -lquadmath (Note, the order is important! with /path_to_fastwig/lib in the library path -L/path_to_fastwig/lib)
    • macro: USE_FAST_WIG_SU2_COEFFS
      Note
      The hash-tables need to be precomputed by the user and passed to Sym::initialize(). See manual http://fy.chalmers.se/subatom/fastwigxj/README for instructions. The precomputed tables are commonly named as table_Y.Xj, where X is {3,6,9} and Y the maximal value of J. The tables are commonly stored in the folder cgc_hash within the root-folder of the project.
      For 9j-symbols which are not pre-computed, the library uses a fallback and compute the 9j-symbol from 6j-symbol. To do so, the library needs 128bit floats (quadmath). This enforces the compiler gcc, since clang does not support quadmath.
      When extensively using this library you may cite the corresponding publication (See website above for details)
  4. General library + own hash function: A naive hash implementation which uses the coupl_Xj_base-functions but also handles a std::unordered_map for hashing the symbols. Note that this implmentation is not thread-safe! This is turned off per default but can be used by defining OWN_HASH_CGC.

Definition in file SU2Wrappers.h.

#include "DmrgExternal.h"
Include dependency graph for SU2Wrappers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define USE_GSL_SU2_COEFFS   1
 

Functions

double coupl_9j_base (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)
 
double coupl_6j_base (const int q1, const int q2, const int q3, const int q4, const int q5, const int q6)
 
double coupl_3j_base (const int q1, const int q2, const int q3, const int q1_z, const int q2_z, const int q3_z)
 
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)
 
double coupling_6j (const int q1, const int q2, const int q3, const int q4, const int q5, const int q6)
 
double coupling_3j (const int q1, const int q2, const int q3, const int q1_z, const int q2_z, const int q3_z)
 

Macro Definition Documentation

◆ USE_GSL_SU2_COEFFS

#define USE_GSL_SU2_COEFFS   1

Definition at line 6 of file SU2Wrappers.h.

Function Documentation

◆ coupl_3j_base()

double coupl_3j_base ( const int  q1,
const int  q2,
const int  q3,
const int  q1_z,
const int  q2_z,
const int  q3_z 
)
inline

Definition at line 88 of file SU2Wrappers.h.

◆ coupl_6j_base()

double coupl_6j_base ( const int  q1,
const int  q2,
const int  q3,
const int  q4,
const int  q5,
const int  q6 
)
inline

Definition at line 81 of file SU2Wrappers.h.

◆ coupl_9j_base()

double coupl_9j_base ( 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 
)
inline

Definition at line 72 of file SU2Wrappers.h.

◆ coupling_3j()

double coupling_3j ( const int  q1,
const int  q2,
const int  q3,
const int  q1_z,
const int  q2_z,
const int  q3_z 
)
inline

Definition at line 217 of file SU2Wrappers.h.

◆ coupling_6j()

double coupling_6j ( const int  q1,
const int  q2,
const int  q3,
const int  q4,
const int  q5,
const int  q6 
)
inline

Definition at line 210 of file SU2Wrappers.h.

◆ coupling_9j()

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 
)
inline

Definition at line 201 of file SU2Wrappers.h.