#include #include #include //#include //using namespace cps; CPS_START_NAMESPACE //using namespace std; extern const Float SU3_lambda[8][18]={ { 0.0,0.0,1.0,0.0,0.0,0.0, 1.0,0.0,0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0,0.0,0.0 }, { 0.0,0.0,0.0,-1.0,0.0,0.0, 0.0,1.0,0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0,0.0,0.0 }, { 1.0,0.0,0.0,0.0,0.0,0.0, 0.0,0.0,-1.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0,0.0,0.0 }, { 0.0,0.0,0.0,0.0,1.0,0.0, 0.0,0.0,0.0,0.0,0.0,0.0, 1.0,0.0,0.0,0.0,0.0,0.0 }, { 0.0,0.0,0.0,0.0,0.0,-1.0, 0.0,0.0,0.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0,0.0,0.0 }, { 0.0,0.0,0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0,1.0,0.0, 0.0,0.0,1.0,0.0,0.0,0.0 }, { 0.0,0.0,0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0,0.0,-1.0, 0.0,0.0,0.0,1.0,0.0,0.0 }, { 1.0/sqrt(3.0),0.0,0.0,0.0,0.0,0.0, 0.0,0.0,1.0/sqrt(3.0),0.0,0.0,0.0, 0.0,0.0,0.0,0.0,-2.0/sqrt(3.0),0.0 } }; void generateSU3(Matrix & mat, Float Q[8]) { //return exp( i lambda_a/2 * Q[a] ), checked with mathematica. //follow the algorithm from physical review D 69,054501 (2004) paper Float invsqrt3 = 1.0/sqrt(3); Float c0 = (invsqrt3 * ((Q[0]*Q[0]*Q[7]+Q[1]*Q[1]*Q[7]+Q[2]*Q[2]*Q[7])*3.0-Q[7]*Q[7]*Q[7]) - 0.5*invsqrt3 * (Q[3]*Q[3]*Q[7]+Q[4]*Q[4]*Q[7]+Q[5]*Q[5]*Q[7]+Q[6]*Q[6]*Q[7]) * 3.0 + 0.5 * (Q[0]*Q[3]*Q[5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