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

Function validate_targets

quest/src/core/validation.cpp:3608–3617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3606}
3607
3608void validate_targets(Qureg qureg, int* targets, int numTargets, const char* caller) {
3609
3610 // must always have at least 1 target
3611 bool numCanBeZero = false;
3612
3613 assertValidQubits(
3614 qureg, targets, numTargets, numCanBeZero, caller,
3615 report::NEGATIVE_OR_ZERO_NUM_TARGETS, report::NUM_TARGETS_EXCEEDS_QUREG_SIZE, report::TARGET_LIST_WAS_NULL_PTR,
3616 report::INVALID_TARGET_QUBIT, report::DUPLICATE_TARGET_QUBITS);
3617}
3618void validate_twoTargets(Qureg qureg, int target1, int target2, const char* caller) {
3619
3620 int targs[] = {target1, target2};

Callers 15

validate_twoTargetsFunction · 0.85
applyDiagMatrPowerFunction · 0.85
applyPhaseGadgetFunction · 0.85
applyMultiQubitPhaseFlipFunction · 0.85
applyMultiQubitNotFunction · 0.85
applyMultiQubitProjectorFunction · 0.85

Calls 1

assertValidQubitsFunction · 0.85

Tested by

no test coverage detected