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

Function TEST_ON_CACHED_QUREGS

tests/unit/operations.cpp:142–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140 */
141
142void TEST_ON_CACHED_QUREGS(quregCache quregs, auto& reference, auto& function) {
143
144 for (auto& [label, qureg]: quregs) {
145
146 DYNAMIC_SECTION( label ) {
147
148 // no need to validate whether qureg successfully
149 // enters the debug state here, because the below
150 // serial setToDebugState() is guaranteed to succeed
151 initDebugState(qureg);
152 setToDebugState(reference);
153
154 function(qureg, reference);
155 REQUIRE_AGREE( qureg, reference );
156 }
157 }
158}
159
160void TEST_ON_CACHED_QUREG_AND_MATRIX(quregCache quregs, matrixCache matrices, auto apiFunc, auto refState, auto refMatr, auto refFunc) {
161

Callers 1

SECTIONFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected