Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2f8aeaa
exploit index-permutation symmetry in the color basis and color matrix
oliviermattelaer Aug 5, 2026
dab4a8d
index the JAMP matrix instead of scanning every column of it
oliviermattelaer Aug 6, 2026
0911a2d
build the powers of Nc in the JAMP coefficients once per power
oliviermattelaer Aug 6, 2026
390c493
encode the color matrix by one line per orbit, and split the contract…
oliviermattelaer Aug 6, 2026
b66e13e
look for the JAMP sub-expressions by orbits of the color basis symmetry
oliviermattelaer Aug 6, 2026
bb8b465
carry the color flow factors as powers of i, not as signs
oliviermattelaer Aug 6, 2026
e4f76be
write the color flow definitions out as tables, keeping the orbit opt…
oliviermattelaer Aug 6, 2026
d21bdad
finish the color flow optimisation with the plain scan
oliviermattelaer Aug 6, 2026
7c659b5
keep whichever of the two optimisations is the shorter, on small proc…
oliviermattelaer Aug 6, 2026
d253574
use the orbit equivariant optimisation for madevent too
oliviermattelaer Aug 6, 2026
c840ec0
read the amplitudes into a buffer so madevent can use the tables too
oliviermattelaer Aug 6, 2026
018e56b
find the reversal symmetry of the color basis and fold the color matr…
oliviermattelaer Aug 6, 2026
04ce4e0
sum |M|^2 over one color flow per reversal pair
oliviermattelaer Aug 6, 2026
48ab222
work out one color flow per reversal pair and copy the other
oliviermattelaer Aug 6, 2026
e965843
Revert "work out one color flow per reversal pair and copy the other"
oliviermattelaer Aug 6, 2026
386a3ff
fold the color matrix only where the template sums over the pairs
oliviermattelaer Aug 6, 2026
d26858b
carry the folded color sum in the madevent templates, switched off
oliviermattelaer Aug 6, 2026
10a1dad
gather the folded color flows without opening a block
oliviermattelaer Aug 7, 2026
9fe3443
sum |M|^2 with real arithmetic
oliviermattelaer Aug 7, 2026
ee8a18b
refresh the madevent references for the folded color sum
oliviermattelaer Aug 7, 2026
b7291d7
Revert "sum |M|^2 with real arithmetic"
oliviermattelaer Aug 7, 2026
58879ec
walk whole numbers when every coefficient shares its power of i
oliviermattelaer Aug 7, 2026
990cd7f
sum the color for every helicity at once, through BLAS
oliviermattelaer Aug 7, 2026
b33129e
leave the helicity guard alone when BLAS is off
oliviermattelaer Aug 7, 2026
6be84b4
drop the INIT_CF call that belongs to another session
oliviermattelaer Aug 7, 2026
2b26e0e
give madevent the common block its color matrix is rebuilt into
oliviermattelaer Aug 7, 2026
49aa8a3
Merge branch 'claude/colour-reflection' into claude/gracious-moser-25…
oliviermattelaer Aug 7, 2026
c99a102
put the stored IOTest references back
oliviermattelaer Aug 7, 2026
27b7d3a
Merge branch 'claude/madevent-init-cf' into claude/gracious-moser-253876
oliviermattelaer Aug 7, 2026
f889950
regenerate the three stored comparison files
oliviermattelaer Aug 7, 2026
7fd3a33
sum the color of every helicity in one batched BLAS-3 call, for madevent
oliviermattelaer Aug 7, 2026
7614a93
mg7: keep the flavors carried by processes mapped onto one matrix ele…
oliviermattelaer Aug 6, 2026
eca43df
make a failed run fail as a failed run, not as a disagreement
oliviermattelaer Aug 6, 2026
ab161ac
build the (n-2)! Del Duca-Dixon-Maltoni basis for multi-gluon processes
oliviermattelaer Aug 7, 2026
7487ad5
give standalone the same color flow work as madevent
oliviermattelaer Aug 7, 2026
adeb002
Merge branch 'claude/madevent-blas-colour-sum' into claude/dixon-malt…
oliviermattelaer Aug 7, 2026
6f559c3
give madmatrix the DDM color basis and the Kleiss-Kuijf color flows
oliviermattelaer Aug 7, 2026
ed00d1a
fold the madmatrix color sum onto one flow per reversal pair
oliviermattelaer Aug 7, 2026
4ca220c
give the madmatrix color flows the sub-expressions the fortran ones have
oliviermattelaer Aug 7, 2026
332bf68
fix the FPTYPE=f build of the madmatrix check_sa driver
oliviermattelaer Aug 7, 2026
20446e4
send the C++ color sum through a host BLAS
oliviermattelaer Aug 7, 2026
449de54
Merge branch 'claude/competent-haslett-2092a6' into claude/madmatrix-…
oliviermattelaer Aug 7, 2026
e93f684
Merge branch 'claude/madmatrix-cpu-blas' into claude/dixon-maltoni-gl…
oliviermattelaer Aug 7, 2026
4bb8e20
Merge branch 'claude/madmatrix-colour-fold' into claude/dixon-maltoni…
oliviermattelaer Aug 7, 2026
4bdf039
fold the cuBLAS color sum onto one flow per reversal pair
oliviermattelaer Aug 7, 2026
ed9f672
Merge branch 'claude/madmatrix-jamp-cse' into claude/dixon-maltoni-gl…
oliviermattelaer Aug 7, 2026
1852bf7
Merge branch 'claude/cranky-franklin-bc7ec5' into claude/dixon-malton…
oliviermattelaer Aug 7, 2026
d718ce8
share the orbit equivariant color-flow search with the madmatrix backend
oliviermattelaer Aug 7, 2026
467862f
mg7: pick the color flow from a mask built on the color flow basis
oliviermattelaer Aug 9, 2026
9f984d9
hel_recycle: never wrap a statement onto a blank physical line
oliviermattelaer Aug 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Template/LO/Source/run.inc
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,8 @@ c 2 means approximation by the denominator of the propa
c
double precision limhel
common/to_limhel/limhel
c
c whether the color sum may go through the batched BLAS-3 call, where
c the matrix element was generated with one
logical blas_color_sum
common/to_blas_color_sum/blas_color_sum
5 changes: 5 additions & 0 deletions Template/LO/SubProcesses/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ endif

LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib $(llhapdf) -lbias

# what the batched color sum is linked against, empty unless a matrix
# element was generated with one
BLASLIBS =
LINKLIBS += $(BLASLIBS)

LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS)

ifneq ("$(wildcard ../../Source/RUNNING)","")
Expand Down
38 changes: 33 additions & 5 deletions madgraph/core/color_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ def simplify(self):

return ColorFactor([col_str1, col_str2])

def complex_conjugate(self):
"""f (and d) are real, so complex conjugation leaves them untouched.
The default behaviour of reversing the indices would introduce a
spurious sign, since f is totally antisymmetric."""

return self

#===============================================================================
# d
#===============================================================================
Expand Down Expand Up @@ -1128,18 +1135,39 @@ def extend_str(self, new_col_fact):
for col_str in new_col_fact:
self.append_str(col_str)

@staticmethod
def similarity_key(col_str):
"""Hashable key which is equal for two color strings exactly when
ColorString.is_similar says they are, i.e. same Nc power, same
imaginary character and same canonical representation (both the
canonical structure and the index replacement dictionary)."""

canonical, repl_dict = col_str.to_canonical()
return (col_str.Nc_power, col_str.is_imaginary, canonical,
tuple(sorted(repl_dict.items())))

def simplify(self):
"""Returns a new color factor where each color string has been
simplified once and similar strings have been added."""
simplified once and similar strings have been added.

Similar strings are looked up through a dictionary rather than by
scanning the strings accumulated so far: the color factors appearing
for high multiplicity processes have thousands of terms, and the linear
scan of append_str made this quadratic. Insertion order is preserved,
so the resulting color factor is identical to the one a scan produces."""

new_col_factor = ColorFactor()
similar = {}
# Simplify
for col_str in self:
res = col_str.simplify()
if res:
new_col_factor.extend_str(res)
else:
new_col_factor.append_str(col_str)
for new_str in (res if res else [col_str]):
key = self.similarity_key(new_str)
try:
similar[key].add(new_str)
except KeyError:
similar[key] = new_str
new_col_factor.append(new_str)

# Only returns non zero elements
return ColorFactor([col_str for col_str in \
Expand Down
Loading
Loading