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

Function leftapplyFullStateDiagMatrPower

quest/src/api/multiplication.cpp:300–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300void leftapplyFullStateDiagMatrPower(Qureg qureg, FullStateDiagMatr matrix, qcomp exponent) {
301 validate_quregFields(qureg, __func__);
302 validate_matrixFields(matrix, __func__);
303 validate_matrixAndQuregAreCompatible(matrix, qureg, false, __func__); // matrix can be non-unitary
304 validate_matrixExpIsNonDiverging(matrix, exponent, __func__);
305
306 // rho -> matrix^exponent rho
307 bool leftMultiply = true;
308 bool rightMultiply = false;
309 bool rightConj = false;
310
311 (qureg.isDensityMatrix)?
312 localiser_densmatr_allTargDiagMatr(qureg, matrix, exponent, leftMultiply, rightMultiply, rightConj):
313 localiser_statevec_allTargDiagMatr(qureg, matrix, exponent);
314}
315
316void rightapplyFullStateDiagMatr(Qureg qureg, FullStateDiagMatr matrix) {
317 validate_quregFields(qureg, __func__);

Callers 2

SECTIONFunction · 0.85

Tested by

no test coverage detected