Skip to content

Stabilize native correlated amplitudes and cache exact colour overlaps - #28

Open
lsimon125 wants to merge 3 commits into
MadGraphTeam:mainfrom
lsimon125:codex/cache-connected-colour-traces
Open

lsimon125 wants to merge 3 commits into
MadGraphTeam:mainfrom
lsimon125:codex/cache-connected-colour-traces

Conversation

@lsimon125

Copy link
Copy Markdown

Summary

Improve native correlated matrix elements for cancellation-prone phase-space points, without adding Python or Symbolica to the numerical SDK. These changes were motivated by integrating the tree-level provider into MadNkLO.

  • Retain rounding residuals through coherent amplitude sums, rational colour weights and complex bilinear contractions using twofold arithmetic.
  • Add explicit, opt-in binary128 rescue: Runtime.compile_correlated_rescue(...) generates a Linux GCC/quadmath companion from retained evaluators; two additive C ABI functions load it and evaluate correlated requests with the existing binary64 buffer layout.
  • Cache exact closed colour overlaps during connected-correlator preparation. The bounded cache preserves the full Nc Laurent polynomial, does not identify reflected traces, and returns independent coefficient mappings.
  • Preserve Symjit-only builds with an explicit rescue-buffer type.

The changes do not alter colour/crossing conventions, model rules, dependency manifests or build configuration. There are no process-specific colour-factor shortcuts. The cache is isolated in its own commit and is a performance improvement, not a prerequisite for the numerical fixes.

Validation

  • 125 focused colour tests, 5 focused Rust correlation tests, 17 C ABI tests, and 2 native rescue compiler regressions passed during development.
  • Release cargo check -p rusticol-core --offline --locked passed with both default features and --no-default-features --features f64-symjit at the final revision.
  • Antiquark crossed-channel stress gate (u~ g > u~ g g): compensation alone left 528 failures in 750,060 checks; explicit rescue reduced this to zero with unchanged tolerances. The massive b g > b g g rescue gate also passed all 750,060 checks.
  • External MadNkLO integration against a normally built and installed SDK wheel passed 8,850 pointwise comparisons across scoped e+ e- > j j NNLO tree channels, general spin/colour and quadruple-colour requests, and massive crossed g g > b b~ g. Real F2PY accessor workflows and missing/wrong-companion loader guards also passed. These integration fixtures live in MadNkLO, not this PR.
  • Exact-colour cache benchmark: all 576 five-gluon matrix entries unchanged; preparation reduced from 3.54 s uncached to 0.55 s cold / 0.33 s warm.

The installed-wheel numerical campaigns used da9f175a; the final 3f6b3cbc commit only corrects declaration/initialization for Symjit-only compilation and was checked in both feature configurations. No duplicate numerical campaign was needed for that type-only fix.

Scope And Limitations

Rescue is explicit, not an automatic precision switch. Preparation needs retained evaluators, Symbolica, and Linux GCC/quadmath; execution needs quadmath but no Python or Symbolica. Inputs and result buffers remain binary64, while internal currents/amplitudes use binary128. Companion loading checks artifact identity and dimensions; unsupported programs fail explicitly, and small imaginary components are not clamped. Convenience-language wrappers do not yet expose the two new C ABI functions.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant