BootLoops fork. This is the BootLoops project's patched fork of Blade by Xin Guan, Xiao Liu, Yan-Qing Ma and Wen-Hao Wu (Comput. Phys. Commun. 310 (2025) 109538 [arXiv:2405.14621]; upstream gitee.com/multiloop-pku/blade, MIT): a snapshot at upstream commit
c0a06cb("Propagate MaxDegree to recmod", 2026-05-16) with our patches applied; upstream's history lives at the gitee link. Blade's block-triangular search builds on X. Liu and Y.-Q. Ma, Phys. Rev. D 99 (2019) 071501 [arXiv:1801.10523] and X. Guan, X. Liu and Y.-Q. Ma, Chin. Phys. C 44 (2020) 093106 [arXiv:1912.09294], and it runs on Tiziano Peraro's FiniteFlow (JHEP 07 (2019) 031 [arXiv:1905.08019]; JHEP 12 (2016) 030 [arXiv:1608.01902]; https://github.com/peraro/finiteflow, MIT); please cite those works when using this fork. The patches let the compiled reduction toolchain build and run without a Wolfram installation and add thefflowcli,fflowcli_streamanddumppointsdrivers; they change nothing in Blade's algorithms. We are grateful to the Blade authors and to T. Peraro, whose clean MathLink layer made a line-by-line C transcription possible, and to Xiang Li, who contributed upstream's macOS installer (auto_install_macos), which our installer patch also touches. What changed and why: PATCHES.md. Upstream license and notices (LICENSE.md,THIRD_PARTY.md) are unchanged; our modifications are released under the same MIT license, Copyright (c) 2026 Anthropic, PBC. Created by Matthew D. Schwartz; code for the modifications written by Claude (Anthropic) under his supervision. This is not an officially supported Anthropic product; it is maintained by Matthew D. Schwartz (https://www.bootloops.ai).This fork is the engine only and is part of the BootLoops release. The Python driver and the Python port of Blade's search logic live in the main BootLoops repository,
bootloops, published beside this one by the same organization (undertools/blade/; its default looks for this fork's binaries in a sibling checkout,../blade/bin); that repository does not include this fork and points here fromupgrades/ENGINES.md. PATCHES.md lists every change relative to the upstream base commit.To build this fork: clone this repository, set the paths in
install.in.txt, thencmake . && make install(Ubuntu:sudo ./auto_installbuilds this tree in place; do not use the upstreamwget .../auto_installline below). The upstream./updatescript hard-resets the tree toorigin/mainand rebuilds; in a tree without.gitit fetches stock, unpatched Blade from gitee instead, so use it only inside a clone of this repository (or update withgit pull --ff-only). Questions and bug reports about this fork (the no-Mathematica build,fflowcli,fflowcli_stream,dumppoints, theauto_installchanges) go to this repository's issues, not to the Blade authors; the Support section below is upstream's and covers stock Blade only. The instructions below are upstream's and describe the stock Mathematica-driven workflow.
Maintenance. This repository is maintained by Matthew D. Schwartz, not by Anthropic. It is not an officially supported Anthropic product, and Anthropic does not provide support, updates or fixes for it.
Reporting issues. Please report bugs and security problems through this repository's GitHub issues.
Security considerations. Treat input files from others as code. These are
research tools meant to be run locally on inputs you trust. Many of them
evaluate the contents of their input files (JSON, YAML, .m, .ms, .jl,
pickle and similar), so a file received from someone else can run arbitrary
commands on your machine. Only run files you wrote yourself or got from a
source you trust, or run them in a sandbox or container. The integrity checks
and certificates in this repository guard against accidents. They are not a
security boundary.
Blade is a BLock-triAngular form improved Feynman integral DEcomposition package that uses a search algorithm to construct a system of simple relations among Feynman integrals, using input from integration-by-parts (IBP) decomposition at specific numerical phase space points over a finite field. The system usually has orders of magnitude fewer equations than traditional IBP method and exhibits a block triangular form, which leads to fast numerical evaluation and reduced resource consumption.
The search algorithm is based on the following publications:
- Xiao Liu and Yan-Qing Ma. Determining arbitrary Feynman integrals by vacuum integrals. [Phys.Rev.D 99 (2019) 071501](arXiv: 1801.10523)
- Xin Guan, Xiao Liu and Yan-Qing Ma. Complete reduction of integrals in two-loop five-light-parton scattering amplitudes. [Chin.Phys.C 44 (2020) 9, 093106](arXiv: 1912.09294)
- Xin Guan, Xiao Liu, Yan-Qing Ma and Wen-Hao Wu. Blade: A package for block-triangular form improved Feynman integrals decomposition. [Comput.Phys.Commun. 310 (2025) 109538](arXiv: 2405.14621)
If you use Ubuntu system and have root privilege, you can install Blade as well as its dependencies (except Mathematica) fully automatically. To this end, download the auto_install file (such as using the command wget https://gitee.com/multiloop-pku/blade/raw/main/auto_install) and then run
chmod +x auto_install
./auto_install
You might not be running the command as root, such as using sudo ./auto_install, which could result in the file being owned by root instead of the current user.
If you use macOS, we also provide an automatic installation script based on Homebrew. The script installs Blade together with its dependencies (except Mathematica). Download the script (for example using wget https://gitee.com/multiloop-pku/blade/raw/main/auto_install_macos) and then run
chmod +x auto_install_macos
./auto_install_macos
For users who do not have root privileges or use different operation system, we provide a sample installation document sample_install.md that users can follow.
We use FiniteFlow (arXiv:1905.08019) as a sparse solver and finite-field reconstructor. The following packages should be installed in order.
-
We support using Ratracer (arXiv:2211.03572) for finite field reconstruction. Ratracer itself relies on the FireFly library.
To use Ratracer, you should reset the path listed in BLAddOns/RatRacer/install.m.
To set up the paths for dependencies, you should edit the following information in the install.in.txt file:
DFFLOWMLINK_DIR="/path/to/finiteflow-master"
DCMAKE_PREFIX_PATH="/dependencies/installation/path/prefix"
The /path/to/finiteflow-master directory should contain the dynamic-link library libfflow.so(or libfflow.dylib), the mathlink file fflowmlink.so(or fflowmlink.dylib), and the Mathematica file for FiniteFlow mathlink/FiniteFlow.m.
The /dependencies/installation/path/prefix refers to the installation paths for GMP, MPFR and FLINT, separated by semicolons. You can omit any of the directories if the corresponding dependencies were installed in the default installation path (e.g., /usr/local).
Then to install the binaries and generate the necessary files, use the following command:
cmake .
make install
To remove the files generated during the cmake and make install processes, use the following command:
./uninstall
To update Blade to the latest version, use the following command:
./update
Additional instructions for MacOS users can be found in the install.in.txt file.
Several examples are provided in example folder, in the order of complexity. You are encouraged to run examples that name begin with 1_ to get familiar with the package.
- 1_automatic - introduction to automatic reduction of Feynman loop integrals;
- 1_preferred_masters - introduction to automatic reduction with user-defined master integrals;
- 1_userdefined_target - introduction to automatic reduction of user defined target integrals;
- 1_differential_equations - introduction to automatic construction of differential equations;
- 1_prescription - introduction to automatic reduction of Feynman integrals with cut propagators;
- 1_complex_number - introduction to reduction with complex replacement rules;
- 1_improve_masters - introduction to d-factorized basis and physical basis;
- 1_spanning_reduce - introduction to the spanning-sector reduction algorithm;
- 1_blade_vs_plain_ibp - comparision between the block-triangular form improved reduction and the traditional IBP reduction;
- 1_generalized_integrand - introduction to automatic reduction of Feynman integrals with additional integrand;
- 2_reducer_options - introduction to a few options;
- 2_reconstructor_option - introduction to the interface for Ratracer;
- 2_block_triangular_form - introduction to the block-triangular form;
- 3_manual_search_options - introduction to the manual reduction with adaptive-search algorithm;
- 4_paper_higgsjet - a three-loop four-point diagram with one massive external line;
- 4_paper_fsf3 - a four-loop two-point diagram with one massive internal particle;
- 4_paper_topo5 - a two-loop four-point diagram with two massive internal particle;
- 4_paper_dpmass - a two-loop five-point diagram with one massive external line.
If you have any questions or advices, please do not hesitate to contact us: guanxin0507@pku.edu.cn, xiao.liu@physics.ox.ac.uk, yqma@pku.edu.cn, wuwenhao21@mails.ucas.ac.cn