| 111 | TEST_CASE( "mixDephasing", TEST_CATEGORY ) { |
| 112 | |
| 113 | SECTION( LABEL_CORRECTNESS ) { |
| 114 | |
| 115 | int numQubits = getNumCachedQubits(); |
| 116 | int targ = GENERATE_COPY( range(0,numQubits) ); |
| 117 | qreal prob = getRandomReal(0, 1/2.); |
| 118 | |
| 119 | vector<qmatrix> kraus = { |
| 120 | std::sqrt(1-prob) * getPauliMatrix(0), |
| 121 | std::sqrt(prob) * getPauliMatrix(3) |
| 122 | }; |
| 123 | |
| 124 | auto apiFunc = [&](Qureg qureg) { mixDephasing(qureg, targ, prob); }; |
| 125 | |
| 126 | CAPTURE( targ, prob ); |
| 127 | SECTION( LABEL_DENSMATR ) { TEST_ON_CACHED_QUREGS(apiFunc, {targ}, kraus); } |
| 128 | } |
| 129 | |
| 130 | /// @todo input validation |
| 131 | } |
nothing calls this directly
no test coverage detected