| 2217 | |
| 2218 | |
| 2219 | qcomp 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 | |
| 2232 | qcomp localiser_statevec_calcInnerProduct(Qureg quregA, Qureg quregB) { |
no test coverage detected