| 1670 | |
| 1671 | |
| 1672 | CompMatr getSpoofedCompMatrFromSuperOp(SuperOp op) { |
| 1673 | |
| 1674 | // prepare output CompMatr (avoiding C++20 designated initialiser) |
| 1675 | CompMatr out; |
| 1676 | |
| 1677 | // superoperator acts on twice as many qubits |
| 1678 | out.numQubits = 2 * op.numQubits; |
| 1679 | out.numRows = op.numRows; |
| 1680 | |
| 1681 | // heap fields are not consulted |
| 1682 | out.isApproxUnitary = nullptr; |
| 1683 | out.isApproxHermitian = nullptr; |
| 1684 | out.wasGpuSynced = nullptr; |
| 1685 | |
| 1686 | // copy pointers (noting cpuElems is 2D/nested) |
| 1687 | out.cpuElems = op.cpuElems; |
| 1688 | out.cpuElemsFlat = op.cpuElemsFlat; |
| 1689 | out.gpuElemsFlat = op.gpuElemsFlat; |
| 1690 | |
| 1691 | return out; |
| 1692 | } |
| 1693 | |
| 1694 | |
| 1695 | void localiser_densmatr_superoperator(Qureg qureg, SuperOp op, vector<int> ketTargs) { |
no outgoing calls
no test coverage detected