JOINT   INSTITUTE   FOR   NUCLEAR   RESEARCH
lit JINRLIB   Program   Library

PSI / SU2 - spin algebra utility


Authors: Mihai Tiberiu Dima, Maria Dima
rus

Highlights

The 2 classes field embodiments of spin wave-vectors (psi) and spin operators (su2) in a high performance slimline templated polymorphic package - part of the NXV4 "Math_on_Paper Software" concept, allowing users to work with the computer almost as with pen on paper.

Example       su2<cpx<int>> sy(0,-i,i,0)  ;
          double   u = 1.0 ;
          auto     z = u+sy ;

Evidently, z will be instantiated as su2<cpx<double>> - transparent to the user (grace to the class' type-calculator returning the appropriate type from the "+" operator):

         double + su2<cpx<int>> = su2<cpx<double>>

    The classes are move-semantix compliant, for superior speed, and slim (all strictly non-class members being implemented as friend operators and functions - for a total of over 2450 psi and 5630 su2 instantiations of the usual algebraic/logical operators).

    The classes overload the cout operator to display wave-vectors and spin operators in a pedantic manner.

Example  cout << boolalpha << sy << endl  ;
         cout << z << endl               ;
         cout << noboolalpha << z << endl;
         cout << boolalpha << psi<cpx<int>>(3,i) << endl;

will display     sy.su2<cpx.int>
         [1+sy].su2<cpx.double>
          1+sy
        [3|up>+i|down>].psi<cpx.int>


    The su2 class implements the correct foliage of the sqrt and log functions, as well as exponentiation of su2^su2, together with the full complement of algebraic and logical operators for instantiations with: int, float, double, long double, cpx<int>, cpx<float>, cpx<double>, cpx<long double>.

 


Documentation -   manual: psi and su2, with main & application tutorials

Downloads        - C++ libs(1) as *.tgz, *.zip and examples: 1, 2, 3, 4, appl

                            (1)gcc-4.4.7 20120313 //... linux-2.6.32-504.12.2.el6.x86_64




     This project was realised in the framework of the 05-6-1119-2014/2023 "New Investigation Tools in Computational Physics" research theme, of the Meshcheryakov Laboratory of Information Technologies JINR.




home up e-mail