| 1099 | } |
| 1100 | |
| 1101 | void applyMultiStateControlledRotateY(Qureg qureg, int* controls, int* states, int numControls, int target, qreal angle) { |
| 1102 | validate_quregFields(qureg, __func__); |
| 1103 | validate_controlsAndTarget(qureg, controls, numControls, target, __func__); |
| 1104 | validate_controlStates(states, numControls, __func__); // permits states==nullptr |
| 1105 | |
| 1106 | // note that for the single-target scenario, we do not call the backend of |
| 1107 | // applyMultiStateControlledPauliGadget() since it contains sub-optimal logic |
| 1108 | // which sees the factor of every amplitude dynamically evaluated (based on |
| 1109 | // index parity, etc); the dense-matrix element lookup is faster |
| 1110 | |
| 1111 | // harmlessly re-validates, including hardcoded matrix unitarity |
| 1112 | CompMatr1 matrix = util_getExpPauliY(angle); |
| 1113 | validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, states, numControls, &target, 1, matrix, __func__); |
| 1114 | } |
| 1115 | |
| 1116 | void applyMultiStateControlledRotateZ(Qureg qureg, int* controls, int* states, int numControls, int target, qreal angle) { |
| 1117 | validate_quregFields(qureg, __func__); |
no test coverage detected