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

Function createInlineSuperOp

quest/src/api/channels.cpp:375–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373
374
375SuperOp createInlineSuperOp(int numQubits, vector<vector<qcomp>> matrix) {
376 validate_envIsInit(__func__);
377 validate_newSuperOpParams(numQubits, __func__);
378 validate_newInlineSuperOpDimMatchesVectors(numQubits, matrix, __func__);
379
380 // pre-validation gauranteed to pass, but malloc failures will trigger an error
381 // message specific to 'createSuperOp', rather than this 'inline' version. Alas!
382 SuperOp op = createSuperOp(numQubits);
383 setAndSyncSuperOpElems(op, matrix);
384 return op;
385}
386
387
388

Callers 2

SECTIONFunction · 0.85
demo_createInlineSuperOpFunction · 0.85

Calls 5

validate_envIsInitFunction · 0.85
createSuperOpFunction · 0.85
setAndSyncSuperOpElemsFunction · 0.85

Tested by

no test coverage detected