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

Function leftapplyDiagMatrPower

quest/src/api/multiplication.cpp:249–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247extern "C" {
248
249void 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
260void rightapplyDiagMatrPower(Qureg qureg, int* targets, int numTargets, DiagMatr matrix, qcomp exponent) {
261 validate_quregFields(qureg, __func__);

Callers

nothing calls this directly

Tested by

no test coverage detected