def test_CG_with_JoeSEsolver(helconf, se_arg): oParticles = lips.Particles(len(helconf)) oParticles.fix_mom_cons(real_momenta=False) oSEUnknown = SEUnknown(se_arg) oCHYUnknown = seampy.NumericalAmplitude(theory="CG", helconf=helconf) assert (numpy.isclose(1j * complex(oSEUnknown(oParticles)), complex(oCHYUnknown(oParticles))) or numpy.isclose(1j * complex(oSEUnknown(oParticles)), -complex(oCHYUnknown(oParticles))))
def test_YM_with_BlackHat(helconf): oParticles = lips.Particles(len(helconf)) oParticles.fix_mom_cons(real_momenta=False) oBHUnknown = BHUnknown(helconf=helconf, amppart="tree") oCHYUnknown = seampy.NumericalAmplitude(theory="YM", helconf=helconf) assert (numpy.isclose(complex(oBHUnknown(oParticles)), complex(oCHYUnknown(oParticles))) or numpy.isclose(complex(oBHUnknown(oParticles)), -complex(oCHYUnknown(oParticles))))
def test_scattering_equations_n_point(n): oParticles = lips.Particles(n) oParticles.fix_mom_cons() num_ss = { str(s): oParticles.compute(str(s)) for s in seampy.mandelstams(n) } sols = seampy.solve_scattering_equations(n, num_ss) assert (all([ entry < 10**-270 for entry in map( float, map( abs, sympy.simplify( seampy.hms(n).subs(sols[0]).subs(num_ss).subs( {seampy.punctures(n)[1]: 1})))) ]))
def test_CG_not_color_ordered(): oParticles = lips.Particles(6) oParticles.fix_mom_cons() oNewParticles = oParticles.image("321456") oCGAmp = seampy.NumericalAmplitude(theory="CG", helconf="pmpmpm") assert (abs(oCGAmp(oParticles) - oCGAmp(oNewParticles)) < 10**-270)