spatial-computing 0.20.0__tar.gz → 0.23.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.
Files changed (149) hide show
  1. {spatial_computing-0.20.0/spatial_computing.egg-info → spatial_computing-0.23.0}/PKG-INFO +10 -21
  2. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/README.md +8 -11
  3. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/pyproject.toml +2 -5
  4. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/__init__.py +1 -1
  5. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/cli.py +7 -22
  6. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/compute/workloads.py +72 -58
  7. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/core/model.py +0 -2
  8. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/core/registry.py +1 -12
  9. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/service.py +6 -5
  10. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/app.js +1 -1
  11. spatial_computing-0.23.0/spatial/runtime/arch.py +12 -0
  12. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/microvm.py +8 -1
  13. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/planner.py +56 -8
  14. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/runner.py +4 -2
  15. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/unified/__init__.py +1 -1
  16. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/unified/model.py +2 -15
  17. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/unified/providers.py +9 -54
  18. {spatial_computing-0.20.0 → spatial_computing-0.23.0/spatial_computing.egg-info}/PKG-INFO +10 -21
  19. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial_computing.egg-info/SOURCES.txt +2 -23
  20. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial_computing.egg-info/entry_points.txt +0 -1
  21. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial_computing.egg-info/requires.txt +0 -10
  22. spatial_computing-0.23.0/tests/test_domains.py +16 -0
  23. spatial_computing-0.23.0/tests/test_engines.py +41 -0
  24. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_hardening.py +1 -29
  25. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_kernel.py +15 -0
  26. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_runtime.py +108 -1
  27. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_unified.py +2 -39
  28. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_v02.py +1 -65
  29. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_v03.py +1 -25
  30. spatial_computing-0.23.0/tests/test_v05.py +26 -0
  31. spatial_computing-0.20.0/spatial/holographic/__init__.py +0 -8
  32. spatial_computing-0.20.0/spatial/holographic/cgh.py +0 -40
  33. spatial_computing-0.20.0/spatial/holographic/model.py +0 -49
  34. spatial_computing-0.20.0/spatial/q/__init__.py +0 -4
  35. spatial_computing-0.20.0/spatial/q/__main__.py +0 -9
  36. spatial_computing-0.20.0/spatial/q/backends/__init__.py +0 -170
  37. spatial_computing-0.20.0/spatial/q/codegen.py +0 -153
  38. spatial_computing-0.20.0/spatial/q/compiler.py +0 -341
  39. spatial_computing-0.20.0/spatial/q/ir.py +0 -121
  40. spatial_computing-0.20.0/spatial/q/lexer.py +0 -61
  41. spatial_computing-0.20.0/spatial/q/parser.py +0 -330
  42. spatial_computing-0.20.0/spatial/q/qir.py +0 -128
  43. spatial_computing-0.20.0/spatial/q/runtime.py +0 -275
  44. spatial_computing-0.20.0/spatial/q/sim.py +0 -241
  45. spatial_computing-0.20.0/spatial/scientific/__init__.py +0 -8
  46. spatial_computing-0.20.0/spatial/scientific/jobs.py +0 -80
  47. spatial_computing-0.20.0/spatial/simulation/__init__.py +0 -7
  48. spatial_computing-0.20.0/spatial/simulation/heat.py +0 -48
  49. spatial_computing-0.20.0/spatial/simulation/nbody.py +0 -31
  50. spatial_computing-0.20.0/tests/test_domains.py +0 -51
  51. spatial_computing-0.20.0/tests/test_engines.py +0 -75
  52. spatial_computing-0.20.0/tests/test_optimizer.py +0 -63
  53. spatial_computing-0.20.0/tests/test_q.py +0 -181
  54. spatial_computing-0.20.0/tests/test_v05.py +0 -72
  55. spatial_computing-0.20.0/tests/test_v07.py +0 -35
  56. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/LICENSE +0 -0
  57. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/setup.cfg +0 -0
  58. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/ai/__init__.py +0 -0
  59. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/ai/kvcache.py +0 -0
  60. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/ai/llm.py +0 -0
  61. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/compute/__init__.py +0 -0
  62. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/compute/cost.py +0 -0
  63. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/compute/detect.py +0 -0
  64. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/compute/monitor.py +0 -0
  65. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/compute/scheduler.py +0 -0
  66. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/compute/taskqueue.py +0 -0
  67. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/compute/worker.py +0 -0
  68. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/core/__init__.py +0 -0
  69. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/core/auth.py +0 -0
  70. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/core/energy.py +0 -0
  71. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/core/ledger.py +0 -0
  72. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/core/protocol.py +0 -0
  73. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fabric/__init__.py +0 -0
  74. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fabric/cuda.py +0 -0
  75. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fabric/devices.py +0 -0
  76. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fabric/metal.py +0 -0
  77. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fabric/metal_mandel.swift +0 -0
  78. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fabric/metal_run.swift +0 -0
  79. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fleet/__init__.py +0 -0
  80. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fleet/agent.py +0 -0
  81. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fleet/alerts.py +0 -0
  82. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fleet/dashboard.py +0 -0
  83. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fleet/ha.py +0 -0
  84. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/fleet/hub.py +0 -0
  85. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/intelligence/__init__.py +0 -0
  86. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/intelligence/predictor.py +0 -0
  87. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/interconnect/__init__.py +0 -0
  88. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/interconnect/collectives.py +0 -0
  89. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/interconnect/comm.py +0 -0
  90. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/interconnect/model.py +0 -0
  91. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/interconnect/tasks.py +0 -0
  92. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/kernel/__init__.py +0 -0
  93. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/kernel/dsl.py +0 -0
  94. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/kernel/library.py +0 -0
  95. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/memory/__init__.py +0 -0
  96. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/memory/fararray.py +0 -0
  97. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/memory/pageserver.py +0 -0
  98. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/memory/secure.py +0 -0
  99. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/memory/shared.py +0 -0
  100. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/memory/tiered.py +0 -0
  101. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/__init__.py +0 -0
  102. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/billing.py +0 -0
  103. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/db.py +0 -0
  104. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/invoice_rules.py +0 -0
  105. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/mailer.py +0 -0
  106. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/oidc.py +0 -0
  107. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/pdf.py +0 -0
  108. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/qr.py +0 -0
  109. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/security.py +0 -0
  110. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/server.py +0 -0
  111. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/fonts/DMMono-normal-400.woff2 +0 -0
  112. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/fonts/DMMono-normal-500.woff2 +0 -0
  113. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/fonts/InstrumentSerif-italic-400.woff2 +0 -0
  114. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/fonts/InstrumentSerif-normal-400.woff2 +0 -0
  115. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/fonts/Inter-normal-400.woff2 +0 -0
  116. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/fonts/Inter-normal-500.woff2 +0 -0
  117. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/fonts/Inter-normal-600.woff2 +0 -0
  118. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/fonts.css +0 -0
  119. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/index.html +0 -0
  120. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/logo.svg +0 -0
  121. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/static/style.css +0 -0
  122. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/totp.py +0 -0
  123. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/ubl.py +0 -0
  124. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/platform/vat.py +0 -0
  125. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/__init__.py +0 -0
  126. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/desktop/Dockerfile +0 -0
  127. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/desktop/__init__.py +0 -0
  128. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/desktop/start.sh +0 -0
  129. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/envs.py +0 -0
  130. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/inspect.py +0 -0
  131. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/runtime/toolchain.py +0 -0
  132. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial/unified/planner.py +0 -0
  133. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial_computing.egg-info/dependency_links.txt +0 -0
  134. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/spatial_computing.egg-info/top_level.txt +0 -0
  135. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_auth.py +0 -0
  136. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_compute.py +0 -0
  137. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_core.py +0 -0
  138. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_dashboard.py +0 -0
  139. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_fabric.py +0 -0
  140. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_fleet.py +0 -0
  141. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_ha.py +0 -0
  142. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_interconnect.py +0 -0
  143. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_memory.py +0 -0
  144. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_platform.py +0 -0
  145. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_platform2.py +0 -0
  146. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_qr.py +0 -0
  147. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_quorum.py +0 -0
  148. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_real_servers.py +0 -0
  149. {spatial_computing-0.20.0 → spatial_computing-0.23.0}/tests/test_sso.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spatial-computing
