HISKP-LQCD / sLapH-projection-NG

2 stars 0 forks source link

Need for a individual momentum cutoff on the analytic side #18

Closed martin-ueding closed 4 years ago

martin-ueding commented 4 years ago

While trying to reproduce the rho projections I encounter a bunch of failures due to missing HDF5 datasets. The first one missing for the various cases are the following:

Frame & Irrep First missing HDF5 dataset
-1-1-1-A1 C4cB_uuuu_p000.d000.g5_p00-1.d000.g5_p112.d000.g5_p-1-1-1.d000.g5
-1-1-1-E C4cB_uuuu_p001.d000.g5_p00-1.d000.g5_p112.d000.g5_p-1-1-2.d000.g5
-1-10-A1 C4cB_uuuu_p000.d000.g5_p0-10.d000.g5_p120.d000.g5_p-1-10.d000.g5
-1-10-A2 C4cB_uuuu_p01-1.d000.g5_p0-1-1.d000.g5_p121.d000.g5_p-1-21.d000.g5
-1-10-B1 C4cB_uuuu_p00-1.d000.g5_p0-1-1.d000.g5_p121.d000.g5_p-1-11.d000.g5
-1-10-B2 C4cB_uuuu_p010.d000.g5_p0-10.d000.g5_p120.d000.g5_p-1-20.d000.g5
-1-11-A1 C4cB_uuuu_p000.d000.g5_p001.d000.g5_p11-2.d000.g5_p-1-11.d000.g5
-1-11-E C4cB_uuuu_p001.d000.g5_p001.d000.g5_p11-2.d000.g5_p-1-10.d000.g5
-10-1-A1 C4cB_uuuu_p000.d000.g5_p00-1.d000.g5_p102.d000.g5_p-10-1.d000.g5
-10-1-A2 C4cB_uuuu_p0-11.d000.g5_p0-1-1.d000.g5_p112.d000.g5_p-11-2.d000.g5
-10-1-B1 C4cB_uuuu_p0-10.d000.g5_p0-1-1.d000.g5_p112.d000.g5_p-11-1.d000.g5
-10-1-B2 C4cB_uuuu_p00-1.d000.g5_p00-1.d000.g5_p102.d000.g5_p-100.d000.g5
-11-1-A1 C4cB_uuuu_p000.d000.g5_p00-1.d000.g5_p1-12.d000.g5_p-11-1.d000.g5
-101-B2 C4cB_uuuu_p00-1.d000.g5_p001.d000.g5_p10-2.d000.g5_p-102.d000.g5
-110-A1 C4cB_uuuu_p000.d000.g5_p010.d000.g5_p1-20.d000.g5_p-110.d000.g5
-110-A2 C4cD_uuuu_p01-1.d000.g5_p01-1.d000.g5_p-101.d000.g5_p1-21.d000.g5
-110-B1 C4cB_uuuu_p00-1.d000.g5_p01-1.d000.g5_p1-21.d000.g5_p-111.d000.g5
-110-B2 C4cB_uuuu_p0-10.d000.g5_p010.d000.g5_p1-20.d000.g5_p-120.d000.g5
-111-A1 C4cB_uuuu_p000.d000.g5_p001.d000.g5_p1-1-2.d000.g5_p-111.d000.g5
-111-A2 C4cB_uuuu_p01-1.d000.g5_p0-11.d000.g5_p10-2.d000.g5_p-102.d000.g5
-111-E C4cB_uuuu_p001.d000.g5_p001.d000.g5_p1-1-2.d000.g5_p-110.d000.g5
0-1-1-A1 C4cB_uuuu_p000.d000.g5_p00-1.d000.g5_p012.d000.g5_p0-1-1.d000.g5
0-1-1-A2 C4cB_uuuu_p-101.d000.g5_p-10-1.d000.g5_p112.d000.g5_p1-1-2.d000.g5
0-1-1-B1 C4cB_uuuu_p-100.d000.g5_p-10-1.d000.g5_p112.d000.g5_p1-1-1.d000.g5
0-1-1-B2 C4cB_uuuu_p00-1.d000.g5_p00-1.d000.g5_p012.d000.g5_p0-10.d000.g5
00-1-A1 C4cB_uuuu_p000.d000.g5_p0-1-1.d000.g5_p012.d000.g5_p00-1.d000.g5
00-1-B1 C4cB_uuuu_p0-10.d000.g5_p0-1-1.d000.g5_p012.d000.g5_p01-1.d000.g5
00-1-B2 C4cB_uuuu_p-1-10.d000.g5_p-1-1-1.d000.g5_p112.d000.g5_p11-1.d000.g5
00-1-E C4cB_uuuu_p0-10.d000.g5_p0-1-1.d000.g5_p012.d000.g5_p01-1.d000.g5
0-10-A1 C4cB_uuuu_p000.d000.g5_p0-1-1.d000.g5_p021.d000.g5_p0-10.d000.g5
0-10-B1 C4cB_uuuu_p00-1.d000.g5_p0-1-1.d000.g5_p021.d000.g5_p0-11.d000.g5
0-10-B2 C4cB_uuuu_p-10-1.d000.g5_p-1-1-1.d000.g5_p121.d000.g5_p1-11.d000.g5
0-10-E C4cB_uuuu_p00-1.d000.g5_p0-1-1.d000.g5_p021.d000.g5_p0-11.d000.g5
0-11-A1 C4cB_uuuu_p000.d000.g5_p001.d000.g5_p01-2.d000.g5_p0-11.d000.g5
0-11-A2 C4cB_uuuu_p-10-1.d000.g5_p-101.d000.g5_p11-2.d000.g5_p1-12.d000.g5
0-11-B1 C4cB_uuuu_p-100.d000.g5_p-101.d000.g5_p11-2.d000.g5_p1-11.d000.g5
0-11-B2 C4cB_uuuu_p00-1.d000.g5_p001.d000.g5_p01-2.d000.g5_p0-12.d000.g5
000-A2u C4cB_uuuu_p-1-1-1.d000.g5_p-1-1-1.d000.g5_p111.d000.g5_p111.d000.g5
000-T1u C4cB_uuuu_p0-1-1.d000.g5_p-1-1-1.d000.g5_p111.d000.g5_p011.d000.g5
1-1-1-A1 C4cB_uuuu_p000.d000.g5_p00-1.d000.g5_p-112.d000.g5_p1-1-1.d000.g5
1-1-1-A2 C4cB_uuuu_p0-11.d000.g5_p01-1.d000.g5_p-102.d000.g5_p10-2.d000.g5
1-1-1-E C4cB_uuuu_p001.d000.g5_p00-1.d000.g5_p-112.d000.g5_p1-1-2.d000.g5
01-1-A1 C4cB_uuuu_p000.d000.g5_p00-1.d000.g5_p0-12.d000.g5_p01-1.d000.g5
01-1-A2 C4cD_uuuu_p-10-1.d000.g5_p-10-1.d000.g5_p110.d000.g5_p1-12.d000.g5
01-1-B1 C4cB_uuuu_p-100.d000.g5_p-10-1.d000.g5_p1-12.d000.g5_p11-1.d000.g5
01-1-B2 C4cB_uuuu_p001.d000.g5_p00-1.d000.g5_p0-12.d000.g5_p01-2.d000.g5
1-10-A1 C4cB_uuuu_p000.d000.g5_p0-10.d000.g5_p-120.d000.g5_p1-10.d000.g5
1-10-A2 C4cB_uuuu_p01-1.d000.g5_p0-1-1.d000.g5_p-121.d000.g5_p1-21.d000.g5
1-10-B1 C4cB_uuuu_p00-1.d000.g5_p0-1-1.d000.g5_p-121.d000.g5_p1-11.d000.g5
1-10-B2 C4cB_uuuu_p0-10.d000.g5_p0-10.d000.g5_p-120.d000.g5_p100.d000.g5
1-11-A1 C4cB_uuuu_p000.d000.g5_p001.d000.g5_p-11-2.d000.g5_p1-11.d000.g5
1-11-A2 C4cB_uuuu_p0-1-1.d000.g5_p011.d000.g5_p-10-2.d000.g5_p102.d000.g5
1-11-E C4cB_uuuu_p00-1.d000.g5_p001.d000.g5_p-11-2.d000.g5_p1-12.d000.g5
10-1-A1 C4cB_uuuu_p000.d000.g5_p00-1.d000.g5_p-102.d000.g5_p10-1.d000.g5
10-1-A2 C4cD_uuuu_p0-1-1.d000.g5_p0-1-1.d000.g5_p110.d000.g5_p-112.d000.g5
10-1-B1 C4cB_uuuu_p0-10.d000.g5_p0-1-1.d000.g5_p-112.d000.g5_p11-1.d000.g5
10-1-B2 C4cB_uuuu_p001.d000.g5_p00-1.d000.g5_p-102.d000.g5_p10-2.d000.g5
010-A1 C4cB_uuuu_p000.d000.g5_p01-1.d000.g5_p0-21.d000.g5_p010.d000.g5
010-B1 C4cB_uuuu_p00-1.d000.g5_p01-1.d000.g5_p0-21.d000.g5_p011.d000.g5
010-B2 C4cB_uuuu_p-10-1.d000.g5_p-11-1.d000.g5_p1-21.d000.g5_p111.d000.g5
010-E C4cB_uuuu_p00-1.d000.g5_p01-1.d000.g5_p0-21.d000.g5_p011.d000.g5
11-1-A1 C4cB_uuuu_p000.d000.g5_p00-1.d000.g5_p-1-12.d000.g5_p11-1.d000.g5
11-1-A2 C4cB_uuuu_p011.d000.g5_p0-1-1.d000.g5_p-102.d000.g5_p10-2.d000.g5
11-1-E C4cB_uuuu_p00-1.d000.g5_p00-1.d000.g5_p-1-12.d000.g5_p110.d000.g5
011-A1 C4cB_uuuu_p000.d000.g5_p001.d000.g5_p0-1-2.d000.g5_p011.d000.g5
011-A2 C4cD_uuuu_p-101.d000.g5_p-101.d000.g5_p110.d000.g5_p1-1-2.d000.g5
011-B1 C4cB_uuuu_p-100.d000.g5_p-101.d000.g5_p1-1-2.d000.g5_p111.d000.g5
011-B2 C4cB_uuuu_p001.d000.g5_p001.d000.g5_p0-1-2.d000.g5_p010.d000.g5
100-A1 C4cB_uuuu_p000.d000.g5_p10-1.d000.g5_p-201.d000.g5_p100.d000.g5
100-B1 C4cB_uuuu_p00-1.d000.g5_p10-1.d000.g5_p-201.d000.g5_p101.d000.g5
100-B2 C4cB_uuuu_p0-1-1.d000.g5_p1-1-1.d000.g5_p-211.d000.g5_p111.d000.g5
100-E C4cB_uuuu_p00-1.d000.g5_p10-1.d000.g5_p-201.d000.g5_p101.d000.g5
101-A1 C4cB_uuuu_p000.d000.g5_p001.d000.g5_p-10-2.d000.g5_p101.d000.g5
101-A2 C4cD_uuuu_p0-11.d000.g5_p0-11.d000.g5_p110.d000.g5_p-11-2.d000.g5
101-B1 C4cB_uuuu_p0-10.d000.g5_p0-11.d000.g5_p-11-2.d000.g5_p111.d000.g5
101-B2 C4cB_uuuu_p001.d000.g5_p001.d000.g5_p-10-2.d000.g5_p100.d000.g5

