| 3157 | } |
| 3158 | |
| 3159 | void assertValidNewPauliIndices(int* indices, int numInds, int maxIndExcl, const char* caller) { |
| 3160 | |
| 3161 | // check each index is valid |
| 3162 | for (int i=0; i<numInds; i++) { |
| 3163 | int ind = indices[i]; |
| 3164 | assertThat( |
| 3165 | ind >= 0 && ind < maxIndExcl, report::NEW_PAULI_STR_INVALID_INDEX, |
| 3166 | {{"${BAD_IND}", ind}, {"${MAX_PAULIS}", maxIndExcl}}, caller); |
| 3167 | } |
| 3168 | |
| 3169 | // check no index is duplicated |
| 3170 | assertThat(isIndexListUnique(indices, numInds), report::NEW_PAULI_STR_DUPLICATED_INDEX, caller); |
| 3171 | } |
| 3172 | |
| 3173 | void validate_newPauliStrNumPaulis(int numPaulis, int maxNumPaulis, const char* caller) { |
| 3174 |
no test coverage detected