CHROMA
diquark_w.cc
Go to the documentation of this file.
1 // $Id: diquark_w.cc,v 1.3 2007-02-28 03:28:16 edwards Exp $
2 /*! \file
3  * \brief Construct a diquark object
4  */
5 
7 
8 namespace Chroma
9 {
10 
11  //! Unpack a quark
12  /*!
13  * \ingroup hadron
14  *
15  * We need this fast, so at the expense of a lot of memory we will
16  * expose all the color/spin indices of each propagator into a temporary
17  */
18  multi2d< multi2d<LatticeComplex> > unpackQuark(const LatticePropagator& quark_propagator)
19  {
20  multi2d< multi2d<LatticeComplex> > qc(Ns,Ns);
21 
22  for(int scol=0; scol < Ns; ++scol) // spin col
23  {
24  for(int srow=0; srow < Ns; ++srow) // spin row
25  {
26  LatticeColorMatrix color_mat = peekSpin(quark_propagator,
27  srow,scol); // (srow,scol)
28 
29  qc(srow,scol).resize(Nc,Nc);
30 
31  for(int ccol=0; ccol < Nc; ++ccol) // color col
32  for(int crow=0; crow < Nc; ++crow) // color row
33  {
34  qc(srow,scol)(crow,ccol) = peekColor(color_mat,
35  crow,ccol); // (crow,ccol)
36  }
37  }
38  }
39 
40  return qc;
41  }
42 
43 
44  //! Construct a QQ diquark object
45  /*!
46  * \ingroup hadron
47  *
48  * This routine is specific to Wilson fermions!
49  *
50  * In all baryons the colour components are contracted with the totally
51  * antisymmetric 'tensor' eps(a,b,c) = antisym_tensor(a,b,c).
52  *
53  * \param diquark diquark object (in real space) ( Write )
54  * \param quark_propagator_1 quark propagator ( Read )
55  * \param quark_propagator_2 quark propagator ( Read )
56  */
57 
59  const LatticePropagator& quark_propagator_1,
60  const LatticePropagator& quark_propagator_2)
61  {
62  START_CODE();
63 
64  // We need this fast, so at the expense of a lot of memory we will
65  // expose all the color/spin indices of each propagator into a temporary
66  multi2d< multi2d<LatticeComplex> > qc_1(unpackQuark(quark_propagator_1));
67  multi2d< multi2d<LatticeComplex> > qc_2(unpackQuark(quark_propagator_2));
68 
69  // Final diquark contractions
70  multi1d<int> ranks(6);
71  ranks = Ns;
72  ranks[4] = Nc; // cf
73  ranks[5] = Nc; // ci
74 
75  diquark.comp.resize(ranks);
76 
77  for(ranks[0]=0; ranks[0] < Ns; ++ranks[0]) // sf_2
78  for(ranks[1]=0; ranks[1] < Ns; ++ranks[1]) // sf_1
79  for(ranks[2]=0; ranks[2] < Ns; ++ranks[2]) // si_2
80  for(ranks[3]=0; ranks[3] < Ns; ++ranks[3]) // si_1
81  {
82  const multi2d<LatticeComplex>& q_1 = qc_1(ranks[3],ranks[1]); // Note: oddball transpose
83  const multi2d<LatticeComplex>& q_2 = qc_2(ranks[2],ranks[0]); // Note: oddball transpose
84 
85  // Contract over color indices with antisym tensors
86  // Permutations: +(0,1,2)+(1,2,0)+(2,0,1)-(1,0,2)-(0,2,1)-(2,1,0)
87  // d = (\epsilon^{i1,j1,k1}\epsilon^{i2,j2,k2} Q1^{i1,i2} Q2^{j1,j2})^{k1,k2}
88  ranks[4] = 2; ranks[5] = 2;
89  diquark.comp[ranks] = q_1(0,0)*q_2(1,1) - q_1(1,0)*q_2(0,1) - q_1(0,1)*q_2(1,0) + q_1(1,1)*q_2(0,0);
90 
91  ranks[4] = 0; ranks[5] = 0;
92  diquark.comp[ranks] = q_1(1,1)*q_2(2,2) - q_1(2,1)*q_2(1,2) - q_1(1,2)*q_2(2,1) + q_1(2,2)*q_2(1,1);
93 
94  ranks[4] = 1; ranks[5] = 1;
95  diquark.comp[ranks] = q_1(2,2)*q_2(0,0) - q_1(0,2)*q_2(2,0) - q_1(2,0)*q_2(0,2) + q_1(0,0)*q_2(2,2);
96 
97  ranks[4] = 0; ranks[5] = 2;
98  diquark.comp[ranks] = q_1(1,0)*q_2(2,1) - q_1(2,0)*q_2(1,1) - q_1(1,1)*q_2(2,0) + q_1(2,1)*q_2(1,0);
99 
100  ranks[4] = 0; ranks[5] = 1;
101  diquark.comp[ranks] = q_1(1,2)*q_2(2,0) - q_1(2,2)*q_2(1,0) - q_1(1,0)*q_2(2,2) + q_1(2,0)*q_2(1,2);
102 
103  ranks[4] = 1; ranks[5] = 2;
104  diquark.comp[ranks] = q_1(2,0)*q_2(0,1) - q_1(0,0)*q_2(2,1) - q_1(2,1)*q_2(0,0) + q_1(0,1)*q_2(2,0);
105 
106  ranks[4] = 1; ranks[5] = 0;
107  diquark.comp[ranks] = q_1(2,1)*q_2(0,2) - q_1(0,1)*q_2(2,2) - q_1(2,2)*q_2(0,1) + q_1(0,2)*q_2(2,1);
108 
109  ranks[4] = 2; ranks[5] = 0;
110  diquark.comp[ranks] = q_1(0,1)*q_2(1,2) - q_1(1,1)*q_2(0,2) - q_1(0,2)*q_2(1,1) + q_1(1,2)*q_2(0,1);
111 
112  ranks[4] = 2; ranks[5] = 1;
113  diquark.comp[ranks] = q_1(0,2)*q_2(1,0) - q_1(1,2)*q_2(0,0) - q_1(0,0)*q_2(1,2) + q_1(1,0)*q_2(0,2);
114  }
115 
116  END_CODE();
117  }
118 
119 
120 } // end namespace Chroma
Construct a diquark object.
void QQDiquark(QQDiquarkContract_t &diquark, const LatticePropagator &quark_propagator_1, const LatticePropagator &quark_propagator_2)
Construct a QQ diquark object.
Definition: diquark_w.cc:58
multi2d< multi2d< LatticeComplex > > unpackQuark(const LatticePropagator &quark_propagator)
Unpack a quark.
Definition: diquark_w.cc:18
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
START_CODE()
Dense QQDiquark object.
Definition: diquark_w.h:18
multiNd< LatticeComplex > comp
Definition: diquark_w.h:19