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

Function getMatrixInner

tests/utils/convert.cpp:118–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116
117template <typename T>
118qmatrix getMatrixInner(T m) {
119
120 qindex dim = (is_same_v<T, SuperOp>)?
121 getPow2(2*m.numQubits):
122 getPow2( m.numQubits);
123
124 qmatrix out = getZeroMatrix(dim);
125
126 for (size_t r=0; r<out.size(); r++)
127 for (size_t c=0; c<out.size(); c++)
128 out[r][c] = getElem<T>(m, r, c);
129
130 return out;
131}
132
133
134qmatrix getMatrix(CompMatr1 m) { return getMatrixInner(m); }

Callers 1

getMatrixFunction · 0.85

Calls 2

getPow2Function · 0.85
getZeroMatrixFunction · 0.70

Tested by

no test coverage detected