| 237 | |
| 238 | |
| 239 | int mem_getEffectiveNumStateVecQubitsPerNode(int numQubits, bool isDensMatr, int numNodes) { |
| 240 | |
| 241 | // compute logs directly to avoid overflows (even though validation should preclude them) |
| 242 | qindex logNumAmpsTotal = ((isDensMatr)? 2 : 1) * numQubits; |
| 243 | qindex logNumAmpsPerNode = logNumAmpsTotal - logBase2(numNodes); |
| 244 | return logNumAmpsPerNode; |
| 245 | } |
| 246 | |
| 247 | |
| 248 | qindex mem_getTotalGlobalMemoryUsed(Qureg qureg) { |
no test coverage detected