limen-compiler 0.8.3__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 (251) hide show
  1. limen_compiler-0.8.3/.env.example +31 -0
  2. limen_compiler-0.8.3/.github/workflows/ci.yml +37 -0
  3. limen_compiler-0.8.3/.github/workflows/release.yml +132 -0
  4. limen_compiler-0.8.3/.gitignore +11 -0
  5. limen_compiler-0.8.3/.vscode/settings.json +3 -0
  6. limen_compiler-0.8.3/Cargo.lock +317 -0
  7. limen_compiler-0.8.3/Cargo.toml +27 -0
  8. limen_compiler-0.8.3/LICENSE +101 -0
  9. limen_compiler-0.8.3/PKG-INFO +426 -0
  10. limen_compiler-0.8.3/README.md +365 -0
  11. limen_compiler-0.8.3/benchmarks/RESULTS.md +17 -0
  12. limen_compiler-0.8.3/benchmarks/TSP_EIL51_RESULTS.md +49 -0
  13. limen_compiler-0.8.3/benchmarks/TSP_SCALING_RESULTS.md +16 -0
  14. limen_compiler-0.8.3/benchmarks/qpu_benchmark.py +294 -0
  15. limen_compiler-0.8.3/benchmarks/tsp_eil51_benchmark.py +699 -0
  16. limen_compiler-0.8.3/benchmarks/tsp_scaling_study.py +425 -0
  17. limen_compiler-0.8.3/docs/ACCEPTABLE_USE.md +55 -0
  18. limen_compiler-0.8.3/docs/APPLY_NOTES.md +52 -0
  19. limen_compiler-0.8.3/docs/CHANGELOG.md +196 -0
  20. limen_compiler-0.8.3/docs/CONTRIBUTING.md +109 -0
  21. limen_compiler-0.8.3/docs/DIRECTORY_MAP.md +279 -0
  22. limen_compiler-0.8.3/docs/ROADMAP.md +87 -0
  23. limen_compiler-0.8.3/docs/architecture.md +186 -0
  24. limen_compiler-0.8.3/examples/.gitkeep +0 -0
  25. limen_compiler-0.8.3/examples/_resume_cut_circuit_kingston.py +112 -0
  26. limen_compiler-0.8.3/examples/analog_demo.py +112 -0
  27. limen_compiler-0.8.3/examples/analyze_tsp_qpu_results.py +275 -0
  28. limen_compiler-0.8.3/examples/cobyla_multi_backend.py +274 -0
  29. limen_compiler-0.8.3/examples/codesign_demo.py +112 -0
  30. limen_compiler-0.8.3/examples/communication_demo.py +81 -0
  31. limen_compiler-0.8.3/examples/cut_circuit_ibm_kingston.py +169 -0
  32. limen_compiler-0.8.3/examples/cutting_smoke_test.py +155 -0
  33. limen_compiler-0.8.3/examples/distributed_two_node.py +148 -0
  34. limen_compiler-0.8.3/examples/dwave_codesign_qpu.py +196 -0
  35. limen_compiler-0.8.3/examples/fetch_backend_calibration.py +84 -0
  36. limen_compiler-0.8.3/examples/fetch_openquantum_job.py +105 -0
  37. limen_compiler-0.8.3/examples/fetch_qpu_job.py +121 -0
  38. limen_compiler-0.8.3/examples/fleet_discovery.py +379 -0
  39. limen_compiler-0.8.3/examples/ibm_codesign_qpu.py +199 -0
  40. limen_compiler-0.8.3/examples/ibm_qpu_demo.py +355 -0
  41. limen_compiler-0.8.3/examples/max_cut.py +120 -0
  42. limen_compiler-0.8.3/examples/router_tier2_kingston.py +146 -0
  43. limen_compiler-0.8.3/examples/router_tier2_kingston_fetch.py +328 -0
  44. limen_compiler-0.8.3/examples/teleport_qpu.py +104 -0
  45. limen_compiler-0.8.3/examples/vrp_demo.py +182 -0
  46. limen_compiler-0.8.3/limen/.gitkeep +0 -0
  47. limen_compiler-0.8.3/limen/__init__.py +163 -0
  48. limen_compiler-0.8.3/limen/_qubo_spectrum_pyfallback.py +50 -0
  49. limen_compiler-0.8.3/limen/analog/LAYOUT.md +36 -0
  50. limen_compiler-0.8.3/limen/analog/__init__.py +30 -0
  51. limen_compiler-0.8.3/limen/analog/backends/__init__.py +17 -0
  52. limen_compiler-0.8.3/limen/analog/backends/bec.py +223 -0
  53. limen_compiler-0.8.3/limen/analog/backends/classical_sim.py +141 -0
  54. limen_compiler-0.8.3/limen/analog/backends/neutral_atom.py +702 -0
  55. limen_compiler-0.8.3/limen/analog/backends/photonic.py +239 -0
  56. limen_compiler-0.8.3/limen/analog/calibration_loader.py +185 -0
  57. limen_compiler-0.8.3/limen/analog/certificate.py +227 -0
  58. limen_compiler-0.8.3/limen/analog/delta_model.py +285 -0
  59. limen_compiler-0.8.3/limen/analog/hamiltonian.py +193 -0
  60. limen_compiler-0.8.3/limen/analog/lhz.py +287 -0
  61. limen_compiler-0.8.3/limen/backends/.gitkeep +0 -0
  62. limen_compiler-0.8.3/limen/backends/__init__.py +34 -0
  63. limen_compiler-0.8.3/limen/backends/azure_atom.py +258 -0
  64. limen_compiler-0.8.3/limen/backends/braket.py +253 -0
  65. limen_compiler-0.8.3/limen/backends/dwave.py +277 -0
  66. limen_compiler-0.8.3/limen/backends/neutral_atom.py +35 -0
  67. limen_compiler-0.8.3/limen/backends/openquantum.py +265 -0
  68. limen_compiler-0.8.3/limen/backends/photonic.py +35 -0
  69. limen_compiler-0.8.3/limen/backends/qiskit_backend.py +688 -0
  70. limen_compiler-0.8.3/limen/codesign/__init__.py +18 -0
  71. limen_compiler-0.8.3/limen/codesign/_pyfallback.py +90 -0
  72. limen_compiler-0.8.3/limen/codesign/portfolio.py +114 -0
  73. limen_compiler-0.8.3/limen/codesign/solver.py +309 -0
  74. limen_compiler-0.8.3/limen/communication/__init__.py +42 -0
  75. limen_compiler-0.8.3/limen/communication/channel.py +958 -0
  76. limen_compiler-0.8.3/limen/core/.gitkeep +0 -0
  77. limen_compiler-0.8.3/limen/core/__init__.py +1 -0
  78. limen_compiler-0.8.3/limen/core/compiler.py +346 -0
  79. limen_compiler-0.8.3/limen/core/ir.py +134 -0
  80. limen_compiler-0.8.3/limen/cutting/__init__.py +46 -0
  81. limen_compiler-0.8.3/limen/cutting/certificate.py +88 -0
  82. limen_compiler-0.8.3/limen/cutting/dispatch.py +153 -0
  83. limen_compiler-0.8.3/limen/cutting/local_dispatch.py +93 -0
  84. limen_compiler-0.8.3/limen/cutting/partition.py +127 -0
  85. limen_compiler-0.8.3/limen/cutting/qubo_bridge.py +184 -0
  86. limen_compiler-0.8.3/limen/cutting/reconstruct.py +56 -0
  87. limen_compiler-0.8.3/limen/distributed/__init__.py +19 -0
  88. limen_compiler-0.8.3/limen/distributed/client.py +142 -0
  89. limen_compiler-0.8.3/limen/distributed/config.py +92 -0
  90. limen_compiler-0.8.3/limen/distributed/marshal.py +91 -0
  91. limen_compiler-0.8.3/limen/distributed/node.py +48 -0
  92. limen_compiler-0.8.3/limen/distributed/partition.py +378 -0
  93. limen_compiler-0.8.3/limen/distributed/proto/__init__.py +6 -0
  94. limen_compiler-0.8.3/limen/distributed/proto/coordination.proto +95 -0
  95. limen_compiler-0.8.3/limen/distributed/proto/coordination_pb2.py +78 -0
  96. limen_compiler-0.8.3/limen/distributed/proto/coordination_pb2_grpc.py +312 -0
  97. limen_compiler-0.8.3/limen/distributed/registry.py +125 -0
  98. limen_compiler-0.8.3/limen/distributed/server.py +235 -0
  99. limen_compiler-0.8.3/limen/docs/.gitkeep +0 -0
  100. limen_compiler-0.8.3/limen/docs/ACCEPTABLE_USE.md +55 -0
  101. limen_compiler-0.8.3/limen/docs/architecture.md +284 -0
  102. limen_compiler-0.8.3/limen/docs/universality_theorem.md +242 -0
  103. limen_compiler-0.8.3/limen/ecc/__init__.py +41 -0
  104. limen_compiler-0.8.3/limen/ecc/budget.py +117 -0
  105. limen_compiler-0.8.3/limen/ecc/certificate.py +114 -0
  106. limen_compiler-0.8.3/limen/ecc/decoder.py +87 -0
  107. limen_compiler-0.8.3/limen/ecc/encoder.py +149 -0
  108. limen_compiler-0.8.3/limen/ecc/surface_code.py +111 -0
  109. limen_compiler-0.8.3/limen/ecc/syndrome.py +56 -0
  110. limen_compiler-0.8.3/limen/exceptions/__init__.py +13 -0
  111. limen_compiler-0.8.3/limen/formulation/__init__.py +42 -0
  112. limen_compiler-0.8.3/limen/formulation/compiler.py +319 -0
  113. limen_compiler-0.8.3/limen/formulation/constraints.py +142 -0
  114. limen_compiler-0.8.3/limen/formulation/penalty.py +54 -0
  115. limen_compiler-0.8.3/limen/frontends/.gitkeep +0 -0
  116. limen_compiler-0.8.3/limen/frontends/__init__.py +13 -0
  117. limen_compiler-0.8.3/limen/frontends/pyqubo.py +102 -0
  118. limen_compiler-0.8.3/limen/frontends/vrp.py +264 -0
  119. limen_compiler-0.8.3/limen/gates/__init__.py +31 -0
  120. limen_compiler-0.8.3/limen/gates/ir.py +126 -0
  121. limen_compiler-0.8.3/limen/gates/qaoa.py +127 -0
  122. limen_compiler-0.8.3/limen/gates/qiskit_exec.py +121 -0
  123. limen_compiler-0.8.3/limen/gates/simulator.py +231 -0
  124. limen_compiler-0.8.3/limen/gates/synthesis.py +98 -0
  125. limen_compiler-0.8.3/limen/pipeline.py +1344 -0
  126. limen_compiler-0.8.3/limen/quantum_channel/__init__.py +12 -0
  127. limen_compiler-0.8.3/limen/quantum_channel/channel_delta.py +3 -0
  128. limen_compiler-0.8.3/limen/quantum_channel/qkd.py +9 -0
  129. limen_compiler-0.8.3/limen/quantum_channel/teleport.py +7 -0
  130. limen_compiler-0.8.3/limen/quantum_channel/teleport_analysis.py +3 -0
  131. limen_compiler-0.8.3/limen/qubo_spectrum.py +93 -0
  132. limen_compiler-0.8.3/limen/router/__init__.py +60 -0
  133. limen_compiler-0.8.3/limen/router/budget_router.py +505 -0
  134. limen_compiler-0.8.3/limen/router/calibration.py +226 -0
  135. limen_compiler-0.8.3/limen/router/history.py +185 -0
  136. limen_compiler-0.8.3/limen/router/job_state.py +188 -0
  137. limen_compiler-0.8.3/limen/router/problem_profile.py +139 -0
  138. limen_compiler-0.8.3/limen/security/__init__.py +45 -0
  139. limen_compiler-0.8.3/limen/security/pqc.py +146 -0
  140. limen_compiler-0.8.3/limen/validator/.gitkeep +0 -0
  141. limen_compiler-0.8.3/limen/validator/__init__.py +1 -0
  142. limen_compiler-0.8.3/limen/validator/validator.py +237 -0
  143. limen_compiler-0.8.3/pyproject.toml +92 -0
  144. limen_compiler-0.8.3/pyrightconfig.json +6 -0
  145. limen_compiler-0.8.3/results/README.md +25 -0
  146. limen_compiler-0.8.3/results/benchmark_20260609_193026.json +92 -0
  147. limen_compiler-0.8.3/results/benchmark_20260609_194423.json +158 -0
  148. limen_compiler-0.8.3/results/calibration_ibm_fez_2026-07-08T013946.277834Z.json +12 -0
  149. limen_compiler-0.8.3/results/calibration_ibm_kingston_2026-07-07T201820.830032Z.json +7 -0
  150. limen_compiler-0.8.3/results/calibration_ibm_marrakesh_2026-07-08T014002.246986Z.json +12 -0
  151. limen_compiler-0.8.3/results/codesign_qpu_20260609_193841.json +111 -0
  152. limen_compiler-0.8.3/results/fetched_jobs_d8ll3ojnn5bs738s8j3g.json +1991 -0
  153. limen_compiler-0.8.3/results/fetched_jobs_d8u5qqkbp3hs7385g0mg_d8u6b6kbp3hs7385gil0.json +60 -0
  154. limen_compiler-0.8.3/results/fetched_jobs_d8vl8j1ropqc738cjvug_d91euieu9n7c73amjlcg_d91epe6u9n7c73amjc.json +10460 -0
  155. limen_compiler-0.8.3/results/fetched_openquantum_jobs_c281a62f-52c1-43b5-9c25-93fc2e6258a2_2100264a-70b9-4cd4-a55e.json +1957 -0
  156. limen_compiler-0.8.3/results/fleet_certificate.json +115 -0
  157. limen_compiler-0.8.3/results/openquantum_rigetti_20260627_005700.json +23 -0
  158. limen_compiler-0.8.3/results/router_tier2_kingston_d965qgotcv6s73djc1l0.json +163 -0
  159. limen_compiler-0.8.3/results/router_tier2_kingston_d96mijgtcv6s73djv5a0.json +172 -0
  160. limen_compiler-0.8.3/results/teleport_summary.json +85 -0
  161. limen_compiler-0.8.3/results/tsp_eil51_20260611_183758.json +58 -0
  162. limen_compiler-0.8.3/results/tsp_eil51_20260611_184853.json +63 -0
  163. limen_compiler-0.8.3/results/tsp_eil51_20260611_185704.json +64 -0
  164. limen_compiler-0.8.3/results/tsp_eil51_20260611_190912.json +64 -0
  165. limen_compiler-0.8.3/results/tsp_eil51_20260626_215323.json +64 -0
  166. limen_compiler-0.8.3/results/tsp_eil51_20260627_004217.json +59 -0
  167. limen_compiler-0.8.3/results/tsp_scaling_20260612_174936.json +163 -0
  168. limen_compiler-0.8.3/results/tsp_scaling_20260626_215147.json +163 -0
  169. limen_compiler-0.8.3/results/vrp_nyc_20260628_232403.json +65 -0
  170. limen_compiler-0.8.3/scripts/deploy_node.sh +178 -0
  171. limen_compiler-0.8.3/scripts/gen_proto.py +45 -0
  172. limen_compiler-0.8.3/src/analog/interface.rs +46 -0
  173. limen_compiler-0.8.3/src/analog/mod.rs +3 -0
  174. limen_compiler-0.8.3/src/analog/neutral_atom.rs +89 -0
  175. limen_compiler-0.8.3/src/analog/photonic.rs +74 -0
  176. limen_compiler-0.8.3/src/cutting/mod.rs +7 -0
  177. limen_compiler-0.8.3/src/cutting/reconstruct.rs +253 -0
  178. limen_compiler-0.8.3/src/delta.rs +74 -0
  179. limen_compiler-0.8.3/src/ecc/decoder.rs +176 -0
  180. limen_compiler-0.8.3/src/ecc/mod.rs +4 -0
  181. limen_compiler-0.8.3/src/ecc/remapper.rs +41 -0
  182. limen_compiler-0.8.3/src/ecc/selector.rs +66 -0
  183. limen_compiler-0.8.3/src/ecc/surface_code.rs +92 -0
  184. limen_compiler-0.8.3/src/frontends.rs +125 -0
  185. limen_compiler-0.8.3/src/graph_partition.rs +203 -0
  186. limen_compiler-0.8.3/src/lib.rs +73 -0
  187. limen_compiler-0.8.3/src/scoring.rs +117 -0
  188. limen_compiler-0.8.3/src/sim/ising_backend.rs +258 -0
  189. limen_compiler-0.8.3/src/sim/mod.rs +3 -0
  190. limen_compiler-0.8.3/src/sim/qudit.rs +22 -0
  191. limen_compiler-0.8.3/src/sim/statevector_backend.rs +183 -0
  192. limen_compiler-0.8.3/src/stackelberg.rs +97 -0
  193. limen_compiler-0.8.3/src/validator.rs +91 -0
  194. limen_compiler-0.8.3/tests/.gitkeep +0 -0
  195. limen_compiler-0.8.3/tests/test_analog.py +325 -0
  196. limen_compiler-0.8.3/tests/test_backend_dwave.py +93 -0
  197. limen_compiler-0.8.3/tests/test_backend_qiskit.py +63 -0
  198. limen_compiler-0.8.3/tests/test_backends_offline.py +141 -0
  199. limen_compiler-0.8.3/tests/test_bec.py +67 -0
  200. limen_compiler-0.8.3/tests/test_calibration_loader.py +255 -0
  201. limen_compiler-0.8.3/tests/test_certificate.py +82 -0
  202. limen_compiler-0.8.3/tests/test_codesign.py +135 -0
  203. limen_compiler-0.8.3/tests/test_codesign_cbf.py +60 -0
  204. limen_compiler-0.8.3/tests/test_codesign_history.py +121 -0
  205. limen_compiler-0.8.3/tests/test_communication.py +198 -0
  206. limen_compiler-0.8.3/tests/test_compiler_embedding.py +245 -0
  207. limen_compiler-0.8.3/tests/test_core.py +89 -0
  208. limen_compiler-0.8.3/tests/test_cutting_qubo_bridge.py +144 -0
  209. limen_compiler-0.8.3/tests/test_decoder.py +39 -0
  210. limen_compiler-0.8.3/tests/test_delta_model.py +274 -0
  211. limen_compiler-0.8.3/tests/test_distributed_feedforward.py +114 -0
  212. limen_compiler-0.8.3/tests/test_distributed_health.py +45 -0
  213. limen_compiler-0.8.3/tests/test_distributed_register_retry.py +161 -0
  214. limen_compiler-0.8.3/tests/test_distributed_registry.py +85 -0
  215. limen_compiler-0.8.3/tests/test_distributed_server.py +65 -0
  216. limen_compiler-0.8.3/tests/test_distributed_tls.py +120 -0
  217. limen_compiler-0.8.3/tests/test_ecc_budget.py +85 -0
  218. limen_compiler-0.8.3/tests/test_ecc_roundtrip.py +61 -0
  219. limen_compiler-0.8.3/tests/test_formulation.py +214 -0
  220. limen_compiler-0.8.3/tests/test_frontend_vrp.py +191 -0
  221. limen_compiler-0.8.3/tests/test_gate_exec.py +48 -0
  222. limen_compiler-0.8.3/tests/test_gate_ir.py +54 -0
  223. limen_compiler-0.8.3/tests/test_gate_simulator.py +83 -0
  224. limen_compiler-0.8.3/tests/test_gate_synthesis.py +72 -0
  225. limen_compiler-0.8.3/tests/test_geometry.py +135 -0
  226. limen_compiler-0.8.3/tests/test_job_state.py +174 -0
  227. limen_compiler-0.8.3/tests/test_lhz.py +150 -0
  228. limen_compiler-0.8.3/tests/test_lhz_certificate.py +100 -0
  229. limen_compiler-0.8.3/tests/test_lhz_fallback.py +112 -0
  230. limen_compiler-0.8.3/tests/test_logical_certificate.py +51 -0
  231. limen_compiler-0.8.3/tests/test_measured_prior.py +119 -0
  232. limen_compiler-0.8.3/tests/test_partition.py +148 -0
  233. limen_compiler-0.8.3/tests/test_phase3_completion.py +165 -0
  234. limen_compiler-0.8.3/tests/test_physics_validation.py +151 -0
  235. limen_compiler-0.8.3/tests/test_pipeline.py +227 -0
  236. limen_compiler-0.8.3/tests/test_pipeline_distributed.py +86 -0
  237. limen_compiler-0.8.3/tests/test_pqc.py +123 -0
  238. limen_compiler-0.8.3/tests/test_problem_profile.py +79 -0
  239. limen_compiler-0.8.3/tests/test_pyfallback.py +137 -0
  240. limen_compiler-0.8.3/tests/test_qaoa.py +69 -0
  241. limen_compiler-0.8.3/tests/test_quantum_channel.py +88 -0
  242. limen_compiler-0.8.3/tests/test_router.py +281 -0
  243. limen_compiler-0.8.3/tests/test_router_calibration.py +228 -0
  244. limen_compiler-0.8.3/tests/test_router_history.py +149 -0
  245. limen_compiler-0.8.3/tests/test_router_informed_fleet.py +46 -0
  246. limen_compiler-0.8.3/tests/test_run_pipeline_from_plan.py +84 -0
  247. limen_compiler-0.8.3/tests/test_run_route_request.py +114 -0
  248. limen_compiler-0.8.3/tests/test_rust_exports.py +110 -0
  249. limen_compiler-0.8.3/tests/test_sim.py +35 -0
  250. limen_compiler-0.8.3/tests/test_surface_code.py +67 -0
  251. limen_compiler-0.8.3/tests/test_syndrome_circuit.py +48 -0
