scqubits.core.circuit_input.convert_value_to_GHz

scqubits.core.circuit_input.convert_value_to_GHz(val, units)[source]

Converts a given value and units to energy in GHz. The units are given in a string in the format “pU” where p is an optional multiplier prefix and U is units. For example: “pH”, “nA”, “fF”, “eV”.

Parameters:
  • (float) (val)

  • (str) (units)

Raises:

ValueError – If the unit is unknown.:

Returns:

float: Energy in GHz