netket.operator.spin.identity#
- netket.operator.spin.identity(hilbert, dtype=None)[source]#
Builds the \(\mathbb{I}\) identity operator.
- Parameters:
hilbert (
DiscreteHilbert
) – The hilbert space.dtype (
Any
) – The datatype to use for the matrix elements.
- Return type:
- Returns:
An instance of {class}`nk.operator.LocalOperator`.