| 3845 | } |
| 3846 | |
| 3847 | void validate_lindbladDampingRates(qreal* damps, int numJumps, const char* caller) { |
| 3848 | |
| 3849 | // possibly repeated from jump op validation, for safety |
| 3850 | assertThat(numJumps >= 0, report::NEGATIVE_NUM_LINDBLAD_JUMP_OPS, caller); |
| 3851 | |
| 3852 | if (isNumericalValidationDisabled()) |
| 3853 | return; |
| 3854 | |
| 3855 | // in lieu of asserting positivity, we somewhat unusually permit small negative |
| 3856 | // damping rates just for consistency with other numerical validation tolerances |
| 3857 | for (int n=0; n<numJumps; n++) |
| 3858 | assertThat(damps[n] >= - global_validationEpsilon, report::NEGATIVE_LINDBLAD_DAMPING_RATE, caller); |
| 3859 | } |
| 3860 | |
| 3861 | void validate_numLindbladSuperPropagatorTerms(qindex numSuperTerms, const char* caller) { |
| 3862 |
no test coverage detected