quantax.nn.fermion_idx#

quantax.nn.fermion_idx(x: Array, separate_spins: bool = False) Array | Tuple[Array, Array]#

Get the indices of occupied fermion sites.

Parameters:
  • x – A 1D array representing the fermion configuration. For spinful fermions, the first half corresponds to spin-up sites and the second half to spin-down sites.

  • separate_spins – Whether to return the indices of spin-up and spin-down fermions separately.