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

Function validate_controls

quest/src/core/validation.cpp:3624–3633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3622}
3623
3624void validate_controls(Qureg qureg, int* ctrls, int numCtrls, const char* caller) {
3625
3626 // it is fine to have zero controls
3627 bool numCanBeZero = true;
3628
3629 assertValidQubits(
3630 qureg, ctrls, numCtrls, numCanBeZero, caller,
3631 report::NEGATIVE_NUM_CONTROLS, report::NUM_CONTROLS_EXCEEDS_QUREG_SIZE, report::NON_EMPTY_CONTROL_LIST_WAS_NULL_PTR,
3632 report::INVALID_CONTROL_QUBIT, report::DUPLICATE_CONTROL_QUBITS);
3633}
3634
3635void validate_controlsAndTargets(Qureg qureg, int* ctrls, int numCtrls, int* targs, int numTargs, const char* caller) {
3636

Calls 1

assertValidQubitsFunction · 0.85

Tested by

no test coverage detected