3
- Version: 0.20.0
4
- Summary: Spatial Computing: open-source infrastructure efficiency toolkit. Measure, decide, prove (compute, tiered memory, runtime routing, hybrid quantum language)
3
+ Version: 0.23.0
4
+ Summary: Spatial Computing: open-source infrastructure efficiency toolkit. Measure, decide, prove (compute, tiered memory, runtime routing, fleet)
5
5
  Author: Spatial Computing contributors
6
6
  License-Expression: Apache-2.0
7
7
  Project-URL: Homepage, https://spatial-computing-ecru.vercel.app
@@ -17,16 +17,8 @@ Requires-Dist: psutil>=5.9
17
17
  Requires-Dist: numba<0.62,>=0.59
18
18
  Requires-Dist: lz4>=4.3
19
19
  Requires-Dist: cryptography>=42
20
- Provides-Extra: quantum
21
- Requires-Dist: qiskit>=2.0; extra == "quantum"
22
- Requires-Dist: qiskit-aer>=0.17; extra == "quantum"
23
- Requires-Dist: qiskit-qasm3-import>=0.5; extra == "quantum"
24
- Requires-Dist: pyqir>=0.10; extra == "quantum"
25
20
  Provides-Extra: build
26
21
  Requires-Dist: ziglang>=0.13; extra == "build"
27
- Provides-Extra: qpu
28
- Requires-Dist: qiskit>=2.0; extra == "qpu"
29
- Requires-Dist: qiskit-ibm-runtime>=0.40; extra == "qpu"
30
22
  Provides-Extra: dev
31
23
  Requires-Dist: pytest>=8; extra == "dev"
32
24
  Requires-Dist: lxml>=5; extra == "dev"
@@ -36,9 +28,9 @@ Dynamic: license-file
36
28
 
37
29
  **Measure. Decide. Prove.**
38
30
 
39
- One objective for the whole infrastructure: get every job done correctly at the lowest cost, and prove it. Spatial Computing prices every way to run a job across compute, memory, runtime, quantum, AI, science and a fleet of machines, picks the cheapest, and records the estimate next to what really happened. A gain is claimed only when it is measured. It does not add RAM, cores or GPUs: it compares execution strategies on the hardware you have, trades one resource for another in numbers, and says plainly what it cannot do.
31
+ One objective for the whole infrastructure: get every job done correctly at the lowest cost, and prove it. Spatial Computing prices every way to run a job across compute, memory, runtime, AI and a fleet of machines, picks the cheapest, and records the estimate next to what really happened. A gain is claimed only when it is measured. It does not add RAM, cores or GPUs: it compares execution strategies on the hardware you have, trades one resource for another in numbers, and says plainly what it cannot do.
40
32
 
