Function mixKrausMap

Source
pub unsafe extern "C" fn mixKrausMap(
    qureg: Qureg,
    target: c_int,
    ops: *mut ComplexMatrix2,
    numOps: c_int,
)
Expand description

Apply a general single-qubit Kraus map to a density matrix, as specified by at most four Kraus operators, \f$K_i\f$ (\p ops). A Kraus map is also referred to as a “operator-sum representation” of a quantum channel, and enables the simulation of general single-qubit noise process, by effecting \f[ \rho \to \sum\limits_i^{\text{numOps}} K_i \rho K_i^\dagger \f]

The Kraus map must be completely positive and trace preserving, which constrains each \f$ K_i \f$ in \p ops by \f[ \sum \limits_i^{\text{numOps}} K_i^\dagger K_i = I \f] where \f$ I \f$ is the identity matrix. Use mixNonTPKrausMap() to relax this condition.

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
  • mixNonTPKrausMap()
  • mixTwoQubitKrausMap()
  • mixMultiQubitKrausMap()
  • mixDephasing()
  • mixDepolarising()
  • mixDamping()
  • mixPauli()
  • mixDensityMatrix()

@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 \p ops do not create a completely positive, trace preserving map
  • if a node cannot fit 4 amplitudes in distributed mode @author Balint Koczor @author Tyson Jones (refactored, doc)