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

Function validate_measurementOutcomesAreValid

quest/src/core/validation.cpp:3698–3706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3696}
3697
3698void validate_measurementOutcomesAreValid(int* outcomes, int numOutcomes, const char* caller) {
3699
3700 // no need to validate numOutcomes; it is already validated by caller (e.g. through numTargets)
3701
3702 for (int i=0; i<numOutcomes; i++)
3703 assertThat(
3704 outcomes[i] == 0 || outcomes[i]== 1, report::MANY_QUBIT_MEASUREMENTS_OUTCOME_INVALID,
3705 {{"${INDEX}", i}, {"${OUTCOME}", outcomes[i]}}, caller);
3706}
3707
3708void validate_measurementOutcomeProbNotZero(int outcome, qreal prob, const char* caller) {
3709

Calls 1

assertThatFunction · 0.85

Tested by

no test coverage detected