quantum-spherifier 1.0.0
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.
- package/.env.example +37 -0
- package/LICENSE +21 -0
- package/README.md +738 -0
- package/config/default.json +83 -0
- package/config/production.json +31 -0
- package/docker/Dockerfile +37 -0
- package/docker/docker-compose.yml +25 -0
- package/docs/architecture.md +160 -0
- package/docs/qspherifier.jpg +0 -0
- package/package.json +128 -0
- package/plugins/example-plugin.js +44 -0
- package/research/INDEX.md +37 -0
- package/research/cross_refs/.gitkeep +0 -0
- package/research/designs/.gitkeep +0 -0
- package/research/hypotheses/.gitkeep +0 -0
- package/research/hypotheses/new_qubit_modalities/doc_0035ce8c/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_0035ce8c/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_005f1a09/main.md +63 -0
- package/research/hypotheses/new_qubit_modalities/doc_005f1a09/manifest.json +143 -0
- package/research/hypotheses/new_qubit_modalities/doc_05f0ed46/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_05f0ed46/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_05fd0eb1/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_05fd0eb1/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_0705eed0/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_0705eed0/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_07aff3d1/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_07aff3d1/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_0894efe7/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_0894efe7/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_08e086ad/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_08e086ad/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_0929ce83/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_0929ce83/manifest.json +119 -0
- package/research/hypotheses/new_qubit_modalities/doc_0b51b472/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_0b51b472/manifest.json +131 -0
- package/research/hypotheses/new_qubit_modalities/doc_0cfcfcbe/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_0cfcfcbe/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_0d9f04a2/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_0d9f04a2/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_0f665487/main.md +62 -0
- package/research/hypotheses/new_qubit_modalities/doc_0f665487/manifest.json +146 -0
- package/research/hypotheses/new_qubit_modalities/doc_11a00531/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_11a00531/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_12507df9/main.md +62 -0
- package/research/hypotheses/new_qubit_modalities/doc_12507df9/manifest.json +146 -0
- package/research/hypotheses/new_qubit_modalities/doc_14edc7a7/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_14edc7a7/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_17dce1f5/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_17dce1f5/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_18a79edc/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_18a79edc/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_18b76f8b/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_18b76f8b/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_1d8b27dd/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_1d8b27dd/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_1e746572/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_1e746572/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_1f409f63/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_1f409f63/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_1fb93b3c/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_1fb93b3c/manifest.json +118 -0
- package/research/hypotheses/new_qubit_modalities/doc_2014700e/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_2014700e/manifest.json +118 -0
- package/research/hypotheses/new_qubit_modalities/doc_21d9499b/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_21d9499b/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_22744a09/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_22744a09/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_25a11cb2/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_25a11cb2/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_26180f52/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_26180f52/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_264f31a7/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_264f31a7/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_273d88b1/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_273d88b1/manifest.json +140 -0
- package/research/hypotheses/new_qubit_modalities/doc_27b9d2bc/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_27b9d2bc/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_2942ef20/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_2942ef20/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_2babdd5a/main.md +62 -0
- package/research/hypotheses/new_qubit_modalities/doc_2babdd5a/manifest.json +146 -0
- package/research/hypotheses/new_qubit_modalities/doc_2bb39428/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_2bb39428/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_2e1771dc/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_2e1771dc/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_2f6e27eb/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_2f6e27eb/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_2ff8c87a/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_2ff8c87a/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_311003a4/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_311003a4/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_329910b6/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_329910b6/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_32b3ea58/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_32b3ea58/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_354b23cb/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_354b23cb/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_3630eed6/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_3630eed6/manifest.json +113 -0
- package/research/hypotheses/new_qubit_modalities/doc_37ca8f04/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_37ca8f04/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_3a8f0c5e/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_3a8f0c5e/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_3d55724e/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_3d55724e/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_3e27ad06/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_3e27ad06/manifest.json +108 -0
- package/research/hypotheses/new_qubit_modalities/doc_401a8bad/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_401a8bad/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_40f8352b/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_40f8352b/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_4331dcfd/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_4331dcfd/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_4337cbdc/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_4337cbdc/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_45d2acc5/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_45d2acc5/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_45d39a5f/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_45d39a5f/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_4ed900da/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_4ed900da/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_525bf00e/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_525bf00e/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_54035ce1/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_54035ce1/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_552565a2/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_552565a2/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_5652c681/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_5652c681/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_59b3863c/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_59b3863c/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_5cd7ecd5/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_5cd7ecd5/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_5dec51b1/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_5dec51b1/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_5e6dc9c1/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_5e6dc9c1/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_60cdeb68/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_60cdeb68/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_637c1a32/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_637c1a32/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_659be8e8/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_659be8e8/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_69f47a99/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_69f47a99/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_6a06ee6e/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_6a06ee6e/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_6c383667/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_6c383667/manifest.json +123 -0
- package/research/hypotheses/new_qubit_modalities/doc_788cc9f1/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_788cc9f1/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_85cd549d/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_85cd549d/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_86023f9a/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_86023f9a/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_86c37a8e/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_86c37a8e/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_875cb066/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_875cb066/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_8a7a0b27/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_8a7a0b27/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_8b8c723e/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_8b8c723e/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_8c881657/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_8c881657/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_8d3bbca1/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_8d3bbca1/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_8d45fa02/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_8d45fa02/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_8d5389e6/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_8d5389e6/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_9288e51d/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_9288e51d/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_9bd195fd/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_9bd195fd/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_9c000140/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_9c000140/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_9c1775b8/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_9c1775b8/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_9ea9fbaa/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_9ea9fbaa/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_9f34ca4b/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_9f34ca4b/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_9fe95a15/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_9fe95a15/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_a0b6a004/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_a0b6a004/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_a11472f7/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_a11472f7/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_a226de32/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_a226de32/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_a3ed0beb/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_a3ed0beb/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_a49aeac3/main.md +63 -0
- package/research/hypotheses/new_qubit_modalities/doc_a49aeac3/manifest.json +143 -0
- package/research/hypotheses/new_qubit_modalities/doc_a548aead/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_a548aead/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_a94c6b43/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_a94c6b43/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_ab2c416b/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_ab2c416b/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_ad5b545f/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_ad5b545f/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_ae0d0b6f/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_ae0d0b6f/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_aeb039af/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_aeb039af/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_b5569c01/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_b5569c01/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_ba323435/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_ba323435/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_be91ffb6/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_be91ffb6/manifest.json +121 -0
- package/research/hypotheses/new_qubit_modalities/doc_bfc11573/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_bfc11573/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_c01dda61/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_c01dda61/manifest.json +140 -0
- package/research/hypotheses/new_qubit_modalities/doc_c40b6bac/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_c40b6bac/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_c449abfd/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_c449abfd/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_c5286a95/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_c5286a95/manifest.json +123 -0
- package/research/hypotheses/new_qubit_modalities/doc_c6232031/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_c6232031/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_c8567a48/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_c8567a48/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_ca23e08b/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_ca23e08b/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_caf7e9d3/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_caf7e9d3/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_cbb77c2d/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_cbb77c2d/manifest.json +110 -0
- package/research/hypotheses/new_qubit_modalities/doc_cc601d30/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_cc601d30/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_ccdd3f14/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_ccdd3f14/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_cde08d2e/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_cde08d2e/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_ce6a235a/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_ce6a235a/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_d093b9ad/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_d093b9ad/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_d17719c6/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_d17719c6/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_d399eea3/main.md +63 -0
- package/research/hypotheses/new_qubit_modalities/doc_d399eea3/manifest.json +143 -0
- package/research/hypotheses/new_qubit_modalities/doc_d3d90e51/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_d3d90e51/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_d874dc7e/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_d874dc7e/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_db98a164/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_db98a164/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_dbe2ca8c/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_dbe2ca8c/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_dc21205e/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_dc21205e/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_e13ae515/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_e13ae515/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_e14a007d/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_e14a007d/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_e15ccaf5/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_e15ccaf5/manifest.json +116 -0
- package/research/hypotheses/new_qubit_modalities/doc_e2d250b7/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_e2d250b7/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_e32df689/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_e32df689/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_e5b4bedb/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_e5b4bedb/manifest.json +134 -0
- package/research/hypotheses/new_qubit_modalities/doc_e72263b3/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_e72263b3/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_e855d210/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_e855d210/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_ecf6f682/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_ecf6f682/manifest.json +133 -0
- package/research/hypotheses/new_qubit_modalities/doc_ed1d25a4/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_ed1d25a4/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_f07aa6d9/main.md +62 -0
- package/research/hypotheses/new_qubit_modalities/doc_f07aa6d9/manifest.json +146 -0
- package/research/hypotheses/new_qubit_modalities/doc_f257c4ba/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_f257c4ba/manifest.json +128 -0
- package/research/hypotheses/new_qubit_modalities/doc_f2e20da6/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_f2e20da6/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_f34857aa/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_f34857aa/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_fae0902f/main.md +62 -0
- package/research/hypotheses/new_qubit_modalities/doc_fae0902f/manifest.json +146 -0
- package/research/hypotheses/new_qubit_modalities/doc_fbbb63bb/main.md +60 -0
- package/research/hypotheses/new_qubit_modalities/doc_fbbb63bb/manifest.json +139 -0
- package/research/hypotheses/new_qubit_modalities/doc_fd4cec3b/main.md +61 -0
- package/research/hypotheses/new_qubit_modalities/doc_fd4cec3b/manifest.json +136 -0
- package/research/hypotheses/new_qubit_modalities/doc_fe713bc9/main.md +59 -0
- package/research/hypotheses/new_qubit_modalities/doc_fe713bc9/manifest.json +133 -0
- package/research/hypotheses/quantum_algorithms/doc_479d7cf8/main.md +62 -0
- package/research/hypotheses/quantum_algorithms/doc_479d7cf8/manifest.json +146 -0
- package/research/hypotheses/quantum_algorithms/doc_6dbdd005/main.md +63 -0
- package/research/hypotheses/quantum_algorithms/doc_6dbdd005/manifest.json +143 -0
- package/research/hypotheses/quantum_algorithms/doc_b862fc72/main.md +61 -0
- package/research/hypotheses/quantum_algorithms/doc_b862fc72/manifest.json +140 -0
- package/research/hypotheses/quantum_algorithms/doc_cdf33ced/main.md +63 -0
- package/research/hypotheses/quantum_algorithms/doc_cdf33ced/manifest.json +143 -0
- package/research/hypotheses/quantum_error_correction/doc_3986910a/main.md +61 -0
- package/research/hypotheses/quantum_error_correction/doc_3986910a/manifest.json +140 -0
- package/research/hypotheses/quantum_error_correction/doc_460e1a25/main.md +61 -0
- package/research/hypotheses/quantum_error_correction/doc_460e1a25/manifest.json +140 -0
- package/research/hypotheses/quantum_error_correction/doc_4cdf3487/main.md +62 -0
- package/research/hypotheses/quantum_error_correction/doc_4cdf3487/manifest.json +131 -0
- package/research/hypotheses/quantum_error_correction/doc_55457312/main.md +63 -0
- package/research/hypotheses/quantum_error_correction/doc_55457312/manifest.json +143 -0
- package/research/hypotheses/quantum_error_correction/doc_562627d3/main.md +62 -0
- package/research/hypotheses/quantum_error_correction/doc_562627d3/manifest.json +146 -0
- package/research/hypotheses/quantum_error_correction/doc_60af027e/main.md +62 -0
- package/research/hypotheses/quantum_error_correction/doc_60af027e/manifest.json +146 -0
- package/research/hypotheses/quantum_error_correction/doc_83a8579f/main.md +63 -0
- package/research/hypotheses/quantum_error_correction/doc_83a8579f/manifest.json +143 -0
- package/research/hypotheses/quantum_error_correction/doc_8ec38dbd/main.md +62 -0
- package/research/hypotheses/quantum_error_correction/doc_8ec38dbd/manifest.json +146 -0
- package/research/hypotheses/quantum_error_correction/doc_90cb416e/main.md +61 -0
- package/research/hypotheses/quantum_error_correction/doc_90cb416e/manifest.json +140 -0
- package/research/hypotheses/quantum_error_correction/doc_a40b574c/main.md +62 -0
- package/research/hypotheses/quantum_error_correction/doc_a40b574c/manifest.json +146 -0
- package/research/hypotheses/quantum_error_correction/doc_b4efacc8/main.md +63 -0
- package/research/hypotheses/quantum_error_correction/doc_b4efacc8/manifest.json +143 -0
- package/research/hypotheses/quantum_error_correction/doc_ca0d6569/main.md +62 -0
- package/research/hypotheses/quantum_error_correction/doc_ca0d6569/manifest.json +146 -0
- package/research/hypotheses/quantum_error_correction/doc_d1eb8740/main.md +61 -0
- package/research/hypotheses/quantum_error_correction/doc_d1eb8740/manifest.json +140 -0
- package/research/hypotheses/quantum_error_correction/doc_e55fcdcf/main.md +62 -0
- package/research/hypotheses/quantum_error_correction/doc_e55fcdcf/manifest.json +120 -0
- package/research/hypotheses/quantum_error_correction/doc_f227b165/main.md +63 -0
- package/research/hypotheses/quantum_error_correction/doc_f227b165/manifest.json +133 -0
- package/research/hypotheses/quantum_error_correction/doc_f5f78884/main.md +61 -0
- package/research/hypotheses/quantum_error_correction/doc_f5f78884/manifest.json +140 -0
- package/research/hypotheses/quantum_error_correction/doc_fdbcc4b0/main.md +61 -0
- package/research/hypotheses/quantum_error_correction/doc_fdbcc4b0/manifest.json +140 -0
- package/research/indices/patent_queue.md +124 -0
- package/research/patents/.gitkeep +0 -0
- package/research/patents/new_qubit_modalities/doc_083cce20/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_083cce20/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_083cce20/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_096ccdfa/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_096ccdfa/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_096ccdfa/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_099071ac/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_099071ac/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_099071ac/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_0adeaec6/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_0adeaec6/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_0adeaec6/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_0e4132a8/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_0e4132a8/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_0e4132a8/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_10af60fa/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_10af60fa/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_10af60fa/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_10afe71a/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_10afe71a/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_10afe71a/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_1339dcfa/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_1339dcfa/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_1339dcfa/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_15222e50/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_15222e50/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_15222e50/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_19e3f8ad/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_19e3f8ad/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_19e3f8ad/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_1a5d01f8/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_1a5d01f8/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_1a5d01f8/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_1bd8bb3b/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_1bd8bb3b/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_1bd8bb3b/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_1c7b4dc1/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_1c7b4dc1/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_1c7b4dc1/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_1ce08a7e/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_1ce08a7e/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_1ce08a7e/manifest.json +130 -0
- package/research/patents/new_qubit_modalities/doc_1cecf1a6/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_1cecf1a6/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_1cecf1a6/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_1d9ad900/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_1d9ad900/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_1d9ad900/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_1ec2eda5/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_1ec2eda5/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_1ec2eda5/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_24b05ff7/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_24b05ff7/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_24b05ff7/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_31c650c7/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_31c650c7/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_31c650c7/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_32f4c6cd/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_32f4c6cd/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_32f4c6cd/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_35a33533/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_35a33533/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_35a33533/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_37d39074/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_37d39074/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_37d39074/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_3bf9f16d/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_3bf9f16d/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_3bf9f16d/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_4440d9d5/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_4440d9d5/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_4440d9d5/manifest.json +130 -0
- package/research/patents/new_qubit_modalities/doc_46620281/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_46620281/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_46620281/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_48532723/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_48532723/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_48532723/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_496df511/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_496df511/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_496df511/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_4c89560e/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_4c89560e/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_4c89560e/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_4cea899d/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_4cea899d/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_4cea899d/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_4d2078d6/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_4d2078d6/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_4d2078d6/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_567d30eb/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_567d30eb/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_567d30eb/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_58bc6d20/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_58bc6d20/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_58bc6d20/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_59084437/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_59084437/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_59084437/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_5b665385/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_5b665385/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_5b665385/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_5f6eb22e/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_5f6eb22e/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_5f6eb22e/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_61841835/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_61841835/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_61841835/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_652f3497/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_652f3497/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_652f3497/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_65e31048/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_65e31048/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_65e31048/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_6906c32e/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_6906c32e/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_6906c32e/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_69b6b7f2/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_69b6b7f2/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_69b6b7f2/manifest.json +146 -0
- package/research/patents/new_qubit_modalities/doc_6c2088b8/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_6c2088b8/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_6c2088b8/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_6f269347/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_6f269347/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_6f269347/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_72bb1059/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_72bb1059/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_72bb1059/manifest.json +134 -0
- package/research/patents/new_qubit_modalities/doc_7302b617/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_7302b617/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_7302b617/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_73419bbf/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_73419bbf/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_73419bbf/manifest.json +139 -0
- package/research/patents/new_qubit_modalities/doc_7403ead0/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_7403ead0/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_7403ead0/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_7541d2ca/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_7541d2ca/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_7541d2ca/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_7680aa01/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_7680aa01/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_7680aa01/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_7c687253/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_7c687253/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_7c687253/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_7e9ac677/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_7e9ac677/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_7e9ac677/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_80d1269d/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_80d1269d/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_80d1269d/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_8415653b/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_8415653b/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_8415653b/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_86c2029b/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_86c2029b/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_86c2029b/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_88f8f770/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_88f8f770/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_88f8f770/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_8b820b6d/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_8b820b6d/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_8b820b6d/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_8de83b3b/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_8de83b3b/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_8de83b3b/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_8f3c09b2/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_8f3c09b2/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_8f3c09b2/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_8f84e761/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_8f84e761/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_8f84e761/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_900ee19f/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_900ee19f/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_900ee19f/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_908b0523/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_908b0523/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_908b0523/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_931099a3/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_931099a3/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_931099a3/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_93ee5d51/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_93ee5d51/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_93ee5d51/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_98121789/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_98121789/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_98121789/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_99fa1dbf/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_99fa1dbf/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_99fa1dbf/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_9abf5f6a/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_9abf5f6a/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_9abf5f6a/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_9cff9f3f/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_9cff9f3f/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_9cff9f3f/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_9fed647b/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_9fed647b/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_9fed647b/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_a3f62d60/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_a3f62d60/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_a3f62d60/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_a788a20b/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_a788a20b/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_a788a20b/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_a9b5116c/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_a9b5116c/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_a9b5116c/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_aaa731aa/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_aaa731aa/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_aaa731aa/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_afa469c3/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_afa469c3/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_afa469c3/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_b19b53e2/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_b19b53e2/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_b19b53e2/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_b64d1987/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_b64d1987/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_b64d1987/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_b68e9075/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_b68e9075/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_b68e9075/manifest.json +146 -0
- package/research/patents/new_qubit_modalities/doc_b6b86c9e/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_b6b86c9e/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_b6b86c9e/manifest.json +146 -0
- package/research/patents/new_qubit_modalities/doc_b7240f70/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_b7240f70/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_b7240f70/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_b7b42d51/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_b7b42d51/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_b7b42d51/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_b83f6b8a/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_b83f6b8a/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_b83f6b8a/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_b8f7e1bb/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_b8f7e1bb/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_b8f7e1bb/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_bc5321b9/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_bc5321b9/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_bc5321b9/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_c361e73b/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_c361e73b/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_c361e73b/manifest.json +135 -0
- package/research/patents/new_qubit_modalities/doc_cb9b6a6e/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_cb9b6a6e/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_cb9b6a6e/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_cf3eeb26/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_cf3eeb26/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_cf3eeb26/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_cfbeb808/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_cfbeb808/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_cfbeb808/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_cffd04a6/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_cffd04a6/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_cffd04a6/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_d416b00f/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_d416b00f/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_d416b00f/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_d557dc44/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_d557dc44/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_d557dc44/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_d80f7790/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_d80f7790/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_d80f7790/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_d8aadbce/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_d8aadbce/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_d8aadbce/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_da88d4e8/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_da88d4e8/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_da88d4e8/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_de3d7026/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_de3d7026/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_de3d7026/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_e14c8177/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_e14c8177/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_e14c8177/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_e1d1a39d/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_e1d1a39d/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_e1d1a39d/manifest.json +146 -0
- package/research/patents/new_qubit_modalities/doc_e4e26a47/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_e4e26a47/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_e4e26a47/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_e6cb751e/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_e6cb751e/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_e6cb751e/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_e77f22ca/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_e77f22ca/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_e77f22ca/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_e907e2a8/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_e907e2a8/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_e907e2a8/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_f5f85ca6/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_f5f85ca6/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_f5f85ca6/manifest.json +125 -0
- package/research/patents/new_qubit_modalities/doc_f6a9e5b3/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_f6a9e5b3/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_f6a9e5b3/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_f83f92f0/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_f83f92f0/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_f83f92f0/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_f99fe94b/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_f99fe94b/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_f99fe94b/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_f9d8235b/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_f9d8235b/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_f9d8235b/manifest.json +144 -0
- package/research/patents/new_qubit_modalities/doc_fe0561b4/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_fe0561b4/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_fe0561b4/manifest.json +145 -0
- package/research/patents/new_qubit_modalities/doc_ff47a428/main.md +64 -0
- package/research/patents/new_qubit_modalities/doc_ff47a428/main.tex +68 -0
- package/research/patents/new_qubit_modalities/doc_ff47a428/manifest.json +145 -0
- package/research/patents/quantum_algorithms/doc_af0d56c9/main.md +64 -0
- package/research/patents/quantum_algorithms/doc_af0d56c9/main.tex +68 -0
- package/research/patents/quantum_algorithms/doc_af0d56c9/manifest.json +146 -0
- package/research/patents/quantum_error_correction/doc_0a24b8af/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_0a24b8af/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_0a24b8af/manifest.json +141 -0
- package/research/patents/quantum_error_correction/doc_0a6aee57/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_0a6aee57/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_0a6aee57/manifest.json +146 -0
- package/research/patents/quantum_error_correction/doc_20a67ec2/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_20a67ec2/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_20a67ec2/manifest.json +146 -0
- package/research/patents/quantum_error_correction/doc_458e5def/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_458e5def/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_458e5def/manifest.json +146 -0
- package/research/patents/quantum_error_correction/doc_475ce69d/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_475ce69d/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_475ce69d/manifest.json +135 -0
- package/research/patents/quantum_error_correction/doc_6c43b9d3/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_6c43b9d3/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_6c43b9d3/manifest.json +145 -0
- package/research/patents/quantum_error_correction/doc_837d0cbb/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_837d0cbb/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_837d0cbb/manifest.json +146 -0
- package/research/patents/quantum_error_correction/doc_89199c22/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_89199c22/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_89199c22/manifest.json +145 -0
- package/research/patents/quantum_error_correction/doc_aaee59e8/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_aaee59e8/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_aaee59e8/manifest.json +146 -0
- package/research/patents/quantum_error_correction/doc_cf5f172b/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_cf5f172b/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_cf5f172b/manifest.json +146 -0
- package/research/patents/quantum_error_correction/doc_d5f8a4ee/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_d5f8a4ee/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_d5f8a4ee/manifest.json +146 -0
- package/research/patents/quantum_error_correction/doc_df16f521/main.md +64 -0
- package/research/patents/quantum_error_correction/doc_df16f521/main.tex +68 -0
- package/research/patents/quantum_error_correction/doc_df16f521/manifest.json +145 -0
- package/research/simulations/.gitkeep +0 -0
- package/research/topics/algorithms/seed_qsvt_2026/main.tex +93 -0
- package/research/topics/algorithms/seed_qsvt_2026/manifest.json +19 -0
- package/research/topics/molecular_simulation/seed_femoco_2026/main.tex +119 -0
- package/research/topics/molecular_simulation/seed_femoco_2026/manifest.json +20 -0
- package/research/topics/qec/seed_surface_code_2026/main.tex +89 -0
- package/research/topics/qec/seed_surface_code_2026/manifest.json +20 -0
- package/research/topics/qubits/seed_neutral_atom_2026/main.tex +98 -0
- package/research/topics/qubits/seed_neutral_atom_2026/manifest.json +19 -0
- package/scripts/benchmark.js +56 -0
- package/scripts/cli.js +237 -0
- package/src/core/ANNPsi.js +266 -0
- package/src/core/ArtificialJunkyNeuron.js +439 -0
- package/src/core/QSpherifierAgent.js +620 -0
- package/src/core/StateSerializer.js +74 -0
- package/src/index.js +178 -0
- package/src/layers/AJNLayer.js +248 -0
- package/src/layers/TransformerBlock.js +201 -0
- package/src/llm/AnthropicAdapter.js +76 -0
- package/src/llm/DeepSeekAdapter.js +78 -0
- package/src/llm/GoogleAdapter.js +78 -0
- package/src/llm/LLMAdapter.js +64 -0
- package/src/llm/LLMRouter.js +107 -0
- package/src/llm/LocalLLMAdapter.js +72 -0
- package/src/llm/OpenAIAdapter.js +78 -0
- package/src/llm/ZAIAdapter.js +99 -0
- package/src/modules/CascadeMonitor.js +84 -0
- package/src/modules/CitationGraph.js +119 -0
- package/src/modules/DocumentArchivist.js +326 -0
- package/src/modules/HierarchicalCommandInterpreter.js +220 -0
- package/src/modules/HypothesisGenerator.js +421 -0
- package/src/modules/MemorySystem.js +210 -0
- package/src/modules/MetricsCollector.js +139 -0
- package/src/modules/PatentClusterManager.js +199 -0
- package/src/modules/PatentDraftAssistant.js +221 -0
- package/src/modules/PluginManager.js +92 -0
- package/src/modules/QuantumKnowledgeGraph.js +888 -0
- package/src/modules/ResearchLineRouter.js +187 -0
- package/src/modules/ResourceFeasibilityChecker.js +494 -0
- package/src/modules/SafetyGuardrails.js +139 -0
- package/src/modules/TokenEnergyArbitrator.js +129 -0
- package/src/tools/BibliographyTool.js +74 -0
- package/src/tools/FileSystemTool.js +91 -0
- package/src/tools/LaTeXDocumentTool.js +94 -0
- package/src/tools/QuantumPhysicsTool.js +219 -0
- package/src/tools/Tool.js +30 -0
- package/src/tools/ToolRegistry.js +40 -0
- package/src/tools/WebSearchTool.js +50 -0
- package/src/training/TrainingPipeline.js +52 -0
- package/tests/run.js +200 -0
- package/web/public/css/dashboard.css +431 -0
- package/web/public/favicon.png +0 -0
- package/web/public/index.html +170 -0
- package/web/public/js/dashboard.js +431 -0
- package/web/public/qspherifier.png +0 -0
- package/web/server.js +306 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AnthropicAdapter.js — quantum-spherifier (v1.0)
|
|
3
|
+
* Adapter for Anthropic Claude (Opus 4.1 / Sonnet 4) via the official
|
|
4
|
+
* Anthropic API. Requires ANTHROPIC_API_KEY env var.
|
|
5
|
+
*
|
|
6
|
+
* Claude Opus 4.1 is exceptionally strong at:
|
|
7
|
+
* - Long-context scientific reasoning (200K context)
|
|
8
|
+
* - Careful, step-by-step quantum circuit analysis
|
|
9
|
+
* - Patent claim drafting with precise language
|
|
10
|
+
* Used as a primary failover partner to ZAIAdapter.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { LLMAdapter } from './LLMAdapter.js';
|
|
14
|
+
|
|
15
|
+
export class AnthropicAdapter extends LLMAdapter {
|
|
16
|
+
constructor(opts = {}) {
|
|
17
|
+
super(opts);
|
|
18
|
+
this.model = opts.model ?? 'claude-opus-4-1';
|
|
19
|
+
this.apiKey = opts.apiKey ?? process.env.ANTHROPIC_API_KEY;
|
|
20
|
+
this.endpoint = opts.endpoint ?? 'https://api.anthropic.com/v1/messages';
|
|
21
|
+
this.apiVersion = opts.apiVersion ?? '2023-06-01';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_envelope(ok, extra = {}) {
|
|
25
|
+
return { ok, timestamp: Date.now(), adapter: 'anthropic', model: this.model, ...extra };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async chat(prompt, systemPrompt) {
|
|
29
|
+
if (!this.apiKey) {
|
|
30
|
+
return this._envelope(false, { error: 'ANTHROPIC_API_KEY not set', content: '' });
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const body = {
|
|
34
|
+
model: this.model,
|
|
35
|
+
max_tokens: this.maxTokens,
|
|
36
|
+
temperature: this.temperature,
|
|
37
|
+
messages: [{ role: 'user', content: prompt }],
|
|
38
|
+
};
|
|
39
|
+
if (systemPrompt) body.system = systemPrompt;
|
|
40
|
+
|
|
41
|
+
const controller = new AbortController();
|
|
42
|
+
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
43
|
+
|
|
44
|
+
const r = await fetch(this.endpoint, {
|
|
45
|
+
method: 'POST',
|
|
46
|
+
headers: {
|
|
47
|
+
'x-api-key': this.apiKey,
|
|
48
|
+
'anthropic-version': this.apiVersion,
|
|
49
|
+
'content-type': 'application/json',
|
|
50
|
+
},
|
|
51
|
+
body: JSON.stringify(body),
|
|
52
|
+
signal: controller.signal,
|
|
53
|
+
});
|
|
54
|
+
clearTimeout(timer);
|
|
55
|
+
|
|
56
|
+
if (!r.ok) {
|
|
57
|
+
const txt = await r.text();
|
|
58
|
+
return this._envelope(false, { error: `HTTP ${r.status}: ${txt}`, content: '' });
|
|
59
|
+
}
|
|
60
|
+
const data = await r.json();
|
|
61
|
+
const content = data.content?.[0]?.text ?? '';
|
|
62
|
+
return this._envelope(true, {
|
|
63
|
+
content,
|
|
64
|
+
usage: data.usage ?? null,
|
|
65
|
+
finishReason: data.stop_reason ?? null,
|
|
66
|
+
});
|
|
67
|
+
} catch (err) {
|
|
68
|
+
const msg = err.name === 'AbortError' ? `Timeout after ${this.timeoutMs}ms` : err.message;
|
|
69
|
+
return this._envelope(false, { error: msg, content: '' });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async embed(_text) {
|
|
74
|
+
return this._envelope(false, { error: 'Anthropic does not expose a public embeddings endpoint' });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DeepSeekAdapter.js — quantum-spherifier (v1.0)
|
|
3
|
+
* Adapter for DeepSeek (V3, R1) via the official DeepSeek API.
|
|
4
|
+
* Requires DEEPSEEK_API_KEY env var. OpenAI-compatible endpoint.
|
|
5
|
+
*
|
|
6
|
+
* DeepSeek-R1 is used for:
|
|
7
|
+
* - Chain-of-thought reasoning over quantum error correction proofs
|
|
8
|
+
* - Cost-effective high-volume hypothesis screening
|
|
9
|
+
* - Mathematical derivation verification
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { LLMAdapter } from './LLMAdapter.js';
|
|
13
|
+
import { hashEmbed } from './ZAIAdapter.js';
|
|
14
|
+
|
|
15
|
+
export class DeepSeekAdapter extends LLMAdapter {
|
|
16
|
+
constructor(opts = {}) {
|
|
17
|
+
super(opts);
|
|
18
|
+
this.model = opts.model ?? 'deepseek-reasoner';
|
|
19
|
+
this.apiKey = opts.apiKey ?? process.env.DEEPSEEK_API_KEY;
|
|
20
|
+
this.endpoint = opts.endpoint ?? 'https://api.deepseek.com/chat/completions';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_envelope(ok, extra = {}) {
|
|
24
|
+
return { ok, timestamp: Date.now(), adapter: 'deepseek', model: this.model, ...extra };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async chat(prompt, systemPrompt) {
|
|
28
|
+
if (!this.apiKey) {
|
|
29
|
+
return this._envelope(false, { error: 'DEEPSEEK_API_KEY not set', content: '' });
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const messages = [];
|
|
33
|
+
if (systemPrompt) messages.push({ role: 'system', content: systemPrompt });
|
|
34
|
+
messages.push({ role: 'user', content: prompt });
|
|
35
|
+
|
|
36
|
+
const controller = new AbortController();
|
|
37
|
+
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
38
|
+
|
|
39
|
+
const r = await fetch(this.endpoint, {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
headers: {
|
|
42
|
+
'Authorization': `Bearer ${this.apiKey}`,
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
},
|
|
45
|
+
body: JSON.stringify({
|
|
46
|
+
model: this.model,
|
|
47
|
+
messages,
|
|
48
|
+
max_tokens: this.maxTokens,
|
|
49
|
+
temperature: this.temperature,
|
|
50
|
+
}),
|
|
51
|
+
signal: controller.signal,
|
|
52
|
+
});
|
|
53
|
+
clearTimeout(timer);
|
|
54
|
+
|
|
55
|
+
if (!r.ok) {
|
|
56
|
+
const txt = await r.text();
|
|
57
|
+
return this._envelope(false, { error: `HTTP ${r.status}: ${txt}`, content: '' });
|
|
58
|
+
}
|
|
59
|
+
const data = await r.json();
|
|
60
|
+
const content = data.choices?.[0]?.message?.content ?? '';
|
|
61
|
+
return this._envelope(true, {
|
|
62
|
+
content,
|
|
63
|
+
usage: data.usage ?? null,
|
|
64
|
+
finishReason: data.choices?.[0]?.finish_reason ?? null,
|
|
65
|
+
});
|
|
66
|
+
} catch (err) {
|
|
67
|
+
const msg = err.name === 'AbortError' ? `Timeout after ${this.timeoutMs}ms` : err.message;
|
|
68
|
+
return this._envelope(false, { error: msg, content: '' });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async embed(text) {
|
|
73
|
+
if (typeof text !== 'string' || text.length === 0) {
|
|
74
|
+
return this._envelope(false, { error: 'embed() requires a non-empty string' });
|
|
75
|
+
}
|
|
76
|
+
return this._envelope(true, { embedding: hashEmbed(text) });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GoogleAdapter.js — quantum-spherifier (v1.0)
|
|
3
|
+
* Adapter for Google Gemini (2.0 Flash, 2.0 Pro, 1.5 Pro) via the
|
|
4
|
+
* official Generative Language API. Requires GOOGLE_API_KEY env var.
|
|
5
|
+
*
|
|
6
|
+
* Gemini 2.0 Pro is used for:
|
|
7
|
+
* - Multimodal quantum circuit diagram analysis
|
|
8
|
+
* - Very long context (2M tokens) literature reviews
|
|
9
|
+
* - Cross-referencing arXiv preprints at scale
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { LLMAdapter } from './LLMAdapter.js';
|
|
13
|
+
import { hashEmbed } from './ZAIAdapter.js';
|
|
14
|
+
|
|
15
|
+
export class GoogleAdapter extends LLMAdapter {
|
|
16
|
+
constructor(opts = {}) {
|
|
17
|
+
super(opts);
|
|
18
|
+
this.model = opts.model ?? 'gemini-2.0-flash';
|
|
19
|
+
this.apiKey = opts.apiKey ?? process.env.GOOGLE_API_KEY;
|
|
20
|
+
this.endpoint = opts.endpoint
|
|
21
|
+
?? `https://generativelanguage.googleapis.com/v1beta/models/${this.model}:generateContent`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_envelope(ok, extra = {}) {
|
|
25
|
+
return { ok, timestamp: Date.now(), adapter: 'google', model: this.model, ...extra };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async chat(prompt, systemPrompt) {
|
|
29
|
+
if (!this.apiKey) {
|
|
30
|
+
return this._envelope(false, { error: 'GOOGLE_API_KEY not set', content: '' });
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const body = {
|
|
34
|
+
contents: [{ role: 'user', parts: [{ text: prompt }] }],
|
|
35
|
+
generationConfig: {
|
|
36
|
+
temperature: this.temperature,
|
|
37
|
+
maxOutputTokens: this.maxTokens,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
if (systemPrompt) {
|
|
41
|
+
body.systemInstruction = { parts: [{ text: systemPrompt }] };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const controller = new AbortController();
|
|
45
|
+
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
46
|
+
|
|
47
|
+
const r = await fetch(`${this.endpoint}?key=${this.apiKey}`, {
|
|
48
|
+
method: 'POST',
|
|
49
|
+
headers: { 'Content-Type': 'application/json' },
|
|
50
|
+
body: JSON.stringify(body),
|
|
51
|
+
signal: controller.signal,
|
|
52
|
+
});
|
|
53
|
+
clearTimeout(timer);
|
|
54
|
+
|
|
55
|
+
if (!r.ok) {
|
|
56
|
+
const txt = await r.text();
|
|
57
|
+
return this._envelope(false, { error: `HTTP ${r.status}: ${txt}`, content: '' });
|
|
58
|
+
}
|
|
59
|
+
const data = await r.json();
|
|
60
|
+
const content = data.candidates?.[0]?.content?.parts?.[0]?.text ?? '';
|
|
61
|
+
return this._envelope(true, {
|
|
62
|
+
content,
|
|
63
|
+
usage: data.usageMetadata ?? null,
|
|
64
|
+
finishReason: data.candidates?.[0]?.finishReason ?? null,
|
|
65
|
+
});
|
|
66
|
+
} catch (err) {
|
|
67
|
+
const msg = err.name === 'AbortError' ? `Timeout after ${this.timeoutMs}ms` : err.message;
|
|
68
|
+
return this._envelope(false, { error: msg, content: '' });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async embed(text) {
|
|
73
|
+
if (typeof text !== 'string' || text.length === 0) {
|
|
74
|
+
return this._envelope(false, { error: 'embed() requires a non-empty string' });
|
|
75
|
+
}
|
|
76
|
+
return this._envelope(true, { embedding: hashEmbed(text) });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLMAdapter.js — quantum-spherifier (v1.0)
|
|
3
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
* Abstract LLM adapter interface. All adapters must implement:
|
|
5
|
+
* chat(prompt, systemPrompt) -> { ok, content, usage, ... }
|
|
6
|
+
* complete(prompt) -> { ok, content, usage, ... }
|
|
7
|
+
* embed(text) -> { ok, embedding }
|
|
8
|
+
* classify(text, labels) -> { ok, label, confidence }
|
|
9
|
+
*
|
|
10
|
+
* quantum-spherifier uses the most powerful frontier LLMs available:
|
|
11
|
+
* GLM-4.6 (Z.ai), Claude Opus 4.1 (Anthropic), GPT-4o (OpenAI),
|
|
12
|
+
* Gemini 2.0 (Google), DeepSeek-V3, and local models via Ollama.
|
|
13
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export class LLMAdapter {
|
|
17
|
+
constructor(opts = {}) {
|
|
18
|
+
this.model = opts.model ?? 'default';
|
|
19
|
+
this.temperature = opts.temperature ?? 0.7;
|
|
20
|
+
this.maxTokens = opts.maxTokens ?? 8192;
|
|
21
|
+
this.timeoutMs = opts.timeoutMs ?? 120_000;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async chat(_prompt, _systemPrompt) {
|
|
25
|
+
throw new Error('chat() not implemented');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async complete(_prompt) {
|
|
29
|
+
return this.chat(_prompt);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async embed(_text) {
|
|
33
|
+
throw new Error('embed() not implemented');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async classify(text, labels) {
|
|
37
|
+
const systemPrompt = [
|
|
38
|
+
'You are a classification engine. Respond with EXACTLY ONE of the following labels,',
|
|
39
|
+
'and nothing else.',
|
|
40
|
+
'Labels: ' + labels.join(' | '),
|
|
41
|
+
].join('\n');
|
|
42
|
+
const r = await this.chat(text, systemPrompt);
|
|
43
|
+
if (!r.ok) return r;
|
|
44
|
+
const raw = (r.content ?? '').trim().toLowerCase();
|
|
45
|
+
const matched = labels.find(l => l.toLowerCase() === raw)
|
|
46
|
+
?? labels.find(l => l.toLowerCase().includes(raw))
|
|
47
|
+
?? null;
|
|
48
|
+
return {
|
|
49
|
+
ok: true,
|
|
50
|
+
label: matched ?? r.content.trim(),
|
|
51
|
+
confidence: matched ? 1.0 : 0.5,
|
|
52
|
+
raw: r.content.trim(),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
metadata() {
|
|
57
|
+
return {
|
|
58
|
+
model: this.model,
|
|
59
|
+
temperature: this.temperature,
|
|
60
|
+
maxTokens: this.maxTokens,
|
|
61
|
+
adapter: this.constructor.name,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLMRouter.js — quantum-spherifier (v1.0)
|
|
3
|
+
* Multi-LLM adapter with automatic failover, cost-aware routing, and
|
|
4
|
+
* per-task model selection. Tries adapters in priority order until one
|
|
5
|
+
* succeeds. Tracks per-adapter success rates and demotes failing adapters.
|
|
6
|
+
*
|
|
7
|
+
* Task routing policy (configurable):
|
|
8
|
+
* - hypothesis_generation → glm-4.6 (best STEM reasoning per token)
|
|
9
|
+
* - patent_drafting → claude-opus-4-1 (precise legal language)
|
|
10
|
+
* - literature_review → gemini-2.0-flash (long context, low cost)
|
|
11
|
+
* - proof_verification → deepseek-reasoner (CoT reasoning)
|
|
12
|
+
* - fallback → gpt-4o → local
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { EventEmitter } from 'eventemitter3';
|
|
16
|
+
import { LLMAdapter } from './LLMAdapter.js';
|
|
17
|
+
|
|
18
|
+
const DEFAULT_TASK_ROUTING = {
|
|
19
|
+
hypothesis_generation: ['zai', 'anthropic', 'openai', 'google', 'deepseek', 'local'],
|
|
20
|
+
patent_drafting: ['anthropic', 'zai', 'openai', 'google', 'local'],
|
|
21
|
+
literature_review: ['google', 'zai', 'openai', 'local'],
|
|
22
|
+
proof_verification: ['deepseek', 'zai', 'anthropic', 'local'],
|
|
23
|
+
default: ['zai', 'anthropic', 'openai', 'google', 'deepseek', 'local'],
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export class LLMRouter extends LLMAdapter {
|
|
27
|
+
constructor(opts = {}) {
|
|
28
|
+
super(opts);
|
|
29
|
+
this.adapters = new Map(); // id -> { adapter, priority, successes, failures, lastErrorAt }
|
|
30
|
+
this.taskRouting = { ...DEFAULT_TASK_ROUTING, ...(opts.taskRouting ?? {}) };
|
|
31
|
+
this.minRetryMs = opts.minRetryMs ?? 30_000;
|
|
32
|
+
this.defaultTask = opts.defaultTask ?? 'default';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
register(id, adapter, priority = 100) {
|
|
36
|
+
if (!(adapter instanceof LLMAdapter)) {
|
|
37
|
+
throw new Error('Must register an LLMAdapter instance');
|
|
38
|
+
}
|
|
39
|
+
this.adapters.set(id, { adapter, priority, successes: 0, failures: 0, lastErrorAt: 0 });
|
|
40
|
+
this.emit('registered', { id, priority });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
setTaskRouting(task, adapterIds) {
|
|
44
|
+
this.taskRouting[task] = adapterIds;
|
|
45
|
+
this.emit('routingChanged', { task, adapterIds });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
_eligibleIds(task) {
|
|
49
|
+
const order = this.taskRouting[task] ?? this.taskRouting[this.defaultTask];
|
|
50
|
+
const now = Date.now();
|
|
51
|
+
return order.filter(id => {
|
|
52
|
+
const entry = this.adapters.get(id);
|
|
53
|
+
if (!entry) return false;
|
|
54
|
+
return entry.failures === 0 || (now - entry.lastErrorAt) > this.minRetryMs;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async chat(prompt, systemPrompt, opts = {}) {
|
|
59
|
+
const task = opts.task ?? this.defaultTask;
|
|
60
|
+
const eligibleIds = this._eligibleIds(task);
|
|
61
|
+
if (eligibleIds.length === 0) {
|
|
62
|
+
return {
|
|
63
|
+
ok: false,
|
|
64
|
+
error: `All LLM adapters unavailable for task "${task}"`,
|
|
65
|
+
content: '',
|
|
66
|
+
timestamp: Date.now(),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
for (const id of eligibleIds) {
|
|
70
|
+
const entry = this.adapters.get(id);
|
|
71
|
+
const r = await entry.adapter.chat(prompt, systemPrompt);
|
|
72
|
+
if (r?.ok) {
|
|
73
|
+
entry.successes++;
|
|
74
|
+
return { ...r, adapterUsed: id, task };
|
|
75
|
+
}
|
|
76
|
+
entry.failures++;
|
|
77
|
+
entry.lastErrorAt = Date.now();
|
|
78
|
+
this.emit('adapterFailed', { id, error: r?.error });
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
ok: false,
|
|
82
|
+
error: `All eligible LLM adapters failed for task "${task}"`,
|
|
83
|
+
content: '',
|
|
84
|
+
timestamp: Date.now(),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async embed(text) {
|
|
89
|
+
for (const [, entry] of this.adapters) {
|
|
90
|
+
const r = await entry.adapter.embed(text);
|
|
91
|
+
if (r?.ok) return r;
|
|
92
|
+
}
|
|
93
|
+
return { ok: false, error: 'No adapter could embed' };
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
status() {
|
|
97
|
+
return [...this.adapters.entries()].map(([id, a]) => ({
|
|
98
|
+
id,
|
|
99
|
+
adapter: a.adapter.constructor.name,
|
|
100
|
+
model: a.adapter.model,
|
|
101
|
+
priority: a.priority,
|
|
102
|
+
successes: a.successes,
|
|
103
|
+
failures: a.failures,
|
|
104
|
+
lastErrorAt: a.lastErrorAt || null,
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LocalLLMAdapter.js — quantum-spherifier (v1.0)
|
|
3
|
+
* Adapter for local LLMs served via Ollama (llama3.1:70b, qwen2.5:72b,
|
|
4
|
+
* deepseek-r1:32b, etc.). OpenAI-compatible endpoint at /v1/chat/completions.
|
|
5
|
+
*
|
|
6
|
+
* Used as an air-gapped fallback when no cloud API keys are available,
|
|
7
|
+
* and for cost-free high-volume screening of low-stakes hypotheses.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { LLMAdapter } from './LLMAdapter.js';
|
|
11
|
+
import { hashEmbed } from './ZAIAdapter.js';
|
|
12
|
+
|
|
13
|
+
export class LocalLLMAdapter extends LLMAdapter {
|
|
14
|
+
constructor(opts = {}) {
|
|
15
|
+
super(opts);
|
|
16
|
+
this.model = opts.model ?? process.env.OLLAMA_MODEL ?? 'llama3.1:70b';
|
|
17
|
+
this.endpoint = opts.endpoint
|
|
18
|
+
?? process.env.OLLAMA_ENDPOINT
|
|
19
|
+
?? 'http://localhost:11434/v1/chat/completions';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
_envelope(ok, extra = {}) {
|
|
23
|
+
return { ok, timestamp: Date.now(), adapter: 'local', model: this.model, ...extra };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async chat(prompt, systemPrompt) {
|
|
27
|
+
try {
|
|
28
|
+
const messages = [];
|
|
29
|
+
if (systemPrompt) messages.push({ role: 'system', content: systemPrompt });
|
|
30
|
+
messages.push({ role: 'user', content: prompt });
|
|
31
|
+
|
|
32
|
+
const controller = new AbortController();
|
|
33
|
+
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
34
|
+
|
|
35
|
+
const r = await fetch(this.endpoint, {
|
|
36
|
+
method: 'POST',
|
|
37
|
+
headers: { 'Content-Type': 'application/json' },
|
|
38
|
+
body: JSON.stringify({
|
|
39
|
+
model: this.model,
|
|
40
|
+
messages,
|
|
41
|
+
max_tokens: this.maxTokens,
|
|
42
|
+
temperature: this.temperature,
|
|
43
|
+
stream: false,
|
|
44
|
+
}),
|
|
45
|
+
signal: controller.signal,
|
|
46
|
+
});
|
|
47
|
+
clearTimeout(timer);
|
|
48
|
+
|
|
49
|
+
if (!r.ok) {
|
|
50
|
+
const txt = await r.text();
|
|
51
|
+
return this._envelope(false, { error: `HTTP ${r.status}: ${txt}`, content: '' });
|
|
52
|
+
}
|
|
53
|
+
const data = await r.json();
|
|
54
|
+
const content = data.choices?.[0]?.message?.content ?? '';
|
|
55
|
+
return this._envelope(true, {
|
|
56
|
+
content,
|
|
57
|
+
usage: data.usage ?? null,
|
|
58
|
+
finishReason: data.choices?.[0]?.finish_reason ?? null,
|
|
59
|
+
});
|
|
60
|
+
} catch (err) {
|
|
61
|
+
const msg = err.name === 'AbortError' ? `Timeout after ${this.timeoutMs}ms` : err.message;
|
|
62
|
+
return this._envelope(false, { error: msg, content: '' });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async embed(text) {
|
|
67
|
+
if (typeof text !== 'string' || text.length === 0) {
|
|
68
|
+
return this._envelope(false, { error: 'embed() requires a non-empty string' });
|
|
69
|
+
}
|
|
70
|
+
return this._envelope(true, { embedding: hashEmbed(text) });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAIAdapter.js — quantum-spherifier (v1.0)
|
|
3
|
+
* Adapter for OpenAI GPT-class models (GPT-4o, GPT-4-Turbo, o1, o3-mini)
|
|
4
|
+
* via the official OpenAI API. Requires OPENAI_API_KEY env var.
|
|
5
|
+
*
|
|
6
|
+
* GPT-4o and the o-series reasoning models are used for:
|
|
7
|
+
* - High-throughput hypothesis generation
|
|
8
|
+
* - Quantum algorithm pseudocode synthesis
|
|
9
|
+
* - Cross-domain analogies (e.g. classical error correction → QEC)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { LLMAdapter } from './LLMAdapter.js';
|
|
13
|
+
import { hashEmbed } from './ZAIAdapter.js';
|
|
14
|
+
|
|
15
|
+
export class OpenAIAdapter extends LLMAdapter {
|
|
16
|
+
constructor(opts = {}) {
|
|
17
|
+
super(opts);
|
|
18
|
+
this.model = opts.model ?? 'gpt-4o';
|
|
19
|
+
this.apiKey = opts.apiKey ?? process.env.OPENAI_API_KEY;
|
|
20
|
+
this.endpoint = opts.endpoint ?? 'https://api.openai.com/v1/chat/completions';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_envelope(ok, extra = {}) {
|
|
24
|
+
return { ok, timestamp: Date.now(), adapter: 'openai', model: this.model, ...extra };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async chat(prompt, systemPrompt) {
|
|
28
|
+
if (!this.apiKey) {
|
|
29
|
+
return this._envelope(false, { error: 'OPENAI_API_KEY not set', content: '' });
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const messages = [];
|
|
33
|
+
if (systemPrompt) messages.push({ role: 'system', content: systemPrompt });
|
|
34
|
+
messages.push({ role: 'user', content: prompt });
|
|
35
|
+
|
|
36
|
+
const controller = new AbortController();
|
|
37
|
+
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
38
|
+
|
|
39
|
+
const r = await fetch(this.endpoint, {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
headers: {
|
|
42
|
+
'Authorization': `Bearer ${this.apiKey}`,
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
},
|
|
45
|
+
body: JSON.stringify({
|
|
46
|
+
model: this.model,
|
|
47
|
+
messages,
|
|
48
|
+
max_tokens: this.maxTokens,
|
|
49
|
+
temperature: this.temperature,
|
|
50
|
+
}),
|
|
51
|
+
signal: controller.signal,
|
|
52
|
+
});
|
|
53
|
+
clearTimeout(timer);
|
|
54
|
+
|
|
55
|
+
if (!r.ok) {
|
|
56
|
+
const txt = await r.text();
|
|
57
|
+
return this._envelope(false, { error: `HTTP ${r.status}: ${txt}`, content: '' });
|
|
58
|
+
}
|
|
59
|
+
const data = await r.json();
|
|
60
|
+
const content = data.choices?.[0]?.message?.content ?? '';
|
|
61
|
+
return this._envelope(true, {
|
|
62
|
+
content,
|
|
63
|
+
usage: data.usage ?? null,
|
|
64
|
+
finishReason: data.choices?.[0]?.finish_reason ?? null,
|
|
65
|
+
});
|
|
66
|
+
} catch (err) {
|
|
67
|
+
const msg = err.name === 'AbortError' ? `Timeout after ${this.timeoutMs}ms` : err.message;
|
|
68
|
+
return this._envelope(false, { error: msg, content: '' });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async embed(text) {
|
|
73
|
+
if (typeof text !== 'string' || text.length === 0) {
|
|
74
|
+
return this._envelope(false, { error: 'embed() requires a non-empty string' });
|
|
75
|
+
}
|
|
76
|
+
return this._envelope(true, { embedding: hashEmbed(text) });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ZAIAdapter.js — quantum-spherifier (v1.0)
|
|
3
|
+
* Primary LLM adapter. Uses z-ai-web-dev-sdk which provides access
|
|
4
|
+
* to GLM-4.6, GLM-4.5V, and other frontier models hosted by Z.ai.
|
|
5
|
+
*
|
|
6
|
+
* GLM-4.6 is the recommended default for scientific reasoning tasks:
|
|
7
|
+
* - 200K-token context window
|
|
8
|
+
* - Strong reasoning across STEM benchmarks
|
|
9
|
+
* - Tool-use and JSON-mode support
|
|
10
|
+
* - Excellent for quantum computing literature synthesis
|
|
11
|
+
*
|
|
12
|
+
* For embeddings, falls back to a deterministic hash embedding because
|
|
13
|
+
* the gateway does not expose a native embed endpoint.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import ZAI from 'z-ai-web-dev-sdk';
|
|
17
|
+
import { LLMAdapter } from './LLMAdapter.js';
|
|
18
|
+
|
|
19
|
+
const DIM = 384;
|
|
20
|
+
|
|
21
|
+
function hashEmbed(text) {
|
|
22
|
+
const e = new Float64Array(DIM);
|
|
23
|
+
for (let i = 0; i < text.length; i++) {
|
|
24
|
+
const code = text.charCodeAt(i);
|
|
25
|
+
const slot = (i * 31 + code) % DIM;
|
|
26
|
+
e[slot] += Math.sin(code * 0.01 + i * 0.1) * (1 + (code % 5));
|
|
27
|
+
}
|
|
28
|
+
let n = 0;
|
|
29
|
+
for (const v of e) n += v * v;
|
|
30
|
+
n = Math.sqrt(n) || 1;
|
|
31
|
+
for (let i = 0; i < DIM; i++) e[i] /= n;
|
|
32
|
+
return Array.from(e);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export class ZAIAdapter extends LLMAdapter {
|
|
36
|
+
constructor(opts = {}) {
|
|
37
|
+
super(opts);
|
|
38
|
+
this.model = opts.model ?? 'glm-4.6';
|
|
39
|
+
this._zai = null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async _ensureClient() {
|
|
43
|
+
if (!this._zai) {
|
|
44
|
+
try {
|
|
45
|
+
this._zai = await ZAI.create();
|
|
46
|
+
} catch (err) {
|
|
47
|
+
throw new Error(`Failed to initialise z-ai-web-dev-sdk: ${err.message}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return this._zai;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
_envelope(ok, extra = {}) {
|
|
54
|
+
return { ok, timestamp: Date.now(), adapter: 'zai', model: this.model, ...extra };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async chat(prompt, systemPrompt) {
|
|
58
|
+
try {
|
|
59
|
+
const client = await this._ensureClient();
|
|
60
|
+
const messages = [];
|
|
61
|
+
if (systemPrompt) messages.push({ role: 'system', content: systemPrompt });
|
|
62
|
+
messages.push({ role: 'user', content: prompt });
|
|
63
|
+
|
|
64
|
+
const response = await client.chat.completions.create({
|
|
65
|
+
model: this.model,
|
|
66
|
+
messages,
|
|
67
|
+
max_tokens: this.maxTokens,
|
|
68
|
+
temperature: this.temperature,
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const choice = response.choices?.[0];
|
|
72
|
+
const content = choice?.message?.content ?? '';
|
|
73
|
+
return this._envelope(true, {
|
|
74
|
+
content,
|
|
75
|
+
usage: response.usage ?? null,
|
|
76
|
+
finishReason: choice?.finish_reason ?? null,
|
|
77
|
+
});
|
|
78
|
+
} catch (err) {
|
|
79
|
+
return this._envelope(false, { error: err.message ?? String(err), content: '' });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async complete(prompt) {
|
|
84
|
+
return this.chat(prompt);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async embed(text) {
|
|
88
|
+
if (typeof text !== 'string' || text.length === 0) {
|
|
89
|
+
return this._envelope(false, { error: 'embed() requires a non-empty string' });
|
|
90
|
+
}
|
|
91
|
+
return this._envelope(true, { embedding: hashEmbed(text) });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async classify(text, labels) {
|
|
95
|
+
return super.classify(text, labels);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { hashEmbed };
|