The 000 in the T1u is a different case. There Markus has implemented an individual momentum cutoff at p_i^2 ≤ 2 whereas I do not have this limitation and therefore it tries to access a higher momentum. Perhaps I add this rule into my analytic projection code at some point.

The reference momenta (000, 001, 110, 111) work just fine, but these other are problematic. I would guess that I screwed up the reference rotation.

In the -110 in the A2 has this as the first missing one:

C4cD_uuuu_p01-1.d000.g5_p01-1.d000.g5_p-101.d000.g5_p1-21.d000.g5

The momenta on source and sink are these (reverse the ones at sink):

(0, 1, -1) + (-1, 0, 1) → (0, -1, 1) + (-1, 2, -1)

Momentum conservation holds. But notice how the fourth momentum has norm squared 6, so it certainly isn't computed. Eyeing the table one can see that all the problematic ones have norm squared 5 or 6. For the T1u it is problematic at norm squared 3 already, but we know why.

So there is a need to implement the individual momentum restrictions into the analytic projection code as well in order to prevent these data sets from being requested. I am a bit surprised that the reference momenta work, though.

martin-ueding commented 4 years ago

This cutoff is implemented exactly like in the contraction code now. We have the following choice:

ContractionMomentumCutoff[0] = 4;
ContractionMomentumCutoff[1] = 5;
ContractionMomentumCutoff[2] = 6;
ContractionMomentumCutoff[3] = 7;
ContractionMomentumCutoff[4] = 4;

