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

Function validate_fidelityIsReal

quest/src/core/validation.cpp:4169–4178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4167}
4168
4169void 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
4180void validate_buresDistanceInnerProdIsNormalised(qreal mag, const char* caller) {
4181

Callers 1

calcFidelityFunction · 0.85

Calls 3

assertThatFunction · 0.85
util_isApproxRealFunction · 0.85

Tested by

no test coverage detected