Skip to content

Interaction1Site

On-site (1-site) interaction term.

Interaction1Site dataclass

Interaction1Site(
    site: int = 0,
    tnsr: Optional[Tensor] = None,
    *,
    cpl: float = 0.0,
    label: List[str] = list(),
)

Bases: Interaction

On-site (1-site) interaction term.

Attributes:

Name Type Description
site int

Site index (0-based).

tnsr Optional[Tensor]

4-index MPO tensor in format (L_trivial_IN, R_trivial_OUT, bra_OUT, ket_IN). The coupling cpl is applied by build_hamiltonian and must NOT be baked in. Set by the model builder.

Notes

The tnsr field must have axes (L_trivial_IN, R_trivial_OUT, bra_OUT, ket_IN). build_hamiltonian multiplies the tensor by cpl at accumulation time — do not bake the coupling into the tensor.

See Also