class netket.models.tensor_networks.MPSPeriodic[source]#

Bases: Module

A periodic Matrix Product State (MPS) for a quantum state of discrete degrees of freedom. The MPS is defined as

\[\Psi(s_1,\dots s_N) = \mathrm{Tr} \left[ A[s_1] \dots A[s_N] \right] ,\]

for arbitrary local quantum numbers \(s_i\), where \(A[s_i]\) are matrices of shape \((\text{bond_dim}, \text{bond_dim})\) for \(i=1, \dots N\) , depending on the value of the local quantum number \(s_i\).

checkpoint: bool = True#

Whether to use jax.checkpoint on the scan function for memory efficiency.

symperiod: Optional[int] = None#

Periodicity in the chain of MPS tensors. The chain of MPS tensors is constructed as a sequence of identical unit cells consisting of symperiod tensors. if None, symperiod equals the number of physical degrees of freedom.

unroll: int = 1#

the number of scan iterations to unroll within a single iteration of a loop.

hilbert: HomogeneousHilbert#

Hilbert space on which the state is defined.

bond_dim: int#

Bond dimension of the MPS tensors. See formula above.

kernel_init: Callable[[Any, Sequence[int], Any], Union[ndarray, Array]]#

the initializer for the MPS weights. This is added to an identity tensor.


Queries the tensor network for the input configurations x.


x – the input configuration


Internal function, used to contract the tensor network with some input tensor.


qn – The input tensor to be contracted with this MPS