| 247 | extern "C" { |
| 248 | |
| 249 | void leftapplyDiagMatrPower(Qureg qureg, int* targets, int numTargets, DiagMatr matrix, qcomp exponent) { |
| 250 | validate_quregFields(qureg, __func__); |
| 251 | validate_targets(qureg, targets, numTargets, __func__); |
| 252 | validate_matrixDimMatchesTargets(matrix, numTargets, __func__); // also validates fields and is-sync, but not unitarity |
| 253 | validate_matrixExpIsNonDiverging(matrix, exponent, __func__); // harmlessly re-validates fields and is-sync |
| 254 | |
| 255 | bool conj = false; |
| 256 | auto qubits = util_getVector(targets, numTargets); |
| 257 | localiser_statevec_anyCtrlAnyTargDiagMatr(qureg, {}, {}, qubits, matrix, exponent, conj); |
| 258 | } |
| 259 | |
| 260 | void rightapplyDiagMatrPower(Qureg qureg, int* targets, int numTargets, DiagMatr matrix, qcomp exponent) { |
| 261 | validate_quregFields(qureg, __func__); |
nothing calls this directly
no test coverage detected