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

Function cpu_statevec_initDebugState_sub

quest/src/cpu/cpu_subroutines.cpp:2461–2473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2459
2460
2461void cpu_statevec_initDebugState_sub(Qureg qureg) {
2462
2463 // overwrite all local amps
2464 qindex numIts = qureg.numAmpsPerNode;
2465
2466 #pragma omp parallel for if(qureg.isMultithreaded)
2467 for (qindex n=0; n<numIts; n++) {
2468
2469 // i = global index of nth local amp
2470 qindex i = concatenateBits(qureg.rank, n, qureg.logNumAmpsPerNode);
2471 qureg.cpuAmps[n] = qcomp(2*i/10., (2*i+1)/10.);
2472 }
2473}
2474
2475
2476void cpu_statevec_initUnnormalisedUniformlyRandomPureStateAmps_sub(Qureg qureg) {

Callers 1

Calls 1

concatenateBitsFunction · 0.85

Tested by

no test coverage detected