MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / validate_purifiedDistanceIsNormalised

Function validate_purifiedDistanceIsNormalised

quest/src/core/validation.cpp:4191–4201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4189}
4190
4191void validate_purifiedDistanceIsNormalised(qcomp fid, const char* caller) {
4192
4193 if (isNumericalValidationDisabled())
4194 return;
4195
4196 /// @todo include scalars in error message when non-integers are supported
4197
4198 qreal eps = REDUCTION_EPSILON_FACTOR * global_validationEpsilon;
4199 assertThat(util_isApproxReal(fid, eps), report::CALC_PURIFIED_DISTANCE_NOT_APPROX_REAL, caller);
4200 assertThat(std::real(fid) <= 1 + eps, report::CALC_PURIFIED_DISTANCE_REAL_EXCEEDED_ONE, caller);
4201}
4202
4203
4204

Callers 1

calcDistanceFunction · 0.85

Calls 3

assertThatFunction · 0.85
util_isApproxRealFunction · 0.85

Tested by

no test coverage detected