|
JINRLIB Program LibraryPSI / SU2 - spin algebra utilityAuthors: Mihai Tiberiu Dima, Maria Dima |
|
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 + 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 ; [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>.
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. |