1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-10 19:36:56 +01:00

Using Cayley-Hamilton form for the exponential of SU(3) matrices

This commit is contained in:
Guido Cossu
2017-05-25 12:07:47 +01:00
parent 15e801af3f
commit ab3596d4d3
4 changed files with 106 additions and 29 deletions

View File

@ -62,17 +62,12 @@ namespace Grid {
return ret;
}
template<class obj> Lattice<obj> expMat(const Lattice<obj> &rhs, ComplexD alpha, Integer Nexp = DEFAULT_MAT_EXP){
template<class obj> Lattice<obj> expMat(const Lattice<obj> &rhs, RealD alpha, Integer Nexp = DEFAULT_MAT_EXP){
Lattice<obj> ret(rhs._grid);
ret.checkerboard = rhs.checkerboard;
conformable(ret,rhs);
obj unit(1.0);
parallel_for(int ss=0;ss<rhs._grid->oSites();ss++){
//ret._odata[ss]=Exponentiate(rhs._odata[ss],alpha, Nexp);
ret._odata[ss] = unit;
for(int i=Nexp; i>=1;--i)
ret._odata[ss] = unit + ret._odata[ss]*rhs._odata[ss]*(alpha/RealD(i));
ret._odata[ss]=Exponentiate(rhs._odata[ss],alpha, Nexp);
}
return ret;