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

Function assertValidNewPauliCodes

quest/src/core/validation.cpp:3147–3157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3145}
3146
3147void assertValidNewPauliCodes(int* paulis, int numPaulis, const char* caller) {
3148
3149 for (int i=0; i<numPaulis; i++) {
3150 int code = paulis[i];
3151
3152 assertThat(
3153 code>=0 && code<=3,
3154 report::NEW_PAULI_STR_INVALID_PAULI_CODE,
3155 {{"${BAD_CODE}", code}, {"${CODE_IND}", i}}, caller);
3156 }
3157}
3158
3159void assertValidNewPauliIndices(int* indices, int numInds, int maxIndExcl, const char* caller) {
3160

Callers 1

Calls 1

assertThatFunction · 0.85

Tested by

no test coverage detected