Skip to content

Fields

Field realizations shared by the physics packages: Monte Carlo sampling of lattice gauge fields.

WilsonSamplingInteraction(label, *, target, beta=2.0, state='theta', move='rotate', values=(), width=1.5, rule='metropolis', schedule='colored', group=None, hits=1)

Bases: SamplingInteraction

Monte Carlo sampling of link variables with the local Wilson action of the plaquettes of a link.

For link angles the action is -beta sum_p cos(theta_p), where theta_p is the oriented sum of the link angles around the plaquette p. For the matrices of a group SU(N) it is -(beta / N) sum_p Re tr U_p, where U_p is the path-ordered product of the link matrices around p, and the move 'rotate' multiplies a link by a random matrix of the group near the identity of spread width.

Parameters:

Name Type Description Default
label str

The label of the interaction, unique among the parts of its system.

required
target Annotated[str, RoleSpec()]

The path of the group on the edges of a cell complex.

required
beta Annotated[float, ParameterSpec(domain=closed_open(0, oo))]

The inverse coupling of the Wilson action.

2.0
state str

The name of the state that holds the link angles.

'theta'
move str

'rotate' for U(1) or a matrix group, or 'random-value' for Z_N.

'rotate'
values Sequence[float]

The angles a random-value move draws from.

()
width float

The largest change of a rotation.

1.5
rule str

The acceptance, 'metropolis', 'glauber', or 'heat-bath'.

'metropolis'
schedule str

'colored' or 'random-sequential'.

'colored'
group MatrixGroupSpec | None

The matrix group of the links, or None for link angles.

None
hits int

The number of moves proposed per link and sweep of matrix links.

1

Examples:

>>> from skcomplex.systems.physics.common.fields import WilsonSamplingInteraction
>>> WilsonSamplingInteraction('wilson', target='links', beta=2.0).beta
2.0
>>> from skcomplex.core.specs import MatrixGroupSpec
>>> color = WilsonSamplingInteraction('wilson', target='links', state='U', group=MatrixGroupSpec('SU', 3))
>>> color.objective.group.degree
3
Source code in src/skcomplex/systems/physics/common/fields/_wilson_sampling.py
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
def __init__(
    self,
    label: str,
    *,
    target: Annotated[str, RoleSpec()],
    beta: Annotated[float, ParameterSpec(domain=RealSet.closed_open(0, oo))] = 2.0,
    state: str = 'theta',
    move: str = 'rotate',
    values: Sequence[float] = (),
    width: float = 1.5,
    rule: str = 'metropolis',
    schedule: str = 'colored',
    group: MatrixGroupSpec | None = None,
    hits: int = 1,
) -> None:
    super().__init__(
        label,
        target=target,
        state=state,
        objective=self._get_action if group is None else HolonomyScoreSpec(self._get_trace_action, group, hits),
        move=move,
        rule=rule,
        schedule=schedule,
        values=values,
        width=width,
    )
    self.beta = beta
    self.group = group
    self.hits = hits