| 1555 | extern "C" { |
| 1556 | |
| 1557 | void applyQubitProjector(Qureg qureg, int target, int outcome) { |
| 1558 | validate_quregFields(qureg, __func__); |
| 1559 | validate_target(qureg, target, __func__); |
| 1560 | validate_measurementOutcomeIsValid(outcome, __func__); |
| 1561 | |
| 1562 | qreal prob = 1; |
| 1563 | |
| 1564 | // density matrix has an optimised func in lieu of calling the statevector func twice |
| 1565 | (qureg.isDensityMatrix)? |
| 1566 | localiser_densmatr_multiQubitProjector(qureg, {target}, {outcome}, prob): |
| 1567 | localiser_statevec_multiQubitProjector(qureg, {target}, {outcome}, prob); |
| 1568 | } |
| 1569 | |
| 1570 | void applyMultiQubitProjector(Qureg qureg, int* qubits, int* outcomes, int numQubits) { |
| 1571 | validate_quregFields(qureg, __func__); |
no test coverage detected