code: def from_dict(d):
          
          return ISA(
              qubits=sorted([Qubit(id=int(qid),
                                   type=q.get("type", DEFAULT_QUBIT_TYPE),
                                   dead=q.get("dead", False))
                             for qid, q in d["1Q"].items()],
                            key=lambda qubit: qubit.id),
              edges=sorted([Edge(targets=[int(q) for q in eid.split('-')],
                                 type=e.get("type", DEFAULT_EDGE_TYPE),
                                 dead=e.get("dead", False))
                            for eid, e in d["2Q"].items()],
                           key=lambda edge: edge.targets),
          )
docs: Re-create the ISA from a dictionary representation.
  
          :param Dict[str,Any] d: The dictionary representation.
          :return: The restored ISA.
          :rtype: ISA