qat.model.convert_purr module

convert_purr_echo_hw_to_pydantic(legacy_hw, seed_uuid=True)

Converts a PuRR QuantumHardwareModel into a PhysicalHardwareModel.

Parameters:
  • legacy_hw (QuantumHardwareModel) – The PuRR QuantumHardwareModel to convert.

  • seed_uuid (bool) – Whether to seed the UUID generation for pulse channels that don’t exist in the PuRR model. Defaults to True so conversions generate deterministic UUIDs across runs; set to False to use unseeded UUID generation instead.

Return type:

PhysicalHardwareModel

get_number_from_string(s)

Returns the first number found in a string, or None if no number is found.

Used to extract the index from IDs.

Return type:

int | None