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

Function validate_expecPauliStrSumValueIsReal

quest/src/core/validation.cpp:4249–4260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4247}
4248
4249void validate_expecPauliStrSumValueIsReal(qcomp value, bool isDensMatr, const char* caller) {
4250
4251 if (isNumericalValidationDisabled())
4252 return;
4253
4254 string msg = (isDensMatr)?
4255 report::CALC_DENSMATR_EXPECTED_PAULI_STR_SUM_VALUE_WAS_NOT_APPROX_REAL:
4256 report::CALC_STATEVEC_EXPECTED_PAULI_STR_SUM_VALUE_WAS_NOT_APPROX_REAL;
4257
4258 qreal eps = REDUCTION_EPSILON_FACTOR * global_validationEpsilon;
4259 assertThat(util_isApproxReal(value, eps), msg, caller);
4260}
4261
4262void validate_densMatrExpecDiagMatrValueIsReal(qcomp value, qcomp exponent, const char* caller) {
4263

Callers 1

calcExpecPauliStrSumFunction · 0.85

Calls 3

assertThatFunction · 0.85
util_isApproxRealFunction · 0.85

Tested by

no test coverage detected