pub fn expectation( operator: &(impl LinearOperator + ?Sized), state: &[Complex64], ) -> Result<Complex64>