sft_wick.indices — Index Management

Index management for Wick contractions.

Generates fresh component indices and spatial variables for vertex instantiation.

class sft_wick.indices.IndexContext[source]

Bases: object

Generates fresh, unique index names for vertex instantiation.

When multiple copies of vertices are created during perturbative expansion, each copy needs non-overlapping internal indices.

fresh_component_index(prefix='i')[source]

Generate a fresh component index name like i_0, i_1, …

Parameters:

prefix (str)

Return type:

str

fresh_spatial_variable(prefix='y')[source]

Generate a fresh spatial variable name like y_0, y_1, …

Parameters:

prefix (str)

Return type:

str