| 96 | |
| 97 | |
| 98 | int mem_getMaxNumQuregQubitsBeforeIndexOverflow(bool isDensityMatrix) { |
| 99 | |
| 100 | // cannot store more amplitudes than can be counted by the qindex type (even when distributed) |
| 101 | qindex maxNumAmps = std::numeric_limits<qindex>::max(); |
| 102 | int maxNumQubits = std::floor(std::log2(maxNumAmps) / static_cast<qreal>((isDensityMatrix)? 2 : 1)); |
| 103 | return maxNumQubits; |
| 104 | } |
| 105 | |
| 106 | int mem_getMaxNumMatrixQubitsBeforeIndexOverflow(bool isDenseMatrix) { |
| 107 |
no outgoing calls
no test coverage detected