For each possible trace diagram, we then check whether it can generate valid regularisation terms. Specifically, we discard any diagram which contains invalid amplitude blocks (e. g. t i j kl ), more than one particle or hole bubble or which violates the computational complexity constraints discussed before. The computational scaling and memory scaling of intermediates are calculated with the Python library opt_einsum, which automatically generates an optimised contraction path. We do not discard trace diagrams with exactly one particle or hole bubble, as slicing the bubble still generates non-zero contributions to the regulariser. Additionally, we check if a diagram is connected via a depth-first search. Lastly, we confirm that the diagram is unique by comparing it to all previously generated trace diagrams of the same tensor composi-tion. This comparison is performed by an exhaustive search over all possible rearrangements of the diagram by means of tensor symmetry or index permutation and is the most timeintensive steps in this generation process.