Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuEST-Kit/QuEST
/ getRandomDiagonalMatrix
Function
getRandomDiagonalMatrix
tests/utils/random.cpp:279–287 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
277
278
279
qmatrix getRandomDiagonalMatrix(size_t dim) {
280
281
qmatrix out = getZeroMatrix(dim);
282
283
for (size_t i=0; i<dim; i++)
284
out[i][i] = getRandomComplex();
285
286
return out;
287
}
288
289
290
Callers
3
SECTION
Function · 0.85
SECTION
Function · 0.85
SECTION
Function · 0.85
Calls
2
getZeroMatrix
Function · 0.70
getRandomComplex
Function · 0.70
Tested by
no test coverage detected