def METHOD_NAME(self) -> HilbertIndex:
    """
    Returns the `HilbertIndex` object, which is a numba jitclass used to convert
    integers to states and vice-versa.
    """
    if self.__hilbert_index is None:
        if not self.is_indexable:
            raise RuntimeError("The hilbert space is too large to be indexed.")
        if self.constrained:
            self.__hilbert_index = ConstrainedHilbertIndex(
                np.asarray(self.local_states, dtype=np.float64),
                self.size,
                self._constraint_fn,
            )
        else:
            self.__hilbert_index = UnconstrainedHilbertIndex(
                np.asarray(self.local_states, dtype=np.float64), self.size
            )
    return self.__hilbert_index