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

Function initRandomPureState

quest/src/api/initialisations.cpp:117–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116
117void initRandomPureState(Qureg qureg) {
118 validate_quregFields(qureg, __func__);
119
120 // these invoked localiser functions may harmlessly
121 // re-call the API and re-perform input validation
122
123 if (qureg.isDensityMatrix)
124 localiser_densmatr_initUniformlyRandomPureStateAmps(qureg);
125 else {
126 localiser_statevec_initUnnormalisedUniformlyRandomPureStateAmps(qureg);
127 setQuregToRenormalized(qureg);
128 }
129}
130
131
132void initRandomMixedState(Qureg qureg, qindex numPureStates) {

Callers 7

SECTIONFunction · 0.85
DYNAMIC_SECTIONFunction · 0.85
SECTIONFunction · 0.85
mainFunction · 0.85

Tested by

no test coverage detected