| 115 | |
| 116 | |
| 117 | void 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 | |
| 132 | void initRandomMixedState(Qureg qureg, qindex numPureStates) { |
no test coverage detected