quantax.nn.Embedding#
- class quantax.nn.Embedding#
Bases:
ModuleLearned positional encoding of a configuration onto the lattice grid.
The positional encoding
PEholds one embedding table per position in the sublattice, tiled over the spatial gridlattice.shape[1:]. Each unit cellโs state (seeinput_to_index) selects an entry from the table at its position, so the output is fully indexed fromPE.- __init__(d: int, sublattice: Sequence[int] | None = None, dtype: str | type[Any] | dtype | SupportsDType = <class 'jax.numpy.float32'>)#
- Parameters:
d โ The embedding dimension (number of output channels per site).
sublattice โ The spatial period of the positional encoding
PE, tiled over the grid. Default toNone, i.e. the same encoding on all positions.dtype โ The data type of the parameters. Default to
float32.