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

Function validate_measurementOutcomesProbNotZero

quest/src/core/validation.cpp:3718–3727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3716}
3717
3718void validate_measurementOutcomesProbNotZero(int* outcomes, int numQubits, qreal prob, const char* caller) {
3719
3720 if (isNumericalValidationDisabled())
3721 return;
3722
3723 /// @todo report 'prob' and 'outcomes' (as binary sequence) once validation reporting can handle floats
3724 qindex outcomeValue = getIntegerFromBits(outcomes, numQubits);
3725
3726 assertThat(prob >= global_validationEpsilon, report::MANY_QUBIT_MEASUREMENT_OUTCOME_IMPOSSIBLY_UNLIKELY, {{"${OUTCOME_VALUE}", outcomeValue}}, caller);
3727}
3728
3729void validate_measurementOutcomesFitInGpuMem(Qureg qureg, int numQubits, const char* caller) {
3730

Callers 1

Calls 3

getIntegerFromBitsFunction · 0.85
assertThatFunction · 0.85

Tested by

no test coverage detected