28 QDPIO::cerr <<
"readKYUQprop - only supports Nc=3" << std::endl;
34 QDPIO::cerr <<
"readKYUQprop - only supports Ns=4" << std::endl;
38 BinaryFileReader bin(file);
45 LatticePropagatorD q_old;
46 multi2d<LatticeFermionD> source(Nc,Ns);
47 multi2d<LatticeRealD> re(Nc,Ns);
48 multi2d<LatticeRealD> im(Nc,Ns);
50 LatticeColorVectorD cv;
52 for(
int src_spin=0; src_spin < Ns; ++src_spin)
53 for(
int src_color=0; src_color < Nc; ++src_color)
55 for(
int snk_spin=0; snk_spin < Ns; ++snk_spin)
56 for(
int snk_color=0; snk_color < Nc; ++snk_color)
58 read(bin, re(snk_color,snk_spin));
61 for(
int snk_spin=0; snk_spin < Ns; ++snk_spin)
62 for(
int snk_color=0; snk_color < Nc; ++snk_color)
64 read(bin, im(snk_color,snk_spin));
68 for(
int snk_spin=0; snk_spin < Ns; ++snk_spin)
70 for(
int snk_color=0; snk_color < Nc; ++snk_color)
73 cmplx(re(snk_color,snk_spin), im(snk_color,snk_spin)),
77 pokeSpin(f, cv, snk_spin);
81 source(src_color,src_spin) = f;
90 for(
int src_color=0; src_color < Nc; ++src_color)
92 FermToProp(LatticeFermionD(source(src_color,0)+source(src_color,2)),
94 FermToProp(LatticeFermionD(source(src_color,1)+source(src_color,3)),
96 FermToProp(LatticeFermionD(source(src_color,2)-source(src_color,0)),
98 FermToProp(LatticeFermionD(source(src_color,3)-source(src_color,1)),
103 q_old *= RealD(1.0) / sqrt(RealD(2));
109 q =
U * q_old * adj(
U);
115 ComplexD
i = cmplx(RealD(0), RealD(1));
117 ComplexD
one = cmplx(RealD(1), RealD(0));
119 SpinMatrixD gamma_1 =
zero;
120 pokeSpin(gamma_1,
one, 0, 3);
121 pokeSpin(gamma_1,
one, 1, 2);
122 pokeSpin(gamma_1,
one, 2, 1);
123 pokeSpin(gamma_1,
one, 3, 0);
125 SpinMatrixD gamma_5 =
zero;
126 pokeSpin(gamma_5, mi, 0, 2);
127 pokeSpin(gamma_5, mi, 1, 3);
128 pokeSpin(gamma_5,
i, 2, 0);
129 pokeSpin(gamma_5,
i, 3, 1);
132 LatticeComplex ps_rho = trace(adj(gamma_5 * q_old * gamma_5) * gamma_1 * q_old * gamma_1);
134 LatticeComplex dr_rho = trace(adj(Gamma(15) *
q * Gamma(15)) * Gamma(1) *
q * Gamma(1));
136 QDPIO::cout <<
"readKYUQprop: norm2(ps_rho) = " << RealD(norm2(ps_rho)) << std::endl;
137 QDPIO::cout <<
"readKYUQprop: norm2(dr_rho) = " << RealD(norm2(dr_rho)) << std::endl;
138 QDPIO::cout <<
"readKYUQprop: norm2(ps_rho - dr_rho) = " << RealD(norm2(ps_rho-dr_rho)) << std::endl;
139 QDPIO::cout <<
"readKYUQprop: norm2(ps_rho + dr_rho) = " << RealD(norm2(ps_rho+dr_rho)) << std::endl;
147 multi1d<DComplex> ps_hsum = sumMulti(ps_rho, phases.
getSet());
148 multi1d<DComplex> dr_hsum = sumMulti(dr_rho, phases.
getSet());
151 XMLFileWriter xml_out(
"kyuqprop.xml");
153 push(xml_out,
"kyuqprop");
154 write(xml_out,
"norm_diff", RealD(norm2(ps_rho-dr_rho)));
155 write(xml_out,
"ps_hsum", ps_hsum);
156 write(xml_out,
"dr_hsum", ps_hsum);
Primary include file for CHROMA library code.
Fourier transform phase factor support.
const Set & getSet() const
The set to be used in sumMulti.
Basis rotation matrix from Dirac to Degrand-Rossi (and reverse)
SpinMatrixD DiracToDRMat()
The Dirac to Degrand-Rossi spin transformation matrix (and reverse)
void FermToProp(const LatticeFermionF &a, LatticePropagatorF &b, int color_index, int spin_index)
Insert a LatticeFermion into a LatticePropagator.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void readKYUQprop(LatticePropagator &q, const std::string &file)
Read a Kentucky quark propagator.
Read/write a KYU propagator.
Asqtad Staggered-Dirac operator.
push(xml_out,"Condensates")
Fourier transform phase factor support.
multi1d< LatticeColorMatrix > U