Expand description
Stokes vector and Mueller $4\times 4$ matrix polarimetric realizability verifiers (C02 Mode 1 & Mode 4).
All reference calculations are evaluated from first principles in independent f64 arithmetic:
- Overflow-safe scaled 3D hypotenuse $\operatorname{hypot}_3(S_1, S_2, S_3)$.
- Physical Stokes admission: $S_0 \ge 0$ and $\operatorname{hypot}_3(S_1, S_2, S_3) \le S_0 + 64,\varepsilon \max(S_0, \operatorname{hypot}_3(S_1, S_2, S_3))$.
- Degree of Polarization $\text{DoP} = \operatorname{hypot}_3(S_1, S_2, S_3) / S_0 \in [0, 1]$, never clamping source components to mask over-polarized states.
- Cloude $4\times 4$ Hermitian coherency matrix $\mathbf{C}(\mathbf{M})$ constructed from the 16 Pauli-basis Dirac-Kronig projections in the candidate C02 $V$-sign convention, with deterministic complex Hermitian Jacobi eigenvalue verification ($\lambda_i \ge -64,\varepsilon |\mathbf{M}|_F$).
- Fry-Kattawar trace/transmittance passivity conditions and Jones-to-Mueller exact equivalence.
Structs§
- Complex64
- Complex scalar in
f64precision for independent Jones & Cloude algebra. - Verified
Mueller Report - Verified Mueller $4\times 4$ physical realizability report.
- Verified
Stokes State - Verified Stokes physical state summary (retaining original unmodified components).
Enums§
- Polarimetric
Validation Error - Structured rejection reason for Stokes or Mueller physical realizability failures.
Constants§
- C02_
ROUNDING_ FACTOR - Standard C02 small-operation rounding allowance factor ($64 \times 2^{-52}$).
- F64_EPS
- Machine epsilon for IEEE-754
f64($2^{-52}$). - VACUUM_
SPEED_ OF_ LIGHT_ M_ PER_ S - Exact defined speed of light in vacuum $c_0$ ($\text{m/s}$).
Functions§
- apply_
mueller_ matrix - Apply a $4\times 4$ Mueller matrix to a Stokes vector: $\mathbf{S}{\text{out}} = \mathbf{M}\mathbf{S}{\text{in}}$.
- compute_
cloude_ coherency_ matrix - Construct the $4\times 4$ Hermitian Cloude coherency matrix $\mathbf{C}(\mathbf{M})$ from a $4\times 4$ Mueller matrix $\mathbf{M}$ using the 16 Hermitian Pauli-basis projections:
- deterministic_
transverse_ basis - Deterministic transverse basis $(\mathbf{e}_1, \mathbf{e}_2)$ for propagation unit vector $\mathbf{k}$.
- hermitian_
4x4_ eigenvalues - Compute all 4 real eigenvalues (sorted ascending) of a $4\times 4$ complex Hermitian matrix using deterministic two-stage complex-phase clearing + real Jacobi rotations.
- jones_
to_ mueller_ matrix - Convert a $2\times 2$ complex Jones matrix $\mathbf{J}$ to its exact $4\times 4$ Mueller matrix $\mathbf{M}(\mathbf{J}) = \mathbf{A}(\mathbf{J} \otimes \mathbf{J}^*)\mathbf{A}^{-1}$ in the C02 Mode 1/4 convention.
- jones_
vector_ to_ stokes - Convert a complex Jones vector $(E_x, E_y)$ to a Stokes vector $(S_0, S_1, S_2, S_3)$ in the C02 Mode 1 convention where $(1, i)/\sqrt{2} \mapsto (1, 0, 0, -1)$.
- rotate_
stokes_ transverse_ basis - Passive transverse basis rotation of a Stokes vector by angle $\theta$ ($\text{rad}$).
- scaled_
hypot3 - Overflow- and underflow-safe 3D Euclidean norm $\sqrt{x^2 + y^2 + z^2}$.
- vacuum_
or_ homogeneous_ propagation_ delay_ s - Compute geometric propagation time $\Delta t = \frac{n \cdot d}{c_0}$ in a homogeneous medium.
- verify_
jones_ to_ mueller_ equivalence - Verify that a candidate $4\times 4$ Mueller matrix agrees with the exact Jones-to-Mueller transformation $\mathbf{M}(\mathbf{J}) = \mathbf{A}(\mathbf{J} \otimes \mathbf{J}^*)\mathbf{A}^{-1}$ within the C02 closed-form budget $64 \cdot 2^{-52} Q$.
- verify_
mueller_ realizability - Verify physical realizability and passivity of a $4\times 4$ Mueller matrix (C02 Mode 4).
- verify_
stokes_ realizability - Verify physical Stokes realizability per C02 Mode 1. Never clamps or modifies input components.