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

Function applyFullStateDiagMatrPower

quest/src/api/operations.cpp:467–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467void applyFullStateDiagMatrPower(Qureg qureg, FullStateDiagMatr matrix, qcomp exponent) {
468 validate_quregFields(qureg, __func__);
469 validate_matrixFields(matrix, __func__);
470 validate_matrixAndQuregAreCompatible(matrix, qureg, false, __func__);
471 validate_matrixIsUnitary(matrix, __func__);
472 validate_unitaryExponentIsReal(exponent, __func__);
473 validate_matrixExpIsNonDiverging(matrix, exponent, __func__);
474
475 // rho -> matrix^exponent rho conj(matrix^exponent)
476 bool leftMultiply = true;
477 bool rightMultiply = true;
478 bool rightConj = true;
479
480 (qureg.isDensityMatrix)?
481 localiser_densmatr_allTargDiagMatr(qureg, matrix, exponent, leftMultiply, rightMultiply, rightConj):
482 localiser_statevec_allTargDiagMatr(qureg, matrix, exponent);
483}
484
485} // end de-mangler
486

Callers 2

SECTIONFunction · 0.85
applyFullStateDiagMatrFunction · 0.85

Tested by

no test coverage detected