pub unsafe extern "C" fn mixTwoQubitDephasing(
qureg: Qureg,
qubit1: c_int,
qubit2: c_int,
prob: f64,
)Expand description
Mixes a density matrix \p qureg to induce two-qubit dephasing noise. With probability \p prob, applies Pauli Z to either or both qubits.
This transforms \p qureg = \f$\rho\f$ into the mixed state \f[ (1 - \text{prob}) , \rho + \frac{\text{prob}}{3} ; \left( Z_a , \rho , Z_a + Z_b , \rho , Z_b + Z_a Z_b , \rho , Z_a Z_b \right) \f] where a = \p qubit1, b = \p qubit2. \p prob cannot exceed 3/4, at which maximal mixing occurs.
@see
- mixDephasing()
@ingroup decoherence @param[in,out] qureg a density matrix @param[in] qubit1 qubit upon which to induce dephasing noise @param[in] qubit2 qubit upon which to induce dephasing noise @param[in] prob the probability of the phase error occuring @throws invalidQuESTInputError()
- if \p qureg is not a density matrix
- if either \p qubit1 or \p qubit2 is outside [0, \p qureg.numQubitsRepresented)
- if \p qubit1 = \p qubit2
- if \p prob is not in [0, 3/4] @author Tyson Jones (GPU, doc) @author Ania Brown (CPU, distributed)