Skip to content

Commit 4941f11

Browse files
committed
update readme
1 parent 7718036 commit 4941f11

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
# Loka Light
22

3+
## Conceptual intro
4+
5+
- Multipolarity: signals are distributions over **N poles** instead of binary (+/−); `LokaCn` and `MultipolarValue` keep the algebra and Σ‑balance.
6+
- Pseudomultipolar cascades: Σ is controlled by M/N/NX stages (`physics.sigma`, `devices.sigma_guard.SigmaGuard`) so that a common component is removed before decoding.
7+
- Volumetric path (lightweight): `MultipolarOscillator` → TX/RX antennas → receiver form a simple medium/communication chain; `geometry_profile` is a label, not a full 3D field model.
8+
- Pseudo‑quantum layer: CPU/NumPy states via `MultiConjugateFunction` with both scalar `probability_density()` and tensor `probability_tensor()` for simple “quantum‑like” experiments.
9+
10+
### Minimal code examples
11+
12+
**1. Basic 4‑pole loka and Σ‑aware value**
13+
14+
```python
15+
from loka_light.core.algebras import LokaCn
16+
from loka_light.core.value import MultipolarValue
17+
18+
loka = LokaCn(4, "add", "C4_add", ["A", "B", "C", "D"])
19+
mv = MultipolarValue(loka, {"A": 1.0, "C": -1.0})
20+
21+
print("mv:", mv)
22+
print("collapsed:", mv.collapse()) # complex number with Σ structure
23+
```
24+
25+
**2. SigmaGuard as a one‑line Σ→0 purification**
26+
27+
```python
28+
from loka_light.core.algebras import LokaCn
29+
from loka_light.core.value import MultipolarValue
30+
from loka_light.devices.sigma_guard import SigmaGuard
31+
32+
loka = LokaCn(3, "add", "C3_add", ["P0", "P1", "P2"])
33+
mv = MultipolarValue(loka, {"P0": 1.0, "P1": 0.5, "P2": -0.2})
34+
35+
guard = SigmaGuard()
36+
mv_clean = guard.apply(mv)
37+
38+
print("residual before:", guard.residual(mv))
39+
print("residual after:", guard.residual(mv_clean))
40+
```
41+
42+
**3. Simple pseudo‑quantum state with tensor metric**
43+
44+
```python
45+
import numpy as np
46+
from loka_light.physics.multipolar_wave import MultiConjugateFunction
47+
48+
psi = MultiConjugateFunction([1.0 + 0.0j, 1.0j], n_conjugates=2)
49+
50+
print("probability_density:", psi.probability_density())
51+
print("probability_tensor:\n", psi.probability_tensor())
52+
```
53+
354
## Environment
455

556
```bash
@@ -179,3 +230,7 @@ report = mpq.single_qubit_correctness_demo(phase_angle=np.pi/3, shots=1024, seed
179230
print("variation_distance:", report.variation_distance)
180231
PY
181232
```
233+
234+
## TODO
235+
236+
- Package and publish `loka_light` to PyPI as a small SDK for N‑pole / Σ‑aware cascades and pseudo‑quantum experiments.

0 commit comments

Comments
 (0)