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

Function getMixedDensityMatrix

tests/deprecated/test_utilities.cpp:780–790  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780QMatrix getMixedDensityMatrix(vector<qreal> probs, vector<QVector> states) {
781 DEMAND( probs.size() == states.size() );
782 DEMAND( probs.size() >= 1 );
783
784 QMatrix matr = getZeroMatrix(states[0].size());
785
786 for (size_t i=0; i<probs.size(); i++)
787 matr += probs[i] * getPureDensityMatrix(states[i]);
788
789 return matr;
790}
791
792QVector getDFT(QVector in) {
793 REQUIRE( in.size() > 0 );

Callers 1

test_operators.cppFile · 0.85

Calls 2

getPureDensityMatrixFunction · 0.85
getZeroMatrixFunction · 0.70

Tested by

no test coverage detected