InteractionNSite¶
N-site interaction term spanning a contiguous window of MPO sites.
InteractionNSite
dataclass
¶
InteractionNSite(
sites: List[int] = list(),
tnsrs: Optional[List[Tensor]] = None,
*,
cpl: float = 0.0,
label: List[str] = list(),
)
Bases: Interaction
N-site interaction term spanning a contiguous window of MPO sites.
Attributes:
| Name | Type | Description |
|---|---|---|
sites |
List[int]
|
Operator site indices in operator order (e.g. |
tnsrs |
Optional[List[Tensor]]
|
Contiguous list of 4-index MPO tensors covering
|
Notes¶
Unlike Interaction1Site and Interaction2Site, which name their sites explicitly and let build_hamiltonian synthesize the operator string in between, an InteractionNSite carries the entire window verbatim. The window is the contiguous range [min(sites), max(sites)], and tnsrs must supply one tensor per site in that range — including any identity or Jordan-Wigner string tensors on sites that carry no operator.
sitesrecords the operator site indices in operator order (e.g.[m, n, k, l]forc†_m c†_n c_k c_l). This order is metadata for the model builder;build_hamiltonianonly readsmin(sites)andmax(sites)to locate the window.tnsrs[offset]is placed at sitemin(sites) + offset. Every tensor has axes(L_bond_IN, R_bond_OUT, bra_OUT, ket_IN); the two outer bonds of the window must be trivial (dim-1, charge-neutral) so the term composes with the identity tensors on the remaining sites.build_hamiltonianscales only the last window tensor bycpl— do not bake the coupling into the tensors.
Since the window is taken verbatim, a term whose operators are not contiguous is expressed by padding the gaps with identity (or string) tensors rather than by splitting the term.
See Also¶
- Interaction — base class.
- Interaction2Site — two-site specialization with an implicit operator string.
- build_hamiltonian — consumes these objects.