openfermion.utils.depolarizing_channel

Apply a depolarizing channel

Applies an amplitude damping channel with a given probability to the target qubit in the density_matrix.

density_matrix (numpy.ndarray): Density matrix of the system probability (float): Probability error is applied p \in [0, 1] target_qubit (int/str): target for the channel error, if given special value "all", then a total depolarizing channel is applied. transpose (bool): Dummy parameter to match signature of other channels but depolarizing channel is symmetric under conjugate transpose.

new_density_matrix (numpy.ndarray): Density matrix with the channel applied.