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

Function rightapplyDiagMatrPower

quest/src/api/multiplication.cpp:260–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void rightapplyDiagMatrPower(Qureg qureg, int* targets, int numTargets, DiagMatr matrix, qcomp exponent) {
261 validate_quregFields(qureg, __func__);
262 validate_quregIsDensityMatrix(qureg, __func__);
263 validate_targets(qureg, targets, numTargets, __func__);
264 validate_matrixDimMatchesTargets(matrix, numTargets, __func__); // also validates fields and is-sync, but not unitarity
265 validate_matrixExpIsNonDiverging(matrix, exponent, __func__); // harmlessly re-validates fields and is-sync
266
267 bool conj = false;
268 auto qubits = util_getBraQubits(util_getVector(targets, numTargets), qureg);
269 localiser_statevec_anyCtrlAnyTargDiagMatr(qureg, {}, {}, qubits, matrix, exponent, conj);
270}
271
272} // end de-mangler
273

Callers

nothing calls this directly

Calls 8

validate_quregFieldsFunction · 0.85
validate_targetsFunction · 0.85
util_getBraQubitsFunction · 0.85
util_getVectorFunction · 0.85

Tested by

no test coverage detected