| 3413 | */ |
| 3414 | |
| 3415 | void validate_basisStateIndex(Qureg qureg, qindex ind, const char* caller) { |
| 3416 | |
| 3417 | qindex maxIndExcl = powerOf2(qureg.numQubits); |
| 3418 | |
| 3419 | tokenSubs vars = { |
| 3420 | {"${STATE_IND}", ind}, |
| 3421 | {"${NUM_QB}", qureg.numQubits}, |
| 3422 | {"${NUM_STATES}", maxIndExcl}}; |
| 3423 | |
| 3424 | assertThat(ind >= 0 && ind < maxIndExcl, report::INVALID_BASIS_STATE_INDEX, vars, caller); |
| 3425 | } |
| 3426 | |
| 3427 | void validate_basisStateRowCol(Qureg qureg, qindex row, qindex col, const char* caller) { |
| 3428 |
no test coverage detected