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

Function getDiagonals

tests/utils/qmatrix.cpp:246–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244 */
245
246qvector getDiagonals(qmatrix m) {
247 DEMAND( m.size() > 1 );
248
249 qvector out = getZeroVector(m.size());
250
251 for (size_t i=0; i<out.size(); i++)
252 out[i] = m[i][i];
253
254 return out;
255}

Callers 5

SECTIONFunction · 0.85

Calls 1

getZeroVectorFunction · 0.85

Tested by

no test coverage detected