qbraid_core.services.storage.convert_to_gb

qbraid_core.services.storage.convert_to_gb(size, unit)

Converts a size in a given unit to GB.

Parameters:
  • size (Decimal) – The size value to convert.

  • unit (Unit) – The unit of the size.

Return type:

Decimal

Returns:

The size in GB.

Raises:

ValueError – If the unit is not recognized.