Function mixTwoQubitKrausMap

Source
pub unsafe extern "C" fn mixTwoQubitKrausMap(
    qureg: Qureg,
    target1: c_int,
    target2: c_int,
    ops: *mut ComplexMatrix4,
    numOps: c_int,
)
Expand description

Apply a general two-qubit Kraus map to a density matrix, as specified by at most sixteen Kraus operators. A Kraus map is also referred to as a “operator-sum representation” of a quantum channel. This allows one to simulate a general two-qubit noise process.

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 mixNonTPTwoQubitKrausMap() to relax this this condition.

\p targetQubit1 is treated as the \p least significant qubit in each op in \p ops.

Note that in distributed mode, this routine requires that each node contains at least 16 amplitudes. This means an q-qubit register can be distributed by at most 2^(q-4) numTargs nodes.

@see

  • ::ComplexMatrix4
  • mixNonTPTwoQubitKrausMap()
  • mixMultiQubitKrausMap()
  • mixKrausMap()

@ingroup decoherence @param[in,out] qureg the density matrix to which to apply the map @param[in] target1 the least significant target qubit in \p ops @param[in] target2 the most significant target qubit in \p ops @param[in] ops an array of at most 16 Kraus operators @param[in] numOps the number of operators in \p ops which must be >0 and <= 16. @throws invalidQuESTInputError()

  • if \p qureg is not a density matrix
  • if either \p target1 or \p target2 is outside of [0, \p qureg.numQubitsRepresented)
  • if \p target1 = \p target2
  • if \p numOps is outside [1, 16]
  • if \p ops do not create a completely positive, trace preserving map
  • if a node cannot fit 16 amplitudes in distributed mode @author Balint Koczor @author Tyson Jones (refactored, doc)