Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuEST-Kit/QuEST
/ setToRandomState
Function
setToRandomState
tests/utils/random.cpp:334–336 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
332
333
334
void setToRandomState(qvector& state) {
335
state = getRandomStateVector(getLog2(state.size()));
336
}
337
void setToRandomState(qmatrix& state) {
338
state = getRandomDensityMatrix(getLog2(state.size()));
339
}
Callers
5
SECTION
Function · 0.85
TEST_ON_MIXED_CACHED_QUREGS
Function · 0.85
DYNAMIC_SECTION
Function · 0.85
TEST_ON_MIXED_CACHED_QUREGS
Function · 0.85
TEST_ON_CACHED_QUREG_AND_MATRIX
Function · 0.85
Calls
3
getLog2
Function · 0.85
getRandomStateVector
Function · 0.70
getRandomDensityMatrix
Function · 0.70
Tested by
no test coverage detected