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

Function setAndSyncKrausMapElems

quest/src/api/channels.cpp:298–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296// type T can be qcomp*** or vector<vector<vector<qcomp>>>
297template <typename T>
298void setAndSyncKrausMapElems(KrausMap map, T matrices) {
299
300 // copy over the given matrices into the map's CPU mmemory
301 for (int n=0; n<map.numMatrices; n++)
302 cpu_copyMatrix(map.matrices[n], matrices[n], map.numRows);
303
304 // update the superoperator, including its GPU memory, and its isApproxCPTP flag
305 syncKrausMap(map);
306}
307
308
309extern "C" void setKrausMap(KrausMap map, qcomp*** matrices) {

Callers 3

setKrausMapFunction · 0.85
setInlineKrausMapFunction · 0.85
createInlineKrausMapFunction · 0.85

Calls 2

cpu_copyMatrixFunction · 0.85
syncKrausMapFunction · 0.85

Tested by

no test coverage detected