class_docstr: Class for the Bures-Wasserstein metric on the HPD manifold.
docstr: Compute the parallel transport of a tangent vec along a geodesic.
  
  Approximation of the solution of the parallel transport of a tangent
  vector a along the geodesic defined by :math:`t \mapsto exp_{(
  base\_point)}(t* tangent\_vec\_b)`. The parallel transport equation is
  formulated in this case in [TP2021]_.
  
  Parameters
  ----------
  tangent_vec : array-like, shape=[..., n, n]
      Tangent vector at `base_point` to transport.
  base_point : array-like, shape=[..., n, n]
      Initial point of the geodesic.
  direction : array-like, shape=[..., n, n]
      Tangent vector at `base_point`, initial velocity of the geodesic to
      transport along.
  end_point : array-like, shape=[..., n, n]
      Point to transport to.
      Optional, default: None.
  n_steps : int
      Number of steps to use to approximate the solution of the
      ordinary differential equation.
      Optional, default: 100
  step : str, {'euler', 'rk2', 'rk4'}
      Scheme to use in the integration scheme.
      Optional, default: 'rk4'.
  
  Returns
  -------
  transported :  array-like, shape=[..., n, n]
      Transported tangent vector at `exp_(base_point)(tangent_vec_b)`.
  
  See Also
  --------
  Integration module: geomstats.integrator
docstr_tok: ["Compute","the","parallel","transport","of","a","tangent","vec","along","a","geodesic",".","Approximation","of","the","solution","of","the","parallel","transport","of","a","tangent","vector","a","along","the","geodesic","defined","by",":","math",":","`","t","\\mapsto","exp_","{","(","base\\_point",")","}","(","t","*","tangent\\_vec\\_b",")","`",".","The","parallel","transport","equation","is","formulated","in","this","case","in","[","TP2021","]","_.","Parameters","--","--","--","--","--","tangent_vec",":","array-like",",","shape=","[","...",",","n",",","n","]","Tangent","vector","at","`","base_point","`","to","transport",".","base_point",":","array-like",",","shape=","[","...",",","n",",","n","]","Initial","point","of","the","geodesic",".","direction",":","array-like",",","shape=","[","...",",","n",",","n","]","Tangent","vector","at","`","base_point","`",",","initial","velocity","of","the","geodesic","to","transport","along",".","end_point",":","array-like",",","shape=","[","...",",","n",",","n","]","Point","to","transport","to",".","Optional",",","default",":","None",".","n_steps",":","int","Number","of","steps","to","use","to","approximate","the","solution","of","the","ordinary","differential","equation",".","Optional",",","default",":","100","step",":","str",",","{","'euler","'",",","'rk2","'",",","'rk4","'","}","Scheme","to","use","in","the","integration","scheme",".","Optional",",","default",":","'rk4","'",".","Returns","--","--","--","-","transported",":","array-like",",","shape=","[","...",",","n",",","n","]","Transported","tangent","vector","at","`","exp_","(","base_point",")","(","tangent_vec_b",")","`",".","See","Also","--","--","--","--","Integration","module",":","geomstats.integrator"]
code: def parallel_transport(
      self,
      tangent_vec,
      base_point,
      direction=None,
      end_point=None,
      n_steps=10,
      step="rk4",
  ):
      r"""Compute the parallel transport of a tangent vec along a geodesic.
  
      Approximation of the solution of the parallel transport of a tangent
      vector a along the geodesic defined by :math:`t \mapsto exp_{(
      base\_point)}(t* tangent\_vec\_b)`. The parallel transport equation is
      formulated in this case in [TP2021]_.
  
      Parameters
      ----------
      tangent_vec : array-like, shape=[..., n, n]
          Tangent vector at `base_point` to transport.
      base_point : array-like, shape=[..., n, n]
          Initial point of the geodesic.
      direction : array-like, shape=[..., n, n]
          Tangent vector at `base_point`, initial velocity of the geodesic to
          transport along.
      end_point : array-like, shape=[..., n, n]
          Point to transport to.
          Optional, default: None.
      n_steps : int
          Number of steps to use to approximate the solution of the
          ordinary differential equation.
          Optional, default: 100
      step : str, {'euler', 'rk2', 'rk4'}
          Scheme to use in the integration scheme.
          Optional, default: 'rk4'.
  
      Returns
      -------
      transported :  array-like, shape=[..., n, n]
          Transported tangent vector at `exp_(base_point)(tangent_vec_b)`.
  
      See Also
      --------
      Integration module: geomstats.integrator
      """
      if end_point is None:
          end_point = self.exp(direction, base_point)
  
      horizontal_lift_a = gs.linalg.solve_sylvester(
          base_point, base_point, tangent_vec
      )
  
      square_root_bp, inverse_square_root_bp = powermh(
          base_point, [0.5, -0.5]
      )
      end_point_lift = Matrices.mul(
          square_root_bp, end_point, square_root_bp
      )
      square_root_lift = powermh(end_point_lift, 0.5)
  
      horizontal_velocity = gs.matmul(
          inverse_square_root_bp, square_root_lift
      )
      partial_horizontal_velocity = Matrices.mul(
          horizontal_velocity, square_root_bp
      )
      partial_horizontal_velocity += ComplexMatrices.transconjugate(
          partial_horizontal_velocity
      )
  
      def force(state, time):
          horizontal_geodesic_t = (
              1 - time
          ) * square_root_bp + time * horizontal_velocity
          geodesic_t = (
              (1 - time) ** 2 * base_point
              + time * (1 - time) * partial_horizontal_velocity
              + time**2 * end_point
          )
  
          align = Matrices.mul(
              horizontal_geodesic_t,
              ComplexMatrices.transconjugate(
                  horizontal_velocity - square_root_bp
              ),
              state,
          )
          right = align + ComplexMatrices.transconjugate(align)
          return gs.linalg.solve_sylvester(
              geodesic_t, geodesic_t, -right
          )
  
      flow = integrate(
          force, horizontal_lift_a, n_steps=n_steps, step=step
      )
      final_align = Matrices.mul(end_point, flow[-1])
      return final_align + ComplexMatrices.transconjugate(final_align)
  
imports: import math
  import geomstats.backend
  from geomstats.geometry.base import ComplexVectorSpaceOpenSet
  from geomstats.geometry.complex_matrices import ComplexMatrices, ComplexMatricesMetric
  from geomstats.geometry.complex_riemannian_metric import ComplexRiemannianMetric
  from geomstats.geometry.general_linear import GeneralLinear
  from geomstats.geometry.hermitian_matrices import HermitianMatrices, expmh, powermh
  from geomstats.geometry.matrices import Matrices
  from geomstats.geometry.pullback_metric import PullbackDiffeoMetric
  from geomstats.geometry.spd_matrices import SymMatrixLog, logmh
  from geomstats.integrator import integrate
  from geomstats.vectorization import repeat_out
label_desc: Use image node_id 5 for calling the HPDBuresWassersteinMetric obj's underlying member method code with example usage: obj.parallel_transport(tangent_vec, base_point, direction, end_point, n_steps, step) and returns: unknown, gs