rf-compute 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 rf-compute contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,253 @@
1
+ Metadata-Version: 2.4
2
+ Name: rf-compute
3
+ Version: 0.1.0
4
+ Summary: Wave-domain computation kernel — one API across the four RF-as-compute lineages (metamaterials, AirComp, microwave photonics, spin-torque neuromorphic). Research and education surface.
5
+ Author: rf-compute contributors
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/LE-VAI/rf-compute
8
+ Project-URL: Source, https://github.com/LE-VAI/rf-compute
9
+ Project-URL: Issues, https://github.com/LE-VAI/rf-compute/issues
10
+ Project-URL: Documentation, https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md
11
+ Project-URL: Bibliography, https://github.com/LE-VAI/rf-compute/blob/main/docs/bibliography.md
12
+ Project-URL: Contributing, https://github.com/LE-VAI/rf-compute/blob/main/CONTRIBUTING.md
13
+ Keywords: rf,radio-frequency,analog-computing,wave-computing,metamaterials,aircomp,over-the-air-computation,microwave-photonics,neuromorphic,spin-torque,sdr,software-defined-radio,research,education
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Education
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Topic :: Scientific/Engineering :: Physics
18
+ Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: License :: OSI Approved :: MIT License
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Operating System :: OS Independent
28
+ Requires-Python: >=3.9
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: numpy>=1.20
32
+ Provides-Extra: sdr
33
+ Requires-Dist: SoapySDR>=0.8; extra == "sdr"
34
+ Provides-Extra: viz
35
+ Requires-Dist: matplotlib>=3.5; extra == "viz"
36
+ Provides-Extra: dev
37
+ Requires-Dist: pytest>=7.0; extra == "dev"
38
+ Requires-Dist: matplotlib>=3.5; extra == "dev"
39
+ Dynamic: license-file
40
+
41
+ # rf-compute
42
+
43
+ <!-- vai-hero:start -->
44
+ <p align="center">
45
+ <picture>
46
+ <source media="(prefers-reduced-motion: reduce)" srcset="https://raw.githubusercontent.com/LE-VAI/rf-compute/main/docs/media/hero-poster.png">
47
+ <img src="https://raw.githubusercontent.com/LE-VAI/rf-compute/main/docs/media/hero-loop.webp" width="800" alt="Two carrier waves travel across the frame. Carrier A completes one cycle per loop and carrier B completes two. The bottom lane shows their sum, sampled as orange stems: the interference is the operation.">
48
+ </picture>
49
+ </p>
50
+ <p align="center"><sub>A 4-second loop. It plays once and rests, and shows a still frame if you prefer reduced motion. <a href="https://le-vai.github.io/LE-VAI/loops/#rf-compute">Watch it on repeat</a>.</sub></p>
51
+ <!-- vai-hero:end -->
52
+
53
+ **Radio Frequency as a computational substrate — not a transmission medium.**
54
+
55
+ A research-and-education surface for wave-domain computation. The waveform is the operand. Interference isn't noise to cancel — it's the multiply-accumulate operation. The medium is the math.
56
+
57
+ ---
58
+
59
+ ## The one-sentence version
60
+
61
+ > Instead of using RF to carry bits to a digital chip that does the math, you make the RF waveform *be* the math — interference performs the operation, the channel is the adder, the medium is the algorithm.
62
+
63
+ This is not a new idea. It's been hiding in plain sight across four separate research communities for ~18 years. `rf-compute` is the bridge that makes it legible to builders.
64
+
65
+ ---
66
+
67
+ ## Why this exists
68
+
69
+ There is no unified developer surface for RF-as-compute. The field is real, peer-reviewed, and active — but it's scattered across four communities that don't share vocabulary, tooling, or a "hello world":
70
+
71
+ | Lineage | Where it publishes | What it does |
72
+ |---|---|---|
73
+ | **Computational metamaterials** | *Science*, *Nature* | Passive materials that perform math on wavefields |
74
+ | **Over-the-air computation (AirComp)** | *IEEE Trans. Inf. Theory* | The wireless channel *is* the computation |
75
+ | **Microwave photonics** | *Nature Photonics* | RF signals on optical carriers doing NN inference |
76
+ | **Spin-torque neuromorphic** | *Nature Electronics* | Microwave nano-oscillators as neurons |
77
+
78
+ They all share one thing: **the waveform is the operand.** Nobody has built the bridge between them. That's the gap this project fills.
79
+
80
+ ---
81
+
82
+ ## The $350 hello world
83
+
84
+ You don't need a fab, a clean room, or a metamaterial. You need **two transmit SDRs, one receive SDR, and a laptop** — clone-tier hardware gets you there around $350; official units run ~$725. Either way, the simulation kernel runs free on NumPy alone.
85
+
86
+ ```
87
+ Tx1 ──┐
88
+ ├── air ──→ Rx ──→ f(x1 + x2) ← the channel computed the sum
89
+ Tx2 ──┘
90
+ ```
91
+
92
+ Two transmitters send pre-coded signals simultaneously. The receiver reads their sum from the superposed waveform — **without decoding either signal individually.** Interference is the operation. This is the Nazer & Gastpar 2007 result, made legible.
93
+
94
+ This is the simplest wave-compute primitive that exists. If you can run this, you understand the field.
95
+
96
+ 📖 **Full walkthrough:** [`docs/hello-world-aircomp.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-aircomp.md) — hardware, code, what to expect, troubleshooting
97
+
98
+ **Budget option:** One HackRF + one RTL-SDR (clone-tier ~$190, official ~$380). You transmit x1, x2, and x1+x2 sequentially and compare captures in post-processing. You lose the simultaneity that makes AirComp profound, but you learn the signal-processing structure for half the cost. Details in the walkthrough.
99
+
100
+ ### Quick start (60 seconds, no hardware)
101
+
102
+ ```bash
103
+ git clone https://github.com/LE-VAI/rf-compute.git
104
+ cd rf-compute
105
+ pip install -e .
106
+ python examples/tier1_aircomp_kernel.py # AirComp: 3+5=8
107
+ python examples/tier1_5_lattice_aircomp_kernel.py # exact lattice sums, $0
108
+ python examples/tier1_6_fading_coefficients.py # coefficient selection on fading, $0
109
+ python examples/tier2_convolution_kernel.py # 4 operators
110
+ python examples/tier3_inversion_kernel.py # solves Ax=b
111
+ python examples/tier4_ota_federated_learning.py # federated learning over the air, $0
112
+ ```
113
+
114
+ The simulation kernel runs the same API as the hardware kernel — switch `backend="sim"` to `backend="sdr"` when you have SDRs. See [`docs/INSTALL.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/INSTALL.md) for the SDR driver install (the one friction point when you're ready for hardware).
115
+
116
+ ---
117
+
118
+ ## The hello-world ladder
119
+
120
+ Six reproducible experiments, escalating in cost. Each maps to a peer-reviewed result.
121
+
122
+ | Tier | Experiment | Cost (clone-tier / official) | Proves | Citation |
123
+ |---|---|---|---|---|
124
+ | **1** | AirComp sum | ~$350 / ~$725 | Interference IS computation | Nazer & Gastpar, *IEEE TIT* (2011) |
125
+ | **1.5** | Lattice-coded AirComp | free (sim) | The exact result: noise-resilient sums in one channel use, no message decoded | Nazer & Gastpar, *IEEE TIT* (2007/2011) |
126
+ | **1.6** | Fading-channel coefficients | free (sim) | Coefficients are an optimization: the plain sum is undecodable on ~95% of fading channels; selection finds a decodable one | Nazer & Gastpar (2011); Sahraei & Gastpar (2014); Liu & Ling, *IEEE TWC* (2016) |
127
+ | **2** | Wave-domain convolution | ~$200 / ~$395 | Linear operators are native to wave physics | Silva et al., *Science* (2014) |
128
+ | **3** | Matrix inversion via feedback | free / ~$200 / ~$350 | The wave domain solves equations; settling, not iterating | Tzarouchis, Edwards & Engheta, *Nature Communications* (2025) |
129
+ | **4** | Over-the-air federated learning | free (sim) | The channel aggregates model updates in `d+1` uses however many devices transmit; a shared pilot rescues training from misalignment, and heterogeneity bounds the rescue | Zhu, Wang & Huang, *IEEE TWC* (2020); Shao, Gündüz & Liew, *IEEE TWC* (2022) |
130
+
131
+ Tier 3 has three modes (simulation free, software-in-the-loop ~$200 clone / ~$395 official, analog feedback ~$350 clone / ~$480 official) — see the walkthrough for the trade-off.
132
+
133
+ 📖 **Full ladder walkthroughs:** [Tier 1](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-aircomp.md) · [Tier 1.5](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-lattice-aircomp.md) · [Tier 1.6](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-fading-coefficients.md) · [Tier 2](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-convolution.md) · [Tier 3](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-matrix-inversion.md) · [Tier 4](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-ota-federated-learning.md) — each with parts lists, code, and troubleshooting
134
+
135
+ ---
136
+
137
+ ## What this is NOT
138
+
139
+ This is a **research and education surface**, not a product. We build the map, the vocabulary, and the reproducible "hello world." The community builds the future.
140
+
141
+ We are explicitly **not** building:
142
+
143
+ - ❌ Deep-learning-scale matrices (SOTA is 5×5; NN layers are 1024×1024 — that's a hardware physics problem)
144
+ - ❌ Phone-form-factor integration (45 MHz ≈ 6.7m wavelength — subwavelength resonator design at phone scale is unsolved)
145
+ - ❌ Noise-resilient analog compute for hostile EM environments (lab results won't hold in a pocket)
146
+ - ❌ 6G standards integration (AirComp is a 6G research candidate, not yet in 3GPP standardization; that's a multi-year institutional process)
147
+ - ❌ Commercial fabrication (Lightmatter is pursuing the optical frontier; pure-RF commercial compute is not this project)
148
+
149
+ These are real, important problems. They belong to the metamaterials physics community, the antenna engineers, the RF circuit designers, the standards bodies, and industry — not to a research-and-education surface. We name them clearly so builders know where the open frontier lives.
150
+
151
+ 📖 **Full deferral table:** [`docs/field-map.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md#what-we-are-not-building-graceful-deferral-to-the-community)
152
+
153
+ ---
154
+
155
+ ## The field map
156
+
157
+ The complete lineage-to-primitive map lives in [`docs/field-map.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md). It covers:
158
+
159
+ - Each of the four lineages with origin papers, SOTA devices, key labs, and SDR-mappable primitives
160
+ - The SDR bridge: why software-defined radio is the unified developer surface
161
+ - The "hello world" ladder with cost estimates and parts lists
162
+ - Field maturity at a glance
163
+ - Full provenance and citation list
164
+
165
+ If you read one document, read the field map.
166
+
167
+ ---
168
+
169
+ ## Hardware you'll need
170
+
171
+ Prices verified 2026-08-31, re-checked 2026-09-30. HackRF One official retail is ~$340 (SparkFun/Adafruit have retired the unit; GSG's successor **HackRF Pro** is ~$400). AliExpress clones run ~$100–150 but degrade above 1 GHz per Great Scott Gadgets' own clone test — fine for sub-GHz learning experiments, not for precision work. RTL-SDR Blog V4 is end-of-line (May 2026); current official units are the V3 or V4L at ~$35–40 (the V4L is itself a limited edition with roughly a year of chip stock).
172
+
173
+ | Item | Tier 1 | Tier 2 | Tier 3 (Mode B/C) | Official | Clone-tier |
174
+ |---|:---:|:---:|:---:|---|---|
175
+ | HackRF One SDR (Tx) | ×2 | ×1 | ×1 | ~$340 each | ~$100–150 each |
176
+ | RTL-SDR (Rx, receive-only) | ×1 | ×1 | ×1 | ~$35–40 | ~$30 |
177
+ | 10 MHz clock sync cable (BNC/SMA) | ✓ | | | ~$5 | — |
178
+ | Laptop (any OS) | ✓ | ✓ | ✓ | you have one | — |
179
+ | Passive scatterer / reflector | | ✓ (Mode B) | | ~$10–20 | DIY |
180
+ | RF circulator (one-way loop) | | | ✓ (Mode C) | ~$40 | — |
181
+ | Programmable attenuator (loop gain) | | | ✓ (Mode C) | ~$30 | — |
182
+ | RF splitter/combiner | | | ✓ (Mode C) | ~$15–25 | — |
183
+
184
+ **Total entry cost: free (Tier 3 sim) / clone-tier ~$200–350 / official ~$390–725 depending on tier.** No fab. No clean room. No metamaterial. Tier 3 Mode A is pure simulation and costs nothing — start there to see the math before buying hardware. If you buy clones, know what you're buying: they work for learning, they drift for precision.
185
+
186
+ ---
187
+
188
+ ## Who this is for
189
+
190
+ - **Builders** who want to touch wave-domain compute without a physics PhD
191
+ - **Researchers** who want a shared vocabulary across the four lineages
192
+ - **Educators** who want reproducible experiments with real citations
193
+ - **Curious engineers** who read "the channel is the adder" and want to see it work
194
+
195
+ If you've never heard of RF-as-compute and want to understand it: start with the $350 hello world. If you're already in one of the four lineages: the field map is the bridge to the other three.
196
+
197
+ ---
198
+
199
+ ## The key papers (start here)
200
+
201
+ | Paper | Year | Why it matters |
202
+ |---|---|---|
203
+ | Nazer & Gastpar, "Computation over multiple-access channels," *IEEE Trans. Inf. Theory* | 2007 | The founding result. Interference computes functions. |
204
+ | Silva et al., "Performing mathematical operations with metamaterials," *Science* | 2014 | Passive materials do math on wavefields. |
205
+ | Torrejon et al., "Neuromorphic computing with spintronic oscillators," *Nature* | 2017 | Microwave nano-oscillators as neurons. 99.6% spoken-digit. |
206
+ | Zangeneh-Nejad et al., "Analogue computing with metamaterials," *Nature Reviews Materials* | 2021 | The canonical review. "Wave-based analog computing." |
207
+ | Li et al., "Performing calculus with ENZ metamaterials," *Science Advances* | 2022 | Differentiation + integration in the material. |
208
+ | Tzarouchis, Edwards & Engheta, "Programmable wave-based analog computing machine: a metastructure that designs metastructures," *Nature Communications* 16, 908 ([DOI](https://doi.org/10.1038/s41467-025-56019-1)) | 2025 | **The SOTA.** Matrix inversion, Newton's method, Lagrangian optimization at 45 MHz. |
209
+ | Chegini, Guan & Yao, "Microwave photonic neural network," *J. Lightwave Technology* | 2025 | RF photonic MVM. 55×10⁶ MAC/s. |
210
+
211
+ 📖 **Annotated bibliography:** [`docs/bibliography.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/bibliography.md) — every citation, reading order, how to use it
212
+
213
+ ---
214
+
215
+ ## Status
216
+
217
+ **Pre-release.** The spine is complete: field map, six-tier hello-world ladder, annotated bibliography, contribution guide, and the SDR kernel abstraction. The simulation kernel is fully reproducible (every run seed-deterministic; 116 tests).
218
+
219
+ - ✅ [Field map](https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md) — the spine document
220
+ - ✅ [Tier 1: AirComp sum](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-aircomp.md) — the $350 hello world
221
+ - ✅ [Tier 1.5: Lattice-coded AirComp](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-lattice-aircomp.md) — the $0 exact-computation primitive (nested-lattice kernel)
222
+ - ✅ [Tier 1.6: Fading-channel coefficients](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-fading-coefficients.md) — the $0 coefficient-selection tier (computation-rate maximization, MMSE α, LLL + norm-bound search)
223
+ - ✅ [Tier 2: Wave-domain convolution](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-convolution.md) — the $200 linear-operator primitive
224
+ - ✅ [Tier 3: Matrix inversion via feedback](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-matrix-inversion.md) — the wave-domain capstone (free / $200 / $350)
225
+ - ✅ [Tier 4: Over-the-air federated learning](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-ota-federated-learning.md) — the AirComp capstone ($0): aggregation over the air, misalignment, and a pilot-aided equalizer
226
+ - ✅ [Annotated bibliography](https://github.com/LE-VAI/rf-compute/blob/main/docs/bibliography.md) — every citation, reading order, how to use it
227
+ - ✅ [Installation guide](https://github.com/LE-VAI/rf-compute/blob/main/docs/INSTALL.md) — pip install, SDR drivers, troubleshooting
228
+ - ✅ [Contributing guide](https://github.com/LE-VAI/rf-compute/blob/main/CONTRIBUTING.md) — the reproducibility + provenance + honesty bar
229
+ - ✅ [LICENSE](https://github.com/LE-VAI/rf-compute/blob/main/LICENSE) — MIT
230
+ - ✅ [SDR kernel abstraction](https://github.com/LE-VAI/rf-compute/tree/main/rf_compute/) — one API across all four lineages
231
+ - ✅ [`examples/tier1_aircomp_kernel.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier1_aircomp_kernel.py) — Tier 1 with the kernel
232
+ - ✅ [`examples/tier1_5_lattice_aircomp_kernel.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier1_5_lattice_aircomp_kernel.py) — Tier 1.5 with the kernel
233
+ - ✅ [`examples/tier1_6_fading_coefficients.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier1_6_fading_coefficients.py) — Tier 1.6 with the kernel
234
+ - ✅ [`examples/tier2_convolution_kernel.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier2_convolution_kernel.py) — Tier 2 with the kernel
235
+ - ✅ [`examples/tier3_inversion_kernel.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier3_inversion_kernel.py) — Tier 3 with the kernel
236
+ - ✅ [`examples/tier4_ota_federated_learning.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier4_ota_federated_learning.py) — Tier 4 with the kernel
237
+ - ⏳ Community contributions (see `CONTRIBUTING.md`)
238
+
239
+ ---
240
+
241
+ ## License
242
+
243
+ MIT — see [LICENSE](https://github.com/LE-VAI/rf-compute/blob/main/LICENSE).
244
+
245
+ ---
246
+
247
+ ## Provenance
248
+
249
+ This project is a research-and-education surface synthesized from peer-reviewed literature. The underlying research was conducted 2026-07-31 via a multi-source academic search across *Science*, *Nature*, *Nature Photonics*, *IEEE Trans. Inf. Theory*, *Journal of Lightwave Technology*, and arXiv. Full provenance and citation verification in [`docs/field-map.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md#provenance).
250
+
251
+ All citations are peer-reviewed unless marked `[preprint]` or `[vendor]`. Lightmatter performance figures are vendor-sourced. AirComp surveys are preprints. The spin-torque SDR mapping is approximate, not a hardware equivalent.
252
+
253
+ This surface does not claim authorship of the underlying physics. It claims only the bridge — the map, the vocabulary, and the reproducible "hello world."
@@ -0,0 +1,213 @@
1
+ # rf-compute
2
+
3
+ <!-- vai-hero:start -->
4
+ <p align="center">
5
+ <picture>
6
+ <source media="(prefers-reduced-motion: reduce)" srcset="https://raw.githubusercontent.com/LE-VAI/rf-compute/main/docs/media/hero-poster.png">
7
+ <img src="https://raw.githubusercontent.com/LE-VAI/rf-compute/main/docs/media/hero-loop.webp" width="800" alt="Two carrier waves travel across the frame. Carrier A completes one cycle per loop and carrier B completes two. The bottom lane shows their sum, sampled as orange stems: the interference is the operation.">
8
+ </picture>
9
+ </p>
10
+ <p align="center"><sub>A 4-second loop. It plays once and rests, and shows a still frame if you prefer reduced motion. <a href="https://le-vai.github.io/LE-VAI/loops/#rf-compute">Watch it on repeat</a>.</sub></p>
11
+ <!-- vai-hero:end -->
12
+
13
+ **Radio Frequency as a computational substrate — not a transmission medium.**
14
+
15
+ A research-and-education surface for wave-domain computation. The waveform is the operand. Interference isn't noise to cancel — it's the multiply-accumulate operation. The medium is the math.
16
+
17
+ ---
18
+
19
+ ## The one-sentence version
20
+
21
+ > Instead of using RF to carry bits to a digital chip that does the math, you make the RF waveform *be* the math — interference performs the operation, the channel is the adder, the medium is the algorithm.
22
+
23
+ This is not a new idea. It's been hiding in plain sight across four separate research communities for ~18 years. `rf-compute` is the bridge that makes it legible to builders.
24
+
25
+ ---
26
+
27
+ ## Why this exists
28
+
29
+ There is no unified developer surface for RF-as-compute. The field is real, peer-reviewed, and active — but it's scattered across four communities that don't share vocabulary, tooling, or a "hello world":
30
+
31
+ | Lineage | Where it publishes | What it does |
32
+ |---|---|---|
33
+ | **Computational metamaterials** | *Science*, *Nature* | Passive materials that perform math on wavefields |
34
+ | **Over-the-air computation (AirComp)** | *IEEE Trans. Inf. Theory* | The wireless channel *is* the computation |
35
+ | **Microwave photonics** | *Nature Photonics* | RF signals on optical carriers doing NN inference |
36
+ | **Spin-torque neuromorphic** | *Nature Electronics* | Microwave nano-oscillators as neurons |
37
+
38
+ They all share one thing: **the waveform is the operand.** Nobody has built the bridge between them. That's the gap this project fills.
39
+
40
+ ---
41
+
42
+ ## The $350 hello world
43
+
44
+ You don't need a fab, a clean room, or a metamaterial. You need **two transmit SDRs, one receive SDR, and a laptop** — clone-tier hardware gets you there around $350; official units run ~$725. Either way, the simulation kernel runs free on NumPy alone.
45
+
46
+ ```
47
+ Tx1 ──┐
48
+ ├── air ──→ Rx ──→ f(x1 + x2) ← the channel computed the sum
49
+ Tx2 ──┘
50
+ ```
51
+
52
+ Two transmitters send pre-coded signals simultaneously. The receiver reads their sum from the superposed waveform — **without decoding either signal individually.** Interference is the operation. This is the Nazer & Gastpar 2007 result, made legible.
53
+
54
+ This is the simplest wave-compute primitive that exists. If you can run this, you understand the field.
55
+
56
+ 📖 **Full walkthrough:** [`docs/hello-world-aircomp.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-aircomp.md) — hardware, code, what to expect, troubleshooting
57
+
58
+ **Budget option:** One HackRF + one RTL-SDR (clone-tier ~$190, official ~$380). You transmit x1, x2, and x1+x2 sequentially and compare captures in post-processing. You lose the simultaneity that makes AirComp profound, but you learn the signal-processing structure for half the cost. Details in the walkthrough.
59
+
60
+ ### Quick start (60 seconds, no hardware)
61
+
62
+ ```bash
63
+ git clone https://github.com/LE-VAI/rf-compute.git
64
+ cd rf-compute
65
+ pip install -e .
66
+ python examples/tier1_aircomp_kernel.py # AirComp: 3+5=8
67
+ python examples/tier1_5_lattice_aircomp_kernel.py # exact lattice sums, $0
68
+ python examples/tier1_6_fading_coefficients.py # coefficient selection on fading, $0
69
+ python examples/tier2_convolution_kernel.py # 4 operators
70
+ python examples/tier3_inversion_kernel.py # solves Ax=b
71
+ python examples/tier4_ota_federated_learning.py # federated learning over the air, $0
72
+ ```
73
+
74
+ The simulation kernel runs the same API as the hardware kernel — switch `backend="sim"` to `backend="sdr"` when you have SDRs. See [`docs/INSTALL.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/INSTALL.md) for the SDR driver install (the one friction point when you're ready for hardware).
75
+
76
+ ---
77
+
78
+ ## The hello-world ladder
79
+
80
+ Six reproducible experiments, escalating in cost. Each maps to a peer-reviewed result.
81
+
82
+ | Tier | Experiment | Cost (clone-tier / official) | Proves | Citation |
83
+ |---|---|---|---|---|
84
+ | **1** | AirComp sum | ~$350 / ~$725 | Interference IS computation | Nazer & Gastpar, *IEEE TIT* (2011) |
85
+ | **1.5** | Lattice-coded AirComp | free (sim) | The exact result: noise-resilient sums in one channel use, no message decoded | Nazer & Gastpar, *IEEE TIT* (2007/2011) |
86
+ | **1.6** | Fading-channel coefficients | free (sim) | Coefficients are an optimization: the plain sum is undecodable on ~95% of fading channels; selection finds a decodable one | Nazer & Gastpar (2011); Sahraei & Gastpar (2014); Liu & Ling, *IEEE TWC* (2016) |
87
+ | **2** | Wave-domain convolution | ~$200 / ~$395 | Linear operators are native to wave physics | Silva et al., *Science* (2014) |
88
+ | **3** | Matrix inversion via feedback | free / ~$200 / ~$350 | The wave domain solves equations; settling, not iterating | Tzarouchis, Edwards & Engheta, *Nature Communications* (2025) |
89
+ | **4** | Over-the-air federated learning | free (sim) | The channel aggregates model updates in `d+1` uses however many devices transmit; a shared pilot rescues training from misalignment, and heterogeneity bounds the rescue | Zhu, Wang & Huang, *IEEE TWC* (2020); Shao, Gündüz & Liew, *IEEE TWC* (2022) |
90
+
91
+ Tier 3 has three modes (simulation free, software-in-the-loop ~$200 clone / ~$395 official, analog feedback ~$350 clone / ~$480 official) — see the walkthrough for the trade-off.
92
+
93
+ 📖 **Full ladder walkthroughs:** [Tier 1](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-aircomp.md) · [Tier 1.5](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-lattice-aircomp.md) · [Tier 1.6](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-fading-coefficients.md) · [Tier 2](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-convolution.md) · [Tier 3](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-matrix-inversion.md) · [Tier 4](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-ota-federated-learning.md) — each with parts lists, code, and troubleshooting
94
+
95
+ ---
96
+
97
+ ## What this is NOT
98
+
99
+ This is a **research and education surface**, not a product. We build the map, the vocabulary, and the reproducible "hello world." The community builds the future.
100
+
101
+ We are explicitly **not** building:
102
+
103
+ - ❌ Deep-learning-scale matrices (SOTA is 5×5; NN layers are 1024×1024 — that's a hardware physics problem)
104
+ - ❌ Phone-form-factor integration (45 MHz ≈ 6.7m wavelength — subwavelength resonator design at phone scale is unsolved)
105
+ - ❌ Noise-resilient analog compute for hostile EM environments (lab results won't hold in a pocket)
106
+ - ❌ 6G standards integration (AirComp is a 6G research candidate, not yet in 3GPP standardization; that's a multi-year institutional process)
107
+ - ❌ Commercial fabrication (Lightmatter is pursuing the optical frontier; pure-RF commercial compute is not this project)
108
+
109
+ These are real, important problems. They belong to the metamaterials physics community, the antenna engineers, the RF circuit designers, the standards bodies, and industry — not to a research-and-education surface. We name them clearly so builders know where the open frontier lives.
110
+
111
+ 📖 **Full deferral table:** [`docs/field-map.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md#what-we-are-not-building-graceful-deferral-to-the-community)
112
+
113
+ ---
114
+
115
+ ## The field map
116
+
117
+ The complete lineage-to-primitive map lives in [`docs/field-map.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md). It covers:
118
+
119
+ - Each of the four lineages with origin papers, SOTA devices, key labs, and SDR-mappable primitives
120
+ - The SDR bridge: why software-defined radio is the unified developer surface
121
+ - The "hello world" ladder with cost estimates and parts lists
122
+ - Field maturity at a glance
123
+ - Full provenance and citation list
124
+
125
+ If you read one document, read the field map.
126
+
127
+ ---
128
+
129
+ ## Hardware you'll need
130
+
131
+ Prices verified 2026-08-31, re-checked 2026-09-30. HackRF One official retail is ~$340 (SparkFun/Adafruit have retired the unit; GSG's successor **HackRF Pro** is ~$400). AliExpress clones run ~$100–150 but degrade above 1 GHz per Great Scott Gadgets' own clone test — fine for sub-GHz learning experiments, not for precision work. RTL-SDR Blog V4 is end-of-line (May 2026); current official units are the V3 or V4L at ~$35–40 (the V4L is itself a limited edition with roughly a year of chip stock).
132
+
133
+ | Item | Tier 1 | Tier 2 | Tier 3 (Mode B/C) | Official | Clone-tier |
134
+ |---|:---:|:---:|:---:|---|---|
135
+ | HackRF One SDR (Tx) | ×2 | ×1 | ×1 | ~$340 each | ~$100–150 each |
136
+ | RTL-SDR (Rx, receive-only) | ×1 | ×1 | ×1 | ~$35–40 | ~$30 |
137
+ | 10 MHz clock sync cable (BNC/SMA) | ✓ | | | ~$5 | — |
138
+ | Laptop (any OS) | ✓ | ✓ | ✓ | you have one | — |
139
+ | Passive scatterer / reflector | | ✓ (Mode B) | | ~$10–20 | DIY |
140
+ | RF circulator (one-way loop) | | | ✓ (Mode C) | ~$40 | — |
141
+ | Programmable attenuator (loop gain) | | | ✓ (Mode C) | ~$30 | — |
142
+ | RF splitter/combiner | | | ✓ (Mode C) | ~$15–25 | — |
143
+
144
+ **Total entry cost: free (Tier 3 sim) / clone-tier ~$200–350 / official ~$390–725 depending on tier.** No fab. No clean room. No metamaterial. Tier 3 Mode A is pure simulation and costs nothing — start there to see the math before buying hardware. If you buy clones, know what you're buying: they work for learning, they drift for precision.
145
+
146
+ ---
147
+
148
+ ## Who this is for
149
+
150
+ - **Builders** who want to touch wave-domain compute without a physics PhD
151
+ - **Researchers** who want a shared vocabulary across the four lineages
152
+ - **Educators** who want reproducible experiments with real citations
153
+ - **Curious engineers** who read "the channel is the adder" and want to see it work
154
+
155
+ If you've never heard of RF-as-compute and want to understand it: start with the $350 hello world. If you're already in one of the four lineages: the field map is the bridge to the other three.
156
+
157
+ ---
158
+
159
+ ## The key papers (start here)
160
+
161
+ | Paper | Year | Why it matters |
162
+ |---|---|---|
163
+ | Nazer & Gastpar, "Computation over multiple-access channels," *IEEE Trans. Inf. Theory* | 2007 | The founding result. Interference computes functions. |
164
+ | Silva et al., "Performing mathematical operations with metamaterials," *Science* | 2014 | Passive materials do math on wavefields. |
165
+ | Torrejon et al., "Neuromorphic computing with spintronic oscillators," *Nature* | 2017 | Microwave nano-oscillators as neurons. 99.6% spoken-digit. |
166
+ | Zangeneh-Nejad et al., "Analogue computing with metamaterials," *Nature Reviews Materials* | 2021 | The canonical review. "Wave-based analog computing." |
167
+ | Li et al., "Performing calculus with ENZ metamaterials," *Science Advances* | 2022 | Differentiation + integration in the material. |
168
+ | Tzarouchis, Edwards & Engheta, "Programmable wave-based analog computing machine: a metastructure that designs metastructures," *Nature Communications* 16, 908 ([DOI](https://doi.org/10.1038/s41467-025-56019-1)) | 2025 | **The SOTA.** Matrix inversion, Newton's method, Lagrangian optimization at 45 MHz. |
169
+ | Chegini, Guan & Yao, "Microwave photonic neural network," *J. Lightwave Technology* | 2025 | RF photonic MVM. 55×10⁶ MAC/s. |
170
+
171
+ 📖 **Annotated bibliography:** [`docs/bibliography.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/bibliography.md) — every citation, reading order, how to use it
172
+
173
+ ---
174
+
175
+ ## Status
176
+
177
+ **Pre-release.** The spine is complete: field map, six-tier hello-world ladder, annotated bibliography, contribution guide, and the SDR kernel abstraction. The simulation kernel is fully reproducible (every run seed-deterministic; 116 tests).
178
+
179
+ - ✅ [Field map](https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md) — the spine document
180
+ - ✅ [Tier 1: AirComp sum](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-aircomp.md) — the $350 hello world
181
+ - ✅ [Tier 1.5: Lattice-coded AirComp](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-lattice-aircomp.md) — the $0 exact-computation primitive (nested-lattice kernel)
182
+ - ✅ [Tier 1.6: Fading-channel coefficients](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-fading-coefficients.md) — the $0 coefficient-selection tier (computation-rate maximization, MMSE α, LLL + norm-bound search)
183
+ - ✅ [Tier 2: Wave-domain convolution](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-convolution.md) — the $200 linear-operator primitive
184
+ - ✅ [Tier 3: Matrix inversion via feedback](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-matrix-inversion.md) — the wave-domain capstone (free / $200 / $350)
185
+ - ✅ [Tier 4: Over-the-air federated learning](https://github.com/LE-VAI/rf-compute/blob/main/docs/hello-world-ota-federated-learning.md) — the AirComp capstone ($0): aggregation over the air, misalignment, and a pilot-aided equalizer
186
+ - ✅ [Annotated bibliography](https://github.com/LE-VAI/rf-compute/blob/main/docs/bibliography.md) — every citation, reading order, how to use it
187
+ - ✅ [Installation guide](https://github.com/LE-VAI/rf-compute/blob/main/docs/INSTALL.md) — pip install, SDR drivers, troubleshooting
188
+ - ✅ [Contributing guide](https://github.com/LE-VAI/rf-compute/blob/main/CONTRIBUTING.md) — the reproducibility + provenance + honesty bar
189
+ - ✅ [LICENSE](https://github.com/LE-VAI/rf-compute/blob/main/LICENSE) — MIT
190
+ - ✅ [SDR kernel abstraction](https://github.com/LE-VAI/rf-compute/tree/main/rf_compute/) — one API across all four lineages
191
+ - ✅ [`examples/tier1_aircomp_kernel.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier1_aircomp_kernel.py) — Tier 1 with the kernel
192
+ - ✅ [`examples/tier1_5_lattice_aircomp_kernel.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier1_5_lattice_aircomp_kernel.py) — Tier 1.5 with the kernel
193
+ - ✅ [`examples/tier1_6_fading_coefficients.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier1_6_fading_coefficients.py) — Tier 1.6 with the kernel
194
+ - ✅ [`examples/tier2_convolution_kernel.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier2_convolution_kernel.py) — Tier 2 with the kernel
195
+ - ✅ [`examples/tier3_inversion_kernel.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier3_inversion_kernel.py) — Tier 3 with the kernel
196
+ - ✅ [`examples/tier4_ota_federated_learning.py`](https://github.com/LE-VAI/rf-compute/blob/main/examples/tier4_ota_federated_learning.py) — Tier 4 with the kernel
197
+ - ⏳ Community contributions (see `CONTRIBUTING.md`)
198
+
199
+ ---
200
+
201
+ ## License
202
+
203
+ MIT — see [LICENSE](https://github.com/LE-VAI/rf-compute/blob/main/LICENSE).
204
+
205
+ ---
206
+
207
+ ## Provenance
208
+
209
+ This project is a research-and-education surface synthesized from peer-reviewed literature. The underlying research was conducted 2026-07-31 via a multi-source academic search across *Science*, *Nature*, *Nature Photonics*, *IEEE Trans. Inf. Theory*, *Journal of Lightwave Technology*, and arXiv. Full provenance and citation verification in [`docs/field-map.md`](https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md#provenance).
210
+
211
+ All citations are peer-reviewed unless marked `[preprint]` or `[vendor]`. Lightmatter performance figures are vendor-sourced. AirComp surveys are preprints. The spin-torque SDR mapping is approximate, not a hardware equivalent.
212
+
213
+ This surface does not claim authorship of the underlying physics. It claims only the bridge — the map, the vocabulary, and the reproducible "hello world."
@@ -0,0 +1,94 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "rf-compute"
7
+ version = "0.1.0"
8
+ description = "Wave-domain computation kernel — one API across the four RF-as-compute lineages (metamaterials, AirComp, microwave photonics, spin-torque neuromorphic). Research and education surface."
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ authors = [{ name = "rf-compute contributors" }]
12
+ requires-python = ">=3.9"
13
+ keywords = [
14
+ "rf",
15
+ "radio-frequency",
16
+ "analog-computing",
17
+ "wave-computing",
18
+ "metamaterials",
19
+ "aircomp",
20
+ "over-the-air-computation",
21
+ "microwave-photonics",
22
+ "neuromorphic",
23
+ "spin-torque",
24
+ "sdr",
25
+ "software-defined-radio",
26
+ "research",
27
+ "education",
28
+ ]
29
+ classifiers = [
30
+ "Development Status :: 3 - Alpha",
31
+ "Intended Audience :: Education",
32
+ "Intended Audience :: Science/Research",
33
+ "Topic :: Scientific/Engineering :: Physics",
34
+ "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
35
+ "Topic :: Software Development :: Libraries :: Python Modules",
36
+ "License :: OSI Approved :: MIT License",
37
+ "Programming Language :: Python :: 3",
38
+ "Programming Language :: Python :: 3.9",
39
+ "Programming Language :: Python :: 3.10",
40
+ "Programming Language :: Python :: 3.11",
41
+ "Programming Language :: Python :: 3.12",
42
+ "Programming Language :: Python :: 3.13",
43
+ "Operating System :: OS Independent",
44
+ ]
45
+
46
+ # numpy is the only hard dependency — the simulation backend runs on numpy alone.
47
+ # SoapySDR is optional (only needed for the "sdr" backend); the kernel degrades
48
+ # gracefully to simulation if SoapySDR is absent, so it's not a hard dep.
49
+ dependencies = [
50
+ "numpy>=1.20",
51
+ ]
52
+
53
+ [project.optional-dependencies]
54
+ # SDR backend — install this extra when you have hardware and want to run
55
+ # the real-RF walkthroughs: pip install "rf-compute[sdr]"
56
+ sdr = [
57
+ "SoapySDR>=0.8",
58
+ ]
59
+ # Visualization — the walkthrough scripts use matplotlib for spectrum plots.
60
+ # Optional because the kernel itself doesn't depend on it; only the example
61
+ # scripts and walkthroughs do.
62
+ viz = [
63
+ "matplotlib>=3.5",
64
+ ]
65
+ # Development — for contributors running the test suite.
66
+ # SoapySDR is intentionally NOT included here: it's a system library, not a
67
+ # pip package, and `pip install SoapySDR` fails on platforms without the
68
+ # system binding pre-installed. The kernel gracefully degrades to simulation
69
+ # when SoapySDR is absent, so CI runs the full test suite on numpy + pytest
70
+ # alone. Contributors who want SDR tests install SoapySDR separately (see
71
+ # docs/INSTALL.md).
72
+ dev = [
73
+ "pytest>=7.0",
74
+ "matplotlib>=3.5",
75
+ ]
76
+
77
+ [project.urls]
78
+ Homepage = "https://github.com/LE-VAI/rf-compute"
79
+ Source = "https://github.com/LE-VAI/rf-compute"
80
+ Issues = "https://github.com/LE-VAI/rf-compute/issues"
81
+ Documentation = "https://github.com/LE-VAI/rf-compute/blob/main/docs/field-map.md"
82
+ Bibliography = "https://github.com/LE-VAI/rf-compute/blob/main/docs/bibliography.md"
83
+ Contributing = "https://github.com/LE-VAI/rf-compute/blob/main/CONTRIBUTING.md"
84
+
85
+ [tool.setuptools]
86
+ # We use a flat package layout: the package is `rf_compute/` at the repo root.
87
+ # This keeps `from rf_compute import ...` working in both installed and
88
+ # development (pip install -e .) modes without a `src/` prefix.
89
+ packages = ["rf_compute"]
90
+
91
+ [tool.pytest.ini_options]
92
+ # Tests live in tests/. Run with: pytest
93
+ testpaths = ["tests"]
94
+ python_files = ["test_*.py"]
@@ -0,0 +1,38 @@
1
+ """rf-compute: wave-domain computation kernel — package init."""
2
+
3
+ from .rf_compute import (
4
+ Operator, AirCompOperator, LatticeAirCompOperator, FadingAirCompOperator,
5
+ OTAAggregationOperator, ConvolutionOperator, InversionOperator, ReservoirOperator,
6
+ WaveComputeKernel,
7
+ boxcar, differencer, matched, hilbert,
8
+ )
9
+ from . import lattice
10
+ from . import coefficients
11
+ from . import ota_fl
12
+ from .lattice import (
13
+ mod_lattice, encode, decode, channel, run_trial, monte_carlo,
14
+ fading_trial, fading_scoreline,
15
+ )
16
+ from .coefficients import (
17
+ mmse_alpha, computation_rate, norm_bound, select_coefficients,
18
+ fading_gains, lll_reduce,
19
+ )
20
+ from .ota_fl import (
21
+ make_federated_data, gradient_spread, ota_aggregate, aggregation_quality,
22
+ )
23
+
24
+ __version__ = "0.1.0"
25
+ __all__ = [
26
+ 'Operator', 'AirCompOperator', 'LatticeAirCompOperator',
27
+ 'FadingAirCompOperator', 'OTAAggregationOperator',
28
+ 'ConvolutionOperator', 'InversionOperator', 'ReservoirOperator',
29
+ 'WaveComputeKernel',
30
+ 'boxcar', 'differencer', 'matched', 'hilbert',
31
+ 'lattice', 'coefficients', 'ota_fl',
32
+ 'mod_lattice', 'encode', 'decode', 'channel', 'run_trial', 'monte_carlo',
33
+ 'fading_trial', 'fading_scoreline',
34
+ 'mmse_alpha', 'computation_rate', 'norm_bound', 'select_coefficients',
35
+ 'fading_gains', 'lll_reduce',
36
+ 'make_federated_data', 'gradient_spread', 'ota_aggregate', 'aggregation_quality',
37
+ '__version__',
38
+ ]