34 lines
821 B
Plaintext
34 lines
821 B
Plaintext
---
|
||
title: apply_prefix (v0.26)
|
||
description: API reference for qiskit.utils.apply_prefix in qiskit v0.26
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.utils.apply_prefix
|
||
---
|
||
|
||
<span id="qiskit-utils-apply-prefix" />
|
||
|
||
# qiskit.utils.apply\_prefix
|
||
|
||
<Function id="qiskit.utils.apply_prefix" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/utils/units.py" signature="apply_prefix(value, unit)">
|
||
Given a SI unit prefix and value, apply the prefix to convert to standard SI unit.
|
||
|
||
**Parameters**
|
||
|
||
* **value** (`float`) – The number to apply prefix to.
|
||
* **unit** (`str`) – String prefix.
|
||
|
||
**Return type**
|
||
|
||
`float`
|
||
|
||
**Returns**
|
||
|
||
Converted value.
|
||
|
||
**Raises**
|
||
|
||
**Exception** – If the units aren’t recognized.
|
||
</Function>
|
||
|