Mathematically, Fermions and their interactions are being described by certain matrices, the Dirac matrices (recall that for two matrices, A*B can be distinct from B*A, therefore matrices allow for effects such as flipping sign when being encountered in reverse direction).
In calculations, one then encounters products of such Dirac matrices. In particular, one often wants to compute the trace of them. In principle, this could be done by multiplying the matrices and computing the trace of the result matrix, however, there are 2 disadvantages: Firstly, matrix multiplication is slow, and secondly, in #quantumFieldTheory one wants to compute in a setting where the spacetime dimension is a symbolic parameter, and it is impossible to compute a matrix product when the number of rows in the matrix is an undetermined symbolic value. Hence, instead, one uses the defining properties of Dirac matrices: How they flip signs when the order of their product is changed. In this way, one can "order" an arbitrary product, so that adjacent factors are the same matrix, in which case they become a unit matrix.
The present paper shows that this combinatorial operation is encoded in a specific type of graph, and that the value of the trace is given by the Tutte polynomial of that graph.
https://link.springer.com/article/10.1007/JHEP05(2025)235 #physics

Dirac traces and the Tutte polynomial - Journal of High Energy Physics
Perturbative calculations involving fermion loops in quantum field theories require tracing over Dirac matrices. A simple way to regulate the divergences that generically appear in these calculations is dimensional regularisation, which has the consequence of replacing 4-dimensional Dirac matrices with d-dimensional counterparts for arbitrary complex values of d. In this work, a connection between traces of d-dimensional Dirac matrices and computations of the Tutte polynomial of associated graphs is proven. The time complexity of computing Dirac traces is analysed by this connection, and improvements to algorithms for computing Dirac traces are proposed.




