OPU (Organoid Processing Unit)
The OPU layer handles the low-level simulation of organoid physics.
Device
pykoppu.opu.OPU
Organoid Processing Unit (OPU) Device Class.
Represents the physical cartridge containing the organoid and MEA interface.
Source code in pykoppu/opu/device.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
__init__(model='lif_critical', capacity=100)
Initialize the OPU device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
The biological model to use. Defaults to "lif_critical". |
'lif_critical'
|
capacity
|
int
|
The number of neurons/channels available. Defaults to 100. |
100
|
Source code in pykoppu/opu/device.py
39 40 41 42 43 44 45 46 47 48 49 | |
get_specs_dict()
Get specifications as a dictionary.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: Dictionary of specifications. |
Source code in pykoppu/opu/device.py
80 81 82 83 84 85 86 87 | |
Kernel
pykoppu.opu.Kernel
Kernel for OPU tensor operations.
Source code in pykoppu/opu/kernel.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
compute_energy(J, h, state)
staticmethod
Compute the energy of a given state for the Hamiltonian defined by J and h.
E = -0.5 * x^T J x - h^T x
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
J
|
ndarray
|
Coupling matrix. |
required |
h
|
ndarray
|
Bias vector. |
required |
state
|
ndarray
|
State vector (binary or spin). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The energy value. |
Source code in pykoppu/opu/kernel.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |