| 2626 | } |
| 2627 | |
| 2628 | void assertSuperOpLocalMemDoesntExceedMaxSizeof(int numQubits, bool isInKrausMap, const char* caller) { |
| 2629 | |
| 2630 | int maxNumQubits = mem_getMaxNumSuperOpQubitsBeforeGlobalMemSizeofOverflow(); |
| 2631 | |
| 2632 | tokenSubs vars = { |
| 2633 | {"${NUM_QUBITS}", numQubits}, |
| 2634 | {"${MAX_QUBITS}", maxNumQubits}, |
| 2635 | {"${QCOMP_BYTES}", sizeof(qcomp)}}; |
| 2636 | |
| 2637 | auto msg = (isInKrausMap)? |
| 2638 | report::NEW_KRAUS_MAPS_SUPER_OP_MEM_WOULD_EXCEED_SIZEOF: |
| 2639 | report::NEW_SUPER_OP_MEM_WOULD_EXCEED_SIZEOF; |
| 2640 | assertThat(numQubits <= maxNumQubits, msg, vars, caller); |
| 2641 | } |
| 2642 | |
| 2643 | void assertSuperOpFitsInCpuMem(int numQubits, bool isInKrausMap, const char* caller) { |
| 2644 |
no test coverage detected