| 296 | // type T can be qcomp*** or vector<vector<vector<qcomp>>> |
| 297 | template <typename T> |
| 298 | void 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 | |
| 309 | extern "C" void setKrausMap(KrausMap map, qcomp*** matrices) { |
no test coverage detected