Then we just filter the individual momenta by this. If some momentum occurs that is above the cutoff we just discard that combination and therefore row/column from the correlator matrix. The actual filtering is done with some infix heavy code, which one could make even worse :wink:

Select[
  ...,
  MomentaMaxNorm @ # <= ContractionMomentumCutoff[Norm[totalMomentum]^2] &];
martin-ueding commented 4 years ago

For the 002 in the E I am still missing the following:

C4cB_uuuu_p0-11.d000.g5_p-1-1-1.d000.g5_p11-1.d000.g5_p011.d000.g5

It seems to be just fine. It has total momentum d²=4 and the individual momenta are at most q²=3, so still allowed with the cutoff. I do not see why this should not be allowed. There also exist d²=4 correlators in the file, so that isn't the problem either. For instance this one does exist:

C4cB_uuuu_p0-11.d000.g5_p00-2.d000.g5_p000.d000.g5_p011.d000.g5

Also it is not like q²=3 was banned outright, so for instance this d²=3 correlator does exist:

C4cB_uuuu_p111.d000.g5_p-200.d000.g5_p1-1-1.d000.g5_p000.d000.g5

@maowerner: Could you tell me why I cannot find that first correlator in C4cB_cnfg2552.h5 of B35.32?

martin-ueding commented 4 years ago

For P² = 0 Markus uses a cutoff of p² ≤ 2, so I have changed that in the analytic projection code. Now the 000 T1u works as is did previously:

Bildschirmfoto_001

I am still not sure why the other ones pose a problem now.

martin-ueding commented 4 years ago

Also in the 001 E I have missing ones:

C4cB_uuuu_p0-10.d000.g5_p0-11.d000.g5_p01-2.d000.g5_p011.d000.g5

The momentum 01-2 has norm 5 and should be allowed in the frame 001. Was it < instead of <= in the contraction code? No, but the cutoff is for the sum of the norms!

    int sum_norm_sq = 0;
    for (auto const &q : qn_source) {
      sum_norm_sq += q.momentum.squaredNorm();
    }

    // Also discard when we are beyond the momentum cutoff.
    if (sum_norm_sq > momentum_cutoff.at(p_so.squaredNorm())) {
      continue;
    }

Okay, that's easy to fix in the analytic projection.

kostrzewa commented 4 years ago

The momentum 01-2 has norm 5 and should be allowed in the frame 001. Was it < instead of <= in the contraction code? No, but the cutoff is for the sum of the norms!

Is that what we want though? (in the contraction code, I mean)

martin-ueding commented 4 years ago

At the moment I want that because Markus has implemented that. But we can of course change this going forward! His rationale was that the signal quality deteriorates when the momentum of some particle becomes large. Having multiple particles with a lot of momentum would give a horrible signal and eventually just noise in the correlator matrix. I believe that this sum of momenta is some heuristic emperical thing that he has chosen at some point.

kostrzewa commented 4 years ago

His rationale was that the signal quality deteriorates when the momentum of some particle becomes large.

Sure, that's perfectly clear, I'm wondering more about whether it would make more sense to restrict the individual momenta rather than the sum of their squares. In some sense it boils down to the same thing, however.

Certainly, for this check, the convention should not be touched.

maowerner commented 4 years ago

No, but the cutoff is for the sum of the norms!

I believe that this sum of momenta is some heuristic emperical thing that he has chosen at some point.

That is correct. I am not sure whether Bastian or me actually chose the cutoffs. In any case there is no systematic study how the error changes with higher momenta.

The forth moving frame has a lower cutoff relatively. This is because we were debating whether or not it should be used and decided to only take the lowest few momenta such that we still have something in the E irrep. Given the negligeble impact it had in the rho analysis, one would probably either need to use more momenta or leave it out completely.

maowerner commented 4 years ago

A further remark. For total momentum (2,1,0) a new group is required. (I believe there are only two elements which leave that invariant). This is not yet part of the subduction.

martin-ueding commented 4 years ago

The 111 E still fails because it is missing this one here:

C4cB_uuuu_p001.d000.g5_p001.d000.g5_p-1-1-2.d000.g5_p110.d000.g5

On the source side I see norm squared of 1 + 2 = 3 and on the sink side I see 1 + 6 = 7, which for P² = 3 should still be allowed from the contraction code. @maowerner: Is there some even stricter cutoff for this case?

maowerner commented 4 years ago

I recall we do not use individual momenta with absolute value squared > 4. However the code was refactored quite a bit and I cannot find were it is enforced exactly. I think the list of all possible momenta was created somewhere and everything beyond (2,0,0) was not in there.

Selection_009

martin-ueding commented 4 years ago

So we have a cutoff for the sum of p² and also a cutoff for the individual momenta to p² ≤ 4? Then I need to have both cutoff rules in the Mathematica code.

I'll try that after I'm done upgrading all the workstations to Debian 10 and getting my beowulf cluster back to work.

maowerner commented 4 years ago

Yup, that should do the trick.

Sorry for the Spaghetti code ;)

martin-ueding commented 4 years ago

I have added this in ed938710797ac601e1fa27a30ca78567a909d46d, I'll see how it goes. With the currently reduced Beowulf cluster capacity it might take until the evening to have everything analytically projected.

martin-ueding commented 4 years ago

It just works now, perhaps the cutoffs are too strict, but I seem to be able to reproduce what we want.