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

Function calcInnerProdOfSameDistribQuregs

quest/src/core/localiser.cpp:2219–2229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2217
2218
2219qcomp calcInnerProdOfSameDistribQuregs(Qureg quregA, Qureg quregB) {
2220
2221 // both are statevectors/density-matrices, and both are local/distributed
2222 qcomp prod = accel_statevec_calcInnerProduct_sub(quregA, quregB);
2223
2224 // unless quregs were cloned per-node, all nodes must sum their amp
2225 if (quregA.isDistributed)
2226 comm_reduceAmp(&prod);
2227
2228 return prod;
2229}
2230
2231
2232qcomp localiser_statevec_calcInnerProduct(Qureg quregA, Qureg quregB) {

Callers 1

Calls 2

comm_reduceAmpFunction · 0.85

Tested by

no test coverage detected