| 4167 | } |
| 4168 | |
| 4169 | void validate_fidelityIsReal(qcomp fid, const char* caller) { |
| 4170 | |
| 4171 | if (isNumericalValidationDisabled()) |
| 4172 | return; |
| 4173 | |
| 4174 | /// @todo include imag(fid) in error message when non-integers are supported |
| 4175 | |
| 4176 | qreal eps = REDUCTION_EPSILON_FACTOR * global_validationEpsilon; |
| 4177 | assertThat(util_isApproxReal(fid, eps), report::CALC_FIDELITY_NOT_APPROX_REAL, caller); |
| 4178 | } |
| 4179 | |
| 4180 | void validate_buresDistanceInnerProdIsNormalised(qreal mag, const char* caller) { |
| 4181 |
no test coverage detected