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

Function getControlledMatrix

tests/utils/linalg.cpp:451–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449
450
451qmatrix getControlledMatrix(qmatrix matrix, int numCtrls) {
452
453 size_t dim = getPow2(numCtrls) * matrix.size();
454 size_t off = dim - matrix.size();
455
456 qmatrix out = getIdentityMatrix(dim);
457 setSubMatrix(out, matrix, off, off);
458
459 return out;
460}
461
462
463qmatrix getMixture(vector<qmatrix> densmatrs, vector<qreal> probs) {

Callers 2

getFullStateOperatorFunction · 0.85
operations.cppFile · 0.85

Calls 3

getPow2Function · 0.85
getIdentityMatrixFunction · 0.70
setSubMatrixFunction · 0.70

Tested by

no test coverage detected