ETH Zürich ← AKV

AKV tutorial

This walks through one real job: the two-loop q q̄ → W⁺W⁻ integrand of Amplitudes2to2/qqWW, from FORM-style integrand chunks to scalar integrals and Kira jobs. Everything here runs on the files shipped in examples/ and tests/data/.

1. Build and self-test

./build.sh
./test/run_tests.sh          # ALL TESTS PASSED

2. The process file

examples/qqWW/qqWW.spec describes q(p1) q̄(p2) → W⁺(q1) W⁻(q2) with off-shell W's (q1² = 1 sets the scale, q2² = mq2), s = (p1+p2)², t = (p1−q1)², and decay currents ε1, ε2 with ε_i·q_i = 0. Read it top to bottom:

3. Reduce a chunk

bin/akvred chunk --spec examples/qqWW/qqWW.spec \
    --in tests/data/ww/in_E12c1.h --out E12c1.h --threads 4 --verbose

in_E12c1.h is a UV counterterm piece: a massive tadpole loop k1 (DM = k1² − M) times a massless one-loop box in k2, tagged TAG1(2). AKV averages k1 isotropically (its denominators are massive and external-free), decomposes k2 against {p1,p2,q1}, contracts the transverse metric inside the Dirac string, normal orders it, and writes

E12c1 :=
 + Ubar(Vbar2,q1,Uspin1)*BOX(-2,1,1,1)*TD(2)*e1e2*I*gs^4*Cf*Ca*rat(...)
 ...

Compare with FORM's result, exactly:

gzip -dc tests/data/ww/form_E12c1.h.gz > form_E12c1.h
bin/wwcompare form_E12c1.h E12c1.h      # ... 0 nonzero differences -> EQUAL

wwcompare parses both files independently of AKV (a separate parser and factored rational arithmetic), forms A − B key by key and requires zero. Keys that occur on one side only are allowed if their coefficient sums to zero (FORM's iG representation is not canonical).

4. Where do the families enter?

The tensor and spin layers never look at families. You choose when the family map happens:

bin/akvred scramble --spec examples/qqWW/qqWW.spec --in tests/data/ww/in_E21c1.h --out s.h --seed 3
bin/akvred chunk --spec examples/qqWW/qqWW.spec --in s.h --out before.h --families before
bin/akvred chunk --spec examples/qqWW/qqWW.spec --in s.h --out after.h  --families after
bin/wwcompare before.h after.h          # EQUAL

scramble rewrites the chunk with plain propagators sprop(q, m) in a random loop-momentum frame. before maps each term's propagator set onto the registry (mapfam.py's search, ported), transforms the numerator and reduces; after reduces first and maps the scalar integrals, transforming their scalar-product monomials. The results are identical.

5. One IBP run per family

bin/akvred targets --spec examples/qqWW/qqWW.spec --out-dir kira out/*.h

reads all front-end outputs of the amplitude (AKV's or FORM's), collects the integrals of every family once, and writes kira/<FAM>/targets, kira/<FAM>/jobs.yaml (top sectors, r, s from the targets), a combined kira/jobs.yaml, kira/integralfamilies.yaml and FAIR topologies kira/<FAM>.topo.

6. Your own process

Copy examples/qqWW/qqWW.spec, change the ring, the Gram matrix, the polarisation rules and the registry. The input dialect is FORM's: one L NAME = + (...) + ... ; expression whose terms are products of numbers, ring symbols, sprop(q, 0|M) or tagged propagator symbols, DOT(a,b), and Ubar(Vbar2, …, Uspin1) strings with vectors and Lorentz indices. Today the vectors are k1, k2, p1, p2, q1, ep1, ep2 (2 → 2 with two external currents); see docs/OFFSHELL.md for what is next.