MCPcopy 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
334void setToRandomState(qvector& state) {
335 state = getRandomStateVector(getLog2(state.size()));
336}
337void setToRandomState(qmatrix& state) {
338 state = getRandomDensityMatrix(getLog2(state.size()));
339}

Callers 5

SECTIONFunction · 0.85
DYNAMIC_SECTIONFunction · 0.85

Calls 3

getLog2Function · 0.85
getRandomStateVectorFunction · 0.70
getRandomDensityMatrixFunction · 0.70

Tested by

no test coverage detected