Exercise 6: Pion Propagator
Goals: Computing pseudoscalar two-point function
Concepts: Using QOP routines, summing over 3-d hypersurface
Directory: $HOME/examples/06-pion
How to: $ cd $HOME/examples/06-pion
$ make NO_PROFILE=1
$ submit pion /scratch/data/beta6_gauge_8x8x8x16 0.1503

Let us shift gears now and compute some quark observables. In order to construct any fermion observable one needs to solve the Dirac equation. We will not attempt to develop a solver in this exercise, instead we will use an existing solver from the QOPQDP library. This exercise focuses on mechanisms used to limit QDP computations to a timeslice.

First, let us dispose of the fermion inverter. We setup the Wilson inverter and solve for each of 12 point sources in the following part of main.c. On line 71 we pack individual solutions of the Dirac equations into a propagator.

 47     /* initialize Wilson Dirac matrix solver */
48 wilson_invert_init();
49
50 /* load gauge field */
51 wilson_links = wilson_load_links(U);
52
53 /* set source point at 0,0,0,0 */
54 for(mu=0; mu<NDIM; mu++) coord[mu] = 0;
55
56 /* create some fields */
57 source = QDP_create_D();
58 soln = QDP_create_D();
59 prop = QDP_create_P();
60
61 kappa = atof(argv[2]);
62 resid = 1e-7;
63 printf0("Kappa = %g\n", kappa);
64
65 /* do inversions on source point for each color and spin */
66 for(color = 0; color < QLA_Nc; color++) {
67 for(spin = 0; spin < QLA_Ns; spin++) {
68 point_source(source, coord, color, spin);
69 QDP_D_eq_zero(soln, QDP_all);
70 wilson_invert(soln, wilson_links, source, kappa, resid);
71 QDP_P_eq_diracvec_D(prop, soln, color, spin, QDP_all);
72 }
73 }

Next, the pion propagator is computed and printed:

 75     /* print out pion correlator */
76 print_pion(prop, coord[3]);

Let us take a look on pion.c which does the work. Line 22 creates a collection of nt subsets, one for each time slice.

  3   static QDP_Subset *timeslices = NULL;
4
5 static int
6 timeslice_func(int *coord, void *dum)
7 {
8 return coord[NDIM-1];
9 }
10
11 void
12 print_pion(QDP_DiracPropagator *prop, int t0)
13 {
14 int i, nt;
15 QLA_Real *corr;
16
17 /* get number of timeslices */
18 nt = QDP_coord_size(NDIM-1);
19
20 /* create subset for each timeslice */
21 if(!timeslices) {
22 timeslices = QDP_create_subset(timeslice_func, NULL, 0, nt);
23 }

After that we sum the propagator for a fixed t on line 29:

 25     /* allocate space for correlator on each timeslice */
26 corr = (QLA_Real *) malloc(nt*sizeof(QLA_Real));
27
28 /* do sum[trace(prop^+ prop)] over each timeslice */
29 QDP_r_eq_norm2_P_multi(corr, prop, timeslices, nt);

The rest of print_pion() prints the values of the correlator and does some housekeeping:

 31     /* print result */
32 printf0("BEGIN PION\n");
33 for(i=0; i<nt; i++) {
34 int t = (t0+i)%nt;
35 printf0("%i\t%g\n", i, corr[t] );
36 }
37 printf0("END PION\n");
38
39 free(corr);
40 }

Problems