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

Function validate_controlsAndPauliStrTargets

quest/src/core/validation.cpp:3219–3229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3217}
3218
3219void 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
3231void validate_controlAndPauliStrTargets(Qureg qureg, int ctrl, PauliStr str, const char* caller) {
3232

Calls 4

validate_pauliStrTargetsFunction · 0.85
validate_controlsFunction · 0.85
assertThatFunction · 0.85
paulis_getPauliAtFunction · 0.85

Tested by

no test coverage detected