pub unsafe extern "C" fn mixNonTPKrausMap(
qureg: Qureg,
target: c_int,
ops: *mut ComplexMatrix2,
numOps: c_int,
)Expand description
Apply a general non-trace-preserving single-qubit Kraus map to a density matrix, as specified by at most four operators, \f$K_i\f$ (\p ops). This effects \f[ \rho \to \sum\limits_i^{\text{numOps}} K_i \rho K_i^\dagger \f] where \f$K_i\f$ are permitted to be any matrix. This means the density matrix can enter a non-physical state.
Use mixKrausMap() to enforce that the channel is trace preserving and completely positive.
Note that in distributed mode, this routine requires that each node contains at least 4 amplitudes. This means an q-qubit register can be distributed by at most 2^(q-2) numTargs nodes.
@see
- ::ComplexMatrix2
- mixKrausMap()
- mixNonTPTwoQubitKrausMap()
- mixNonTPMultiQubitKrausMap()
@ingroup decoherence @param[in,out] qureg the density matrix to which to apply the map @param[in] target the target qubit of the map @param[in] ops an array of at most 4 Kraus operators @param[in] numOps the number of operators in \p ops which must be >0 and <= 4. @throws invalidQuESTInputError()
- if \p qureg is not a density matrix
- if \p target is outside of [0, \p qureg.numQubitsRepresented)
- if \p numOps is outside [1, 4]
- if a node cannot fit 4 amplitudes in distributed mode @author Tyson Jones @author Balint Koczor (backend code)