8000
Skip to content

Jens-Braun/FeynGraph

Repository files navigation

FeynGraph - A Modern Feynman Diagram Generator

Warning

FeynGraph is currently still in the testing phase. The core algorithms are validated to operate as expected, but some small bugs may still appear. If this is the case, please file an issue.

FeynGraph is a modern Feynman diagram generation toolkit aiming to be as versatile as possible while remaining pleasant to use. The library itself is written in Rust, additional language bindings are available for Python and Wolfram Mathematica.

A user guide is available here.

Installation

Python

The FeynGraph Python bindings are published to PyPI and can therefore easily installed with e.g. pip

pip install feyngraph

In addition to the library interface, there is also a more classical command line utility. This requires some extra dependencies, which can be installed with e.g.

pip install feyngraph[cli]

Building From Source

The FeynGraph Python library can also easily be built from source, which requires a Rust toolchain and maturin. Then, in the cloned repository, a Python wheel can be compiled by running

maturin build -r

The library can also immediately be installed by running

pip install .

Rust

To use FeynGraph in a Rust project, it can simply be added to the project with

cargo add feyngraph

or be manually added to Cargo.toml as

[dependencies]
feyngraph = "0.1"

Basic Example

The Feynman diagrams of a given process in the Standard Model in Feynman gauge without filtering can be generated by running:

import feyngraph as fg
diags = fg.generate_diagrams(["g", "g"], ["g", "g"], 2)
assert(len(diags) == 88366)

About

FeynGraph - a modern Feynman diagram generator

Resources

License

Stars

Watchers

Forks

Contributors

Languages

0