class_docstr: Class for the Siegel metric.
class_docstr_tok: ["Class","for","the","Siegel","metric","."]
docstr: Compute the Siegel squared distance.
  
  Compute the Riemannian squared distance between point_a and point_b.
  
  Parameters
  ----------
  point_a : array-like, shape=[..., n, n]
      Point.
  point_b : array-like, shape=[..., n, n]
      Point.
  
  Returns
  -------
  squared_dist : array-like, shape=[...]
      Riemannian squared distance.
docstr_tok: ["Compute","the","Siegel","squared","distance",".","Compute","the","Riemannian","squared","distance","between","point_a","and","point_b",".","Parameters","--","--","--","--","--","point_a",":","array-like",",","shape=","[","...",",","n",",","n","]","Point",".","point_b",":","array-like",",","shape=","[","...",",","n",",","n","]","Point",".","Returns","--","--","--","-","squared_dist",":","array-like",",","shape=","[","...","]","Riemannian","squared","distance","."]
code: def squared_dist(self, point_a, point_b):
      """Compute the Siegel squared distance.
  
      Compute the Riemannian squared distance between point_a and point_b.
  
      Parameters
      ----------
      point_a : array-like, shape=[..., n, n]
          Point.
      point_b : array-like, shape=[..., n, n]
          Point.
  
      Returns
      -------
      squared_dist : array-like, shape=[...]
          Riemannian squared distance.
      """
      if gs.ndim(point_a) > gs.ndim(point_b):
          point_a, point_b = point_b, point_a
  
      identity = _create_identity_mat(
          point_b.shape, dtype=point_a.dtype
      )
  
      point_a_transconj = ComplexMatrices.transconjugate(point_a)
      point_b_transconj = ComplexMatrices.transconjugate(point_b)
  
      factor_1 = point_b - point_a
  
      factor_3 = ComplexMatrices.transconjugate(factor_1)
  
      aux_2 = gs.matmul(point_a_transconj, point_b)
  
      aux_3 = gs.matmul(point_a, point_b_transconj)
  
      aux_4 = identity - aux_2
  
      aux_5 = identity - aux_3
  
      factor_2 = gs.linalg.inv(aux_4)
  
      factor_4 = gs.linalg.inv(aux_5)
  
      prod = gs.einsum(
          "...ij,...jk,...kl,...lm->...im",
          factor_1,
          factor_2,
          factor_3,
          factor_4,
      )
  
      prod_power_one_half = gs.linalg.fractional_matrix_power(prod, 0.5)
  
      num = identity + prod_power_one_half
      den = identity - prod_power_one_half
  
      inv_den = gs.linalg.inv(den)
  
      frac = gs.matmul(num, inv_den)
  
      logarithm = gs.linalg.logm(frac)
  
      sq_dist = Matrices.trace_product(logarithm, logarithm) * 0.25
      sq_dist = gs.real(sq_dist)
      return gs.maximum(sq_dist, 0)
  
imports: import geomstats.backend
  from geomstats.geometry.base import ComplexVectorSpaceOpenSet
  from geomstats.geometry.complex_matrices import ComplexMatrices
  from geomstats.geometry.complex_riemannian_metric import ComplexRiemannianMetric
  from geomstats.geometry.hermitian_matrices import expmh, powermh
  from geomstats.geometry.matrices import Matrices
label_desc: Use image node_id 9 for calling the SiegelMetric obj's underlying member method code with example usage: obj.squared_dist(point_a, point_b) and returns: gs