diff --git a/pennylane_qiskit/converter.py b/pennylane_qiskit/converter.py index f5551165..77f86d74 100644 --- a/pennylane_qiskit/converter.py +++ b/pennylane_qiskit/converter.py @@ -1070,9 +1070,9 @@ def load_noise_model(noise_model, **kwargs) -> qml.NoiseModel: instead of the complete list of matrices. Default is ``True``. options (dict[str, Union[int, float]]): optional parameters related to tolerance and rounding: - - decimals (int): number of decimal places to round the Kraus matrices. Default is ``10``. - - atol (float): the relative tolerance parameter. Default value is ``1e-05``. - - rtol (float): the absolute tolernace parameters. Defualt value is ``1e-08``. + - **decimals** (*int*): number of decimal places to round the Kraus matrices. Default is ``10``. + - **atol** (*float*): the relative tolerance parameter. Default value is ``1e-05``. + - **rtol** (*float*): the absolute tolernace parameters. Defualt value is ``1e-08``. Returns: qml.NoiseModel: An equivalent noise model constructed in PennyLane diff --git a/pennylane_qiskit/noise_models.py b/pennylane_qiskit/noise_models.py index c6db2afe..4933b20e 100644 --- a/pennylane_qiskit/noise_models.py +++ b/pennylane_qiskit/noise_models.py @@ -249,10 +249,9 @@ def _process_depolarization(error_dict: dict, multi_pauli: bool = False) -> dict num_terms = 4**num_wires id_factor = num_terms / (num_terms - 1) prob_iden = error_dict["probs"][error_dict["data"].index(["I" * num_wires])] - param = id_factor * (1 - prob_iden) error_dict["name"] = "DepolarizingChannel" - error_dict["data"] = param / id_factor - error_dict["probs"] = param + error_dict["data"] = 1 - prob_iden + error_dict["probs"] = id_factor * (1 - prob_iden) return error_dict error_dict["name"] = "QubitChannel"