| 4017 | } |
| 4018 | |
| 4019 | void validate_quregsCanBeMixed(Qureg out, Qureg* in, int numIn, const char* caller) { |
| 4020 | |
| 4021 | // mixing in multiple quregs (done here) is much stricter than when |
| 4022 | // only one pair is being mixed in, which is handled below |
| 4023 | |
| 4024 | for (int i=0; i<numIn; i++) |
| 4025 | validate_quregFields(in[i], caller); |
| 4026 | |
| 4027 | for (int i=0; i<numIn; i++) |
| 4028 | assertThat(in[i].isDensityMatrix, report::MIXED_QUREGS_NOT_ALL_DENSITY_MATRICES, caller); |
| 4029 | |
| 4030 | bool valid = true; |
| 4031 | for (int i=0; i<numIn && valid; i++) |
| 4032 | valid = valid && doQuregsHaveIdenticalMemoryLayouts(out, in[i]); |
| 4033 | |
| 4034 | assertThat(valid, report::MIXED_QUREGS_HAVE_INCONSISTENT_MEM_LAYOUTS, caller); |
| 4035 | } |
| 4036 | |
| 4037 | void validate_quregPairCanBeMixed(Qureg quregOut, Qureg quregIn, const char* caller) { |
| 4038 |
no test coverage detected