pub fn cascade_mzi(phases: &[f64]) -> [f64; 8]
Cascade N MZI stages by multiplying transfer matrices.
Returns the final 2×2 complex matrix as 8 f64s.