quantax.nn.compute_sign#

quantax.nn.compute_sign(kernel: Array, s: Array, output: str, neg: bool = False) Array#

Compute the sign, phase, or cosine value based on the provided kernel and spin configuration.

Parameters:
  • kernel – The kernel array used for computation.

  • s – The spin configuration array.

  • output – The type of output to compute: “sign”, “phase”, or “cos”.

  • neg – Whether to negate the output.

Returns:

The phase value obtained by jnp.dot(kernel.flatten(), s.flatten()), transformed according to the specified output type.