def acg_potential(omega, x):
  """Computes the (unnormalized) angular central gaussian (ACG) density at x.

  The ACG distribution is obtained by sampling a gaussian random vector with
  covariance Omega and normalizing it to the unit sphere. The density is
  1/(x.T omega *x)**(-d/2).

  Args:
    omega: Covariance matrix (d x d)
    x: d-dimension vector.

  Returns:
    Density evaluated at x.
  """
  d = omega.shape[0]
  return (x.T * omega * x)**(-d / 2)