deserialize_layout

pulser.abstract_repr.deserialize_layout(obj_str, matching_type=None)

Deserialize a layout from an abstract JSON object.

Parameters:
  • obj_str (str) – the JSON string representing the layout encoded in the abstract JSON format.

  • matching_type (Type[RegisterLayout] | None, default: None) – An optional specific RegisterLayout type that the deserialized layout must match. When omitted, no type check is performed.

Return type:

RegisterLayout

Returns:

The RegisterLayout instance.