中文版本: README_zh.md
This directory stores sampled eps = 1/1000 parity inputs, Mathematica
reference values, and C++ benchmark configs.
Mathematica AMFlow is the reference implementation. Keep every Mathematica value and raw cache produced for these benchmarks.
compare_sampled.py compares a C++ sampled output JSON against the
committed Mathematica reference JSON. It reads the requested/top/master
reference entries and reports real/imaginary absolute and relative
errors per integral.
tools/bench/compare_sampled.py \
tools/bench/tt_2loop_box_eps001_mma_reference.json \
/tmp/amflow_bench_tt_2loop_box_cpp_out.json
tools/bench/compare_sampled.py \
tools/bench/doublebox_sv_eps001_mma_reference.json \
/tmp/amflow_bench_doublebox_sv_eps001_cpp_out.jsonDefaults:
- relative tolerance:
1e-25 - absolute tolerance:
1e-40
Use --json-out <path> to write a machine-readable comparison report.
These commands run the sampled C++ benchmark path. They are long-running
benchmark commands, not default ctest entries.
The commands below assume amflow_cli is on $PATH (after
sudo cmake --install build). If you haven't installed, substitute
./build/src/cli/amflow_cli for each amflow_cli.
amflow_cli \
tools/bench/tt_2loop_box_eps001_black_box_amflow_cpp.json \
/tmp/amflow_bench_tt_2loop_box_cpp_out.json
amflow_cli \
tools/bench/doublebox_sv_eps001_black_box_amflow_cpp.json \
/tmp/amflow_bench_doublebox_sv_eps001_cpp_out.json
amflow_cli \
tools/bench/tt_higher_rank_eps001_black_box_amflow_cpp.json \
/tmp/amflow_bench_tt_higher_rank_eps001_cpp_out.json
amflow_cli \
tools/bench/xbox_2loop_eps001_black_box_amflow_cpp.json \
/tmp/amflow_bench_xbox_2loop_eps001_cpp_out.json
amflow_cli \
tools/bench/tt_cutkosky_probe_eps001_black_box_amflow_cpp.json \
/tmp/amflow_bench_tt_cutkosky_probe_eps001_cpp_out.json
AMFLOW_DEBUG_SCHEME=1 amflow_cli \
tools/bench/cutbubble_1L_eps001_black_box_amflow_cpp.json \
/tmp/amflow_bench_cutbubble_1L_eps001_cpp_out.json
AMFLOW_DEBUG_SCHEME=1 amflow_cli \
tools/bench/cutsunrise_2L_eps001_black_box_amflow_cpp.json \
/tmp/amflow_bench_cutsunrise_2L_eps001_cpp_out.json
AMFLOW_DEBUG_SCHEME=1 amflow_cli \
tools/bench/cutbanana_3L_eps001_black_box_amflow_cpp.json \
/tmp/amflow_bench_cutbanana_3L_eps001_cpp_out.jsonAfter a run, compare the output with compare_sampled.py before
updating benchmark status fields.
The live inventory lives in the files themselves: each bench is a
triplet <name>_{cpp.json, mma.wl, mma_reference.json} (sub-master
oracles reuse parent caches and have only cpp.json + mma_reference.json).
Use ls tools/bench/*_mma_reference.json for the full list (228
entries as of 2026-05-17).
Wallclock numbers are intentionally not maintained here; see
docs/ROADMAP.md §"Performance benchmarking".
tt_cutkosky_probeonly differs fromtt_2loop_boxin theEndingSchemepriority list. With this kinematics (s = 30, t = -10/3, msq = 1) the boundary integrals are handled byTradition; the presence ofCutkoskyin the list is exercised at the protocol level but does not perturb numerics.cutbubble_1Lis the opposite counterpart tott_cutkosky_probe: the family already hascut = {1, 1}at the top level, so the top sector satisfiesphase_volume_q(|var| = L+1, all cuts == 1) andAMFSystemSetupMasterchoosesCutkoskyfor the root system. Run withAMFLOW_DEBUG_SCHEME=1to confirm the firing line[scheme] Cutkosky fired: family=cutbubble phase_loop_num=1 ...is printed. The eps^0 leading coefficient is exactly1/(8*Pi), the massless 2-particle phase-space volume.cutsunrise_2Lextends the Cutkosky probe toL = 2: 5-prop basis (3 actual + 2 ISPs) withcut = {1, 1, 1, 0, 0}, targetj[cutsunrise, 1, 1, 1, 0, 0].phase_volume_qtriggers because|var| = 3 = L+1with all live cuts == 1, soAMFSystemSetupMasterpicks Cutkosky on the top family. The firing line reads[scheme] Cutkosky fired: family=cutsunrise phase_loop_num=2 top_position={0,1,2}. This bench is the strongest available check on the(Pi^(2-eps)*(2*Pi)^(2*eps-4))^L * (-1)^(L+1)Cutkosky prefactor atL > 1(the sign factor flips relative to the 1-loop case) and onphase_loop_numpropagation throughAMFSystemSetupMaster.cutbanana_3Lpushes the Cutkosky probe toL = 3: 9-prop basis (4 actual + 5 ISPs) withcut = {1, 1, 1, 1, 0, 0, 0, 0, 0}, targetj[cutbanana, 1, 1, 1, 1, 0, 0, 0, 0, 0]. After cut clearing the eta-flow runs as a 3-loop banana with eta onl1^2(1 massive + 3 massless legs); subsystem recursion goessystem 1 -> 2 -> 3 -> trivial. Firing line:[scheme] Cutkosky fired: family=cutbanana phase_loop_num=3 top_position={0,1,2,3}. Together withcutbubble_1L(sign +1) andcutsunrise_2L(sign -1), this completes the L=1/2/3 sign-pattern check on(-1)^(L+1)(back to +1 at L=3) and exercises the deepest recursion in the bench inventory. RequiresBlackBoxDot = 5(matching the equal-massbanana_3loop): withBlackBoxDot = 1the boundary Reduce step fails withmaster count differs between Masters and Reduce calls. Both the MMA*_mma.wland C++*_cpp.jsonconfigs set this floor explicitly — AMFlow.m'sMax[$BlackBoxDot, JDot/@...]pre-compute cannot raise it on its own when the input integrals all haveJDot = 0(every positive index is exactly 1).doublebox2mis the regression guard for D12 (seedocs/AUDIT_MMA_PARITY.md). Interleaved cross-loop mass placement gives the top-sector differential-equation matrix a complex-conjugate pole pair (η² + η + 12 = 0,|η| ≈ 3.46), tightening the Frobenius series convergence radius for the 4 top-sector masters. The committed C++ config setsworking_pre=200, x_order=400, extra_x_order=480— roughly doubled vs the all-massless / block-mass defaults — to converge. At the older defaults(160, 200, 240)C++ produced a sign-flipped Re andO(0.1)spurious Im; the elevated parameters are the recommended baseline for any topology with complex-pole pairs near the NegIm contour.banana_3looprequiresBlackBoxDot = 5for both the Masters and Reduce passes — at lower dot the Reduce step cannot cover the master set returned by Masters, and AMFlow's protocol-level sanity check refuses to proceed. The committed configs (*_cpp.jsonand*_mma.wl) setdot = 5. Pak symmetry detection in Kira (search_symmetry_relations) must also be enabled for this family; with symmetry off some sub-banana sectors do not collapse and the Reduce master count drifts again.
Raw Mathematica caches under mma_refs/ are large (~80 MB) and not
committed. They can be regenerated from the *_mma.wl scripts in
this directory. For each bench triplet <name>_{cpp.json, mma.wl, mma_reference.json}:
cd tools/bench
math -script <name>_mma.wlEach *_mma.wl writes its raw cache directory under mma_refs/<name>_mma_cache/
and the summarised reference values into <name>_mma_reference.json (which
is committed).
If tools/math_ref/cache/ is also missing (likewise gitignored), use
tools/math_ref/run_amflow_kira.wl driven by a cfg_*.wl file to
regenerate.