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

Function rightapplyDiagMatr

quest/src/api/multiplication.cpp:217–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void rightapplyDiagMatr(Qureg qureg, int* targets, int numTargets, DiagMatr matrix) {
218 validate_quregFields(qureg, __func__);
219 validate_quregIsDensityMatrix(qureg, __func__);
220 validate_targets(qureg, targets, numTargets, __func__);
221 validate_matrixDimMatchesTargets(matrix, numTargets, __func__); // also validates fields and is-sync
222
223 bool conj = false;
224 qcomp exponent = 1;
225 auto qubits = util_getBraQubits(util_getVector(targets, numTargets), qureg);
226 localiser_statevec_anyCtrlAnyTargDiagMatr(qureg, {}, {}, qubits, matrix, exponent, conj);
227}
228
229} // end de-mangler
230

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected