Process generation and state workflows
GammaLoop describes a calculation with a TOML run card and stores its reusable state in a directory. Start the command-line interface through the repository wrapper (./gammaloop) or the Cargo-built executable, then generate processes, integrands, and integration jobs within that state.
Model import and restrictions
JSON and UFO models use the same restriction semantics. With the default --simplify-model=true, applying a restriction freezes zero-valued parameters as constants. A mass fixed to exact zero is replaced by symbolic ZERO in particles and propagators. Diagram generation, unresolved-particle selection, and graph grouping then treat it as massless, just as if the model had declared ZERO from the start. Nonzero masses, however small, remain symbolic. Chemical potentials whose internal expressions become exact zero, including through other restriction-fixed parameters, likewise become symbolic ZERO and generate no Fermi sectors.
Importing the full model or using --simplify-model=false retains adjustable external mass parameters. Runtime changes to their numerical values preserve the symbolic mass assignment used for generation, including when the new value is zero.
The full bundled Standard Model includes masses and Higgs/Goldstone Yukawa interactions for all quark flavors. Its light-quark benchmark inputs are MU = ymu = 0.0022, MD = ymd = 0.0047, and MS = yms = 0.095, in GeV. As for the heavier flavors, the propagator masses and Yukawa input masses are independently adjustable; the dimensionless couplings satisfy yq = sqrt(2) * ymq / vev. These are model defaults, not running-mass evolution. The ordinary restriction cards fix all six light-quark inputs to zero. The exception, thermal_s_mass, retains nonzero MS and yms so both remain adjustable.
Default jet clustering selects colored particles with zero resolved mass. When using finite quark masses in the full model, set clustered_pdgs explicitly to include those quarks in jets.
Choose a generation mode
The interactive command tree separates cross sections, amplitudes, and operations on processes already stored in the active state:
generate xs INITIAL > FINAL ...
generate amp INITIAL > FINAL ...
generate existing ...
generate help xsxs constructs forward-scattering graphs and filters compatible Cutkosky cuts. amp constructs ordinary amplitudes. Their final-state lists therefore have different meanings even when the printed particle syntax is identical. Use the GammaLoop DOT input guide when preparing or reviewing imported graph files. Use generate help <mode> inside the stateful CLI to see the flags supported by your installed version. Amplitudes can also be generated in an equilibrium medium; see thermal and dense media.
Process specification grammar
Process specifications accept to or > between space-separated initial and final states. Braces express alternatives in a cross-section final state, while {} denotes an empty state:
e+ e- > mu+ mu-
e+ e- > { Z Z, a a, H H }
{} > {}The empty-initial-state form is generation grammar, not evidence that the default cross-section flux evaluator supports a zero-incoming-particle calculation. Its implemented flux branches require exactly one or two incoming particles.
A slash vetoes particles and a vertical bar selects an allow-list. The words veto and only are equivalent forms. Outside the bracketed perturbative block, coupling constraints use the active model’s coupling-order name:
e+ e- > d d~ g / u c QED==2 QCD>=2 QCD<=4
e+ e- > mu+ mu- | g ghG QED==2 QCD>=2An unpowered spelling such as
QCD==2 builds an amplitude-side coupling-order filter. A powered spelling such as QCD^2==2 builds a cross-section-side coupling-order filter, but the parsed exponent is currently discarded. Substituting one spelling for the other changes which filter container is used and still does not define a squared amplitude or a complete cross-section order. Production work therefore needs a scientifically reviewed selector set; do not infer one from the spelling alone.The bracketed perturbative block is intentionally distinct from ordinary flags. For amp, {n} fixes the amplitude graph’s loop count; for xs, it fixes the sum of loop counts on the two cut sides. {{n}} fixes the forward graph’s loop count. On a cross-section process, bracketed QCD=n or the shorthand QCD resolves the model’s unresolved-particle set and permits at most the summed requested count of additional cut particles from those sets; it is not an exact graph coupling power. No corresponding amplitude-side selection effect has yet been established for that bracketed named-order spelling:
e+ e- > Z [ {1} {{2}} QCD=2 QED=1 ]
e+ e- > Z [ QCD ]These selectors are generation filters, not universal definitions of LO, NLO, or NNLO. Record the amplitude-side loops, forward loops, unresolved-cut allowance, and coupling filters explicitly for the chosen generation mode; use the physics-scope guide to distinguish that calculation definition from the formal perturbative reach of Local Unitarity.
Particle names, antiparticles, coupling-order names, and allowed interactions come from the model loaded in the current state. A syntactically valid specification can still be rejected when that model does not define a requested name.
Filters, grouping, and multiplicity
Generation flags control topology filters, loop ranges, cut blobs and spectators, symmetrization, and numerator-aware grouping. These choices are physics-significant. In particular, grouping can combine graph multiplicities and numerator ratios; external-fermion symmetrization requires the caller to retain the associated ordering signs. Run generate help <mode> before choosing filters to see the available aliases, defaults, values, and argument counts.
The generated graph’s overall factor keeps separate contributions for automorphisms, internal fermion loops, external-fermion ordering, numerator-independent symmetry grouping, and numerator-dependent grouping. It does not establish a universal incoming-color average. Persist the state and inspect that factor together with any explicit projector when auditing diagram normalization instead of replacing it with an assumed factorial; the normalization checklist assigns each factor to its owner.
A maintainable generation card
The following reduced card uses the repository’s scalar model and the same one-loop bubble command exercised by the maintained scalar-topology example. Save it as manual-bubble.toml and run ./gammaloop --clean-state manual-bubble.toml run generate -c "quit -o" from the repository root.
commands = []
[cli_settings.state]
folder = "./gammaloop_state/manual-bubble"
name = "manual_bubble"
[[command_blocks]]
name = "generate"
commands = [
"import model scalars-default.json",
"generate amp scalar_1 > scalar_1 [{1}] --allowed-vertex-interactions V_3_SCALAR_122 -p bubble -i scalar_bubble",
"generate",
"save state -o",
]The acceptance invariant is a persisted state in which display processes identifies process bubble and integrand scalar_bubble; replaying the card with a clean destination must produce the same named objects. The exact command and setting semantics are linked from the amplitude-generation reference, state-persistence reference, and state-folder setting. The full maintained source is the scalar bubble run card.
An unknown particle or
V_3_SCALAR_122 error means the scalar model was not imported or no longer exposes that interaction. A process with no retained diagram points to the process specification or generation filters. A generated process that disappears after restart means save state -o did not complete or the resumed -s path differs from cli_settings.state.folder.From generation to evaluation
A reproducible run keeps its stages explicit:
- import or select the model before resolving a process specification;
- generate the process and inspect the retained diagrams;
- generate the requested integrand representations;
- set kinematics, sampling, stability, and subtraction settings;
- evaluate samples or run an integration command block;
- exit with persistence enabled when the state should be resumed.
Choose three-dimensional representations
global.generation.three_dimensional_representations selects the representations built for an integrand. Its default is ["cff"]; "ltd" and ["ltd", "cff"] are also valid. The list must be nonempty, and duplicate entries are removed while preserving the first occurrence. The first entry supplies the default representation for stability levels that omit three_dimensional_representation.
LTD requires global.generation.uv.local_uv_cts_from_expanded_4d_integrands = true and automatically selects complete residue sums. Generation orientation filters and runtime selection or sampling of individual orientations are unavailable for these integrands: LTD’s cancellation of H-surfaces requires summing its residues. LTD is supported only with medium.mode = "vacuum" and vacuum_subtraction = false; finite-temperature and finite-density modes require CFF alone, including when the requested list contains both representations. Both vacuum representations share the generated graph, physical cuts, threshold geometry, and four-dimensional UV counterterms.
Integrand generation validates these options and the initial runtime settings before generating diagrams or clearing existing processes. Requests with --only-diagrams skip runtime evaluator validation but retain the process and medium compatibility checks.
[global.generation]
three_dimensional_representations = ["ltd", "cff"]
[global.generation.uv]
local_uv_cts_from_expanded_4d_integrands = trueEach entry of runtime.stability.levels can set three_dimensional_representation = "cff" or three_dimensional_representation = "ltd", provided that representation was generated. Repeated precisions are allowed: a ladder may try double-precision LTD, then double-precision CFF, then a higher precision. CFF avoids the H-surface cancellations present in LTD, so switching representation supplies a distinct stability check. The numerical result, cut weights, and threshold-counterterm weights agree after the complete sums. For a degenerate higher-order pole, this comparison includes all derivative-order pieces of the same physical cut or threshold residue. Individual pieces can differ between representations; contributions for different cuts or observables remain separate.
display processes and display integrands report the representations actually stored in each integrand, in generation order. Changing global.generation.three_dimensional_representations does not change that inventory; imported diagrams without an integrand are marked as not generated. The detailed orientation view distinguishes native residue-map keys from runtime execution slots. For example, an LTD triacontagon has 30 native keys and one complete-sum execution slot. Shared graph topology, cuts, and threshold geometry appear once.
The generation summary and display integrand -p <process> -i <integrand> --category generation divide accumulated graph work into an aggregate row, shared preparation, and ordered representation rows. CFF and LTD each have expression preparation, Spenso contraction, Symbolica evaluator construction, and compilation timings. Common graph preparation, four-dimensional UV work, and helper programs are counted once in the shared row. Percentages use the aggregate duration; graph jobs can overlap when generation runs in parallel, so the summed durations are not elapsed process time. Saved states retain the same inventory and timing breakdown.
The 3drep diagnostic (also spelled 3Drep) builds the selected graph’s symbolic expression directly, without UV or threshold subtraction. Select LTD with 3drep build -g 0 --representation ltd --no-color; validate checks its input topology. This diagnostic choice is independent of the integrand’s generated representation list. It does not generate an auxiliary CFF expression.
The LTD summary displays each affine loop-energy key using internal on-shell energies OSE[i], external energies E[i], and any numerator sampling scale M. It lists E/H surfaces, exact prefactors, factor powers, and denominator trees. The numerator is shared across the map. Use --show-details-for-residue 0 for the full loop/edge maps and terms of row 0; the existing --show-details-for-orientation spelling also works. A quoted "<label>|N<map>|<variant>" selector disambiguates maps with the same orientation label. These selectors inspect symbolic terms; numerical evaluation uses the ordinary integrand commands and sums all LTD residues.
Select integration slots and targets
An integration slot is one (process, integrand) pair. Repeat -p/--process and -i/--integrand-name in matching order to integrate several slots together. By default those slots train and sample a shared grid, so their sample shapes must be compatible; add --uncorrelated when each slot needs an independent grid.
A single --target re im (or --target re,im) applies the same known comparison value to every selected slot. Multi-slot runs can instead use one keyed value per slot:
integrate \
-p bubble_no_integrated_UV -i scalar_bubble_below_thres \
-p bubble -i scalar_bubble_below_thres \
--target bubble_no_integrated_UV@scalar_bubble_below_thres=1.471664021721597e-2,0.0 \
bubble@scalar_bubble_below_thres=2.7029875684552542e-3,0.0 \
--workspace-path ./integration/bubble-below-threshold \
--n-cores 1Targets annotate result deltas; they do not replace integrator.target_relative_accuracy, integrator.target_absolute_accuracy, or the sample-budget settings that control convergence. The maintained scalar bubble run card contains the complete settings and both below- and above-threshold target sets. The generated integration reference is authoritative for selectors, renderers, batching controls, and allowed values.
Resume or replace an integration workspace
An integration workspace is a completed-iteration checkpoint, not a second GammaLoop state. Without --workspace-path, writable sessions use STATE_FOLDER/integration_workspace; read-only sessions use ./integration_workspace_STATE_NAME (or ./integration_workspace) so they do not write into the active state.
- Without
--restart, GammaLoop resumes when the workspace already contains a compatible checkpoint. Slots, shared-versus-uncorrelated sampling, effective model parameters, and generated-integrand fingerprints must match. Saved targets and non-model runtime settings win over changed values and produce a warning. - With
--restart, GammaLoop removes that specific workspace and starts the integration from scratch. Use it when changing slots, sampling correlation, generated integrands, or settings that should take effect. It does not mean “resume”. --show-summary-onlyreads the last completed result without evaluating more samples and cannot be combined with--restart.
The workspace root contains manifest.json, the latest user-facing integration_result.json, per-slot settings and results under integrands/, and the internal resume checkpoint under state/integration_state.bin. Observable resume snapshots live at state/observables/<process@integrand>/latest.json. Configured user-facing output is written per slot as integrands/<process@integrand>/observables_final.json or integrands/<process@integrand>/observables_final.hwu. --write-results-for-each-iteration additionally retains numbered result and observable history at the corresponding root or slot boundary.
integration_result.json is a presentation snapshot, not the authoritative resume state. Keep the complete integration workspace when a run must be resumed, and keep the GammaLoop state/run card that produced the referenced integrands. A copied result JSON alone is suitable for analysis, not continuation.run.toml records boot settings, reusable command blocks, and top-level commands. Generated process and integrand artifacts live beside it. Resume with -s STATE_FOLDER; replay the run card to reconstruct the state from scratch. Copy or archive the entire state directory rather than moving a generated subdirectory on its own, because settings and fingerprints are checked together.Contributor-facing ownership and data flow are documented in the GammaLoop architecture and the UV renormalization architecture.