scqubits.core.units.units_scale_factor#

scqubits.core.units.units_scale_factor(units=None)[source]#

The units_scale_factor function returns a numerical scaling factor that converts from Hz to the units given as a string argument. If no argument is given, the current units stored in _current_units are used. If the units are not supported, a ValueError is raised.

Parameters:

units (Optional[str]) – units to convert to (optional; if none given, default to _current_units)

Return type:

float

Returns:

A numerical scaling factor that converts from Hz to units or _current_units.