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

Function getSpoofedCompMatrFromSuperOp

quest/src/core/localiser.cpp:1672–1692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1670
1671
1672CompMatr 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
1695void localiser_densmatr_superoperator(Qureg qureg, SuperOp op, vector<int> ketTargs) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected