| 373 | |
| 374 | |
| 375 | SuperOp 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 |
no test coverage detected