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

Function getInnerProduct

tests/utils/linalg.cpp:208–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206
207
208qcomp getInnerProduct(qvector bra, qvector ket) {
209 DEMAND( bra.size() == ket.size() );
210
211 qcomp out = 0;
212
213 for (size_t i=0; i<bra.size(); i++)
214 out += std::conj(bra[i]) * ket[i];
215
216 return out;
217}
218
219
220qmatrix getOuterProduct(qvector ket, qvector bra) {

Callers 5

getRandomUnitaryFunction · 0.85
getOrthonormalisedRowsFunction · 0.85
SECTIONFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected