qiskit.utils.apply_prefix¶
- apply_prefix(value, unit)[소스]¶
Given a SI unit prefix and value, apply the prefix to convert to standard SI unit.
- 매개변수
value (
Union
[float
,ParameterExpression
]) – The number to apply prefix to.unit (
str
) – String prefix.
- 반환 형식
float
- 반환
Converted value.
참고
This may induce tiny value error due to internal representation of float object. See https://docs.python.org/3/tutorial/floatingpoint.html for details.
- 예외 발생
ValueError – If the
units
aren’t recognized.