symop.modes.labels.polarization¶
Polarization labels.
This module defines PolarizationLabel,
a normalized Jones-vector label used to compute mode overlaps and build
stable signatures.
Classes
|
Polarization label represented by a normalized Jones vector. |
- class Polarization(jones: tuple[complex, complex]) None¶
Bases:
objectPolarization label represented by a normalized Jones vector.
The Jones vector is stored as a 2-component complex vector:
\[\begin{split}\mathbf{v} = \begin{pmatrix} a \\ b \end{pmatrix},\end{split}\]normalized such that \(\|\mathbf{v}\|_2 = 1\).
Canonicalization¶
Jones vectors have a physically irrelevant global phase. This class canonicalizes the input vector by removing an overall phase so that the first non-negligible component is real and non-negative. This makes signatures stable and reduces spurious differences due to global phase.
- jones¶
Tuple \((a, b)\) representing the Jones vector components.
- classmethod A() Self¶
Anti-diagonal linear polarization.
- Returns:
\(\frac{1}{\sqrt{2}}(1, -1)\).
- Return type:
- classmethod D() Self¶
Diagonal linear polarization.
- Returns:
\(\frac{1}{\sqrt{2}}(1, 1)\).
- Return type:
- classmethod L() Self¶
Left-circular polarization (one common convention).
- Returns:
\(\frac{1}{\sqrt{2}}(1, i)\).
- Return type:
- classmethod R() Self¶
Right-circular polarization (one common convention).
- Returns:
\(\frac{1}{\sqrt{2}}(1, -i)\).
- Return type:
- approx_signature(*, decimals: int = 12, ignore_global_phase: bool = False) tuple[object, ...]¶
Approximate signature with rounded components.
- classmethod linear(theta: float) Self¶
Linear polarization at angle \(\theta\).
The Jones vector is:
\[\begin{split}\mathbf{v}(\theta) = \begin{pmatrix}\cos\theta \\ \sin\theta\end{pmatrix}.\end{split}\]- Parameters:
theta (
float) – Polarization angle (radians).- Returns:
Linear polarization label at angle \(\theta\).
- Return type:
- overlap(other: Polarization) complex¶
Compute the polarization overlap.
This is the usual complex inner product of normalized Jones vectors:
\[\langle \mathbf{v}_1, \mathbf{v}_2 \rangle = \mathbf{v}_1^\dagger \mathbf{v}_2.\]- Parameters:
other (
Polarization) – Another polarization label.- Returns:
Complex overlap \(\langle \mathbf{v}_1, \mathbf{v}_2 \rangle\).
- Return type:
- rotated(theta: float) Self¶
Rotate the polarization by angle \(\theta\).
This applies the real rotation matrix:
\[\begin{split}R(\theta)=\begin{pmatrix} \cos\theta & -\sin\theta\\ \sin\theta & \cos\theta \end{pmatrix}\end{split}\]to the Jones vector.
- Parameters:
theta (
float) – Rotation angle (radians).- Returns:
Rotated polarization label.
- Return type:
- property signature: tuple[object, ...]¶
Stable signature for caching/comparison.
The signature is based on the canonicalized Jones components.
- transformed(unitary: ndarray, *, atol: float = 1e-12) Self¶
Apply a 2x2 unitary Jones transformation.
This method applies a unitary matrix \(U\) to the Jones vector,
\[\mathbf{v}' = U \mathbf{v},\]where \(U\) must satisfy
\[U^\dagger U = I\]up to the specified tolerance.
Since
Polarizationcanonicalizes global phase, transformed states that differ only by a global phase compare equal.- Parameters:
- Returns:
Transformed polarization label.
- Return type:
- Raises:
ValueError – If
unitarydoes not have shape(2, 2)or is not unitary within the requested tolerance.
- pol: PolarizationProtocol¶