| 3217 | } |
| 3218 | |
| 3219 | void validate_controlsAndPauliStrTargets(Qureg qureg, int* ctrls, int numCtrls, PauliStr str, const char* caller) { |
| 3220 | |
| 3221 | // validate targets and controls in isolation |
| 3222 | validate_pauliStrTargets(qureg, str, caller); |
| 3223 | validate_controls(qureg, ctrls, numCtrls, caller); |
| 3224 | |
| 3225 | // validate that they do not overlap (i.e. str has only I at ctrls, never X Y Z) |
| 3226 | const int I = 0; |
| 3227 | for (int n=0; n<numCtrls; n++) |
| 3228 | assertThat(paulis_getPauliAt(str, ctrls[n]) == I, report::PAULI_STR_OVERLAPS_CONTROLS, caller); |
| 3229 | } |
| 3230 | |
| 3231 | void validate_controlAndPauliStrTargets(Qureg qureg, int ctrl, PauliStr str, const char* caller) { |
| 3232 |
no test coverage detected