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

Function getProjector

tests/utils/linalg.cpp:400–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398
399
400qmatrix getProjector(int outcome) {
401 DEMAND( outcome == 0 || outcome == 1 );
402
403 qmatrix out = getZeroMatrix(2);
404 out[outcome][outcome] = 1.;
405 return out;
406}
407
408
409qmatrix getProjector(vector<int> targets, vector<int> outcomes, int numQubits) {

Callers 2

getRefProbInnerFunction · 0.85
SECTIONFunction · 0.85

Calls 3

getZeroMatrixFunction · 0.70
getIdentityMatrixFunction · 0.70
getKroneckerProductFunction · 0.70

Tested by

no test coverage detected