41
- > **Status: v0.17.0, early-stage open-source toolkit.** Everything here was built and measured on a single 2017 MacBook Pro (Intel i7-7660U, 2 cores, 16 GB). Nothing has been proven on a second machine, a data-center GPU or a real quantum computer. See [Limitations](docs/LIMITATIONS.md) and the [site](https://spatial-computing-ecru.vercel.app).
33
+ > **Status: v0.22.0, early-stage open-source toolkit.** Everything here was built and measured on a single 2017 MacBook Pro (Intel i7-7660U, 2 cores, 16 GB). Nothing has been proven on a second machine or a data-center GPU. See [Limitations](docs/LIMITATIONS.md) and the [site](https://spatial-computing-ecru.vercel.app).
42
34
 
43
35
  [Français](README.fr.md)
44
36
 
@@ -48,7 +40,7 @@ Python 3.10 or newer.
48
40
 
49
41
  ```bash
50
42
  python3 -m venv .venv && source .venv/bin/activate
51
- pip install "spatial-computing[quantum]"
43
+ pip install spatial-computing
52
44
  spatial audit
53
45
  ```
54
46
 
@@ -56,7 +48,7 @@ From source, to develop:
56
48
 
57
49
  ```bash
58
50
  git clone https://github.com/abraham1116/spatial-computing && cd spatial-computing
59
- pip install -e ".[quantum,dev]"
51
+ pip install -e ".[dev]"
60
52
  pytest
61
53
  ```
62
54
 
@@ -86,8 +78,6 @@ spatial audit # hardware, current usage, limits of this ma
86
78
  spatial status # honest status of every engine
87
79
  spatial plan app.exe # detected format + execution routes, with reasons
88
80
  spatial run app.elf 600 300 # run through the first feasible route (micro-VM here)
89
- spatial q run examples/03_vqe_hybrid.sq --trace # SPATIAL Q hybrid program
90
- spatial q qasm examples/04_teleport.sq --args '[1.0]' # export OpenQASM 3
91
81
  spatial bench all # redo every measurement and regenerate the results table
92
82
  ```
93
83
 
@@ -109,17 +99,16 @@ st.put(0, b"..." * 1000); st.get(0); print(st.stats())
109
99
  | Fleet (agent on every machine + hub: measure, place, recommend, audit) | operational prototype | `tests/test_fleet.py`, `benchmarks/bench_fleet.py` |
110
100
  | Compute Engine (detect, monitor, compare strategies, offload, cost) | operational prototype | `tests/test_compute.py`, `benchmarks/bench_cpu.py` |
111
101
  | Tiered memory (hot / compressed / far) | operational prototype | `tests/test_memory.py`, `benchmarks/bench_memory.py` |
112
- | Runtime Engine (inspect binaries, route, micro-VM, WASI) | operational prototype | `tests/test_runtime.py`, `benchmarks/bench_runtime.py` |
113
- | SPATIAL Q (language, compiler, IR, OpenQASM 3, simulators) | operational prototype | `tests/test_q.py`, `benchmarks/bench_q.py` |
114
- | AI, Scientific, Simulation, Intelligence, Holographic | first components (toy model, small solvers, numerical optics) | `tests/test_engines.py`, `tests/test_domains.py` |
102
+ | Runtime Engine (inspect binaries, route, micro-VM, WASI, containers incl. ARM64 via emulation) | operational prototype | `tests/test_runtime.py`, `benchmarks/bench_runtime.py` |
103
+ | Portable kernels (one source, CPU/Metal/CUDA/HIP/Triton; market-vertical presets) | first components | `tests/test_kernel.py`, `benchmarks/bench_kernel.py` |
104
+ | AI, Intelligence | first components (toy model) | `tests/test_engines.py`, `tests/test_domains.py` |
115
105
 
116
- Measured on the reference machine (AC power): Numba JIT ×31.6 over pure Python with an identical result; 0.88 s to boot an isolated Linux micro-VM on macOS; −75 % local RAM for a skewed-access dataset at 107× the mean access latency; SPATIAL Q simulator fidelity 1.000 against Qiskit up to 16 qubits. Full table and conditions: [docs/RESULTATS.fr.md](docs/RESULTATS.fr.md).
106
+ Measured on the reference machine (AC power): Numba JIT ×31.6 over pure Python with an identical result; 0.88 s to boot an isolated Linux micro-VM on macOS; −75 % local RAM for a skewed-access dataset at 107× the mean access latency. Full table and conditions: [docs/RESULTATS.fr.md](docs/RESULTATS.fr.md).
117
107
 
118
108
  ## What it does not do
119
109
 
120
110
  - It does not add RAM. Compressed, on-disk or remote memory is typed `far_memory`, never `ram`, and a test enforces it.
121
111
  - It does not confuse virtualization with extra resources.
122
- - It does not claim a QPU speeds anything up: everything in SPATIAL Q is classical simulation, and the `qpu` backend refuses to run until a provider is configured.
123
112
  - It never exposes your machine: servers bind to `127.0.0.1` and refuse anything else without an explicit `--allow-remote`.
124
113
 
125
114
  ## Open core
@@ -2,9 +2,9 @@
2
2
 
3
3
  **Measure. Decide. Prove.**
4
4
 
5
- One objective for the whole infrastructure: get every job done correctly at the lowest cost, and prove it. Spatial Computing prices every way to run a job across compute, memory, runtime, quantum, AI, science and a fleet of machines, picks the cheapest, and records the estimate next to what really happened. A gain is claimed only when it is measured. It does not add RAM, cores or GPUs: it compares execution strategies on the hardware you have, trades one resource for another in numbers, and says plainly what it cannot do.
5
+ One objective for the whole infrastructure: get every job done correctly at the lowest cost, and prove it. Spatial Computing prices every way to run a job across compute, memory, runtime, AI and a fleet of machines, picks the cheapest, and records the estimate next to what really happened. A gain is claimed only when it is measured. It does not add RAM, cores or GPUs: it compares execution strategies on the hardware you have, trades one resource for another in numbers, and says plainly what it cannot do.
6
6
 
7
- > **Status: v0.17.0, early-stage open-source toolkit.** Everything here was built and measured on a single 2017 MacBook Pro (Intel i7-7660U, 2 cores, 16 GB). Nothing has been proven on a second machine, a data-center GPU or a real quantum computer. See [Limitations](docs/LIMITATIONS.md) and the [site](https://spatial-computing-ecru.vercel.app).
7
+ > **Status: v0.22.0, early-stage open-source toolkit.** Everything here was built and measured on a single 2017 MacBook Pro (Intel i7-7660U, 2 cores, 16 GB). Nothing has been proven on a second machine or a data-center GPU. See [Limitations](docs/LIMITATIONS.md) and the [site](https://spatial-computing-ecru.vercel.app).
8
8
 
9
9
  [Français](README.fr.md)
10
10
 
@@ -14,7 +14,7 @@ Python 3.10 or newer.
14
14
 
15
15
  ```bash
16
16
  python3 -m venv .venv && source .venv/bin/activate
17
- pip install "spatial-computing[quantum]"
17
+ pip install spatial-computing
18
18
  spatial audit
19
19
  ```
20
20
 
@@ -22,7 +22,7 @@ From source, to develop:
22
22
 
23
23
  ```bash
24
24
  git clone https://github.com/abraham1116/spatial-computing && cd spatial-computing
25
- pip install -e ".[quantum,dev]"
25
+ pip install -e ".[dev]"
26
26
  pytest
27
27
  ```
28
28
 
@@ -52,8 +52,6 @@ spatial audit # hardware, current usage, limits of this ma
52
52
  spatial status # honest status of every engine
53
53
  spatial plan app.exe # detected format + execution routes, with reasons
54
54
  spatial run app.elf 600 300 # run through the first feasible route (micro-VM here)
55
- spatial q run examples/03_vqe_hybrid.sq --trace # SPATIAL Q hybrid program
56
- spatial q qasm examples/04_teleport.sq --args '[1.0]' # export OpenQASM 3
57
55
  spatial bench all # redo every measurement and regenerate the results table
58
56
  ```
59
57
 
@@ -75,17 +73,16 @@ st.put(0, b"..." * 1000); st.get(0); print(st.stats())
75
73
  | Fleet (agent on every machine + hub: measure, place, recommend, audit) | operational prototype | `tests/test_fleet.py`, `benchmarks/bench_fleet.py` |
76
74
  | Compute Engine (detect, monitor, compare strategies, offload, cost) | operational prototype | `tests/test_compute.py`, `benchmarks/bench_cpu.py` |
77
75
  | Tiered memory (hot / compressed / far) | operational prototype | `tests/test_memory.py`, `benchmarks/bench_memory.py` |
78
- | Runtime Engine (inspect binaries, route, micro-VM, WASI) | operational prototype | `tests/test_runtime.py`, `benchmarks/bench_runtime.py` |
79
- | SPATIAL Q (language, compiler, IR, OpenQASM 3, simulators) | operational prototype | `tests/test_q.py`, `benchmarks/bench_q.py` |
80
- | AI, Scientific, Simulation, Intelligence, Holographic | first components (toy model, small solvers, numerical optics) | `tests/test_engines.py`, `tests/test_domains.py` |
76
+ | Runtime Engine (inspect binaries, route, micro-VM, WASI, containers incl. ARM64 via emulation) | operational prototype | `tests/test_runtime.py`, `benchmarks/bench_runtime.py` |
77
+ | Portable kernels (one source, CPU/Metal/CUDA/HIP/Triton; market-vertical presets) | first components | `tests/test_kernel.py`, `benchmarks/bench_kernel.py` |
78
+ | AI, Intelligence | first components (toy model) | `tests/test_engines.py`, `tests/test_domains.py` |
81
79
 
82
- Measured on the reference machine (AC power): Numba JIT ×31.6 over pure Python with an identical result; 0.88 s to boot an isolated Linux micro-VM on macOS; −75 % local RAM for a skewed-access dataset at 107× the mean access latency; SPATIAL Q simulator fidelity 1.000 against Qiskit up to 16 qubits. Full table and conditions: [docs/RESULTATS.fr.md](docs/RESULTATS.fr.md).
80
+ Measured on the reference machine (AC power): Numba JIT ×31.6 over pure Python with an identical result; 0.88 s to boot an isolated Linux micro-VM on macOS; −75 % local RAM for a skewed-access dataset at 107× the mean access latency. Full table and conditions: [docs/RESULTATS.fr.md](docs/RESULTATS.fr.md).
83
81
 
84
82
  ## What it does not do
85
83
 
86
84
  - It does not add RAM. Compressed, on-disk or remote memory is typed `far_memory`, never `ram`, and a test enforces it.
87
85
  - It does not confuse virtualization with extra resources.
88
- - It does not claim a QPU speeds anything up: everything in SPATIAL Q is classical simulation, and the `qpu` backend refuses to run until a provider is configured.
89
86
  - It never exposes your machine: servers bind to `127.0.0.1` and refuse anything else without an explicit `--allow-remote`.
90
87
 
91
88
  ## Open core
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "spatial-computing"
7
- version = "0.20.0"
8
- description = "Spatial Computing: open-source infrastructure efficiency toolkit. Measure, decide, prove (compute, tiered memory, runtime routing, hybrid quantum language)"
7
+ version = "0.23.0"
8
+ description = "Spatial Computing: open-source infrastructure efficiency toolkit. Measure, decide, prove (compute, tiered memory, runtime routing, fleet)"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
11
11
  license-files = ["LICENSE"]
@@ -15,9 +15,7 @@ requires-python = ">=3.10"
15
15
  dependencies = ["numpy>=1.26,<2.2", "psutil>=5.9", "numba>=0.59,<0.62", "lz4>=4.3", "cryptography>=42"]
16
16
 
17
17
  [project.optional-dependencies]
18
- quantum = ["qiskit>=2.0", "qiskit-aer>=0.17", "qiskit-qasm3-import>=0.5", "pyqir>=0.10"]
19
18
  build = ["ziglang>=0.13"]
20
- qpu = ["qiskit>=2.0", "qiskit-ibm-runtime>=0.40"]
21
19
  dev = ["pytest>=8", "lxml>=5"]
22
20
 
23
21
  [project.urls]
@@ -26,7 +24,6 @@ Repository = "https://github.com/abraham1116/spatial-computing"
26
24
 
27
25
  [project.scripts]
28
26
  spatial = "spatial.cli:main"
29
- spatialq = "spatial.q.runtime:main"
30
27
 
31
28
  [tool.setuptools.packages.find]
32
29
  include = ["spatial*"]
@@ -3,4 +3,4 @@
3
3
  Status of every engine is declared in spatial.core.registry and must be backed
4
4
  by a test or benchmark before being set to OPERATIONAL.
5
5
  """
6
- __version__ = "0.20.0"
6
+ __version__ = "0.23.0"
@@ -10,7 +10,7 @@ from pathlib import Path
10
10
 
11
11
  ROOT = Path(__file__).resolve().parents[1]
12
12
  BENCHES = {"cpu": "bench_cpu", "memory": "bench_memory", "gpu": "bench_gpu",
13
- "runtime": "bench_runtime", "q": "bench_q"}
13
+ "runtime": "bench_runtime"}
14
14
 
15
15
 
16
16
  def cmd_audit(a):
@@ -64,13 +64,6 @@ def cmd_run(a):
64
64
  return 0 if e.ok else 1
65
65
 
66
66
 
67
- def cmd_q(a):
68
- from .q import runtime
69
- sys.argv = ["spatialq", *a.rest]
70
- runtime.main()
71
- return 0
72
-
73
-
74
67
  def cmd_bench(a):
75
68
  names = list(BENCHES) if a.name == "all" else [a.name]
76
69
  bdir = ROOT / "benchmarks"
@@ -211,17 +204,14 @@ def cmd_fleet(a):
211
204
  def cmd_optimize(a):
212
205
  import json as _json
213
206
  from .unified import Job, Objective, Planner, PlanError, Prices
214
- prices = Prices(local_usd_per_hour=a.local_usd_per_hour, qpu_usd_per_shot=a.qpu_usd_per_shot, qpu_usd_per_task=a.qpu_usd_per_task,
215
- ram_usd_gb_hour=a.ram_usd_gb_hour, storage_usd_gb_hour=a.storage_usd_gb_hour)
207
+ prices = Prices(local_usd_per_hour=a.local_usd_per_hour, ram_usd_gb_hour=a.ram_usd_gb_hour, storage_usd_gb_hour=a.storage_usd_gb_hour)
216
208
  obj = Objective(minimize=a.objective, deadline_s=a.deadline, max_ram_bytes=int(a.max_ram_gib * 2**30) if a.max_ram_gib else None,
217
- require_isolation=a.isolated, allow_qpu=a.allow_qpu, require_hardware=a.require_hardware)
209
+ require_isolation=a.isolated)
218
210
  hub = _hub_client(a) if a.hub else None
219
211
  if a.job == "compute":
220
212
  job = Job.compute(a.family, **_json.loads(a.params))
221
213
  elif a.job == "binary":
222
214
  job = Job.binary(a.file, a.args, a.est_native_s)
223
- elif a.job == "quantum":
224
- job = Job.quantum(Path(a.file).read_text(), a.kernel, _json.loads(a.kargs), a.shots)
225
215
  elif a.job == "dataset":
226
216
  job = Job.dataset(int(a.gib * 2**30), a.accesses, a.locality, a.hot_fraction)
227
217
  else:
@@ -292,9 +282,6 @@ def main(argv=None):
292
282
  p.add_argument("--route")
293
283
  p.add_argument("--timeout", type=float, default=300)
294
284
  p.set_defaults(fn=cmd_run)
295
- p = sub.add_parser("q", help="SPATIAL Q: run|check|qasm|ir <file.sq>")
296
- p.add_argument("rest", nargs=argparse.REMAINDER)
297
- p.set_defaults(fn=cmd_q)
298
285
  p = sub.add_parser("bench", help="run benchmarks and regenerate docs/RESULTATS.md")
299
286
  p.add_argument("name", choices=[*BENCHES, "all"])
300
287
  p.set_defaults(fn=cmd_bench)
@@ -308,22 +295,20 @@ def main(argv=None):
308
295
  p.add_argument("--allow-remote", action="store_true", help="explicit consent to accept LAN connections")
309
296
  p.set_defaults(fn=cmd_worker)
310
297
  p = sub.add_parser("optimize", help="ONE objective for every engine: price each way to do a job, pick the cheapest, optionally run and check")
311
- p.add_argument("job", choices=["compute", "binary", "quantum", "dataset", "kv"])
312
- p.add_argument("--family", default="mandel", help="compute: mandel|heat|nbody|hologram|option|ode")
298
+ p.add_argument("job", choices=["compute", "binary", "dataset", "kv"])
299
+ p.add_argument("--family", default="mandel", help="compute: mandel|collatz|waves|batch_score|pk_mandel|pk_collatz|pk_batch_score|pk_rtb|pk_credit|pk_claims|pk_alerts|pk_moderation|pk_telecom")
313
300
  p.add_argument("--params", default="{}", help="compute: JSON parameters, e.g. '{\"n\":800,\"iters\":300}'")
314
- p.add_argument("--file", help="binary: path; quantum: .sq file")
301
+ p.add_argument("--file", help="binary: path")
315
302
  p.add_argument("args", nargs="*", help="binary: arguments")
316
303
  p.add_argument("--est-native-s", type=float, default=1.0, help="binary: expected run time when native")
317
- p.add_argument("--kernel", help="quantum: kernel name"); p.add_argument("--kargs", default="[]"); p.add_argument("--shots", type=int, default=1000)
318
304
  p.add_argument("--gib", type=float, default=1.0, help="dataset: size in GiB"); p.add_argument("--accesses", type=int, default=100000)
319
305
  p.add_argument("--locality", type=float, default=0.8); p.add_argument("--hot-fraction", type=float, default=0.2)
320
306
  p.add_argument("--prefix-tokens", type=int, default=1000); p.add_argument("--reuse", type=float, default=0.5); p.add_argument("--horizon-h", type=float, default=1.0)
321
307
  p.add_argument("--objective", choices=["cost", "time"], default="cost")
322
308
  p.add_argument("--deadline", type=float); p.add_argument("--max-ram-gib", type=float)
323
- p.add_argument("--isolated", action="store_true"); p.add_argument("--allow-qpu", action="store_true"); p.add_argument("--require-hardware", action="store_true")
309
+ p.add_argument("--isolated", action="store_true")
324
310
  p.add_argument("--local-usd-per-hour", type=float, default=0.134, help="price of this machine (default is an assumption)")
325
311
  p.add_argument("--ram-usd-gb-hour", type=float, default=0.0); p.add_argument("--storage-usd-gb-hour", type=float, default=0.0)
326
- p.add_argument("--qpu-usd-per-shot", type=float, default=0.0); p.add_argument("--qpu-usd-per-task", type=float, default=0.0)
327
312
  p.add_argument("--hub", help="host:port of a fleet hub: nodes become options"); p.add_argument("--token-file")
328
313
  p.add_argument("--execute", action="store_true", help="run the chosen option and compare with the estimate")
329
314
  p.set_defaults(fn=cmd_optimize)
@@ -172,6 +172,66 @@ def pk_batch_score_cpu(n: int, signals: int) -> int:
172
172
  def pk_batch_score_metal(n: int, signals: int) -> int:
173
173
  return _pk("batch_score", "metal", n, signals=signals)
174
174
 
175
+ def pk_rtb_cpu(n: int, signals: int) -> int:
176
+ """Portable kernel (spatial.kernel): a real-time ad-bid score (RTB-shaped), on the CPU. SAME kernel as pk_batch_score (`batch_score`
177
+ in spatial.kernel.library), only the name and docs differ: synthetic signals, no trained model,
178
+ no real data for this vertical. See docs/KERNELS.md."""
179
+ return _pk("batch_score", "cpu", n, signals=signals)
180
+
181
+
182
+ def pk_rtb_metal(n: int, signals: int) -> int:
183
+ return _pk("batch_score", "metal", n, signals=signals)
184
+
185
+ def pk_credit_cpu(n: int, signals: int) -> int:
186
+ """Portable kernel (spatial.kernel): a credit/loan application score, on the CPU. SAME kernel as pk_batch_score (`batch_score`
187
+ in spatial.kernel.library), only the name and docs differ: synthetic signals, no trained model,
188
+ no real data for this vertical. See docs/KERNELS.md."""
189
+ return _pk("batch_score", "cpu", n, signals=signals)
190
+
191
+
192
+ def pk_credit_metal(n: int, signals: int) -> int:
193
+ return _pk("batch_score", "metal", n, signals=signals)
194
+
195
+ def pk_claims_cpu(n: int, signals: int) -> int:
196
+ """Portable kernel (spatial.kernel): an insurance claim score, on the CPU. SAME kernel as pk_batch_score (`batch_score`
197
+ in spatial.kernel.library), only the name and docs differ: synthetic signals, no trained model,
198
+ no real data for this vertical. See docs/KERNELS.md."""
199
+ return _pk("batch_score", "cpu", n, signals=signals)
200
+
201
+
202
+ def pk_claims_metal(n: int, signals: int) -> int:
203
+ return _pk("batch_score", "metal", n, signals=signals)
204
+
205
+ def pk_alerts_cpu(n: int, signals: int) -> int:
206
+ """Portable kernel (spatial.kernel): a security alert score (SIEM-shaped), on the CPU. SAME kernel as pk_batch_score (`batch_score`
207
+ in spatial.kernel.library), only the name and docs differ: synthetic signals, no trained model,
208
+ no real data for this vertical. See docs/KERNELS.md."""
209
+ return _pk("batch_score", "cpu", n, signals=signals)
210
+
211
+
212
+ def pk_alerts_metal(n: int, signals: int) -> int:
213
+ return _pk("batch_score", "metal", n, signals=signals)
214
+
215
+ def pk_moderation_cpu(n: int, signals: int) -> int:
216
+ """Portable kernel (spatial.kernel): a content moderation score, on the CPU. SAME kernel as pk_batch_score (`batch_score`
217
+ in spatial.kernel.library), only the name and docs differ: synthetic signals, no trained model,
218
+ no real data for this vertical. See docs/KERNELS.md."""
219
+ return _pk("batch_score", "cpu", n, signals=signals)
220
+
221
+
222
+ def pk_moderation_metal(n: int, signals: int) -> int:
223
+ return _pk("batch_score", "metal", n, signals=signals)
224
+
225
+ def pk_telecom_cpu(n: int, signals: int) -> int:
226
+ """Portable kernel (spatial.kernel): a telecom billing/fraud score, on the CPU. SAME kernel as pk_batch_score (`batch_score`
227
+ in spatial.kernel.library), only the name and docs differ: synthetic signals, no trained model,
228
+ no real data for this vertical. See docs/KERNELS.md."""
229
+ return _pk("batch_score", "cpu", n, signals=signals)
230
+
231
+
232
+ def pk_telecom_metal(n: int, signals: int) -> int:
233
+ return _pk("batch_score", "metal", n, signals=signals)
234
+
175
235
 
176
236
  def montecarlo_pi(samples: int, seed: int = 0) -> float:
177
237
  rng = np.random.default_rng(seed)
@@ -201,58 +261,6 @@ def matmul(n: int, seed: int = 0) -> float:
201
261
  return float((a @ b).trace())
202
262
 
203
263
 
204
- def heat_numpy(n: int, steps: int, c: float = 0.2) -> float:
205
- """Simulation engine: 2-D heat diffusion from a hot square; returns the peak temperature."""
206
- import numpy as np
207
- from ..simulation.heat import simulate
208
- u0 = np.zeros((n, n))
209
- u0[n // 2 - n // 10: n // 2 + n // 10 + 1, n // 2 - n // 10: n // 2 + n // 10 + 1] = 100.0
210
- return float(simulate(u0, c, steps, "numpy").max())
211
-
212
-
213
- def heat_numba(n: int, steps: int, c: float = 0.2) -> float:
214
- import numpy as np
215
- from ..simulation.heat import simulate
216
- u0 = np.zeros((n, n))
217
- u0[n // 2 - n // 10: n // 2 + n // 10 + 1, n // 2 - n // 10: n // 2 + n // 10 + 1] = 100.0
218
- return float(simulate(u0, c, steps, "numba").max())
219
-
220
-
221
- def nbody(bodies: int, steps: int, seed: int = 1) -> float:
222
- """Simulation engine: relative energy drift of a leapfrog N-body run (should be tiny)."""
223
- import numpy as np
224
- from ..simulation import nbody as nb
225
- rng = np.random.default_rng(seed)
226
- pos, vel, mass = rng.normal(size=(bodies, 3)), rng.normal(size=(bodies, 3)) * 0.1, rng.uniform(0.5, 1.5, bodies)
227
- e0 = nb.energy(pos, vel, mass, 0.05)
228
- p, v = nb.leapfrog(pos, vel, mass, dt=1e-3, steps=steps, soft=0.05)
229
- return float(abs(nb.energy(p, v, mass, 0.05) - e0) / abs(e0))
230
-
231
-
232
- def hologram_peak(n: int, seed: int = 1) -> int:
233
- """Holographic engine: synthesise a 1-point hologram, reconstruct it, return the focus position
234
- (row * n + column) of the brightest pixel (it must be the emitter's pixel)."""
235
- import numpy as np
236
- from ..holographic import hologram, reconstruct
237
- wl, pitch = 633e-9, 8e-6
238
- k = int(np.random.default_rng(seed).integers(-n // 8, n // 8 + 1))
239
- H = hologram(np.array([[k * pitch, 0.0, 0.05]]), np.array([1.0]), n, pitch, wl)
240
- img = reconstruct(H, 0.05, pitch, wl)
241
- return int(np.argmax(img))
242
-
243
-
244
- def option_mc(paths: int, seed: int = 0) -> float:
245
- """Scientific engine: Monte-Carlo European call price (Black-Scholes reference exists in tests)."""
246
- from ..scientific import european_call_mc
247
- return float(european_call_mc(100.0, 105.0, 0.03, 0.2, 1.0, paths, seed)[0])
248
-
249
-
250
- def harmonic_rk4_x(omega: float, t_end: float, steps: int) -> float:
251
- """Scientific engine: RK4 solution of x'' = -omega^2 x at t_end (exact: cos(omega * t_end))."""
252
- from ..scientific import harmonic_rk4
253
- return float(harmonic_rk4(omega, t_end, steps)[0])
254
-
255
-
256
264
  REGISTRY = {
257
265
  "mandel_python": mandel_python,
258
266
  "mandel_numpy": mandel_numpy,
@@ -268,12 +276,18 @@ REGISTRY = {
268
276
  "pk_collatz_metal": pk_collatz_metal,
269
277
  "pk_batch_score_cpu": pk_batch_score_cpu,
270
278
  "pk_batch_score_metal": pk_batch_score_metal,
271
- "heat_numpy": heat_numpy,
272
- "heat_numba": heat_numba,
273
- "nbody": nbody,
274
- "hologram_peak": hologram_peak,
275
- "option_mc": option_mc,
276
- "harmonic_rk4": harmonic_rk4_x,
279
+ "pk_rtb_cpu": pk_rtb_cpu,
280
+ "pk_rtb_metal": pk_rtb_metal,
281
+ "pk_credit_cpu": pk_credit_cpu,
282
+ "pk_credit_metal": pk_credit_metal,
283
+ "pk_claims_cpu": pk_claims_cpu,
284
+ "pk_claims_metal": pk_claims_metal,
285
+ "pk_alerts_cpu": pk_alerts_cpu,
286
+ "pk_alerts_metal": pk_alerts_metal,
287
+ "pk_moderation_cpu": pk_moderation_cpu,
288
+ "pk_moderation_metal": pk_moderation_metal,
289
+ "pk_telecom_cpu": pk_telecom_cpu,
290
+ "pk_telecom_metal": pk_telecom_metal,
277
291
  }
278
292
  if HAVE_NUMBA:
279
293
  REGISTRY["mandel_numba"] = mandel_numba
@@ -20,8 +20,6 @@ class ResourceKind(str, Enum):
20
20
  FAR_MEMORY = "far_memory" # compressed / remote / storage-backed. Never reported as RAM.
21
21
  STORAGE = "storage"
22
22
  NETWORK = "network"
23
- QPU = "qpu"
24
- QSIM = "qsim" # classical simulator of a quantum device
25
23
 
26
24
 
27
25
  @dataclass
@@ -43,30 +43,19 @@ ENGINES: list[Engine] = [
43
43
  "one process with SQLite; no SAML; tax tools are not a compliance engine; e-mail tested against a local SMTP stand-in, payments against a fake Stripe API only"),
44
44
  Engine("planner", "Spatial Planner (the one objective)", "spatial.unified", Status.OPERATIONAL_PROTOTYPE,
45
45
  "tests/test_unified.py",
46
- "estimates come from probes and measured constants on one machine; calibration is a median of past ratios; no learned model; fleet and QPU pricing need the caller's prices"),
46
+ "estimates come from probes and measured constants on one machine; calibration is a median of past ratios; no learned model; fleet pricing needs the caller's prices"),
47
47
  Engine("fleet", "Spatial Fleet (agent + hub)", "spatial.fleet", Status.OPERATIONAL_PROTOTYPE,
48
48
  "tests/test_fleet.py, benchmarks/bench_fleet.py",
49
49
  "validated on one machine (agents on loopback); HA: active/standby for two hubs, majority election (election safety, no replicated log) for three or more, tested on one machine with simulated clocks; dashboard is read-only and local; recommendations are estimates; never applies changes by itself"),
50
50
  Engine("runtime", "Spatial Runtime Engine", "spatial.runtime", Status.OPERATIONAL_PROTOTYPE,
51
51
  "tests/test_runtime.py, benchmarks/bench_runtime.py",
52
52
  "Windows: one console program and one GUI window (Notepad) under Wine, nothing more; containers: static Linux ELF, tested with Docker (Colima) and Podman; Linux GUI apps stream through a container and noVNC (three allow-listed apps)"),
53
- Engine("q", "SPATIAL Q", "spatial.q", Status.OPERATIONAL_PROTOTYPE,
54
- "tests/test_q.py, benchmarks/bench_q.py",
55
- "no real QPU executed (OpenQASM 3 and QIR export only); simulator limited by RAM"),
56
53
  Engine("ai", "Spatial AI Engine", "spatial.ai", Status.FIRST_COMPONENTS,
57
54
  "tests/test_engines.py (toy transformer KV cache: restore equals recompute)",
58
55
  "toy NumPy model only; no real LLM, no GPU; placement planner is in the private package"),
59
- Engine("scientific", "Spatial Scientific & Industrial Engine", "spatial.scientific",
60
- Status.FIRST_COMPONENTS, "tests/test_domains.py, tests/test_engines.py (validated jobs)",
61
- "two reference jobs; no domain solvers"),
62
- Engine("simulation", "Spatial Simulation Engine", "spatial.simulation", Status.FIRST_COMPONENTS,
63
- "tests/test_domains.py, tests/test_engines.py (heat diffusion, N-body)", "two small solvers; no multiphysics"),
64
56
  Engine("intelligence", "Spatial Intelligence Engine", "spatial.intelligence",
65
57
  Status.FIRST_COMPONENTS, "tests/test_domains.py, tests/test_engines.py (predictor drives the scheduler)",
66
58
  "least-squares runtime model only"),
67
- Engine("holographic", "Spatial Holographic Engine", "spatial.holographic", Status.FIRST_COMPONENTS,
68
- "tests/test_engines.py (hologram synthesis + numerical reconstruction)",
69
- "numerical optics only; no display hardware, no real-time rendering"),
70
59
  ]
71
60
 
72
61
 
@@ -32,12 +32,13 @@ CATALOG = {
32
32
  "mandel_numba_parallel": dict(title="Mandelbrot (multi-core)", doc="Iteration counts of the Mandelbrot set on a grid, Numba on all cores.", params={"n": (600, 16, 3000), "iters": (200, 10, 2000)}),
33
33
  "pk_mandel_cpu": dict(title="Portable kernel: Mandelbrot", doc="The same kernel source that also runs on a Metal GPU, on the CPU.", params={"n": (512, 16, 2048), "iters": (200, 10, 2000)}),
34
34
  "pk_batch_score_cpu": dict(title="Portable kernel: batch scoring", doc="Fraud/risk/ranking/anomaly-shaped batch scoring (synthetic signals, no real model) on the CPU.", params={"n": (512, 16, 2048), "signals": (16, 1, 200)}),
35
+ "pk_rtb_cpu": dict(title="Portable kernel: Real-time ad-bid score", doc="RTB-shaped batch scoring (synthetic signals, no real model) on the CPU.", params={"n": (512, 16, 2048), "signals": (16, 1, 200)}),
36
+ "pk_credit_cpu": dict(title="Portable kernel: Credit application score", doc="Credit/loan-application-shaped batch scoring (synthetic signals, no real model) on the CPU.", params={"n": (512, 16, 2048), "signals": (16, 1, 200)}),
37
+ "pk_claims_cpu": dict(title="Portable kernel: Insurance claim score", doc="Insurance-claim-shaped batch scoring (synthetic signals, no real model) on the CPU.", params={"n": (512, 16, 2048), "signals": (16, 1, 200)}),
38
+ "pk_alerts_cpu": dict(title="Portable kernel: Security alert score", doc="SIEM-alert-shaped batch scoring (synthetic signals, no real model) on the CPU.", params={"n": (512, 16, 2048), "signals": (16, 1, 200)}),
39
+ "pk_moderation_cpu": dict(title="Portable kernel: Content moderation score", doc="Content-moderation-shaped batch scoring (synthetic signals, no real model) on the CPU.", params={"n": (512, 16, 2048), "signals": (16, 1, 200)}),
40
+ "pk_telecom_cpu": dict(title="Portable kernel: Telecom fraud/billing score", doc="Telecom-fraud/billing-shaped batch scoring (synthetic signals, no real model) on the CPU.", params={"n": (512, 16, 2048), "signals": (16, 1, 200)}),
35
41
  "matmul": dict(title="Matrix multiply", doc="Dense float64 matrix product of size n.", params={"n": (600, 16, 1500)}),
36
- "heat_numba": dict(title="Heat diffusion", doc="2-D heat diffusion from a hot square (simulation engine, Numba).", params={"n": (200, 16, 800), "steps": (500, 1, 5000)}),
37
- "nbody": dict(title="N-body", doc="Leapfrog N-body integration; returns the relative energy drift.", params={"bodies": (100, 2, 300), "steps": (400, 1, 2000)}),
38
- "option_mc": dict(title="Option pricing (Monte Carlo)", doc="European call price by Monte Carlo (scientific engine).", params={"paths": (1_000_000, 1000, 5_000_000)}),
39
- "harmonic_rk4": dict(title="Harmonic oscillator (RK4)", doc="Runge-Kutta solution of x'' = -omega^2 x, compared with the exact answer.", params={"omega": (1.0, 0.01, 100.0), "t_end": (6.0, 0.1, 1000.0), "steps": (2000, 10, 1_000_000)}),
40
- "hologram_peak": dict(title="Hologram synthesis", doc="Synthesise a one-point hologram and reconstruct it (holographic engine).", params={"n": (256, 32, 1024)}),
41
42
  "sha256_chain": dict(title="SHA-256 chain", doc="Hash-bound workload: memory bandwidth and SHA throughput.", params={"rounds": (200, 1, 2000)}),
42
43
  }
43
44
 
@@ -223,7 +223,7 @@ async function appView(id, tab) {
223
223
  h("div", {class: "card"}, h("h2", {}, "Send work"), h("p", {class: "small mute"}, "Hub address: ", h("span", {class: "mono"}, hub)),
224
224
  h("pre", {class: "code"}, `# put a client key in app.tok, then:\nspatial fleet submit --hub ${hub} \\\n --token-file app.tok \\\n --workload montecarlo_pi \\\n --params '{"samples": 1000000}'\n\nspatial fleet status --hub ${hub} --token-file app.tok`)),
225
225
  h("div", {class: "card"}, h("h2", {}, "Add a machine"), h("p", {class: "small mute"}, "Create a node key (Keys tab), save it to node.tok on the machine, then:"),
226
- h("pre", {class: "code"}, `pip install "spatial-computing[quantum]"\nspatial agent --hub ${hub} --token-file node.tok`), h("p", {class: "small mute"}, "The machine appears in ", h("a", {href: "#/fleet"}, "Fleet"), " within seconds."))),
226
+ h("pre", {class: "code"}, `pip install spatial-computing\nspatial agent --hub ${hub} --token-file node.tok`), h("p", {class: "small mute"}, "The machine appears in ", h("a", {href: "#/fleet"}, "Fleet"), " within seconds."))),
227
227
  h("div", {class: "card"}, h("h2", {}, "From Python"), h("pre", {class: "code"}, `from spatial.core.protocol import RpcClient\nc = RpcClient("${hub.split(":")[0]}", ${hub.split(":")[1] || 7700}, open("app.tok","rb").read().strip())\ntid = c.call({"op": "submit", "workload": "montecarlo_pi", "params": {"samples": 1000000}})[0]["task_id"]\nprint(c.call({"op": "task", "task_id": tid})[0]["task"]["state"])`),
228
228
  h("p", {class: "small mute"}, docLink("docs/fleet.html", "Fleet documentation"), " · ", docLink("docs/api.html", "REST API for the console")))];
229
229
  } else if (tab === "jobs") {
@@ -0,0 +1,12 @@
1
+ """The one place that maps `platform.machine()` to the architecture names used everywhere else in this
2
+ package (matching `inspect.py`'s ELF/Mach-O/PE architecture names: x86_64, aarch64, i386, arm). A separate
3
+ module so `planner.py`, `microvm.py` and `runner.py` can all import it without a circular import."""
4
+ from __future__ import annotations
5
+
6
+ import platform
7
+
8
+ _MACHINE = {"AMD64": "x86_64", "arm64": "aarch64"}
9
+
10
+
11
+ def host_arch() -> str:
12
+ return _MACHINE.get(platform.machine(), platform.machine())
@@ -18,6 +18,8 @@ import time
18
18
  from dataclasses import dataclass
19
19
  from pathlib import Path
20
20
 
21
+ from .arch import host_arch
22
+
21
23
  VENDOR = Path(__file__).resolve().parents[2] / "vendor"
22
24
  KERNEL = VENDOR / "vmlinuz-virt"
23
25
  BUSYBOX = VENDOR / "busybox-x86_64"
@@ -77,7 +79,12 @@ class VmResult:
77
79
 
78
80
 
79
81
  def available() -> dict:
80
- return {"qemu": shutil.which("qemu-system-x86_64"), "kernel": KERNEL.exists(), "busybox": BUSYBOX.exists()}
82
+ """This micro-VM is x86_64-only (vendored kernel and busybox, qemu-system-x86_64): on a different host
83
+ architecture it is correctly unavailable, not silently wrong (there is no aarch64 kernel/busybox vendored
84
+ here, so a host_arch() == "aarch64" node would otherwise look for an x86_64 emulator it cannot use as a
85
+ same-architecture micro-VM)."""
86
+ x86 = host_arch() == "x86_64"
87
+ return {"qemu": x86 and shutil.which("qemu-system-x86_64"), "kernel": x86 and KERNEL.exists(), "busybox": x86 and BUSYBOX.exists()}
81
88
 
82
89
 
83
90
  def run_elf(elf_path: str, args: list[str] | None = None, accel: str = "hvf", mem_mb: int = 256,