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

Function getRandomPureDensityMatrix

tests/utils/random.cpp:326–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324
325
326qmatrix getRandomPureDensityMatrix(int numQb) {
327
328 qvector vec = getRandomStateVector(numQb);
329 qmatrix mat = getOuterProduct(vec, vec);
330 return mat;
331}
332
333
334void setToRandomState(qvector& state) {

Callers

nothing calls this directly

Calls 2

getOuterProductFunction · 0.85
getRandomStateVectorFunction · 0.70

Tested by

no test coverage detected