MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / SECTION

Function SECTION

tests/unit/decoherence.cpp:113–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111TEST_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}

Callers

nothing calls this directly

Calls 15

getNumCachedQubitsFunction · 0.85
getPauliMatrixFunction · 0.85
mixDephasingFunction · 0.85
mixDepolarisingFunction · 0.85
mixDampingFunction · 0.85
mixPaulisFunction · 0.85
GENERATE_TARGSFunction · 0.85
mixTwoQubitDephasingFunction · 0.85
mixTwoQubitDepolarisingFunction · 0.85
createKrausMapFunction · 0.85
setKrausMapFunction · 0.85

Tested by

no test coverage detected