Quick start: one loop
At the end of this page you have generated the one-loop QCD correction to g g > t t~ and the loop-induced process g g > h h on the shipped model loop_sm, evaluated both from the shell and from Python with an accuracy estimate, and checked their poles and Ward identities. You need an installed pyAmpliCol (Installation), and you work in the copy of the examples made in Quick start: tree level, which also explains artifacts, run cards and inspect.
1. Generate a one-loop correction
pyamplicol generate "g g > t t~ [QCD]" artifacts/gg_ttx --model loop_sm \
--restriction no_widths
| name | process |
| g_g_to_t_tbar | G G > t t~ |
The process is written as in MadGraph: [QCD] (or [virt=QCD]) asks for the one-loop QCD correction. The result is the virtual correction, the interference of the one-loop and the tree-level amplitude,
renormalized, with the counterterms of the model. loop_sm is MadGraph’s one-loop Standard Model, shipped with pyAmpliCol together with the declaration of its renormalization scheme. One-loop requests are evaluated in full color unless you ask for leading or next-to-leading color.
The restriction no_widths sets every width to zero. Without it the request is refused with the key coloured-width: in the default real on-shell mass scheme a top quark with a width in the tree currents is inconsistent with the counterterms. The message names three remedies; this is one of them. One-loop matrix elements explains the others.
2. Evaluate it
pyamplicol evaluate artifacts/gg_ttx
| point | Born squared order | Born |
| 0 | QCD^4 | +1.256319262646246 |
| 1 | QCD^4 | +1.282741722572736 |
...
| point | virtual squared order | finite [0] | single pole [-1] | double pole [-2] |
| 0 | QCD^6 | +0.5328865751873291 | -0.25843080806497853 | -0.1415641898922143 |
| 1 | QCD^6 | +0.5397029038756515 | -0.2663560099297908 | -0.14454151758722586 |
...
| point | status | arithmetic | bits | reduction | accuracy established | ...
| 0 | success | double | 53 | ninjars (auto) | no | ...
Without a momenta file, evaluate draws two flat phase-space points at \(\sqrt{s} = 1\) TeV and sets the squared renormalization scale \(\mu_R^2\) to \(s\). For each point you get the Born and the virtual correction, each per squared coupling order: QCD^6 is the power of \(g_s\), so the virtual is of order \(\alpha_s^3\). The virtual is a Laurent series in the dimensional regulator \(\epsilon\), with \(d = 4 - 2\epsilon\): the columns are its finite part, its single pole and its double pole.
The last table says that the value is a success but that its accuracy is not established: no accuracy estimate was asked for.
3. Ask for an accuracy estimate
pyamplicol evaluate artifacts/gg_ttx --stability-rotations 1 \
--stability-reduction-direction --stability-rescaled
| Stability estimates (relative, target 1e-05) |
| point | relative | finite | single pole | double pole | ...
| 0 | 3.831e-14 | 3.831e-14 | 1.774e-14 | 4.676e-15 | ...
| 1 | 7.115e-14 | 7.115e-14 | 2.675e-14 | 6.348e-15 | ...
These three switches are the recommended stability checks: each point is evaluated once more in a rotated frame, and its loop numerators are reduced again in reverse order on rescaled inputs. The deviations give a relative accuracy estimate per point. The checks cost extra evaluations, so leave them off when you time a process. Numerical stability explains the estimate, the target accuracy and what to do with a point that misses it.
4. Check the poles and the Ward identities
pyamplicol check artifacts/gg_ttx
| check | subject | point | carrier | R / scale | ...
| poles | QCD^6 1/eps | 0 | double | 1.39e-14 | ...
| poles | QCD^6 1/eps^2 | 0 | double | 0 | ...
| ward | leg 1, c = 1 | 0 | double | 9.08e-14 | ...
...
check PASSED (exit code 0)
check reads the request recorded in the artifact, generates it again in memory and tests it at three phase-space points: the poles against the prediction of Catani’s operator, and the Ward identity of every external gluon (its polarization replaced by its momentum; leg 1, c = 1 is leg 1 in one color structure). R / scale is the residue relative to the size of what is compared, and passes below \(10^{-5}\); carrier is the arithmetic used. The exit code is 0 when every check passes. Run it once on a new model, process or setting before you rely on the values; One-loop matrix elements describes the checks and the other exit codes.
5. The same from Python
from math import sqrt
from pyamplicol import Runtime
from pyamplicol.api import VirtualStabilityChecks
p = sqrt(500.0**2 - 173.0**2) # loop_sm's top mass, 173 GeV, at 1 TeV
point = [[500, 0, 0, 500], [500, 0, 0, -500],
[500, 0.6 * p, 0, 0.8 * p], [500, -0.6 * p, 0, -0.8 * p]]
runtime = Runtime.load("artifacts/gg_ttx")
result = runtime.evaluate([point], mu_r2=1000**2)
print(result.born_values[0][0])
# 2.1999075333190716
virtual = result.values[0][0]
print(virtual.finite, virtual.single_pole, virtual.double_pole)
# 0.7171999700928999 -0.5676332035131346 -0.24788932005716266
Momenta are [E, px, py, pz] in GeV, one list per particle, incoming particles first. mu_r2 is \(\mu_R^2\), one value for every point or one per point. The result is indexed by point and then by squared coupling order; here there is one order, QCD^6. The recommended checks are one object:
checks = VirtualStabilityChecks(rotations=1, reduction_direction=True,
rescaled=True)
checked = runtime.evaluate([point], mu_r2=1000**2, stability_checks=checks)
print(checked.statuses[0], f"{checked.stability[0].relative:.0e}")
# success 4e-14
The checks report an estimate. To evaluate the points that miss a target again in higher precision, pass stability=VirtualRescuePolicy() (from pyamplicol) instead of stability_checks= (Rescue policy).
6. A loop-induced process
A process without a tree-level amplitude is written with [noborn=QCD], as in MadGraph:
pyamplicol generate "g g > h h [noborn=QCD]" artifacts/gg_hh --model loop_sm
pyamplicol evaluate artifacts/gg_hh --stability-rotations 1 \
--stability-reduction-direction --stability-rescaled
| |A_loop|^2 (loop-induced) |
| point | virtual squared order | finite [0] | ...
| 0 | QCD^4, QED^4 | +3.237119151958233e-05 | ...
| 1 | QCD^4, QED^4 | +3.234482124309283e-05 | ...
...
| point | relative | finite | single pole | double pole | ...
| 0 | 3.525e-10 | 3.525e-10 | 1.704e-14 | 1.136e-14 | ...
The value is the squared one-loop amplitude \(\lvert \mathcal{M}^{(1)} \rvert^2\), summed over helicities and colors and averaged as usual. It is finite: its computed poles vanish up to rounding (the single pole of point 0 is \(6 \times 10^{-21}\)). Loop-induced processes are evaluated in full color. From Python the result has the same type as before, with contribution set to "loop-induced" and no Born values:
p_h = sqrt(500.0**2 - 125.0**2) # loop_sm's Higgs mass, 125 GeV
point_hh = [[500, 0, 0, 500], [500, 0, 0, -500],
[500, 0.6 * p_h, 0, 0.8 * p_h], [500, -0.6 * p_h, 0, -0.8 * p_h]]
induced = Runtime.load("artifacts/gg_hh").evaluate([point_hh], mu_r2=1000**2)
print(induced.contribution, induced.values[0][0].finite)
# loop-induced 3.2293614476584975e-05
7. Any process from one card
The examples contain a master card for one-loop requests: MadGraph’s loop_qcd_qed_sm with QCD and electroweak corrections, the complex-mass scheme and stable external particles. You name the action and the process on the command line; --output names the artifact, which generate writes and check and evaluate read.
This generation takes a few minutes and several gigabytes of memory: the electroweak model is large.
In the copy of the examples:
pyamplicol loop_generate.toml generate \
--process="u u~ > d d~ QCD^2<=4 QED^2<=6 [QCD QED]" --output=./my_loop_output
pyamplicol loop_generate.toml check --output=./my_loop_output
pyamplicol loop_generate.toml evaluate --output=./my_loop_output
| point | virtual squared order | finite [0] | ...
| 0 | QCD^2, QED^4 | -0.8096383486750014 | ...
| 0 | QCD^4, QED^2 | +0.5715194838300071 | ...
| 0 | QED^6 | -0.18429095188373282 | ...
...
QCD^2<=4 QED^2<=6 selects squared coupling orders as in MadGraph; every selected order is returned on its own, never summed. Any setting of the card can be changed with --set, for example --set loop.model.scheme.mass_scheme=real-on-shell.
8. The one-loop walkthroughs
Four shipped examples go through every one-loop feature, each with a generate, a check, an evaluate and a profile card:
loop_uux_ttxgg,u u~ > t t~ g g: a virtual correction in QCD;loop_uux_ddxepem,u u~ > d d~ e+ e-: a QCD and electroweak correction, complex-mass scheme;loop_gg_zgg,g g > z g g: loop-induced, every quark in the loop;loop_gg_epemmpmm,g g > e+ e- m+ m-: loop-induced, complex-mass scheme.
The script python/loop_walkthrough.py runs one of them end to end from its generate card: check, generation with color and spin correlations, evaluation with both reduction backends, a profile per stage, correlated evaluation, helicity selection, and the split by squared coupling order with its sum:
python python/loop_walkthrough.py loop_gg_zgg_generate.toml --points 2
The cards run on their own as well (pyamplicol loop_gg_zgg_generate.toml, then pyamplicol loop_gg_zgg_evaluate.toml).
Where next
- One-loop matrix elements: what a one-loop request contains and returns, poles, conventions, color, widths and the complex-mass scheme.
- Numerical stability: accuracy estimates, reduction backends and the rescue of inaccurate points.
- One-loop QCD with loop_sm and One-loop QCD+QED (electroweak): the shipped models, with the MadLoop syntax mapped.
- Python: the rest of the Python interface.
- Examples: every shipped card and script.