pub fn quadratic_form(w: &Array1<C64>, r: &Array2<C64>) -> f64
wᴴ R w (real part; exact for Hermitian R).
wᴴ R w
R