| 1816 | |
| 1817 | template <int NumQubits> |
| 1818 | void gpu_statevec_multiQubitProjector_sub(Qureg qureg, vector<int> qubits, vector<int> outcomes, qreal prob) { |
| 1819 | |
| 1820 | // all qubits are in suffix |
| 1821 | assert_numTargsMatchesTemplateParam(qubits.size(), NumQubits); |
| 1822 | |
| 1823 | #if COMPILE_CUQUANTUM |
| 1824 | |
| 1825 | // cuQuantum disregards NumQubits template param |
| 1826 | cuquantum_statevec_multiQubitProjector_sub(qureg, qubits, outcomes, prob); |
| 1827 | |
| 1828 | #elif COMPILE_CUDA |
| 1829 | |
| 1830 | qreal renorm = 1 / std::sqrt(prob); |
| 1831 | thrust_statevec_multiQubitProjector_sub<NumQubits>(qureg, qubits, outcomes, renorm); |
| 1832 | |
| 1833 | #else |
| 1834 | error_gpuSimButGpuNotCompiled(); |
| 1835 | #endif |
| 1836 | } |
| 1837 | |
| 1838 | |
| 1839 | template <int NumQubits> |
nothing calls this directly
no test coverage detected