spheres.stars.star_utils.poleflip¶
-
spheres.stars.star_utils.
poleflip
(to_flip, from_cartesian=False, from_spherical=False)[source]¶ Flips the pole of projection. If given an extended complex coordinate, this amounts to projecting to the sphere via a South Pole projection and then projecting back to the plane via a North Pole projection.
More simply:
\[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, flips the pole of projection for the entire state. This could be done by flipping the individual roots, or directly on the state/polynomial by reversing the components and complex conjugating.
This is useful for evaluating the Majorana polynomial at \(\infty\). We actually need a second coordinate chart. We flip the projection pole and evaluate at \(0\) instead.
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_flip ((complex/inf) or qt.Qobj or np.ndarray) – Extended complex coordinate, cartesian coordinate, spherical coordinate, or spin state/polynomial to flip.
from_cartesian (bool, optional) – Whether to interpret argument as cartesian coordinates.
from_spherical (bool, optional) – Whether to interpret argument as spherical coordinates.
- Returns
flipped – Flipped extended complex coordinate, cartesian coordinate, spherical coordinate or spin state/polynomial.
- Return type
(complex/inf) or qt.Qobj or np.ndarray