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

Function getSuperOperator

tests/utils/linalg.cpp:484–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482
483
484qmatrix getSuperOperator(vector<qmatrix> matrices) {
485 DEMAND( matrices.size() > 0 );
486
487 size_t dim = matrices[0].size();
488
489 // out = sum_m conj(m) (x) m
490 qmatrix out = getZeroMatrix(dim * dim);
491 for (auto& matr : matrices)
492 out += getKroneckerProduct(getConjugate(matr), matr);
493
494 return out;
495}
496
497
498

Callers 2

SECTIONFunction · 0.85
SECTIONFunction · 0.85

Calls 3

getConjugateFunction · 0.85
getZeroMatrixFunction · 0.70
getKroneckerProductFunction · 0.70

Tested by

no test coverage detected