Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
246
qvector 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
testDensityMatrixEvolution
Function · 0.85
TEST_ON_CACHED_QUREG_AND_MATRIX
Function · 0.85
getRandomOrIdentityApiMatrix
Function · 0.85
TEST_ON_CACHED_QUREG_AND_MATRIX
Function · 0.85
SECTION
Function · 0.85
Calls
1
getZeroVector
Function · 0.85
Tested by
no test coverage detected