spheres.stars.star_utils.antipodal¶
-
spheres.stars.star_utils.
antipodal
(to_invert, from_cartesian=False, from_spherical=False)[source]¶ If given an extended complex coordinate, takes the point to its antipode on the sphere via the map:
\[z \rightarrow -\frac{z}{|z|^2} = - \frac{1}{z^{*}}\]If \(z=\infty\), \(z \rightarrow 0\) and if \(z=0\), \(z \rightarrow \infty\).
If given a spin state or polynomial coefficients, inverts the whole sphere. This could be done by inverting the individual roots, or directly on the state/polynomial by reversing the components, complex conjugating, and multiplying every other component by \(-1\).
If from_cartesian=True or from_spherical=True, the argument is interpreted as a single coordinate in terms of those coordinate systems and the flipped coordinate is returned in the same.
- Parameters
to_invert (complex/inf or qt.Qobj or np.ndarray) – Extended complex coordinate, cartesian coordinate, spherical coordinate, or spin state/polynomial to invert.
- Returns
inverted – Inverted extended complex coordinate, cartesian coordinate, spherical coordinate or spin state/polynomial.
- Return type
complex/inf or qt.Qobj or np.ndarray