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

Function validate_controlsAndTargets

quest/src/core/validation.cpp:3635–3643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3633}
3634
3635void validate_controlsAndTargets(Qureg qureg, int* ctrls, int numCtrls, int* targs, int numTargs, const char* caller) {
3636
3637 // validate controls and targets in isolation
3638 validate_targets(qureg, targs, numTargs, caller);
3639 validate_controls(qureg, ctrls, numCtrls, caller);
3640
3641 // validate that they do not intersect
3642 assertThat(areQubitsDisjoint(ctrls, numCtrls, targs, numTargs), report::CONTROLS_OVERLAP_TARGETS, caller);
3643}
3644void validate_controlAndTarget(Qureg qureg, int ctrl, int targ, const char* caller) {
3645
3646 validate_controlsAndTargets(qureg, &ctrl, 1, &targ, 1, caller);

Calls 4

validate_targetsFunction · 0.85
validate_controlsFunction · 0.85
assertThatFunction · 0.85
areQubitsDisjointFunction · 0.85

Tested by

no test coverage detected