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

Function setSubMatrix

tests/deprecated/test_utilities.cpp:335–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335void setSubMatrix(QMatrix &dest, QMatrix sub, size_t r, size_t c) {
336 DEMAND( sub.size() + r <= dest.size() );
337 DEMAND( sub.size() + c <= dest.size() );
338 for (size_t i=0; i<sub.size(); i++)
339 for (size_t j=0; j<sub.size(); j++)
340 dest[r+i][c+j] = sub[i][j];
341}
342
343QMatrix getSwapMatrix(int qb1, int qb2, int numQb) {
344 DEMAND( numQb > 1 );

Callers 2

getSwapMatrixFunction · 0.70
getFullOperatorMatrixFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected