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:
@ -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;
|
||||
|
Reference in New Issue
Block a user