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

Function populateMatrixQuadrants

quest/src/core/printer.cpp:996–1010  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

994
995
996void populateMatrixQuadrants(MatrixQuadrantInds inds, qcompmatr &ul, qcompmatr &ur, qcompmatr &ll, qcompmatr &lr, Qureg obj) {
997
998 // dense matrices can populate as many as 4 quadrants
999 if (obj.isDensityMatrix) {
1000 populateManyColumnQcompmatr(ul, inds.upperStartRow, inds.leftStartCol, obj);
1001 populateManyColumnQcompmatr(ur, inds.upperStartRow, inds.rightStartCol, obj);
1002 populateManyColumnQcompmatr(ll, inds.lowerStartRow, inds.leftStartCol, obj);
1003 populateManyColumnQcompmatr(lr, inds.lowerStartRow, inds.rightStartCol, obj);
1004
1005 // but vectors always become 1 or 2 quadrants (the left, as a potentially split column)
1006 } else {
1007 populateSingleColumnQcompmatr(ul, inds.upperStartRow, obj);
1008 populateSingleColumnQcompmatr(ll, inds.lowerStartRow, obj);
1009 }
1010}
1011
1012
1013// T can be all 1D and 2D types, i.e. CompMatr/1/2, DiagMatr1/2, FullStateDiagMatr, SuperOp,

Callers 3

printDenseSquareMatrixFunction · 0.85
printVectorFunction · 0.85
print_elemsFunction · 0.85

Calls 2

Tested by

no test coverage detected