From e2d1ceaf61596d6716f6bb1ac15413011870645c Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Tue, 23 Jan 2024 10:24:13 +0100 Subject: [PATCH 01/13] documentation for ndd correlators: simpler notation --- doc/omeas_heavy_mesons.qmd | 168 ++++++++++++++++--------------------- 1 file changed, 74 insertions(+), 94 deletions(-) diff --git a/doc/omeas_heavy_mesons.qmd b/doc/omeas_heavy_mesons.qmd index 91774a64b..e5fcb31b1 100644 --- a/doc/omeas_heavy_mesons.qmd +++ b/doc/omeas_heavy_mesons.qmd @@ -20,6 +20,10 @@ csl: acta-ecologica-sinica.csl fontsize: 16pt --- +### Preamble and notation +
+ Show Content + `tmLQCD`can compute the correlators for the heavy mesons $K$ and $D$. The twisted mass formulation of the heavy doublet $(s, c)$ is such that $K$ and $D$ mix in the spectral decomposition @baron2011computing. In fact, the Dirac operator is not diagonal in flavor, @@ -54,8 +58,13 @@ In the following we use the twisted basis $\chi$ for fermion fields: \end{align} +
+ ## Correlators for the $K$ and $D$ +
+ Show Content + The required correlators are given by the following expectation values on the interacting vacuum ${\bra{\Omega} \cdot \ket{\Omega} = \braket{\cdot}}$: @@ -139,8 +148,13 @@ where ${\sigma_3 = 3. The action of $\sigma_1$ swaps the up and down flavor components of a spinor. ::: +
+ ## Wick contractions +
+ Show Content + Using the above remarks, we can write: @@ -208,7 +222,7 @@ Our correlator becomes: Upon a careful calculation for all values $i,j = 0,1$ we find, equivalently (using spacetime translational symmetry): -\begin{equation} +\begin{equation} \label{eq:C.hihj.Gamma1Gamma2} \begin{split} \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) &= @@ -219,23 +233,52 @@ Upon a careful calculation for all values $i,j = 0,1$ we find, equivalently (usi (S_u)^\dagger (x|0) \gamma_5 \Gamma_1 \right] -\\ -&= -\sum_{y,z} -\operatorname{Tr} -\left[ - (S_h)_{f_i f_j} (x+y|y) - \Gamma_2 \gamma_5 - (S_u)^\dagger (x+z|z) - \gamma_5 \Gamma_1 - \delta_{yz} -\right] -\, . \end{split} \end{equation} This is a generalized case of eq. (A9) of @PhysRevD.59.074503. +
+ + +## Stochastic approximation of the correlators + +### Index dilution + +
+ Show Content + + +We now make the following remark. If we want to invert numerically the system $D_{ij} \psi_{j} = \eta_{i}$ (where the $i,j$ indices include all internal indices), we have: + +\begin{equation} +D_{ij} \psi_{j} = \eta_{i} \, \implies +\psi_{i} = S_{ij} \eta_{j} \, . +\end{equation} + +If $\eta_i \eta_i^{*} = 1$ we have: + +\begin{equation} +S_{ij} = \psi_{i} \eta_{j}^{*} \, . +\end{equation} + +--- + +We can also use **index dilution** in order to select the components we want. In fact, if we define: $\eta_i^{(a)} = \eta \delta_{i}^{a}$, with $\eta^{*} \eta =1$ we have: + +\begin{equation} +S_{ab} = S_{ij} \delta_{i}^{a} \delta_{j}^{b} = +S_{ij} (\eta* \delta_{i}^{a}) (\eta \delta_{j}^{b}) = +(\psi_{i}^{(b)})^{*} \eta_{i}^{a} = \psi^{(b)} \cdot \eta^{(a)} \, . +\end{equation} + +
+ +### Stochastic expression of the correlators + +
+ Show Content + We now approximate the propagator using stochastic sources. Additionally, we use: @@ -267,99 +310,36 @@ Additionally, we use: \end{equation} +Therefore, we can approximate the correlators of eq. \eqref{eq:C.hihj.Gamma1Gamma2} above with: -Therefore, we can use spin dilutions to rephrase the correlator in a form which will turn out to be convenient later -($c$ is the color index): \begin{equation} +\begin{split} \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) = -[(S_h)_{f_i f_j}]_{\alpha_1 \beta_1} (x|0) -[\eta^{(\alpha_2)}_{\beta_1}]_c -(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} -[{(\eta^\dagger)}^{(\alpha_3)}_{\beta_2}]_c -[(S_u)^\dagger]_{\beta_2 \alpha_4} (x|0) +& +\left( + (\psi_h)^{(f_j, \alpha_2)}(x) + \cdot + \eta^{(f_i, \alpha_1)}(0) +\right) +(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} +\\ +& +\left( + (\psi_u)^{(0, \alpha_4)}(x) + \cdot + \eta^{(0, \alpha_3)}(0) +\right) (\gamma_5 \Gamma_1)_{\alpha_4 \alpha_1} -\, . +\end{split} \end{equation} -We now define our spinor propagators. -If $\eta^{(\beta, \phi)}$ is the diluted source: - -\begin{align} -& (D_{\ell/h})_{\alpha_1 \alpha_2} (x|y) ({\psi}_{\ell/h}^{(\beta, \phi)})_{\alpha_2} (y) -= (\eta^{(\beta, \phi)})_{\alpha_1} (x) -\\ -& \, \implies \, -(\psi_{\ell/h}^{(\beta, \phi)})_{\alpha_1} (x) -= -(S_{\ell/h})_{\alpha_2 \alpha_1} (x | y) -\eta^{(\beta, \phi)}_{\alpha_2} (y) -= -(S_{\ell/h})_{\alpha_2 \alpha_1} (x | 0) -\eta^{(\beta, \phi)}_{\alpha_2} (0) -\\ -& \, \implies \, -(\psi_{\ell/h}^{(\beta, \phi)})^{*}_{\alpha_1} (x) -= -(\eta^{(\beta, \phi)})^{*}_{\alpha_2} (y) -(S_{\ell/h}^\dagger)_{\alpha_2 \alpha_1} (x | y) -= -(\eta^{(\beta, \phi)})^\dagger_{\alpha_2} (0) -(S_{\ell/h}^\dagger)_{\alpha_2 \alpha_1} (x | 0) -\end{align} - -This means that for our matrix of correlators we have to do ${4_D \times 2_f \times 2_{h,\ell}} = 16$ inversions. +
-::: {.remark} -1. For the light doublet `tmLQCD` computes only $S_u$, which is obtained with $(\psi_h^{(\beta, f_0)})_{f_0}$. This is the only propagator we need. -2. For the heavy propagator, we can access the $(i,j)$ component of $S_h$ with $(\psi_h^{(\beta, f_j)})_{f_i}$. -::: -Our correlator is given by the following expectation value -(no summation on flavor indices): - -\begin{equation} -\begin{split} -\mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) -&= -\langle -[(\psi_h^{(\alpha_2, f_j)})_{f_i}]_{\alpha_1}(x) -(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} -[(\psi_\ell^{(\alpha_3, f_0)})_{f_0}^\dagger]_{\alpha_4} (x) -(\gamma_5 \Gamma_1)_{\alpha_4 \alpha_1} -\rangle -\\ -&= -\braket{ -(\psi_\ell^{(\alpha_3, f_0)})_{f_0}^\dagger (x) -\cdot -(\gamma_5 \Gamma_1) -\cdot -(\psi_h^{(\alpha_2, f_j)})_{f_i}(x) -} -\, -(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} -\\ -&= -\mathcal{R}^{\alpha_3 \alpha_2} (\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} -\end{split} -\end{equation} - -More explicitly: - -\begin{equation} -\begin{split} -\Gamma_2=1 &\implies \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) -= \mathcal{R}^{00}+\mathcal{R}^{11}-\mathcal{R}^{22}-\mathcal{R}^{33} -\\ -\Gamma_2=\gamma_5 &\implies \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) -= \mathcal{R}^{00}+\mathcal{R}^{11}+\mathcal{R}^{22}+\mathcal{R}^{33} -\end{split} -\end{equation} - From 3d93a019af979bf43fe650a8a584764c3ff48e5b Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Tue, 23 Jan 2024 20:22:57 +0100 Subject: [PATCH 02/13] minor changes --- meas/correlators.c | 5 +++-- offline_measurement.c | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/meas/correlators.c b/meas/correlators.c index 9bfe25db5..b4ca90ca0 100644 --- a/meas/correlators.c +++ b/meas/correlators.c @@ -292,7 +292,7 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, #endif /* heavy-light correlators variables */ - // sign change bilinear^\dagger, with Gamma = 1,gamma_ + // sign change bilinear^\dagger, with Gamma = 1,gamma_5 double eta_Gamma[2] = {1.0, -1.0}; // even-odd spinor fields for the light and heavy doublet correlators @@ -904,11 +904,12 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, } void correlators_measurement(const int traj, const int id, const int ieo) { - //light_correlators_measurement(traj, id, ieo); // ??? maybe add a double check? does i1 --> light and i2 --> heavy? if (measurement_list[id].measure_heavy_mesons == 1) { const int i1 = 0, i2 = 1; heavy_correlators_measurement(traj, id, ieo, i1, i2); } + + light_correlators_measurement(traj, id, ieo); } diff --git a/offline_measurement.c b/offline_measurement.c index 95ea094e8..4911ecd14 100644 --- a/offline_measurement.c +++ b/offline_measurement.c @@ -293,9 +293,7 @@ int main(int argc, char *argv[]) if (g_proc_id == 0) { fprintf(stdout, "#\n# Beginning offline measurement.\n"); } - //printf("Ciao Simone4!\n"); meas->measurefunc(nstore, imeas, even_odd_flag); - printf("Ciao Simone5!\n"); } nstore += Nsave; } From 500705e7fdd1047c749e34f6d40ee7ac7d2517a7 Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Tue, 23 Jan 2024 20:23:41 +0100 Subject: [PATCH 03/13] typo in doc for ndd_correlators --- doc/omeas_heavy_mesons.qmd | 48 +++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/doc/omeas_heavy_mesons.qmd b/doc/omeas_heavy_mesons.qmd index e5fcb31b1..78622438d 100644 --- a/doc/omeas_heavy_mesons.qmd +++ b/doc/omeas_heavy_mesons.qmd @@ -256,7 +256,7 @@ D_{ij} \psi_{j} = \eta_{i} \, \implies \psi_{i} = S_{ij} \eta_{j} \, . \end{equation} -If $\eta_i \eta_i^{*} = 1$ we have: +If $\eta_i \eta_j^{*} = \delta_{ij}$ we have: \begin{equation} S_{ij} = \psi_{i} \eta_{j}^{*} \, . @@ -268,8 +268,9 @@ We can also use **index dilution** in order to select the components we want. In \begin{equation} S_{ab} = S_{ij} \delta_{i}^{a} \delta_{j}^{b} = -S_{ij} (\eta* \delta_{i}^{a}) (\eta \delta_{j}^{b}) = -(\psi_{i}^{(b)})^{*} \eta_{i}^{a} = \psi^{(b)} \cdot \eta^{(a)} \, . +S_{ij} (\eta^{*} \delta_{i}^{a}) (\eta \delta_{j}^{b}) = +\psi_{i}^{(b)} (\eta_{i}^{a})^{*} += \eta^{(a)} \cdot \psi^{(b)} \, . \end{equation} @@ -289,7 +290,7 @@ Additionally, we use: \begin{equation} \eta^{(\alpha)}_{\beta, c} = \eta_c \, \delta^\alpha_\beta \,\, , \, \, - \eta^\dagger_c \eta_c = 1 \, . + \eta_c \otimes \eta^\dagger_c = \mathbb{1}_{N_c \times N_c} \, . \end{equation} - Flavor dilution: sources have an additional flavor index $\phi$, such that their flavor component different from the index vanish. The value of the flavor component however is the same, it changes only its position in the doublet: @@ -319,23 +320,54 @@ Therefore, we can approximate the correlators of eq. \eqref{eq:C.hihj.Gamma1Gamm = & \left( - (\psi_h)^{(f_j, \alpha_2)}(x) - \cdot \eta^{(f_i, \alpha_1)}(0) + \cdot + \psi_h^{(f_j, \alpha_2)}(x) \right) (\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} \\ & \left( - (\psi_u)^{(0, \alpha_4)}(x) - \cdot \eta^{(0, \alpha_3)}(0) + \cdot + \psi_u^{(0, \alpha_4)}(x) \right) (\gamma_5 \Gamma_1)_{\alpha_4 \alpha_1} \end{split} \end{equation} +In our case $\Gamma_{1/2} = 1, \gamma_5$, so that $\Gamma_i \gamma_5$ is diagonal in the Dirac indices. +Thus the correlator can be written as (explicit summation over the indices): + + +\begin{equation} +\begin{split} +\mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) += +& +\sum_{\alpha_{1}, \alpha_{2}} +\left( + \eta^{(f_i, \alpha_1)}(0) + \cdot + \psi_h^{(f_j, \alpha_2)}(x) +\right) +(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_2} +\\ +& +\left( + \eta^{(0, \alpha_2)}(0) + \cdot + \psi_u^{(0, \alpha_1)}(x) +\right) +(\gamma_5 \Gamma_1)_{\alpha_1 \alpha_1} +\end{split} +\end{equation} + + + + + From 7608a7eacb27ac53649664e074f71b6bf983e548 Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Tue, 23 Jan 2024 10:24:13 +0100 Subject: [PATCH 04/13] documentation for ndd correlators: simpler notation --- doc/omeas_heavy_mesons.qmd | 168 ++++++++++++++++--------------------- 1 file changed, 74 insertions(+), 94 deletions(-) diff --git a/doc/omeas_heavy_mesons.qmd b/doc/omeas_heavy_mesons.qmd index 91774a64b..e5fcb31b1 100644 --- a/doc/omeas_heavy_mesons.qmd +++ b/doc/omeas_heavy_mesons.qmd @@ -20,6 +20,10 @@ csl: acta-ecologica-sinica.csl fontsize: 16pt --- +### Preamble and notation +
+ Show Content + `tmLQCD`can compute the correlators for the heavy mesons $K$ and $D$. The twisted mass formulation of the heavy doublet $(s, c)$ is such that $K$ and $D$ mix in the spectral decomposition @baron2011computing. In fact, the Dirac operator is not diagonal in flavor, @@ -54,8 +58,13 @@ In the following we use the twisted basis $\chi$ for fermion fields: \end{align} +
+ ## Correlators for the $K$ and $D$ +
+ Show Content + The required correlators are given by the following expectation values on the interacting vacuum ${\bra{\Omega} \cdot \ket{\Omega} = \braket{\cdot}}$: @@ -139,8 +148,13 @@ where ${\sigma_3 = 3. The action of $\sigma_1$ swaps the up and down flavor components of a spinor. ::: +
+ ## Wick contractions +
+ Show Content + Using the above remarks, we can write: @@ -208,7 +222,7 @@ Our correlator becomes: Upon a careful calculation for all values $i,j = 0,1$ we find, equivalently (using spacetime translational symmetry): -\begin{equation} +\begin{equation} \label{eq:C.hihj.Gamma1Gamma2} \begin{split} \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) &= @@ -219,23 +233,52 @@ Upon a careful calculation for all values $i,j = 0,1$ we find, equivalently (usi (S_u)^\dagger (x|0) \gamma_5 \Gamma_1 \right] -\\ -&= -\sum_{y,z} -\operatorname{Tr} -\left[ - (S_h)_{f_i f_j} (x+y|y) - \Gamma_2 \gamma_5 - (S_u)^\dagger (x+z|z) - \gamma_5 \Gamma_1 - \delta_{yz} -\right] -\, . \end{split} \end{equation} This is a generalized case of eq. (A9) of @PhysRevD.59.074503. +
+ + +## Stochastic approximation of the correlators + +### Index dilution + +
+ Show Content + + +We now make the following remark. If we want to invert numerically the system $D_{ij} \psi_{j} = \eta_{i}$ (where the $i,j$ indices include all internal indices), we have: + +\begin{equation} +D_{ij} \psi_{j} = \eta_{i} \, \implies +\psi_{i} = S_{ij} \eta_{j} \, . +\end{equation} + +If $\eta_i \eta_i^{*} = 1$ we have: + +\begin{equation} +S_{ij} = \psi_{i} \eta_{j}^{*} \, . +\end{equation} + +--- + +We can also use **index dilution** in order to select the components we want. In fact, if we define: $\eta_i^{(a)} = \eta \delta_{i}^{a}$, with $\eta^{*} \eta =1$ we have: + +\begin{equation} +S_{ab} = S_{ij} \delta_{i}^{a} \delta_{j}^{b} = +S_{ij} (\eta* \delta_{i}^{a}) (\eta \delta_{j}^{b}) = +(\psi_{i}^{(b)})^{*} \eta_{i}^{a} = \psi^{(b)} \cdot \eta^{(a)} \, . +\end{equation} + +
+ +### Stochastic expression of the correlators + +
+ Show Content + We now approximate the propagator using stochastic sources. Additionally, we use: @@ -267,99 +310,36 @@ Additionally, we use: \end{equation} +Therefore, we can approximate the correlators of eq. \eqref{eq:C.hihj.Gamma1Gamma2} above with: -Therefore, we can use spin dilutions to rephrase the correlator in a form which will turn out to be convenient later -($c$ is the color index): \begin{equation} +\begin{split} \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) = -[(S_h)_{f_i f_j}]_{\alpha_1 \beta_1} (x|0) -[\eta^{(\alpha_2)}_{\beta_1}]_c -(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} -[{(\eta^\dagger)}^{(\alpha_3)}_{\beta_2}]_c -[(S_u)^\dagger]_{\beta_2 \alpha_4} (x|0) +& +\left( + (\psi_h)^{(f_j, \alpha_2)}(x) + \cdot + \eta^{(f_i, \alpha_1)}(0) +\right) +(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} +\\ +& +\left( + (\psi_u)^{(0, \alpha_4)}(x) + \cdot + \eta^{(0, \alpha_3)}(0) +\right) (\gamma_5 \Gamma_1)_{\alpha_4 \alpha_1} -\, . +\end{split} \end{equation} -We now define our spinor propagators. -If $\eta^{(\beta, \phi)}$ is the diluted source: - -\begin{align} -& (D_{\ell/h})_{\alpha_1 \alpha_2} (x|y) ({\psi}_{\ell/h}^{(\beta, \phi)})_{\alpha_2} (y) -= (\eta^{(\beta, \phi)})_{\alpha_1} (x) -\\ -& \, \implies \, -(\psi_{\ell/h}^{(\beta, \phi)})_{\alpha_1} (x) -= -(S_{\ell/h})_{\alpha_2 \alpha_1} (x | y) -\eta^{(\beta, \phi)}_{\alpha_2} (y) -= -(S_{\ell/h})_{\alpha_2 \alpha_1} (x | 0) -\eta^{(\beta, \phi)}_{\alpha_2} (0) -\\ -& \, \implies \, -(\psi_{\ell/h}^{(\beta, \phi)})^{*}_{\alpha_1} (x) -= -(\eta^{(\beta, \phi)})^{*}_{\alpha_2} (y) -(S_{\ell/h}^\dagger)_{\alpha_2 \alpha_1} (x | y) -= -(\eta^{(\beta, \phi)})^\dagger_{\alpha_2} (0) -(S_{\ell/h}^\dagger)_{\alpha_2 \alpha_1} (x | 0) -\end{align} - -This means that for our matrix of correlators we have to do ${4_D \times 2_f \times 2_{h,\ell}} = 16$ inversions. +
-::: {.remark} -1. For the light doublet `tmLQCD` computes only $S_u$, which is obtained with $(\psi_h^{(\beta, f_0)})_{f_0}$. This is the only propagator we need. -2. For the heavy propagator, we can access the $(i,j)$ component of $S_h$ with $(\psi_h^{(\beta, f_j)})_{f_i}$. -::: -Our correlator is given by the following expectation value -(no summation on flavor indices): - -\begin{equation} -\begin{split} -\mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) -&= -\langle -[(\psi_h^{(\alpha_2, f_j)})_{f_i}]_{\alpha_1}(x) -(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} -[(\psi_\ell^{(\alpha_3, f_0)})_{f_0}^\dagger]_{\alpha_4} (x) -(\gamma_5 \Gamma_1)_{\alpha_4 \alpha_1} -\rangle -\\ -&= -\braket{ -(\psi_\ell^{(\alpha_3, f_0)})_{f_0}^\dagger (x) -\cdot -(\gamma_5 \Gamma_1) -\cdot -(\psi_h^{(\alpha_2, f_j)})_{f_i}(x) -} -\, -(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} -\\ -&= -\mathcal{R}^{\alpha_3 \alpha_2} (\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} -\end{split} -\end{equation} - -More explicitly: - -\begin{equation} -\begin{split} -\Gamma_2=1 &\implies \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) -= \mathcal{R}^{00}+\mathcal{R}^{11}-\mathcal{R}^{22}-\mathcal{R}^{33} -\\ -\Gamma_2=\gamma_5 &\implies \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) -= \mathcal{R}^{00}+\mathcal{R}^{11}+\mathcal{R}^{22}+\mathcal{R}^{33} -\end{split} -\end{equation} - From f9eb405831908e5dc09bb364f345c6b1f6fac08c Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Tue, 23 Jan 2024 20:22:57 +0100 Subject: [PATCH 05/13] minor changes --- meas/correlators.c | 5 +++-- offline_measurement.c | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/meas/correlators.c b/meas/correlators.c index 9bfe25db5..b4ca90ca0 100644 --- a/meas/correlators.c +++ b/meas/correlators.c @@ -292,7 +292,7 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, #endif /* heavy-light correlators variables */ - // sign change bilinear^\dagger, with Gamma = 1,gamma_ + // sign change bilinear^\dagger, with Gamma = 1,gamma_5 double eta_Gamma[2] = {1.0, -1.0}; // even-odd spinor fields for the light and heavy doublet correlators @@ -904,11 +904,12 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, } void correlators_measurement(const int traj, const int id, const int ieo) { - //light_correlators_measurement(traj, id, ieo); // ??? maybe add a double check? does i1 --> light and i2 --> heavy? if (measurement_list[id].measure_heavy_mesons == 1) { const int i1 = 0, i2 = 1; heavy_correlators_measurement(traj, id, ieo, i1, i2); } + + light_correlators_measurement(traj, id, ieo); } diff --git a/offline_measurement.c b/offline_measurement.c index 95ea094e8..4911ecd14 100644 --- a/offline_measurement.c +++ b/offline_measurement.c @@ -293,9 +293,7 @@ int main(int argc, char *argv[]) if (g_proc_id == 0) { fprintf(stdout, "#\n# Beginning offline measurement.\n"); } - //printf("Ciao Simone4!\n"); meas->measurefunc(nstore, imeas, even_odd_flag); - printf("Ciao Simone5!\n"); } nstore += Nsave; } From cd605f7a7749c6c65f8a15c98b4036c12fdc0baa Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Tue, 23 Jan 2024 20:23:41 +0100 Subject: [PATCH 06/13] typo in doc for ndd_correlators --- doc/omeas_heavy_mesons.qmd | 48 +++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/doc/omeas_heavy_mesons.qmd b/doc/omeas_heavy_mesons.qmd index e5fcb31b1..78622438d 100644 --- a/doc/omeas_heavy_mesons.qmd +++ b/doc/omeas_heavy_mesons.qmd @@ -256,7 +256,7 @@ D_{ij} \psi_{j} = \eta_{i} \, \implies \psi_{i} = S_{ij} \eta_{j} \, . \end{equation} -If $\eta_i \eta_i^{*} = 1$ we have: +If $\eta_i \eta_j^{*} = \delta_{ij}$ we have: \begin{equation} S_{ij} = \psi_{i} \eta_{j}^{*} \, . @@ -268,8 +268,9 @@ We can also use **index dilution** in order to select the components we want. In \begin{equation} S_{ab} = S_{ij} \delta_{i}^{a} \delta_{j}^{b} = -S_{ij} (\eta* \delta_{i}^{a}) (\eta \delta_{j}^{b}) = -(\psi_{i}^{(b)})^{*} \eta_{i}^{a} = \psi^{(b)} \cdot \eta^{(a)} \, . +S_{ij} (\eta^{*} \delta_{i}^{a}) (\eta \delta_{j}^{b}) = +\psi_{i}^{(b)} (\eta_{i}^{a})^{*} += \eta^{(a)} \cdot \psi^{(b)} \, . \end{equation} @@ -289,7 +290,7 @@ Additionally, we use: \begin{equation} \eta^{(\alpha)}_{\beta, c} = \eta_c \, \delta^\alpha_\beta \,\, , \, \, - \eta^\dagger_c \eta_c = 1 \, . + \eta_c \otimes \eta^\dagger_c = \mathbb{1}_{N_c \times N_c} \, . \end{equation} - Flavor dilution: sources have an additional flavor index $\phi$, such that their flavor component different from the index vanish. The value of the flavor component however is the same, it changes only its position in the doublet: @@ -319,23 +320,54 @@ Therefore, we can approximate the correlators of eq. \eqref{eq:C.hihj.Gamma1Gamm = & \left( - (\psi_h)^{(f_j, \alpha_2)}(x) - \cdot \eta^{(f_i, \alpha_1)}(0) + \cdot + \psi_h^{(f_j, \alpha_2)}(x) \right) (\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} \\ & \left( - (\psi_u)^{(0, \alpha_4)}(x) - \cdot \eta^{(0, \alpha_3)}(0) + \cdot + \psi_u^{(0, \alpha_4)}(x) \right) (\gamma_5 \Gamma_1)_{\alpha_4 \alpha_1} \end{split} \end{equation} +In our case $\Gamma_{1/2} = 1, \gamma_5$, so that $\Gamma_i \gamma_5$ is diagonal in the Dirac indices. +Thus the correlator can be written as (explicit summation over the indices): + + +\begin{equation} +\begin{split} +\mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) += +& +\sum_{\alpha_{1}, \alpha_{2}} +\left( + \eta^{(f_i, \alpha_1)}(0) + \cdot + \psi_h^{(f_j, \alpha_2)}(x) +\right) +(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_2} +\\ +& +\left( + \eta^{(0, \alpha_2)}(0) + \cdot + \psi_u^{(0, \alpha_1)}(x) +\right) +(\gamma_5 \Gamma_1)_{\alpha_1 \alpha_1} +\end{split} +\end{equation} + + + + + From f7a94a30a0e3a09870d74cd30a1198ff5cd50d2a Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Tue, 23 Jan 2024 20:52:12 +0100 Subject: [PATCH 07/13] applied formula in the documentation for ndd_correlators --- meas/correlators.c | 53 +++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/meas/correlators.c b/meas/correlators.c index b4ca90ca0..c363aeff7 100644 --- a/meas/correlators.c +++ b/meas/correlators.c @@ -659,33 +659,52 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, for (i = j; i < j + LX * LY * LZ; i++) { for (size_t beta = 0; beta < 4; beta++) { // spin dilution spinor psi_u = arr_spinor[1][0][beta][f0][f0][i]; + spinor eta_u = arr_spinor[0][0][beta][f0][f0][0]; res += _spinor_prod_re(psi_u, psi_u); _gamma0(phi, psi_u); respa += _spinor_prod_re(psi_u, phi); _gamma5(phi, phi); resp4 += _spinor_prod_im(psi_u, phi); + } + + // diagonal elements of Gamma_i*gamma_5 + double diag_G1g5[4] = {1.0, 1.0, 1.0, 1.0}; + double diag_G2g5[4] = {1.0, 1.0, 1.0, 1.0}; - for (size_t hi = 0; hi < 2; hi++) { - for (size_t hj = 0; hj < 2; hj++) { - for (size_t g1 = 0; g1 < 2; g1++) { - for (size_t g2 = 0; g2 < 2; g2++) { - double dum = 0.0; // dummy variable - - // heavy doublet spinor propagator - phi = arr_spinor[1][1][beta][hj][hi][i]; - if (g1 == 0) { // Gamma_1 = \mathbb{1} - _gamma5(phi, phi); - } - _spinor_scalar_prod(dum, psi_u, phi); - - double sign_beta = +1.0; - if (g2 == 0 /* Gamma_2 == \mathbb{1} */ && beta >= 2) { - sign_beta = -1.0; + for (size_t hi = 0; hi < 2; hi++) { + for (size_t hj = 0; hj < 2; hj++) { + for (size_t g1 = 0; g1 < 2; g1++) { + if (g1 == 0) { // Gamma_1 = \mathbb{1} + diag_G1g5[2] = -1; + diag_G1g5[3] = -1; + } + for (size_t g2 = 0; g2 < 2; g2++) { + // heavy doublet spinor propagator + for (int alpha_1=0; alpha_1 < 4; alpha_1++){ + spinor eta_h = arr_spinor[1][1][alpha_1][hj][hi][0]; + spinor psi_u = arr_spinor[1][0][alpha_1][f0][f0][i]; + for (int alpha_2=0; alpha_2 < 4; alpha_2++){ + spinor eta_u = arr_spinor[0][0][alpha_2][f0][f0][0]; + double dum1 = 0.0; // dummy variable + _spinor_scalar_prod(dum1, eta_u, psi_u); + double dum2 = 0.0; // dummy variable + spinor psi_h = arr_spinor[1][1][alpha_2][hj][hi][i]; + if (g2 == 0) { // Gamma_2 = \mathbb{1} + diag_G2g5[2] = -1.0; + diag_G2g5[3] = -1.0; + } + _spinor_scalar_prod(dum2, eta_h, psi_h); + res_hihj_g1g2[hi][hj][g1][g2] += dum2*diag_G2g5[alpha_2]*dum1*diag_G1g5[alpha_1]; } - res_hihj_g1g2[hi][hj][g1][g2] += sign_beta * dum; } + // restoring to default + diag_G2g5[2] = 1.0; + diag_G2g5[3] = 1.0; } + // restoring to default + diag_G1g5[2] = 1.0; + diag_G1g5[3] = 1.0; } } From 13db981a26bb6284d6d51a9a64c9fc0bc5be6cfa Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Tue, 23 Jan 2024 20:58:58 +0100 Subject: [PATCH 08/13] fixed typo --- meas/correlators.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meas/correlators.c b/meas/correlators.c index c363aeff7..9d52eea19 100644 --- a/meas/correlators.c +++ b/meas/correlators.c @@ -682,7 +682,7 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, for (size_t g2 = 0; g2 < 2; g2++) { // heavy doublet spinor propagator for (int alpha_1=0; alpha_1 < 4; alpha_1++){ - spinor eta_h = arr_spinor[1][1][alpha_1][hj][hi][0]; + spinor eta_h = arr_spinor[0][1][alpha_1][hj][hi][0]; spinor psi_u = arr_spinor[1][0][alpha_1][f0][f0][i]; for (int alpha_2=0; alpha_2 < 4; alpha_2++){ spinor eta_u = arr_spinor[0][0][alpha_2][f0][f0][0]; From 29086ea2a276fb4359f245583455dd0da828e0f5 Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Wed, 24 Jan 2024 13:30:25 +0100 Subject: [PATCH 09/13] minor change to the ndd documentation --- doc/omeas_heavy_mesons.qmd | 6 ------ 1 file changed, 6 deletions(-) diff --git a/doc/omeas_heavy_mesons.qmd b/doc/omeas_heavy_mesons.qmd index 78622438d..c5081381a 100644 --- a/doc/omeas_heavy_mesons.qmd +++ b/doc/omeas_heavy_mesons.qmd @@ -318,15 +318,12 @@ Therefore, we can approximate the correlators of eq. \eqref{eq:C.hihj.Gamma1Gamm \begin{split} \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) = -& \left( \eta^{(f_i, \alpha_1)}(0) \cdot \psi_h^{(f_j, \alpha_2)}(x) \right) (\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} -\\ -& \left( \eta^{(0, \alpha_3)}(0) \cdot @@ -345,7 +342,6 @@ Thus the correlator can be written as (explicit summation over the indices): \begin{split} \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) = -& \sum_{\alpha_{1}, \alpha_{2}} \left( \eta^{(f_i, \alpha_1)}(0) @@ -353,8 +349,6 @@ Thus the correlator can be written as (explicit summation over the indices): \psi_h^{(f_j, \alpha_2)}(x) \right) (\Gamma_2 \gamma_5)_{\alpha_2 \alpha_2} -\\ -& \left( \eta^{(0, \alpha_2)}(0) \cdot From 142b15212242c189c14be4b8718bc8e20e1ca316 Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Fri, 26 Jan 2024 16:30:06 +0100 Subject: [PATCH 10/13] no need for the sources when building the correlator --- meas/correlators.c | 112 ++++++++++++++------------- solver/dirac_operator_eigenvectors.h | 8 ++ 2 files changed, 65 insertions(+), 55 deletions(-) diff --git a/meas/correlators.c b/meas/correlators.c index 9d52eea19..6f3c1060a 100644 --- a/meas/correlators.c +++ b/meas/correlators.c @@ -40,7 +40,6 @@ #include "gettime.h" - #define TM_OMEAS_FILENAME_LENGTH 100 /****************************************************** @@ -253,6 +252,15 @@ void light_correlators_measurement(const int traj, const int id, const int ieo) return; } + +void spinor_dirac_array(su3_vector* phi, spinor psi){ + phi[0] = psi.s0; + phi[1] = psi.s1; + phi[2] = psi.s2; + phi[3] = psi.s3; +} + + /****************************************************** * * This routine computes the correlator matrix (), @@ -473,9 +481,10 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, for (size_t beta = 0; beta < 4; beta++) { // spin dilution index for (size_t F = 0; F < 2; F++) { // flavor dilution index for (size_t i_f = 0; i_f < 2; i_f++) { // flavor index of the doublet - eo_source_spinor_field_spin_diluted_oet_ts(arr_eo_spinor[0][db][beta][F][0][i_f], - arr_eo_spinor[0][db][beta][F][1][i_f], t0, - beta, sample, traj, seed_i); + eo_source_spinor_field_spin_diluted_oet_ts( + arr_eo_spinor[0][db][beta][F][0][i_f], + arr_eo_spinor[0][db][beta][F][1][i_f], t0, + beta, sample, traj, seed_i); } } } @@ -498,15 +507,15 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, // stored temporarely in the propagator spinors (used as dummy) if (F==0){ mul_one_pm_itau2_and_div_by_sqrt2( - arr_eo_spinor[1][1][beta][F][i_eo][0], arr_eo_spinor[1][1][beta][F][i_eo][1], - arr_eo_spinor[0][1][beta][F][i_eo][0], phi1, +1.0, - VOLUME / 2); + arr_eo_spinor[1][1][beta][F][i_eo][0], arr_eo_spinor[1][1][beta][F][i_eo][1], + arr_eo_spinor[0][1][beta][F][i_eo][0], phi1, +1.0, + VOLUME / 2); } if (F==1){ mul_one_pm_itau2_and_div_by_sqrt2( - arr_eo_spinor[1][1][beta][F][i_eo][0], arr_eo_spinor[1][1][beta][F][i_eo][1], - phi2, arr_eo_spinor[0][1][beta][F][i_eo][1], +1.0, - VOLUME / 2); + arr_eo_spinor[1][1][beta][F][i_eo][0], arr_eo_spinor[1][1][beta][F][i_eo][1], + phi2, arr_eo_spinor[0][1][beta][F][i_eo][1], +1.0, + VOLUME / 2); } for (size_t i_f = 0; i_f < 2; i_f++) { @@ -598,9 +607,9 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, // (c,s) --> [(1-i*tau_2)/sqrt(2)] * (c,s) // stored temporarely in phi1, phi2 mul_one_pm_itau2_and_div_by_sqrt2(phi1, phi2, - arr_eo_spinor[1][1][beta][F][i_eo][0], arr_eo_spinor[1][1][beta][F][i_eo][1], -1.0, - VOLUME / 2); - + arr_eo_spinor[1][1][beta][F][i_eo][0], arr_eo_spinor[1][1][beta][F][i_eo][1], -1.0, + VOLUME / 2); + assign(arr_eo_spinor[1][1][beta][F][i_eo][0], phi1, VOLUME / 2); assign(arr_eo_spinor[1][1][beta][F][i_eo][1], phi2, VOLUME / 2); } @@ -616,19 +625,19 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, } // now we switch from even-odd representation to standard - //for (size_t i_sp = 0; i_sp < 2; i_sp++) { // source or sink - for (size_t db = 0; db < 2; db++) { // doublet: light of heavy - for (size_t beta = 0; beta < 4; beta++) { // spin dilution index - for (size_t F = 0; F < 2; F++) { // flavor projection index - for (size_t i_f = 0; i_f < 2; i_f++) { // flavor index - convert_eo_to_lexic(arr_spinor[1][db][beta][F][i_f], - arr_eo_spinor[1][db][beta][F][0][i_f], - arr_eo_spinor[1][db][beta][F][1][i_f]); + for (size_t i_sp = 0; i_sp < 2; i_sp++) { // source or sink + for (size_t db = 0; db < 2; db++) { // doublet: light of heavy + for (size_t beta = 0; beta < 4; beta++) { // spin dilution index + for (size_t F = 0; F < 2; F++) { // flavor projection index + for (size_t i_f = 0; i_f < 2; i_f++) { // flavor index + convert_eo_to_lexic(arr_spinor[i_sp][db][beta][F][i_f], + arr_eo_spinor[i_sp][db][beta][F][0][i_f], + arr_eo_spinor[i_sp][db][beta][F][1][i_f]); + } } } } } - // } //MPI_Barrier(MPI_COMM_WORLD); if (g_proc_id == 0){ @@ -637,7 +646,7 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, //MPI_Barrier(MPI_COMM_WORLD); if (g_proc_id == 0){ - printf("Checkpoint 11\n"); + printf("Checkpoint 11.0\n"); } /* @@ -645,21 +654,23 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, https://arxiv.org/pdf/1005.2042.pdf) I can build the correlators of eq. (20) */ const int f0 = 0; // flavor index of the up + /* now we sum only over local space for every t */ + const int j_ts = t0-g_proc_coords[0]*T; // checkerboard index of the time at the source for (t = 0; t < T; t++) { - j = g_ipt[t][0][0][0]; + j = g_ipt[t][0][0][0]; // source and sink separated by "t" // dummy variables res = 0.0; respa = 0.0; resp4 = 0.0; - for (i = j; i < j + LX * LY * LZ; i++) { + + // light correlators for (size_t beta = 0; beta < 4; beta++) { // spin dilution spinor psi_u = arr_spinor[1][0][beta][f0][f0][i]; - spinor eta_u = arr_spinor[0][0][beta][f0][f0][0]; res += _spinor_prod_re(psi_u, psi_u); _gamma0(phi, psi_u); @@ -668,43 +679,34 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, resp4 += _spinor_prod_im(psi_u, phi); } - // diagonal elements of Gamma_i*gamma_5 - double diag_G1g5[4] = {1.0, 1.0, 1.0, 1.0}; - double diag_G2g5[4] = {1.0, 1.0, 1.0, 1.0}; - + // heavy correlators for (size_t hi = 0; hi < 2; hi++) { for (size_t hj = 0; hj < 2; hj++) { for (size_t g1 = 0; g1 < 2; g1++) { - if (g1 == 0) { // Gamma_1 = \mathbb{1} - diag_G1g5[2] = -1; - diag_G1g5[3] = -1; - } for (size_t g2 = 0; g2 < 2; g2++) { - // heavy doublet spinor propagator - for (int alpha_1=0; alpha_1 < 4; alpha_1++){ - spinor eta_h = arr_spinor[0][1][alpha_1][hj][hi][0]; - spinor psi_u = arr_spinor[1][0][alpha_1][f0][f0][i]; - for (int alpha_2=0; alpha_2 < 4; alpha_2++){ - spinor eta_u = arr_spinor[0][0][alpha_2][f0][f0][0]; - double dum1 = 0.0; // dummy variable - _spinor_scalar_prod(dum1, eta_u, psi_u); - double dum2 = 0.0; // dummy variable - spinor psi_h = arr_spinor[1][1][alpha_2][hj][hi][i]; - if (g2 == 0) { // Gamma_2 = \mathbb{1} - diag_G2g5[2] = -1.0; - diag_G2g5[3] = -1.0; + double complex dum_tot = 0.0; + for (int alpha_1 = 0; alpha_1 < 4; alpha_1++){ + for (int alpha_2 = 0; alpha_2 < 4; alpha_2++){ + // S_\ell + spinor psi_h = arr_spinor[1][1][alpha_1][hj][hi][i]; + if (g1 == 0){ // Gamma_1 = Id + _gamma5(psi_h, psi_h); + } + su3_vector psi_h_su3[4]; + spinor_dirac_array(&psi_h_su3[0], psi_h); + spinor psi_u_star = arr_spinor[1][0][alpha_2][f0][f0][i]; + if (g2 == 0){ // Gamma_2 = Id. NOTE: works because Gamma_2=Gamma_2* for Gamma_2=1,gamma_5 + _gamma5(psi_u_star, psi_u_star); } - _spinor_scalar_prod(dum2, eta_h, psi_h); - res_hihj_g1g2[hi][hj][g1][g2] += dum2*diag_G2g5[alpha_2]*dum1*diag_G1g5[alpha_1]; + su3_vector psi_u_star_su3[4]; + spinor_dirac_array(&psi_u_star_su3[0], psi_u_star); + complex double dum_12 = 0.0; + _colorvec_scalar_prod(dum_12, psi_u_star_su3[alpha_1], psi_h_su3[alpha_2]); + dum_tot =+ dum_12; } } - // restoring to default - diag_G2g5[2] = 1.0; - diag_G2g5[3] = 1.0; + res_hihj_g1g2[hi][hj][g1][g2] = creal(dum_tot); // correlators are real } - // restoring to default - diag_G1g5[2] = 1.0; - diag_G1g5[3] = 1.0; } } diff --git a/solver/dirac_operator_eigenvectors.h b/solver/dirac_operator_eigenvectors.h index b4ef212e1..6b7454533 100644 --- a/solver/dirac_operator_eigenvectors.h +++ b/solver/dirac_operator_eigenvectors.h @@ -265,6 +265,14 @@ int cyclicDiff(int a,int b, int period); conj((r).s3.c2) * (s).s3.c2; + +#define _colorvec_scalar_prod(proj,r,s)\ + (proj) = conj((r).c0) * (s).c0 + \ + conj((r).c1) * (s).c1; + \ + conj((r).c2) * (s).c2; + + + #define PROJECTSPLIT(p_plus,up_plus,col_proj,phi_o,phi_plus,col_phi)\ p_plus = 0; \ p_plus += conj(up_plus->s0.col_proj) * (phi_o->s0.col_phi); \ From 3926b0243ae0187ac18a2401e4464342e3ffcb0d Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Fri, 26 Jan 2024 16:33:43 +0100 Subject: [PATCH 11/13] updated documentation for ndd correlators --- doc/omeas_heavy_mesons.qmd | 44 ++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/doc/omeas_heavy_mesons.qmd b/doc/omeas_heavy_mesons.qmd index c5081381a..b1ef91910 100644 --- a/doc/omeas_heavy_mesons.qmd +++ b/doc/omeas_heavy_mesons.qmd @@ -317,7 +317,7 @@ Therefore, we can approximate the correlators of eq. \eqref{eq:C.hihj.Gamma1Gamm \begin{equation} \begin{split} \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) -= +&= \left( \eta^{(f_i, \alpha_1)}(0) \cdot @@ -328,37 +328,39 @@ Therefore, we can approximate the correlators of eq. \eqref{eq:C.hihj.Gamma1Gamm \eta^{(0, \alpha_3)}(0) \cdot \psi_u^{(0, \alpha_4)}(x) -\right) +\right)^{*} +(\gamma_5 \Gamma_1)_{\alpha_4 \alpha_1} +\\ +&= +(\psi_h)_{f_i, \alpha_1}^{(f_j, \alpha_2)}(x) +(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_3} +(\psi_u)_{\alpha_3}^{(0, \alpha_4)}(x)^{*} (\gamma_5 \Gamma_1)_{\alpha_4 \alpha_1} \end{split} \end{equation} -In our case $\Gamma_{1/2} = 1, \gamma_5$, so that $\Gamma_i \gamma_5$ is diagonal in the Dirac indices. -Thus the correlator can be written as (explicit summation over the indices): +In the end we have: - \begin{equation} -\begin{split} \mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) = -\sum_{\alpha_{1}, \alpha_{2}} -\left( - \eta^{(f_i, \alpha_1)}(0) - \cdot - \psi_h^{(f_j, \alpha_2)}(x) -\right) -(\Gamma_2 \gamma_5)_{\alpha_2 \alpha_2} -\left( - \eta^{(0, \alpha_2)}(0) - \cdot - \psi_u^{(0, \alpha_1)}(x) -\right) -(\gamma_5 \Gamma_1)_{\alpha_1 \alpha_1} -\end{split} +[\Gamma_2 \gamma_5 (\psi_u)^{(0, \alpha_2)}(x)^{*}]_{\alpha_1} +[\gamma_5 \Gamma_1 (\psi_h)_{f_i}^{(f_j, \alpha_1)}(x) ]_{\alpha_2} +\end{equation} + +In our case $\Gamma_{1,2} = 1,\gamma_5$. Since we use the chiral basis ${\Gamma_{1,2}^{*} = (\Gamma_{1,2}^{T})^\dagger = \Gamma_{1,2}}$. +Therefore we can equivalently write the correlator as: + +\begin{equation} +\mathcal{C}^{h_i, h_j}_{\Gamma_1, \Gamma_2}(t, \vec{x}) += +[\Gamma_2 \gamma_5 (\psi_u)^{(0, \alpha_2)}(x)]^{*}_{\alpha_1} +\cdot +[\gamma_5 \Gamma_1 (\psi_h)_{f_i}^{(f_j, \alpha_1)}(x) ]_{\alpha_2} \, \end{equation} - +where $\cdot$ is the dot product in color space (NOTE: it complex-conjugates the 1st vector). From 56dd8125fb778a0a6ad0f257d0ba98fbb5207729 Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Tue, 9 Apr 2024 22:50:27 +0200 Subject: [PATCH 12/13] small typo only for correlator at t=0 --- meas/correlators.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meas/correlators.c b/meas/correlators.c index 6f3c1060a..61504f43c 100644 --- a/meas/correlators.c +++ b/meas/correlators.c @@ -829,7 +829,7 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, for (size_t hj = 0; hj < 2; hj++) { for (size_t g1 = 0; g1 < 2; g1++) { for (size_t g2 = 0; g2 < 2; g2++) { - fprintf(ofs, "%u %u %u %u 0 %e %e\n", hi, hj, g1, g2, C_hihj_g1g2[hi][hj][g1][g1][t0], 0.0); + fprintf(ofs, "%u %u %u %u 0 %e %e\n", hi, hj, g1, g2, C_hihj_g1g2[hi][hj][g1][g2][t0], 0.0); for (t = 1; t < g_nproc_t * T / 2; t++) { tt = (t0 + t) % (g_nproc_t * T); fprintf(ofs, "%u %u %u %u %d %e ", hi, hj, g1, g2, t, C_hihj_g1g2[hi][hj][g1][g2][tt]); From 4b5e0cd258d83e663dd66d4d18d2d38022a13fdd Mon Sep 17 00:00:00 2001 From: simone-romiti Date: Wed, 10 Apr 2024 14:34:17 +0200 Subject: [PATCH 13/13] typo: =+ instead of += --- meas/correlators.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/meas/correlators.c b/meas/correlators.c index 61504f43c..245e42020 100644 --- a/meas/correlators.c +++ b/meas/correlators.c @@ -679,21 +679,20 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, resp4 += _spinor_prod_im(psi_u, phi); } - // heavy correlators + // heavy correlators for (size_t hi = 0; hi < 2; hi++) { for (size_t hj = 0; hj < 2; hj++) { for (size_t g1 = 0; g1 < 2; g1++) { for (size_t g2 = 0; g2 < 2; g2++) { double complex dum_tot = 0.0; for (int alpha_1 = 0; alpha_1 < 4; alpha_1++){ + spinor psi_h = arr_spinor[1][1][alpha_1][hj][hi][i]; + if (g1 == 0){ // Gamma_1 = Id + _gamma5(psi_h, psi_h); + } + su3_vector psi_h_su3[4]; + spinor_dirac_array(&psi_h_su3[0], psi_h); for (int alpha_2 = 0; alpha_2 < 4; alpha_2++){ - // S_\ell - spinor psi_h = arr_spinor[1][1][alpha_1][hj][hi][i]; - if (g1 == 0){ // Gamma_1 = Id - _gamma5(psi_h, psi_h); - } - su3_vector psi_h_su3[4]; - spinor_dirac_array(&psi_h_su3[0], psi_h); spinor psi_u_star = arr_spinor[1][0][alpha_2][f0][f0][i]; if (g2 == 0){ // Gamma_2 = Id. NOTE: works because Gamma_2=Gamma_2* for Gamma_2=1,gamma_5 _gamma5(psi_u_star, psi_u_star); @@ -702,10 +701,24 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, spinor_dirac_array(&psi_u_star_su3[0], psi_u_star); complex double dum_12 = 0.0; _colorvec_scalar_prod(dum_12, psi_u_star_su3[alpha_1], psi_h_su3[alpha_2]); - dum_tot =+ dum_12; + dum_tot += dum_12; + } + } + // if (g_proc_id == 0){ + // printf("dum_tot = %d %d %d %d %d %e %e \n", t, hi, hj, g1, g2, creal(dum_tot), cimag(dum_tot)); + // } + if (hi != hj){ + dum_tot *= -1; + } + if (g1==g2){ + res_hihj_g1g2[hi][hj][g1][g2] = creal(dum_tot); // correlators is real + } + else{ + if (g2==1){ + dum_tot *= -1; } + res_hihj_g1g2[hi][hj][g1][g2] = cimag(dum_tot); // correlator is imaginary } - res_hihj_g1g2[hi][hj][g1][g2] = creal(dum_tot); // correlators are real } } } @@ -829,6 +842,7 @@ void heavy_correlators_measurement(const int traj, const int id, const int ieo, for (size_t hj = 0; hj < 2; hj++) { for (size_t g1 = 0; g1 < 2; g1++) { for (size_t g2 = 0; g2 < 2; g2++) { + printf("check matrix: %e\n", C_hihj_g1g2[hi][hj][g1][g2][3]); fprintf(ofs, "%u %u %u %u 0 %e %e\n", hi, hj, g1, g2, C_hihj_g1g2[hi][hj][g1][g2][t0], 0.0); for (t = 1; t < g_nproc_t * T / 2; t++) { tt = (t0 + t) % (g_nproc_t * T);