117 lines
3.0 KiB
Plaintext
117 lines
3.0 KiB
Plaintext
---
|
||
title: Electron
|
||
description: API reference for api_example.Electron
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: api_example.Electron
|
||
---
|
||
|
||
# Electron
|
||
|
||
<Class id="api_example.Electron" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit_sphinx_theme/tree/stable/0.1/api_example/electron.py" signature="api_example.Electron(size=None, name=None)" modifiers="class">
|
||
Bases: `object`
|
||
|
||
A representation of an electron.
|
||
|
||
**Examples**
|
||
|
||
```python
|
||
from api_example import Electron
|
||
|
||
ELECTRON = Electron(size="2GB", name="QuantumComputing")
|
||
```
|
||
|
||
### size
|
||
|
||
<Attribute id="api_example.Electron.size">
|
||
How big the Electron is.
|
||
|
||
**Type**
|
||
|
||
str
|
||
</Attribute>
|
||
|
||
### name
|
||
|
||
<Attribute id="api_example.Electron.name">
|
||
What the Electron is called.
|
||
</Attribute>
|
||
|
||
Create an electron.
|
||
|
||
**Parameters**
|
||
|
||
* **size** (*str*) – How big should this thing be?
|
||
* **name** (*str*) – The name we’ll call the electron. Nicknames preferred.
|
||
|
||
**Raises**
|
||
|
||
**ValueError** – You did something wrong
|
||
|
||
## Attributes
|
||
|
||
### CLASS\_ATTRIBUTE
|
||
|
||
<Attribute id="api_example.Electron.CLASS_ATTRIBUTE" attributeValue="re.compile('abc')" />
|
||
|
||
### charge
|
||
|
||
<Attribute id="api_example.Electron.charge" />
|
||
|
||
### mass
|
||
|
||
<Attribute id="api_example.Electron.mass">
|
||
The mass of the electron.
|
||
</Attribute>
|
||
|
||
### really\_long\_named\_attribute\_that\_probably\_does\_not\_fit\_nicely
|
||
|
||
<Attribute id="api_example.Electron.really_long_named_attribute_that_probably_does_not_fit_nicely">
|
||
A bit too verbose if you ask me.
|
||
</Attribute>
|
||
|
||
## Methods
|
||
|
||
### compute\_momentum
|
||
|
||
<Function id="api_example.Electron.compute_momentum" signature="compute_momentum(velocity)">
|
||
Compute the electron’s velocity.
|
||
|
||
**Parameters**
|
||
|
||
**velocity** (*float*) – The electron’s velocity
|
||
|
||
**Returns**
|
||
|
||
The computed momentum.
|
||
|
||
**Raises**
|
||
|
||
**ValueError** – You did something wrong
|
||
|
||
**Return type**
|
||
|
||
float
|
||
</Function>
|
||
|
||
### method\_with\_a\_reallyyreallreallyreallyreallyreallyreallreallyreallyreallyreally\_long\_title
|
||
|
||
<Function id="api_example.Electron.method_with_a_reallyyreallreallyreallyreallyreallyreallreallyreallyreallyreally_long_title" signature="method_with_a_reallyyreallreallyreallyreallyreallyreallreallyreallyreallyreally_long_title()">
|
||
blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah
|
||
</Function>
|
||
|
||
### overloaded\_func
|
||
|
||
<Function id="api_example.Electron.overloaded_func" signature="overloaded_func(arg1: tuple[str, str], arg2: list[str], arg3: int, arg4: Electron) → None" extraSignatures={["overloaded_func(arg1: tuple[int, int], arg2: list[int], arg3: bool, arg4: set[Electron]) → None"]}>
|
||
This is meant to test out [https://github.com/Qiskit/qiskit\_sphinx\_theme/pull/319](https://github.com/Qiskit/qiskit_sphinx_theme/pull/319).
|
||
|
||
**Parameters**
|
||
|
||
* **arg1** – Tuples ftw!
|
||
* **arg2** – But lists are more flexy.
|
||
* **arg3** – Primitive values are good too.
|
||
* **arg4** – Recursionnnnn.
|
||
</Function>
|
||
</Class>
|
||
|