@@ -0,0 +1,31 @@
1
+ # Copy this file to .env and fill in the values you need.
2
+ # .env is gitignored — never commit real credentials.
3
+
4
+ # --- IBM Quantum Runtime ---
5
+ IBM_QUANTUM_TOKEN=
6
+ IBM_QUANTUM_CRN=
7
+
8
+ # --- D-Wave ---
9
+ DWAVE_API_TOKEN=
10
+ DWAVE_API_ENDPOINT=
11
+
12
+ # --- Open Quantum ---
13
+ OPENQUANTUM_CLIENT_ID=
14
+ OPENQUANTUM_CLIENT_SECRET=
15
+
16
+ # --- Azure Quantum (Atom Computing backend) ---
17
+ # Provide either AZURE_QUANTUM_CONNECTION_STRING, or both of
18
+ # AZURE_QUANTUM_RESOURCE_ID and AZURE_QUANTUM_LOCATION.
19
+ AZURE_QUANTUM_RESOURCE_ID=
20
+ AZURE_QUANTUM_LOCATION=
21
+ AZURE_QUANTUM_CONNECTION_STRING=
22
+
23
+ # --- LIMEN distributed node config ---
24
+ LIMEN_NODE_ID=
25
+ LIMEN_NODE_HOST=0.0.0.0
26
+ LIMEN_NODE_PORT=50051
27
+ LIMEN_NODE_DEVICE_IDS=
28
+ LIMEN_KNOWN_PEERS=
29
+ LIMEN_TLS_CERT=
30
+ LIMEN_TLS_KEY=
31
+ LIMEN_TLS_CA=
@@ -0,0 +1,37 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ rust-test:
10
+ name: cargo test
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: dtolnay/rust-toolchain@stable
15
+ - uses: Swatinem/rust-cache@v2
16
+ - run: cargo test --release
17
+
18
+ python-test:
19
+ name: pytest (py${{ matrix.python-version }})
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ python-version: ["3.11", "3.12"]
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - uses: dtolnay/rust-toolchain@stable
28
+ - uses: Swatinem/rust-cache@v2
29
+ - uses: actions/setup-python@v5
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+ - name: Install package with all optional backends (builds limen_core via maturin)
33
+ run: pip install ".[all]"
34
+ - name: Install test dependencies
35
+ run: pip install pytest
36
+ - name: Run test suite
37
+ run: pytest tests/ -q
@@ -0,0 +1,132 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ linux:
14
+ name: Build wheels (linux, ${{ matrix.target }})
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ matrix:
18
+ target: [x86_64, aarch64]
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.12"
24
+ - name: Build wheels
25
+ uses: PyO3/maturin-action@v1
26
+ with:
27
+ target: ${{ matrix.target }}
28
+ args: --release --out dist
29
+ manylinux: auto
30
+ - uses: actions/upload-artifact@v4
31
+ with:
32
+ name: wheels-linux-${{ matrix.target }}
33
+ path: dist
34
+
35
+ windows:
36
+ name: Build wheels (windows, ${{ matrix.target }})
37
+ runs-on: windows-latest
38
+ strategy:
39
+ matrix:
40
+ target: [x64]
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+ - uses: actions/setup-python@v5
44
+ with:
45
+ python-version: "3.12"
46
+ architecture: ${{ matrix.target }}
47
+ - name: Build wheels
48
+ uses: PyO3/maturin-action@v1
49
+ with:
50
+ target: ${{ matrix.target }}
51
+ args: --release --out dist
52
+ - uses: actions/upload-artifact@v4
53
+ with:
54
+ name: wheels-windows-${{ matrix.target }}
55
+ path: dist
56
+
57
+ macos:
58
+ name: Build wheels (macos, ${{ matrix.target }})
59
+ runs-on: macos-14
60
+ strategy:
61
+ matrix:
62
+ target: [aarch64]
63
+ steps:
64
+ - uses: actions/checkout@v4
65
+ - uses: actions/setup-python@v5
66
+ with:
67
+ python-version: "3.12"
68
+ - name: Build wheels
69
+ uses: PyO3/maturin-action@v1
70
+ with:
71
+ target: ${{ matrix.target }}
72
+ args: --release --out dist
73
+ - uses: actions/upload-artifact@v4
74
+ with:
75
+ name: wheels-macos-${{ matrix.target }}
76
+ path: dist
77
+
78
+ sdist:
79
+ name: Build sdist
80
+ runs-on: ubuntu-latest
81
+ steps:
82
+ - uses: actions/checkout@v4
83
+ - name: Build sdist
84
+ uses: PyO3/maturin-action@v1
85
+ with:
86
+ command: sdist
87
+ args: --out dist
88
+ - uses: actions/upload-artifact@v4
89
+ with:
90
+ name: sdist
91
+ path: dist
92
+
93
+ publish-pypi:
94
+ name: Publish to PyPI
95
+ if: startsWith(github.ref, 'refs/tags/')
96
+ needs: [linux, windows, macos, sdist]
97
+ runs-on: ubuntu-latest
98
+ environment: pypi
99
+ permissions:
100
+ # Required for PyPI trusted publishing (OIDC)
101
+ id-token: write
102
+ steps:
103
+ - uses: actions/download-artifact@v4
104
+ with:
105
+ path: dist
106
+ merge-multiple: true
107
+ - name: Publish to PyPI
108
+ uses: pypa/gh-action-pypi-publish@release/v1
109
+ with:
110
+ packages-dir: dist
111
+
112
+ github-release:
113
+ name: Create GitHub Release
114
+ if: startsWith(github.ref, 'refs/tags/')
115
+ needs: [linux, windows, macos, sdist]
116
+ runs-on: ubuntu-latest
117
+ permissions:
118
+ contents: write
119
+ steps:
120
+ - uses: actions/download-artifact@v4
121
+ with:
122
+ path: dist
123
+ merge-multiple: true
124
+ - name: Create release and upload artifacts
125
+ env:
126
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
127
+ run: |
128
+ gh release create "$GITHUB_REF_NAME" \
129
+ --repo "$GITHUB_REPOSITORY" \
130
+ --title "LIMEN $GITHUB_REF_NAME" \
131
+ --generate-notes \
132
+ dist/*
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyd
4
+ *.pdb
5
+ .env
6
+ dist/
7
+ build/
8
+ *.egg-info/
9
+ target/
10
+ .venv/
11
+ venv/
@@ -0,0 +1,3 @@
1
+ {
2
+ "python.defaultInterpreterPath": "D:\\LIMEN\\.venv\\Scripts\\python.exe"
3
+ }
@@ -0,0 +1,317 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
10
+
11
+ [[package]]
12
+ name = "cfg-if"
13
+ version = "1.0.4"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
16
+
17
+ [[package]]
18
+ name = "crossbeam-deque"
19
+ version = "0.8.6"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
22
+ dependencies = [
23
+ "crossbeam-epoch",
24
+ "crossbeam-utils",
25
+ ]
26
+
27
+ [[package]]
28
+ name = "crossbeam-epoch"
29
+ version = "0.9.18"
30
+ source = "registry+https://github.com/rust-lang/crates.io-index"
31
+ checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
32
+ dependencies = [
33
+ "crossbeam-utils",
34
+ ]
35
+
36
+ [[package]]
37
+ name = "crossbeam-utils"
38
+ version = "0.8.21"
39
+ source = "registry+https://github.com/rust-lang/crates.io-index"
40
+ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
41
+
42
+ [[package]]
43
+ name = "either"
44
+ version = "1.16.0"
45
+ source = "registry+https://github.com/rust-lang/crates.io-index"
46
+ checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
47
+
48
+ [[package]]
49
+ name = "equivalent"
50
+ version = "1.0.2"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
53
+
54
+ [[package]]
55
+ name = "fixedbitset"
56
+ version = "0.5.7"
57
+ source = "registry+https://github.com/rust-lang/crates.io-index"
58
+ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
59
+
60
+ [[package]]
61
+ name = "foldhash"
62
+ version = "0.1.5"
63
+ source = "registry+https://github.com/rust-lang/crates.io-index"
64
+ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
65
+
66
+ [[package]]
67
+ name = "hashbrown"
68
+ version = "0.15.5"
69
+ source = "registry+https://github.com/rust-lang/crates.io-index"
70
+ checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
71
+ dependencies = [
72
+ "foldhash",
73
+ ]
74
+
75
+ [[package]]
76
+ name = "hashbrown"
77
+ version = "0.17.1"
78
+ source = "registry+https://github.com/rust-lang/crates.io-index"
79
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
80
+
81
+ [[package]]
82
+ name = "heck"
83
+ version = "0.5.0"
84
+ source = "registry+https://github.com/rust-lang/crates.io-index"
85
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
86
+
87
+ [[package]]
88
+ name = "indexmap"
89
+ version = "2.14.0"
90
+ source = "registry+https://github.com/rust-lang/crates.io-index"
91
+ checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
92
+ dependencies = [
93
+ "equivalent",
94
+ "hashbrown 0.17.1",
95
+ ]
96
+
97
+ [[package]]
98
+ name = "indoc"
99
+ version = "2.0.7"
100
+ source = "registry+https://github.com/rust-lang/crates.io-index"
101
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
102
+ dependencies = [
103
+ "rustversion",
104
+ ]
105
+
106
+ [[package]]
107
+ name = "libc"
108
+ version = "0.2.186"
109
+ source = "registry+https://github.com/rust-lang/crates.io-index"
110
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
111
+
112
+ [[package]]
113
+ name = "limen_core"
114
+ version = "0.8.3"
115
+ dependencies = [
116
+ "petgraph",
117
+ "pyo3",
118
+ "rayon",
119
+ ]
120
+
121
+ [[package]]
122
+ name = "memoffset"
123
+ version = "0.9.1"
124
+ source = "registry+https://github.com/rust-lang/crates.io-index"
125
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
126
+ dependencies = [
127
+ "autocfg",
128
+ ]
129
+
130
+ [[package]]
131
+ name = "once_cell"
132
+ version = "1.21.4"
133
+ source = "registry+https://github.com/rust-lang/crates.io-index"
134
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
135
+
136
+ [[package]]
137
+ name = "petgraph"
138
+ version = "0.8.3"
139
+ source = "registry+https://github.com/rust-lang/crates.io-index"
140
+ checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455"
141
+ dependencies = [
142
+ "fixedbitset",
143
+ "hashbrown 0.15.5",
144
+ "indexmap",
145
+ "serde",
146
+ ]
147
+
148
+ [[package]]
149
+ name = "portable-atomic"
150
+ version = "1.13.1"
151
+ source = "registry+https://github.com/rust-lang/crates.io-index"
152
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
153
+
154
+ [[package]]
155
+ name = "proc-macro2"
156
+ version = "1.0.106"
157
+ source = "registry+https://github.com/rust-lang/crates.io-index"
158
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
159
+ dependencies = [
160
+ "unicode-ident",
161
+ ]
162
+
163
+ [[package]]
164
+ name = "pyo3"
165
+ version = "0.22.6"
166
+ source = "registry+https://github.com/rust-lang/crates.io-index"
167
+ checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
168
+ dependencies = [
169
+ "cfg-if",
170
+ "indoc",
171
+ "libc",
172
+ "memoffset",
173
+ "once_cell",
174
+ "portable-atomic",
175
+ "pyo3-build-config",
176
+ "pyo3-ffi",
177
+ "pyo3-macros",
178
+ "unindent",
179
+ ]
180
+
181
+ [[package]]
182
+ name = "pyo3-build-config"
183
+ version = "0.22.6"
184
+ source = "registry+https://github.com/rust-lang/crates.io-index"
185
+ checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
186
+ dependencies = [
187
+ "once_cell",
188
+ "target-lexicon",
189
+ ]
190
+
191
+ [[package]]
192
+ name = "pyo3-ffi"
193
+ version = "0.22.6"
194
+ source = "registry+https://github.com/rust-lang/crates.io-index"
195
+ checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
196
+ dependencies = [
197
+ "libc",
198
+ "pyo3-build-config",
199
+ ]
200
+
201
+ [[package]]
202
+ name = "pyo3-macros"
203
+ version = "0.22.6"
204
+ source = "registry+https://github.com/rust-lang/crates.io-index"
205
+ checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
206
+ dependencies = [
207
+ "proc-macro2",
208
+ "pyo3-macros-backend",
209
+ "quote",
210
+ "syn",
211
+ ]
212
+
213
+ [[package]]
214
+ name = "pyo3-macros-backend"
215
+ version = "0.22.6"
216
+ source = "registry+https://github.com/rust-lang/crates.io-index"
217
+ checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
218
+ dependencies = [
219
+ "heck",
220
+ "proc-macro2",
221
+ "pyo3-build-config",
222
+ "quote",
223
+ "syn",
224
+ ]
225
+
226
+ [[package]]
227
+ name = "quote"
228
+ version = "1.0.45"
229
+ source = "registry+https://github.com/rust-lang/crates.io-index"
230
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
231
+ dependencies = [
232
+ "proc-macro2",
233
+ ]
234
+
235
+ [[package]]
236
+ name = "rayon"
237
+ version = "1.12.0"
238
+ source = "registry+https://github.com/rust-lang/crates.io-index"
239
+ checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
240
+ dependencies = [
241
+ "either",
242
+ "rayon-core",
243
+ ]
244
+
245
+ [[package]]
246
+ name = "rayon-core"
247
+ version = "1.13.0"
248
+ source = "registry+https://github.com/rust-lang/crates.io-index"
249
+ checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
250
+ dependencies = [
251
+ "crossbeam-deque",
252
+ "crossbeam-utils",
253
+ ]
254
+
255
+ [[package]]
256
+ name = "rustversion"
257
+ version = "1.0.22"
258
+ source = "registry+https://github.com/rust-lang/crates.io-index"
259
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
260
+
261
+ [[package]]
262
+ name = "serde"
263
+ version = "1.0.228"
264
+ source = "registry+https://github.com/rust-lang/crates.io-index"
265
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
266
+ dependencies = [
267
+ "serde_core",
268
+ ]
269
+
270
+ [[package]]
271
+ name = "serde_core"
272
+ version = "1.0.228"
273
+ source = "registry+https://github.com/rust-lang/crates.io-index"
274
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
275
+ dependencies = [
276
+ "serde_derive",
277
+ ]
278
+
279
+ [[package]]
280
+ name = "serde_derive"
281
+ version = "1.0.228"
282
+ source = "registry+https://github.com/rust-lang/crates.io-index"
283
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
284
+ dependencies = [
285
+ "proc-macro2",
286
+ "quote",
287
+ "syn",
288
+ ]
289
+
290
+ [[package]]
291
+ name = "syn"
292
+ version = "2.0.117"
293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
294
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
295
+ dependencies = [
296
+ "proc-macro2",
297
+ "quote",
298
+ "unicode-ident",
299
+ ]
300
+
301
+ [[package]]
302
+ name = "target-lexicon"
303
+ version = "0.12.16"
304
+ source = "registry+https://github.com/rust-lang/crates.io-index"
305
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
306
+
307
+ [[package]]
308
+ name = "unicode-ident"
309
+ version = "1.0.24"
310
+ source = "registry+https://github.com/rust-lang/crates.io-index"
311
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
312
+
313
+ [[package]]
314
+ name = "unindent"
315
+ version = "0.2.4"
316
+ source = "registry+https://github.com/rust-lang/crates.io-index"
317
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
@@ -0,0 +1,27 @@
1
+ [package]
2
+ name = "limen_core"
3
+ version = "0.8.3"
4
+ edition = "2021"
5
+ readme = "README.md"
6
+
7
+ [lib]
8
+ name = "limen_core"
9
+ crate-type = ["cdylib"]
10
+
11
+ [dependencies]
12
+ pyo3 = { version = "0.22", features = ["abi3-py310"] }
13
+ rayon = "1.10"
14
+ petgraph = "0.8"
15
+
16
+ [features]
17
+ # extension-module must NOT be a default/unconditional dependency feature:
18
+ # it tells pyo3 to skip linking libpython, which is correct for the cdylib
19
+ # maturin builds (loaded *by* a running Python process, which supplies
20
+ # those symbols) but breaks `cargo test`'s standalone test binary on Linux
21
+ # (no Python process to supply them -> undefined symbol link errors; this
22
+ # is invisible on Windows, where DLL symbol resolution works differently,
23
+ # which is why this went undetected in local dev). maturin passes
24
+ # `--features pyo3/extension-module` explicitly (see [tool.maturin] in
25
+ # pyproject.toml), so plain `cargo test` -- which does not request this
26
+ # feature -- now links against libpython normally.
27
+ extension-module = ["pyo3/extension-module"]
@@ -0,0 +1,101 @@
1
+ Elastic License 2.0 (ELv2)
2
+
3
+ Copyright (C) 2026 xingxerx / CGX
4
+
5
+ ## Acceptance
6
+
7
+ By using the software, you agree to all of the terms and conditions below.
8
+
9
+ ## Copyright License
10
+
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
12
+ non-sublicensable, non-transferable license to use, copy, distribute, make
13
+ available, and prepare derivative works of the software, in each case
14
+ subject to the limitations and conditions below.
15
+
16
+ ## Limitations
17
+
18
+ You may not provide the software to third parties as a hosted or managed
19
+ service, where the service provides users with access to any substantial
20
+ set of the features or functionality of the software.
21
+
22
+ You may not move, change, disable, or circumvent the license key
23
+ functionality in the software, and you may not remove or obscure any
24
+ functionality in the software that is protected by the license key.
25
+
26
+ You may not alter, remove, or obscure any licensing, copyright, or other
27
+ notices of the licensor in the software. Any use of the licensor's
28
+ trademarks is subject to applicable law.
29
+
30
+ ## Patents
31
+
32
+ The licensor grants you a license, under any patent claims the licensor can
33
+ license, or becomes able to license, to make, have made, use, sell, offer
34
+ for sale, import and have imported the software, in each case subject to
35
+ the limitations and conditions in this license. This license does not
36
+ cover any patent claims that you cause to be infringed by modifications or
37
+ additions to the software. If you or your company make any written claim
38
+ that the software infringes or contributes to infringement of any patent,
39
+ your patent license for the software granted under these terms ends
40
+ immediately. If your company makes such a claim, your patent license ends
41
+ immediately for work on behalf of your company.
42
+
43
+ ## Notices
44
+
45
+ You must ensure that anyone who gets a copy of any part of the software
46
+ from you also gets a copy of these terms.
47
+
48
+ If you modify the software, you must include in any modified copies of the
49
+ software prominent notices stating that you have modified the software.
50
+
51
+ ## No Other Rights
52
+
53
+ These terms do not imply any licenses other than those expressly granted
54
+ in this license.
55
+
56
+ ## Termination
57
+
58
+ If you use the software in violation of these terms, such use is not
59
+ licensed, and your licenses will automatically terminate. If the licensor
60
+ provides you with a notice of your violation, and you cease all violation
61
+ of this license no later than 30 days after you receive that notice, your
62
+ licenses will be reinstated retroactively. However, if you violate these
63
+ terms after such reinstatement, any additional violation of these terms
64
+ will cause your licenses to terminate automatically and permanently.
65
+
66
+ ## No Liability
67
+
68
+ *As far as the law allows, the software comes as is, without any
69
+ warranty or condition, and the licensor will not be liable to you for any
70
+ damages arising out of these terms or the use or nature of the software,
71
+ under any kind of legal claim.*
72
+
73
+ ## Definitions
74
+
75
+ The "licensor" is the entity offering these terms, and the "software" is
76
+ the software the licensor makes available under these terms, including any
77
+ portion of it.
78
+
79
+ "You" refers to the individual or entity agreeing to these terms.
80
+
81
+ "Your company" is any legal entity, sole proprietorship, or other kind of
82
+ organization that you work for, plus all organizations that have control
83
+ over, are under the control of, or are under common control with that
84
+ organization. "Control" means ownership of substantially all the assets
85
+ of an entity, or the power to direct its management and policies by vote,
86
+ contract, or otherwise. Control can be direct or indirect.
87
+
88
+ "Your licenses" are all the licenses granted to you for the software under
89
+ these terms.
90
+
91
+ "Use" means anything you do with the software requiring one of your
92
+ licenses.
93
+
94
+ "Trademark" means trademarks, service marks, and similar rights.
95
+
96
+ ---
97
+
98
+ Use of LIMEN is additionally subject to the restrictions in
99
+ [ACCEPTABLE_USE.md](ACCEPTABLE_USE.md), which prohibits weapons
100
+ development, mass surveillance, unauthorized cryptanalysis, and attacks
101
+ on critical infrastructure.