def from_dict(d):
        """
        Re-create the noise model from a dictionary representation.

        :param Dict[str,Any] d: The dictionary representation.
        :return: The restored noise model.
        :rtype: NoiseModel
        """
        return NoiseModel(
            gates=[KrausModel.from_dict(t) for t in d["gates"]],
            assignment_probs={int(qid): np.array(a) for qid, a in d["assignment_probs"].items()},
        )
def from_dict ( d ) : return NoiseModel ( gates = [ KrausModel . from_dict ( t ) for t in d [ "gates" ] ] , assignment_probs = { int ( qid ) : np . array ( a ) for qid , a in d [ "assignment_probs" ] . items ( ) } , )
Re-create the noise model from a dictionary representation.

        :param Dict[str,Any] d: The dictionary representation.
        :return: The restored noise model.
        :rtype: NoiseModel