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

Function validate_pauliStrTargets

quest/src/core/validation.cpp:3210–3217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3208 */
3209
3210void validate_pauliStrTargets(Qureg qureg, PauliStr str, const char* caller) {
3211
3212 // avoid producing a list of targets which requires enumerating all bits
3213 int maxTarg = paulis_getIndOfLefmostNonIdentityPauli(str);
3214
3215 tokenSubs vars = {{"${MAX_TARG}", maxTarg}, {"${QUREG_QUBITS}", qureg.numQubits}};
3216 assertThat(maxTarg < qureg.numQubits, report::PAULI_STR_TARGETS_EXCEED_QUREG, vars, caller);
3217}
3218
3219void validate_controlsAndPauliStrTargets(Qureg qureg, int* ctrls, int numCtrls, PauliStr str, const char* caller) {
3220

Callers 9

applyPauliStrFunction · 0.85
applyPauliGadgetFunction · 0.85
calcExpecPauliStrFunction · 0.85
leftapplyPauliStrFunction · 0.85
rightapplyPauliStrFunction · 0.85
leftapplyPauliGadgetFunction · 0.85
rightapplyPauliGadgetFunction · 0.85

Calls 2

assertThatFunction · 0.85

Tested by

no test coverage detected