Apply a depolarizing channel
openfermion.utils.depolarizing_channel(
density_matrix, probability, target_qubit, transpose=False
)
Applies an amplitude damping channel with a given probability to the target
qubit in the density_matrix.
Args |
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.
|
Returns |
new_density_matrix
|
numpy.ndarray
Density matrix with the channel
applied.
|