@wenathlan/saddle 1.8.18 → 2.0.2
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/Dockerfile +1339 -0
- package/README.md +33 -12
- package/alternatives.ts +1218 -0
- package/biome.json +153 -0
- package/boards.json +1517 -0
- package/compute.ts +3144 -0
- package/cores.json +1801 -0
- package/dist/acquisition.d.ts +359 -0
- package/dist/acquisition.d.ts.map +1 -0
- package/dist/acquisition.js +629 -0
- package/dist/acquisition.js.map +1 -0
- package/dist/alternatives.d.ts +509 -0
- package/dist/alternatives.d.ts.map +1 -0
- package/dist/alternatives.js +951 -0
- package/dist/alternatives.js.map +1 -0
- package/dist/automation.d.ts +426 -0
- package/dist/automation.d.ts.map +1 -0
- package/dist/automation.js +561 -0
- package/dist/automation.js.map +1 -0
- package/dist/browser.d.ts +562 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +1057 -0
- package/dist/browser.js.map +1 -0
- package/dist/capacitor.config.d.ts +13 -0
- package/dist/capacitor.config.d.ts.map +1 -0
- package/dist/capacitor.config.js +26 -0
- package/dist/capacitor.config.js.map +1 -0
- package/dist/cli.d.ts +17 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +111 -0
- package/dist/cli.js.map +1 -0
- package/dist/communication.d.ts +192 -0
- package/dist/communication.d.ts.map +1 -0
- package/dist/communication.js +418 -0
- package/dist/communication.js.map +1 -0
- package/dist/compute.d.ts +1161 -0
- package/dist/compute.d.ts.map +1 -0
- package/dist/compute.js +2273 -0
- package/dist/compute.js.map +1 -0
- package/dist/distribution.d.ts +529 -0
- package/dist/distribution.d.ts.map +1 -0
- package/dist/distribution.js +811 -0
- package/dist/distribution.js.map +1 -0
- package/dist/execution.d.ts +530 -0
- package/dist/execution.d.ts.map +1 -0
- package/dist/execution.js +761 -0
- package/dist/execution.js.map +1 -0
- package/dist/format.d.ts +19 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +60 -0
- package/dist/format.js.map +1 -0
- package/dist/foundation.d.ts +176 -0
- package/dist/foundation.d.ts.map +1 -0
- package/dist/foundation.js +309 -0
- package/dist/foundation.js.map +1 -0
- package/dist/index.d.ts +733 -123
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1018 -123
- package/dist/index.js.map +1 -1
- package/dist/integration.d.ts +236 -0
- package/dist/integration.d.ts.map +1 -0
- package/dist/integration.js +236 -0
- package/dist/integration.js.map +1 -0
- package/dist/intelligence.d.ts +94 -0
- package/dist/intelligence.d.ts.map +1 -0
- package/dist/intelligence.js +145 -0
- package/dist/intelligence.js.map +1 -0
- package/dist/{isolation/contracts.d.ts → isolation.d.ts} +12 -1
- package/dist/isolation.d.ts.map +1 -0
- package/dist/{isolation/contracts.js → isolation.js} +13 -1
- package/dist/isolation.js.map +1 -0
- package/dist/media.d.ts +344 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +986 -0
- package/dist/media.js.map +1 -0
- package/dist/modes.d.ts +359 -0
- package/dist/modes.d.ts.map +1 -0
- package/dist/modes.js +134 -0
- package/dist/modes.js.map +1 -0
- package/dist/{library/public.d.ts → operations.d.ts} +15 -1
- package/dist/operations.d.ts.map +1 -0
- package/dist/{library/public.js → operations.js} +18 -7
- package/dist/operations.js.map +1 -0
- package/dist/orchestrator.d.ts +1339 -0
- package/dist/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator.js +4308 -0
- package/dist/orchestrator.js.map +1 -0
- package/dist/performance.d.ts +416 -0
- package/dist/performance.d.ts.map +1 -0
- package/dist/performance.js +827 -0
- package/dist/performance.js.map +1 -0
- package/dist/quantum.d.ts +810 -0
- package/dist/quantum.d.ts.map +1 -0
- package/dist/quantum.js +2073 -0
- package/dist/quantum.js.map +1 -0
- package/dist/render.d.ts +381 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +1073 -0
- package/dist/render.js.map +1 -0
- package/dist/scheduler.d.ts +596 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +1259 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/security.d.ts +501 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +1170 -0
- package/dist/security.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/{server/node.js → server.js} +16 -2
- package/dist/server.js.map +1 -0
- package/dist/tiers.d.ts +1002 -0
- package/dist/tiers.d.ts.map +1 -0
- package/dist/tiers.js +2165 -0
- package/dist/tiers.js.map +1 -0
- package/dist/virtual.d.ts +641 -0
- package/dist/virtual.d.ts.map +1 -0
- package/dist/virtual.js +1285 -0
- package/dist/virtual.js.map +1 -0
- package/dist/virtualcpu.d.ts +316 -0
- package/dist/virtualcpu.d.ts.map +1 -0
- package/dist/virtualcpu.js +1180 -0
- package/dist/virtualcpu.js.map +1 -0
- package/dist/virtualgpu.d.ts +345 -0
- package/dist/virtualgpu.d.ts.map +1 -0
- package/dist/virtualgpu.js +1000 -0
- package/dist/virtualgpu.js.map +1 -0
- package/dist/virtualization.d.ts +607 -0
- package/dist/virtualization.d.ts.map +1 -0
- package/dist/virtualization.js +1187 -0
- package/dist/virtualization.js.map +1 -0
- package/dist/virtualmemory.d.ts +818 -0
- package/dist/virtualmemory.d.ts.map +1 -0
- package/dist/virtualmemory.js +1796 -0
- package/dist/virtualmemory.js.map +1 -0
- package/dist/webscrape.d.ts +720 -0
- package/dist/webscrape.d.ts.map +1 -0
- package/dist/webscrape.js +2697 -0
- package/dist/webscrape.js.map +1 -0
- package/docker.config +769 -0
- package/docs/CONVERSA.txt +1523 -0
- package/docs/alternatives.md +499 -0
- package/docs/architecture-1.8.19.md +76 -0
- package/docs/architecture-1.8.19.mmd +33 -0
- package/docs/architecture-1.8.19.png +0 -0
- package/docs/architecture.md +355 -0
- package/docs/brancharchive-2026-08-18.md +18 -0
- package/docs/browser.md +7 -0
- package/docs/consolidation.md +70 -0
- package/docs/e2ugh-engine.md +528 -0
- package/{dist/examples/localjob.js → docs/example-localjob.ts} +3 -3
- package/{dist/examples/publicapi.js → docs/example-publicapi.ts} +2 -2
- package/docs/hardware.md +342 -0
- package/docs/optimization.md +126 -0
- package/docs/performance.md +499 -0
- package/docs/planning.1.8.18.md +94 -0
- package/docs/planning.1.8.19.md +49 -0
- package/docs/releasenotes-1.8.19.md +35 -0
- package/docs/research-1.8.19-virtual-browser.md +27 -0
- package/docs/security.md +454 -0
- package/docs/todo-1.8.18.md +12 -0
- package/docs/todo-1.8.19.md +241 -0
- package/docs/viability.md +777 -0
- package/docs/virtualization.md +335 -0
- package/docs/web-duplicatecleanup.md +9 -0
- package/docs/web-ideas.md +106 -0
- package/docs/workflowimprovements-2026-08-19.md +70 -0
- package/gpumonitor.cpp +1543 -0
- package/gpus.json +2408 -0
- package/index.ts +1478 -0
- package/media.ts +1337 -0
- package/mttg.config +1549 -0
- package/orchestrator.ts +5462 -0
- package/package.json +304 -56
- package/passage.config +1331 -0
- package/performance.ts +1049 -0
- package/processors.json +2217 -0
- package/qemu.config +1062 -0
- package/qemubridge.py +1340 -0
- package/quantum.ts +2393 -0
- package/render.ts +1325 -0
- package/scheduler.ts +1600 -0
- package/security.ts +1449 -0
- package/tiers.ts +2871 -0
- package/tsconfig.json +29 -0
- package/virtualcpu.ts +1273 -0
- package/virtualgpu.ts +1181 -0
- package/virtualhardware.c +1011 -0
- package/virtualhardware.json +739 -0
- package/virtualization.ts +1628 -0
- package/virtualizationcore.cpp +4635 -0
- package/virtualmemory.ts +2303 -0
- package/vm.config.json +1910 -0
- package/{extension → web/extension}/manifest.json +1 -1
- package/web/readme.md +382 -0
- package/web/tsconfig.json +25 -0
- package/dist/adapters/forge.d.ts +0 -17
- package/dist/adapters/forge.d.ts.map +0 -1
- package/dist/adapters/forge.js +0 -19
- package/dist/adapters/forge.js.map +0 -1
- package/dist/adapters/forgejo.d.ts +0 -49
- package/dist/adapters/forgejo.d.ts.map +0 -1
- package/dist/adapters/forgejo.js +0 -8
- package/dist/adapters/forgejo.js.map +0 -1
- package/dist/adapters/github.d.ts +0 -12
- package/dist/adapters/github.d.ts.map +0 -1
- package/dist/adapters/github.js +0 -20
- package/dist/adapters/github.js.map +0 -1
- package/dist/adapters/gitlab.d.ts +0 -17
- package/dist/adapters/gitlab.d.ts.map +0 -1
- package/dist/adapters/gitlab.js +0 -10
- package/dist/adapters/gitlab.js.map +0 -1
- package/dist/adapters/huggingface.d.ts +0 -17
- package/dist/adapters/huggingface.d.ts.map +0 -1
- package/dist/adapters/huggingface.js +0 -6
- package/dist/adapters/huggingface.js.map +0 -1
- package/dist/adapters/socket.d.ts +0 -11
- package/dist/adapters/socket.d.ts.map +0 -1
- package/dist/adapters/socket.js +0 -17
- package/dist/adapters/socket.js.map +0 -1
- package/dist/adapters/transport.d.ts +0 -7
- package/dist/adapters/transport.d.ts.map +0 -1
- package/dist/adapters/transport.js +0 -36
- package/dist/adapters/transport.js.map +0 -1
- package/dist/ai/chunk.d.ts +0 -2
- package/dist/ai/chunk.d.ts.map +0 -1
- package/dist/ai/chunk.js +0 -36
- package/dist/ai/chunk.js.map +0 -1
- package/dist/ai/llmstxt.d.ts +0 -6
- package/dist/ai/llmstxt.d.ts.map +0 -1
- package/dist/ai/llmstxt.js +0 -12
- package/dist/ai/llmstxt.js.map +0 -1
- package/dist/ai/provenance.d.ts +0 -22
- package/dist/ai/provenance.d.ts.map +0 -1
- package/dist/ai/provenance.js +0 -25
- package/dist/ai/provenance.js.map +0 -1
- package/dist/ai/rag.d.ts +0 -26
- package/dist/ai/rag.d.ts.map +0 -1
- package/dist/ai/rag.js +0 -22
- package/dist/ai/rag.js.map +0 -1
- package/dist/ai/tokens.d.ts +0 -15
- package/dist/ai/tokens.d.ts.map +0 -1
- package/dist/ai/tokens.js +0 -9
- package/dist/ai/tokens.js.map +0 -1
- package/dist/api/auth.d.ts +0 -16
- package/dist/api/auth.d.ts.map +0 -1
- package/dist/api/auth.js +0 -19
- package/dist/api/auth.js.map +0 -1
- package/dist/api/contracts.d.ts +0 -28
- package/dist/api/contracts.d.ts.map +0 -1
- package/dist/api/contracts.js +0 -14
- package/dist/api/contracts.js.map +0 -1
- package/dist/api/control.d.ts +0 -10
- package/dist/api/control.d.ts.map +0 -1
- package/dist/api/control.js +0 -35
- package/dist/api/control.js.map +0 -1
- package/dist/api/http.d.ts +0 -7
- package/dist/api/http.d.ts.map +0 -1
- package/dist/api/http.js +0 -12
- package/dist/api/http.js.map +0 -1
- package/dist/api/rate.d.ts +0 -28
- package/dist/api/rate.d.ts.map +0 -1
- package/dist/api/rate.js +0 -36
- package/dist/api/rate.js.map +0 -1
- package/dist/api/security.d.ts +0 -12
- package/dist/api/security.d.ts.map +0 -1
- package/dist/api/security.js +0 -56
- package/dist/api/security.js.map +0 -1
- package/dist/api/service.d.ts +0 -5
- package/dist/api/service.d.ts.map +0 -1
- package/dist/api/service.js +0 -70
- package/dist/api/service.js.map +0 -1
- package/dist/apps/registry.d.ts +0 -33
- package/dist/apps/registry.d.ts.map +0 -1
- package/dist/apps/registry.js +0 -24
- package/dist/apps/registry.js.map +0 -1
- package/dist/binary/archive.d.ts +0 -27
- package/dist/binary/archive.d.ts.map +0 -1
- package/dist/binary/archive.js +0 -46
- package/dist/binary/archive.js.map +0 -1
- package/dist/binary/build.d.ts +0 -29
- package/dist/binary/build.d.ts.map +0 -1
- package/dist/binary/build.js +0 -17
- package/dist/binary/build.js.map +0 -1
- package/dist/binary/transform.d.ts +0 -70
- package/dist/binary/transform.d.ts.map +0 -1
- package/dist/binary/transform.js +0 -105
- package/dist/binary/transform.js.map +0 -1
- package/dist/bot/adapter.d.ts +0 -5
- package/dist/bot/adapter.d.ts.map +0 -1
- package/dist/bot/adapter.js +0 -11
- package/dist/bot/adapter.js.map +0 -1
- package/dist/bot/bot.d.ts +0 -28
- package/dist/bot/bot.d.ts.map +0 -1
- package/dist/bot/bot.js +0 -52
- package/dist/bot/bot.js.map +0 -1
- package/dist/bot/commands.d.ts +0 -8
- package/dist/bot/commands.d.ts.map +0 -1
- package/dist/bot/commands.js +0 -19
- package/dist/bot/commands.js.map +0 -1
- package/dist/bot/permissions.d.ts +0 -13
- package/dist/bot/permissions.d.ts.map +0 -1
- package/dist/bot/permissions.js +0 -16
- package/dist/bot/permissions.js.map +0 -1
- package/dist/browser/actions.d.ts +0 -33
- package/dist/browser/actions.d.ts.map +0 -1
- package/dist/browser/actions.js +0 -44
- package/dist/browser/actions.js.map +0 -1
- package/dist/browser/agent.d.ts +0 -21
- package/dist/browser/agent.d.ts.map +0 -1
- package/dist/browser/agent.js +0 -13
- package/dist/browser/agent.js.map +0 -1
- package/dist/browser/context.d.ts +0 -43
- package/dist/browser/context.d.ts.map +0 -1
- package/dist/browser/context.js +0 -54
- package/dist/browser/context.js.map +0 -1
- package/dist/browser/fingerprint.d.ts +0 -4
- package/dist/browser/fingerprint.d.ts.map +0 -1
- package/dist/browser/fingerprint.js +0 -12
- package/dist/browser/fingerprint.js.map +0 -1
- package/dist/browser/index.d.ts +0 -11
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -11
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/playwright.d.ts +0 -11
- package/dist/browser/playwright.d.ts.map +0 -1
- package/dist/browser/playwright.js +0 -24
- package/dist/browser/playwright.js.map +0 -1
- package/dist/browser/recorder.d.ts +0 -21
- package/dist/browser/recorder.d.ts.map +0 -1
- package/dist/browser/recorder.js +0 -58
- package/dist/browser/recorder.js.map +0 -1
- package/dist/browser/session.d.ts +0 -14
- package/dist/browser/session.d.ts.map +0 -1
- package/dist/browser/session.js +0 -21
- package/dist/browser/session.js.map +0 -1
- package/dist/browser/snapshot.d.ts +0 -69
- package/dist/browser/snapshot.d.ts.map +0 -1
- package/dist/browser/snapshot.js +0 -133
- package/dist/browser/snapshot.js.map +0 -1
- package/dist/captcha/contract.d.ts +0 -35
- package/dist/captcha/contract.d.ts.map +0 -1
- package/dist/captcha/contract.js +0 -17
- package/dist/captcha/contract.js.map +0 -1
- package/dist/captcha/evidence.d.ts +0 -10
- package/dist/captcha/evidence.d.ts.map +0 -1
- package/dist/captcha/evidence.js +0 -9
- package/dist/captcha/evidence.js.map +0 -1
- package/dist/captcha/guard.d.ts +0 -23
- package/dist/captcha/guard.d.ts.map +0 -1
- package/dist/captcha/guard.js +0 -12
- package/dist/captcha/guard.js.map +0 -1
- package/dist/cli/main.d.ts +0 -4
- package/dist/cli/main.d.ts.map +0 -1
- package/dist/cli/main.js +0 -46
- package/dist/cli/main.js.map +0 -1
- package/dist/core/errors.d.ts +0 -84
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/errors.js +0 -54
- package/dist/core/errors.js.map +0 -1
- package/dist/core/events.d.ts +0 -9
- package/dist/core/events.d.ts.map +0 -1
- package/dist/core/events.js +0 -21
- package/dist/core/events.js.map +0 -1
- package/dist/core/hash.d.ts +0 -10
- package/dist/core/hash.d.ts.map +0 -1
- package/dist/core/hash.js +0 -82
- package/dist/core/hash.js.map +0 -1
- package/dist/core/ids.d.ts +0 -10
- package/dist/core/ids.d.ts.map +0 -1
- package/dist/core/ids.js +0 -15
- package/dist/core/ids.js.map +0 -1
- package/dist/delivery/manifest.d.ts +0 -35
- package/dist/delivery/manifest.d.ts.map +0 -1
- package/dist/delivery/manifest.js +0 -68
- package/dist/delivery/manifest.js.map +0 -1
- package/dist/deploy/index.d.ts +0 -6
- package/dist/deploy/index.d.ts.map +0 -1
- package/dist/deploy/index.js +0 -6
- package/dist/deploy/index.js.map +0 -1
- package/dist/dispatch/resumable.d.ts +0 -102
- package/dist/dispatch/resumable.d.ts.map +0 -1
- package/dist/dispatch/resumable.js +0 -64
- package/dist/dispatch/resumable.js.map +0 -1
- package/dist/dispatch/workflow.d.ts +0 -6
- package/dist/dispatch/workflow.d.ts.map +0 -1
- package/dist/dispatch/workflow.js +0 -37
- package/dist/dispatch/workflow.js.map +0 -1
- package/dist/domain/artifacts.d.ts +0 -12
- package/dist/domain/artifacts.d.ts.map +0 -1
- package/dist/domain/artifacts.js +0 -14
- package/dist/domain/artifacts.js.map +0 -1
- package/dist/domain/jobs.d.ts +0 -12
- package/dist/domain/jobs.d.ts.map +0 -1
- package/dist/domain/jobs.js +0 -20
- package/dist/domain/jobs.js.map +0 -1
- package/dist/domain/providers.d.ts +0 -10
- package/dist/domain/providers.d.ts.map +0 -1
- package/dist/domain/providers.js +0 -8
- package/dist/domain/providers.js.map +0 -1
- package/dist/domain/runtime.d.ts +0 -14
- package/dist/domain/runtime.d.ts.map +0 -1
- package/dist/domain/runtime.js +0 -10
- package/dist/domain/runtime.js.map +0 -1
- package/dist/domain/sessions.d.ts +0 -12
- package/dist/domain/sessions.d.ts.map +0 -1
- package/dist/domain/sessions.js +0 -57
- package/dist/domain/sessions.js.map +0 -1
- package/dist/examples/localjob.d.ts +0 -2
- package/dist/examples/localjob.d.ts.map +0 -1
- package/dist/examples/localjob.js.map +0 -1
- package/dist/examples/publicapi.d.ts +0 -2
- package/dist/examples/publicapi.d.ts.map +0 -1
- package/dist/examples/publicapi.js.map +0 -1
- package/dist/extension/build.d.ts +0 -9
- package/dist/extension/build.d.ts.map +0 -1
- package/dist/extension/build.js +0 -85
- package/dist/extension/build.js.map +0 -1
- package/dist/extension/content.d.ts +0 -6
- package/dist/extension/content.d.ts.map +0 -1
- package/dist/extension/content.js +0 -135
- package/dist/extension/content.js.map +0 -1
- package/dist/extension/index.d.ts +0 -7
- package/dist/extension/index.d.ts.map +0 -1
- package/dist/extension/index.js +0 -7
- package/dist/extension/index.js.map +0 -1
- package/dist/extension/pagebridge.d.ts +0 -6
- package/dist/extension/pagebridge.d.ts.map +0 -1
- package/dist/extension/pagebridge.js +0 -42
- package/dist/extension/pagebridge.js.map +0 -1
- package/dist/extension/permissions.d.ts +0 -26
- package/dist/extension/permissions.d.ts.map +0 -1
- package/dist/extension/permissions.js +0 -28
- package/dist/extension/permissions.js.map +0 -1
- package/dist/extension/popup.d.ts +0 -5
- package/dist/extension/popup.d.ts.map +0 -1
- package/dist/extension/popup.js +0 -26
- package/dist/extension/popup.js.map +0 -1
- package/dist/extension/protocol.d.ts +0 -58
- package/dist/extension/protocol.d.ts.map +0 -1
- package/dist/extension/protocol.js +0 -101
- package/dist/extension/protocol.js.map +0 -1
- package/dist/extension/serviceworker.d.ts +0 -25
- package/dist/extension/serviceworker.d.ts.map +0 -1
- package/dist/extension/serviceworker.js +0 -102
- package/dist/extension/serviceworker.js.map +0 -1
- package/dist/extension/worker.d.ts +0 -28
- package/dist/extension/worker.d.ts.map +0 -1
- package/dist/extension/worker.js +0 -22
- package/dist/extension/worker.js.map +0 -1
- package/dist/format/check.d.ts +0 -8
- package/dist/format/check.d.ts.map +0 -1
- package/dist/format/check.js +0 -38
- package/dist/format/check.js.map +0 -1
- package/dist/isolation/contracts.d.ts.map +0 -1
- package/dist/isolation/contracts.js.map +0 -1
- package/dist/library/public.d.ts.map +0 -1
- package/dist/library/public.js.map +0 -1
- package/dist/mcp/browser.d.ts +0 -9
- package/dist/mcp/browser.d.ts.map +0 -1
- package/dist/mcp/browser.js +0 -13
- package/dist/mcp/browser.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -35
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -40
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/transport.d.ts +0 -7
- package/dist/mcp/transport.d.ts.map +0 -1
- package/dist/mcp/transport.js +0 -17
- package/dist/mcp/transport.js.map +0 -1
- package/dist/memory/bridge.d.ts +0 -14
- package/dist/memory/bridge.d.ts.map +0 -1
- package/dist/memory/bridge.js +0 -16
- package/dist/memory/bridge.js.map +0 -1
- package/dist/memory/engine.d.ts +0 -38
- package/dist/memory/engine.d.ts.map +0 -1
- package/dist/memory/engine.js +0 -109
- package/dist/memory/engine.js.map +0 -1
- package/dist/memory/modes.d.ts +0 -43
- package/dist/memory/modes.d.ts.map +0 -1
- package/dist/memory/modes.js +0 -66
- package/dist/memory/modes.js.map +0 -1
- package/dist/memory/objects.d.ts +0 -21
- package/dist/memory/objects.d.ts.map +0 -1
- package/dist/memory/objects.js +0 -20
- package/dist/memory/objects.js.map +0 -1
- package/dist/memory/planner.d.ts +0 -66
- package/dist/memory/planner.d.ts.map +0 -1
- package/dist/memory/planner.js +0 -108
- package/dist/memory/planner.js.map +0 -1
- package/dist/memory/targets.d.ts +0 -78
- package/dist/memory/targets.d.ts.map +0 -1
- package/dist/memory/targets.js +0 -29
- package/dist/memory/targets.js.map +0 -1
- package/dist/memory/transforms.d.ts +0 -19
- package/dist/memory/transforms.d.ts.map +0 -1
- package/dist/memory/transforms.js +0 -14
- package/dist/memory/transforms.js.map +0 -1
- package/dist/modes/matrix.d.ts +0 -23
- package/dist/modes/matrix.d.ts.map +0 -1
- package/dist/modes/matrix.js +0 -18
- package/dist/modes/matrix.js.map +0 -1
- package/dist/modes/modes.d.ts +0 -33
- package/dist/modes/modes.d.ts.map +0 -1
- package/dist/modes/modes.js +0 -15
- package/dist/modes/modes.js.map +0 -1
- package/dist/modes/resolve.d.ts +0 -96
- package/dist/modes/resolve.d.ts.map +0 -1
- package/dist/modes/resolve.js +0 -48
- package/dist/modes/resolve.js.map +0 -1
- package/dist/observability/metrics.d.ts +0 -14
- package/dist/observability/metrics.d.ts.map +0 -1
- package/dist/observability/metrics.js +0 -18
- package/dist/observability/metrics.js.map +0 -1
- package/dist/packager/manifest.d.ts +0 -66
- package/dist/packager/manifest.d.ts.map +0 -1
- package/dist/packager/manifest.js +0 -94
- package/dist/packager/manifest.js.map +0 -1
- package/dist/packager/publish.d.ts +0 -51
- package/dist/packager/publish.d.ts.map +0 -1
- package/dist/packager/publish.js +0 -18
- package/dist/packager/publish.js.map +0 -1
- package/dist/packager/targetcli.d.ts +0 -7
- package/dist/packager/targetcli.d.ts.map +0 -1
- package/dist/packager/targetcli.js +0 -22
- package/dist/packager/targetcli.js.map +0 -1
- package/dist/persistence/adapter.d.ts +0 -5
- package/dist/persistence/adapter.d.ts.map +0 -1
- package/dist/persistence/adapter.js +0 -11
- package/dist/persistence/adapter.js.map +0 -1
- package/dist/persistence/drizzle.d.ts +0 -2
- package/dist/persistence/drizzle.d.ts.map +0 -1
- package/dist/persistence/drizzle.js +0 -12
- package/dist/persistence/drizzle.js.map +0 -1
- package/dist/persistence/memory.d.ts +0 -2
- package/dist/persistence/memory.d.ts.map +0 -1
- package/dist/persistence/memory.js +0 -27
- package/dist/persistence/memory.js.map +0 -1
- package/dist/persistence/migrations.d.ts +0 -19
- package/dist/persistence/migrations.d.ts.map +0 -1
- package/dist/persistence/migrations.js +0 -13
- package/dist/persistence/migrations.js.map +0 -1
- package/dist/persistence/prisma.d.ts +0 -2
- package/dist/persistence/prisma.d.ts.map +0 -1
- package/dist/persistence/prisma.js +0 -25
- package/dist/persistence/prisma.js.map +0 -1
- package/dist/persistence/schema.d.ts +0 -63
- package/dist/persistence/schema.d.ts.map +0 -1
- package/dist/persistence/schema.js +0 -28
- package/dist/persistence/schema.js.map +0 -1
- package/dist/persistence/sql.d.ts +0 -3
- package/dist/persistence/sql.d.ts.map +0 -1
- package/dist/persistence/sql.js +0 -37
- package/dist/persistence/sql.js.map +0 -1
- package/dist/protocol/blocks.d.ts +0 -10
- package/dist/protocol/blocks.d.ts.map +0 -1
- package/dist/protocol/blocks.js +0 -26
- package/dist/protocol/blocks.js.map +0 -1
- package/dist/protocol/json.d.ts +0 -6
- package/dist/protocol/json.d.ts.map +0 -1
- package/dist/protocol/json.js +0 -6
- package/dist/protocol/json.js.map +0 -1
- package/dist/protocol/ndjson.d.ts +0 -3
- package/dist/protocol/ndjson.d.ts.map +0 -1
- package/dist/protocol/ndjson.js +0 -20
- package/dist/protocol/ndjson.js.map +0 -1
- package/dist/protocol/sse.d.ts +0 -7
- package/dist/protocol/sse.d.ts.map +0 -1
- package/dist/protocol/sse.js +0 -25
- package/dist/protocol/sse.js.map +0 -1
- package/dist/proxy/pool.d.ts +0 -9
- package/dist/proxy/pool.d.ts.map +0 -1
- package/dist/proxy/pool.js +0 -27
- package/dist/proxy/pool.js.map +0 -1
- package/dist/queue/idempotency.d.ts +0 -10
- package/dist/queue/idempotency.d.ts.map +0 -1
- package/dist/queue/idempotency.js +0 -13
- package/dist/queue/idempotency.js.map +0 -1
- package/dist/queue/persistent.d.ts +0 -14
- package/dist/queue/persistent.d.ts.map +0 -1
- package/dist/queue/persistent.js +0 -66
- package/dist/queue/persistent.js.map +0 -1
- package/dist/queue/queue.d.ts +0 -7
- package/dist/queue/queue.d.ts.map +0 -1
- package/dist/queue/queue.js +0 -55
- package/dist/queue/queue.js.map +0 -1
- package/dist/queue/saga.d.ts +0 -5
- package/dist/queue/saga.d.ts.map +0 -1
- package/dist/queue/saga.js +0 -20
- package/dist/queue/saga.js.map +0 -1
- package/dist/release/assets.d.ts +0 -144
- package/dist/release/assets.d.ts.map +0 -1
- package/dist/release/assets.js +0 -157
- package/dist/release/assets.js.map +0 -1
- package/dist/release/evidence.d.ts +0 -92
- package/dist/release/evidence.d.ts.map +0 -1
- package/dist/release/evidence.js +0 -148
- package/dist/release/evidence.js.map +0 -1
- package/dist/release/verify.d.ts +0 -12
- package/dist/release/verify.d.ts.map +0 -1
- package/dist/release/verify.js +0 -112
- package/dist/release/verify.js.map +0 -1
- package/dist/runners/chain.d.ts +0 -125
- package/dist/runners/chain.d.ts.map +0 -1
- package/dist/runners/chain.js +0 -95
- package/dist/runners/chain.js.map +0 -1
- package/dist/runners/health.d.ts +0 -36
- package/dist/runners/health.d.ts.map +0 -1
- package/dist/runners/health.js +0 -26
- package/dist/runners/health.js.map +0 -1
- package/dist/runners/heartbeat.d.ts +0 -23
- package/dist/runners/heartbeat.d.ts.map +0 -1
- package/dist/runners/heartbeat.js +0 -29
- package/dist/runners/heartbeat.js.map +0 -1
- package/dist/runners/inprocess.d.ts +0 -17
- package/dist/runners/inprocess.d.ts.map +0 -1
- package/dist/runners/inprocess.js +0 -20
- package/dist/runners/inprocess.js.map +0 -1
- package/dist/runners/scheduler.d.ts +0 -5
- package/dist/runners/scheduler.d.ts.map +0 -1
- package/dist/runners/scheduler.js +0 -19
- package/dist/runners/scheduler.js.map +0 -1
- package/dist/runtime/abort.d.ts +0 -8
- package/dist/runtime/abort.d.ts.map +0 -1
- package/dist/runtime/abort.js +0 -13
- package/dist/runtime/abort.js.map +0 -1
- package/dist/runtime/compatibility.d.ts +0 -37
- package/dist/runtime/compatibility.d.ts.map +0 -1
- package/dist/runtime/compatibility.js +0 -10
- package/dist/runtime/compatibility.js.map +0 -1
- package/dist/runtime/detect.d.ts +0 -13
- package/dist/runtime/detect.d.ts.map +0 -1
- package/dist/runtime/detect.js +0 -18
- package/dist/runtime/detect.js.map +0 -1
- package/dist/runtime/engine.d.ts +0 -20
- package/dist/runtime/engine.d.ts.map +0 -1
- package/dist/runtime/engine.js +0 -61
- package/dist/runtime/engine.js.map +0 -1
- package/dist/runtime/retry.d.ts +0 -19
- package/dist/runtime/retry.d.ts.map +0 -1
- package/dist/runtime/retry.js +0 -54
- package/dist/runtime/retry.js.map +0 -1
- package/dist/runtime/worker.d.ts +0 -10
- package/dist/runtime/worker.d.ts.map +0 -1
- package/dist/runtime/worker.js +0 -25
- package/dist/runtime/worker.js.map +0 -1
- package/dist/scrape/cache.d.ts +0 -45
- package/dist/scrape/cache.d.ts.map +0 -1
- package/dist/scrape/cache.js +0 -45
- package/dist/scrape/cache.js.map +0 -1
- package/dist/scrape/crawl.d.ts +0 -47
- package/dist/scrape/crawl.d.ts.map +0 -1
- package/dist/scrape/crawl.js +0 -114
- package/dist/scrape/crawl.js.map +0 -1
- package/dist/scrape/extract.d.ts +0 -63
- package/dist/scrape/extract.d.ts.map +0 -1
- package/dist/scrape/extract.js +0 -47
- package/dist/scrape/extract.js.map +0 -1
- package/dist/scrape/normalize.d.ts +0 -52
- package/dist/scrape/normalize.d.ts.map +0 -1
- package/dist/scrape/normalize.js +0 -102
- package/dist/scrape/normalize.js.map +0 -1
- package/dist/scrape/robots.d.ts +0 -37
- package/dist/scrape/robots.d.ts.map +0 -1
- package/dist/scrape/robots.js +0 -71
- package/dist/scrape/robots.js.map +0 -1
- package/dist/scrape/schema.d.ts +0 -23
- package/dist/scrape/schema.d.ts.map +0 -1
- package/dist/scrape/schema.js +0 -92
- package/dist/scrape/schema.js.map +0 -1
- package/dist/scrape/scraper.d.ts +0 -6
- package/dist/scrape/scraper.d.ts.map +0 -1
- package/dist/scrape/scraper.js +0 -46
- package/dist/scrape/scraper.js.map +0 -1
- package/dist/scrape/semantic.d.ts +0 -25
- package/dist/scrape/semantic.d.ts.map +0 -1
- package/dist/scrape/semantic.js +0 -27
- package/dist/scrape/semantic.js.map +0 -1
- package/dist/server/node.d.ts +0 -7
- package/dist/server/node.d.ts.map +0 -1
- package/dist/server/node.js.map +0 -1
- package/dist/sessions/file.d.ts +0 -25
- package/dist/sessions/file.d.ts.map +0 -1
- package/dist/sessions/file.js +0 -13
- package/dist/sessions/file.js.map +0 -1
- package/dist/sessions/replay.d.ts +0 -9
- package/dist/sessions/replay.d.ts.map +0 -1
- package/dist/sessions/replay.js +0 -70
- package/dist/sessions/replay.js.map +0 -1
- package/dist/sessions/store.d.ts +0 -25
- package/dist/sessions/store.d.ts.map +0 -1
- package/dist/sessions/store.js +0 -13
- package/dist/sessions/store.js.map +0 -1
- package/dist/storage/adapter.d.ts +0 -5
- package/dist/storage/adapter.d.ts.map +0 -1
- package/dist/storage/adapter.js +0 -11
- package/dist/storage/adapter.js.map +0 -1
- package/dist/storage/cache.d.ts +0 -23
- package/dist/storage/cache.d.ts.map +0 -1
- package/dist/storage/cache.js +0 -79
- package/dist/storage/cache.js.map +0 -1
- package/dist/storage/checksum.d.ts +0 -3
- package/dist/storage/checksum.d.ts.map +0 -1
- package/dist/storage/checksum.js +0 -19
- package/dist/storage/checksum.js.map +0 -1
- package/dist/storage/chunked.d.ts +0 -21
- package/dist/storage/chunked.d.ts.map +0 -1
- package/dist/storage/chunked.js +0 -67
- package/dist/storage/chunked.js.map +0 -1
- package/dist/storage/content.d.ts +0 -24
- package/dist/storage/content.d.ts.map +0 -1
- package/dist/storage/content.js +0 -44
- package/dist/storage/content.js.map +0 -1
- package/dist/storage/filehosting.d.ts +0 -2
- package/dist/storage/filehosting.d.ts.map +0 -1
- package/dist/storage/filehosting.js +0 -24
- package/dist/storage/filehosting.js.map +0 -1
- package/dist/storage/githubcontents.d.ts +0 -2
- package/dist/storage/githubcontents.d.ts.map +0 -1
- package/dist/storage/githubcontents.js +0 -29
- package/dist/storage/githubcontents.js.map +0 -1
- package/dist/storage/index.d.ts +0 -12
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js +0 -12
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/local.d.ts +0 -2
- package/dist/storage/local.d.ts.map +0 -1
- package/dist/storage/local.js +0 -72
- package/dist/storage/local.js.map +0 -1
- package/dist/storage/memory.d.ts +0 -6
- package/dist/storage/memory.d.ts.map +0 -1
- package/dist/storage/memory.js +0 -36
- package/dist/storage/memory.js.map +0 -1
- package/dist/storage/pool.d.ts +0 -95
- package/dist/storage/pool.d.ts.map +0 -1
- package/dist/storage/pool.js +0 -202
- package/dist/storage/pool.js.map +0 -1
- package/dist/storage/s3compatible.d.ts +0 -3
- package/dist/storage/s3compatible.d.ts.map +0 -1
- package/dist/storage/s3compatible.js +0 -70
- package/dist/storage/s3compatible.js.map +0 -1
- package/dist/storage/sync.d.ts +0 -47
- package/dist/storage/sync.d.ts.map +0 -1
- package/dist/storage/sync.js +0 -75
- package/dist/storage/sync.js.map +0 -1
- package/dist/surfaces/adapters.d.ts +0 -97
- package/dist/surfaces/adapters.d.ts.map +0 -1
- package/dist/surfaces/adapters.js +0 -50
- package/dist/surfaces/adapters.js.map +0 -1
- package/dist/surfaces/controls.d.ts +0 -18
- package/dist/surfaces/controls.d.ts.map +0 -1
- package/dist/surfaces/controls.js +0 -45
- package/dist/surfaces/controls.js.map +0 -1
- package/dist/surfaces/manifest.d.ts +0 -68
- package/dist/surfaces/manifest.d.ts.map +0 -1
- package/dist/surfaces/manifest.js +0 -42
- package/dist/surfaces/manifest.js.map +0 -1
- package/dist/surfaces/n8n.d.ts +0 -25
- package/dist/surfaces/n8n.d.ts.map +0 -1
- package/dist/surfaces/n8n.js +0 -31
- package/dist/surfaces/n8n.js.map +0 -1
- package/dist/surfaces/operations.d.ts +0 -32
- package/dist/surfaces/operations.d.ts.map +0 -1
- package/dist/surfaces/operations.js +0 -53
- package/dist/surfaces/operations.js.map +0 -1
- package/dist/surfaces/requirements.d.ts +0 -29
- package/dist/surfaces/requirements.d.ts.map +0 -1
- package/dist/surfaces/requirements.js +0 -50
- package/dist/surfaces/requirements.js.map +0 -1
- package/dist/surfaces/targets.d.ts +0 -196
- package/dist/surfaces/targets.d.ts.map +0 -1
- package/dist/surfaces/targets.js +0 -27
- package/dist/surfaces/targets.js.map +0 -1
- package/dist/webhook/delivery.d.ts +0 -18
- package/dist/webhook/delivery.d.ts.map +0 -1
- package/dist/webhook/delivery.js +0 -36
- package/dist/webhook/delivery.js.map +0 -1
- package/dist/webhook/receiver.d.ts +0 -26
- package/dist/webhook/receiver.d.ts.map +0 -1
- package/dist/webhook/receiver.js +0 -24
- package/dist/webhook/receiver.js.map +0 -1
- package/dist/webhook/signature.d.ts +0 -3
- package/dist/webhook/signature.d.ts.map +0 -1
- package/dist/webhook/signature.js +0 -7
- package/dist/webhook/signature.js.map +0 -1
- package/dist/workflow/manifest.d.ts +0 -22
- package/dist/workflow/manifest.d.ts.map +0 -1
- package/dist/workflow/manifest.js +0 -21
- package/dist/workflow/manifest.js.map +0 -1
- package/dist/workflow/registry.d.ts +0 -7
- package/dist/workflow/registry.d.ts.map +0 -1
- package/dist/workflow/registry.js +0 -18
- package/dist/workflow/registry.js.map +0 -1
- package/dist/workflow/templates.d.ts +0 -6
- package/dist/workflow/templates.d.ts.map +0 -1
- package/dist/workflow/templates.js +0 -18
- package/dist/workflow/templates.js.map +0 -1
- package/dist/workflow/triggers.d.ts +0 -64
- package/dist/workflow/triggers.d.ts.map +0 -1
- package/dist/workflow/triggers.js +0 -99
- package/dist/workflow/triggers.js.map +0 -1
- /package/{extension/README.md → docs/extension.md} +0 -0
|
@@ -0,0 +1,810 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* quantum.ts — classical quantum-simulation layer for saddle v18.
|
|
3
|
+
*
|
|
4
|
+
* the module is a 100 percent classical software statevector simulator:
|
|
5
|
+
* no hardware, no photons, no qpu. the engine "supports" quantum the same
|
|
6
|
+
* way it virtualizes cores, memory and gpus — as one more virtualization
|
|
7
|
+
* layer: every "qubit" is a pair of float64 lanes inside a 2^n amplitude
|
|
8
|
+
* vector (interleaved re/im), every "gate" is an in-place index-pair
|
|
9
|
+
* transformation and every "measurement" is a crypto-seeded collapse of
|
|
10
|
+
* that vector.
|
|
11
|
+
*
|
|
12
|
+
* contexts (22):
|
|
13
|
+
* 01 version anchors (algorithm dates, simulator envelope)
|
|
14
|
+
* 02 error catcher (quantumerror envelope)
|
|
15
|
+
* 03 complex math kernel (2x2 unitary type + gate matrices)
|
|
16
|
+
* 04 quantumsim statevector core (1-20 qubits, Disposable)
|
|
17
|
+
* 05 multi-qubit gate kernels (cnot, cz, toffoli, swap, ccz)
|
|
18
|
+
* 06 canonical circuits (bellstate, ghzstate)
|
|
19
|
+
* 07 grover search (grover2 provable, grover3 statistical)
|
|
20
|
+
* 08 deutsch oracle discrimination (deutsch)
|
|
21
|
+
* 09 quantum teleportation sketch (qteleport)
|
|
22
|
+
* 10 bb84 stations (alice, bob, eve over a simulated channel)
|
|
23
|
+
* 11 bb84 protocol runner (runbb84: sifting, qber, intercept detection)
|
|
24
|
+
* 12 e91 entangled pairs + chsh (rune91)
|
|
25
|
+
* 13 qrng (quantuminspiredrandom, honest anu fallback)
|
|
26
|
+
* 14 dnavault codec (goldman 2013 ternary rotation, framing, strands)
|
|
27
|
+
* 15 dnavault decode (checksum verification, redundancy, roundtrip)
|
|
28
|
+
* 16 dnavault capacity planner (215 pb/g, planodefault)
|
|
29
|
+
* 17 optical 5d quartz planner (360 tb/disc, femtosecond write plan)
|
|
30
|
+
* 18 holographic note (microsoft hsd) and storage compare
|
|
31
|
+
* 19 qram bucket brigade (giovannetti 2008, o(log n) routing, n=8)
|
|
32
|
+
* 20 shor plan (honest: theoretical 7-qubit circuit, never executed)
|
|
33
|
+
* 21 registry (quantumregistry capability catalog)
|
|
34
|
+
* 22 self check (quantumselfcheck: every claim, machine-verified)
|
|
35
|
+
*
|
|
36
|
+
* rules: lowercase identifiers, english jsdoc third person, no emoji,
|
|
37
|
+
* try/catch catcher on every fallible path, node:* built-ins only
|
|
38
|
+
* (node:crypto for all randomness), zero runtime dependencies, no
|
|
39
|
+
* filesystem, network or process coupling beyond the optional,
|
|
40
|
+
* always-fallback anu qrng fetch. ascii only.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* frozen quantum layer anchors. every algorithm keeps its literature
|
|
44
|
+
* year so the registry can cite primary sources instead of folklore.
|
|
45
|
+
*/
|
|
46
|
+
export declare const quantumversions: {
|
|
47
|
+
readonly date: '2026-08-23';
|
|
48
|
+
readonly simulator: 'statevector';
|
|
49
|
+
readonly precision: 'float64 interleaved re/im';
|
|
50
|
+
readonly maxqubits: 20;
|
|
51
|
+
readonly amplitudelanes: 2097152;
|
|
52
|
+
readonly grover: '1996 stoc';
|
|
53
|
+
readonly deutschjozsa: '1992 proc r soc a';
|
|
54
|
+
readonly bb84: '1984 bangalore proceedings';
|
|
55
|
+
readonly e91: '1991 prl 67 661';
|
|
56
|
+
readonly teleportation: '1993 prl 70 1895';
|
|
57
|
+
readonly qram: '2008 prl 100 160501';
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* quantum layer failure envelope. every guard in this module throws it
|
|
61
|
+
* instead of a bare error so callers can branch on the code.
|
|
62
|
+
*/
|
|
63
|
+
export declare class quantumerror extends Error {
|
|
64
|
+
readonly code: string;
|
|
65
|
+
readonly detail?: string;
|
|
66
|
+
constructor(params: {
|
|
67
|
+
code: string;
|
|
68
|
+
message: string;
|
|
69
|
+
detail?: string;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* a 2x2 complex unitary with rows and columns interleaved as
|
|
74
|
+
* [u00re, u00im, u01re, u01im, u10re, u10im, u11re, u11im].
|
|
75
|
+
* gate matrices are plain float tuples so the hot loop stays monomorphic.
|
|
76
|
+
*/
|
|
77
|
+
export type gate2x2 = readonly [number, number, number, number, number, number, number, number];
|
|
78
|
+
/** hadamard matrix ((1/sqrt 2) [[1,1],[1,1]]). */
|
|
79
|
+
export declare const hmatrix: gate2x2;
|
|
80
|
+
/** pauli x matrix [[0,1],[1,0]]. */
|
|
81
|
+
export declare const xmatrix: gate2x2;
|
|
82
|
+
/** pauli y matrix [[0,-i],[i,0]]. */
|
|
83
|
+
export declare const ymatrix: gate2x2;
|
|
84
|
+
/** pauli z matrix diag(1,-1). */
|
|
85
|
+
export declare const zmatrix: gate2x2;
|
|
86
|
+
/** phase gate s = diag(1, i). */
|
|
87
|
+
export declare const smatrix: gate2x2;
|
|
88
|
+
/** inverse phase gate sdg = diag(1, -i). */
|
|
89
|
+
export declare const sdgmatrix: gate2x2;
|
|
90
|
+
/** t gate = diag(1, exp(i pi/4)). */
|
|
91
|
+
export declare const tmatrix: gate2x2;
|
|
92
|
+
/** inverse t gate = diag(1, exp(-i pi/4)). */
|
|
93
|
+
export declare const tdgmatrix: gate2x2;
|
|
94
|
+
/**
|
|
95
|
+
* builds the rotation-x matrix rx(theta) =
|
|
96
|
+
* [[cos(t/2), -i sin(t/2)], [-i sin(t/2), cos(t/2)]].
|
|
97
|
+
*/
|
|
98
|
+
export declare function rxmatrix(theta: number): gate2x2;
|
|
99
|
+
/**
|
|
100
|
+
* builds the rotation-y matrix ry(theta) =
|
|
101
|
+
* [[cos(t/2), -sin(t/2)], [sin(t/2), cos(t/2)]]; ry(2a)|0> equals the
|
|
102
|
+
* polarization state cos(a)|0> + sin(a)|1>, which the e91 context uses
|
|
103
|
+
* to prepare and measure at arbitrary analyzer angles.
|
|
104
|
+
*/
|
|
105
|
+
export declare function rymatrix(theta: number): gate2x2;
|
|
106
|
+
/**
|
|
107
|
+
* builds the rotation-z matrix rz(theta) = diag(e^{-i t/2}, e^{i t/2}).
|
|
108
|
+
*/
|
|
109
|
+
export declare function rzmatrix(theta: number): gate2x2;
|
|
110
|
+
/**
|
|
111
|
+
* pure-software statevector simulator. the state is one Float64Array of
|
|
112
|
+
* 2 * 2^n lanes holding interleaved real and imaginary parts; qubit q is
|
|
113
|
+
* bit q of the basis index (qubit 0 is the least significant bit), so
|
|
114
|
+
* for a single-qubit gate on qubit q the kernel iterates every index i
|
|
115
|
+
* with bit q = 0, takes j = i | 2^q and replaces the pair by
|
|
116
|
+
* u @ [amp(i), amp(j)] exactly as specified. the class is Disposable and
|
|
117
|
+
* meant to be used with `using` so amplitude memory is logically freed
|
|
118
|
+
* even though the gc owns it.
|
|
119
|
+
*/
|
|
120
|
+
export declare class quantumsim implements Disposable {
|
|
121
|
+
#private;
|
|
122
|
+
constructor(nqubits: number);
|
|
123
|
+
/** number of qubits of the register. */
|
|
124
|
+
get nqubits(): number;
|
|
125
|
+
/** hilbert space dimension 2^n. */
|
|
126
|
+
get dim(): number;
|
|
127
|
+
/** true once Symbol.dispose released the state. */
|
|
128
|
+
get disposed(): boolean;
|
|
129
|
+
/** hadamard on qubit q. */
|
|
130
|
+
h(q: number): this;
|
|
131
|
+
/** pauli x (bit flip) on qubit q. */
|
|
132
|
+
x(q: number): this;
|
|
133
|
+
/** pauli y on qubit q. */
|
|
134
|
+
y(q: number): this;
|
|
135
|
+
/** pauli z (phase flip) on qubit q. */
|
|
136
|
+
z(q: number): this;
|
|
137
|
+
/** phase gate s = sqrt(z) on qubit q. */
|
|
138
|
+
s(q: number): this;
|
|
139
|
+
/** inverse phase gate on qubit q. */
|
|
140
|
+
sdg(q: number): this;
|
|
141
|
+
/** t = pi/8 gate on qubit q. */
|
|
142
|
+
t(q: number): this;
|
|
143
|
+
/** inverse t gate on qubit q. */
|
|
144
|
+
tdg(q: number): this;
|
|
145
|
+
/** rotation-x by theta radians on qubit q. */
|
|
146
|
+
rx(theta: number, q: number): this;
|
|
147
|
+
/** rotation-y by theta radians on qubit q. */
|
|
148
|
+
ry(theta: number, q: number): this;
|
|
149
|
+
/** rotation-z by theta radians on qubit q. */
|
|
150
|
+
rz(theta: number, q: number): this;
|
|
151
|
+
/**
|
|
152
|
+
* cnot: for every index i with control bit 1 and target bit 0,
|
|
153
|
+
* swaps amplitudes i and i|2^target; each pair is visited once.
|
|
154
|
+
*/
|
|
155
|
+
cnot(control: number, target: number): this;
|
|
156
|
+
/**
|
|
157
|
+
* cz: flips the sign of every amplitude whose control and target
|
|
158
|
+
* bits are both 1.
|
|
159
|
+
*/
|
|
160
|
+
cz(control: number, target: number): this;
|
|
161
|
+
/**
|
|
162
|
+
* toffoli (ccnot): swaps amplitude pairs only when both control bits
|
|
163
|
+
* are 1 and the target bit is 0.
|
|
164
|
+
*/
|
|
165
|
+
toffoli(control1: number, control2: number, target: number): this;
|
|
166
|
+
/**
|
|
167
|
+
* swap: exchanges qubits a and b by visiting each index pair once
|
|
168
|
+
* (bit a = 0 with bit b = 1 maps to its complement bit a = 1, bit
|
|
169
|
+
* b = 0), so no pair is touched twice.
|
|
170
|
+
*/
|
|
171
|
+
swap(a: number, b: number): this;
|
|
172
|
+
/**
|
|
173
|
+
* measures qubit q in the computational basis, collapsing the state.
|
|
174
|
+
* returns the observed classical bit.
|
|
175
|
+
*/
|
|
176
|
+
measure(q: number): 0 | 1;
|
|
177
|
+
/**
|
|
178
|
+
* measures the full register in the computational basis and returns
|
|
179
|
+
* the observed basis index (qubit 0 in bit 0).
|
|
180
|
+
*/
|
|
181
|
+
measureall(): number;
|
|
182
|
+
/**
|
|
183
|
+
* returns the [p0, p1] distribution of qubit q without collapsing;
|
|
184
|
+
* p1 = sum of |amplitude|^2 over indices with bit q set.
|
|
185
|
+
*/
|
|
186
|
+
probs(q: number): [number, number];
|
|
187
|
+
/**
|
|
188
|
+
* returns the full |amplitude|^2 distribution over all 2^n basis
|
|
189
|
+
* states as a fresh Float64Array (index order: qubit 0 in bit 0).
|
|
190
|
+
*/
|
|
191
|
+
probabilities(): Float64Array;
|
|
192
|
+
/** returns the complex amplitude of one basis index as [re, im]. */
|
|
193
|
+
amplitude(index: number): readonly [number, number];
|
|
194
|
+
/** returns a detached readonly snapshot copy of the state lanes. */
|
|
195
|
+
state(): Readonly<Float64Array>;
|
|
196
|
+
/** euclidean norm of the state vector (should stay within 1e-12 of 1). */
|
|
197
|
+
norm(): number;
|
|
198
|
+
/** renormalizes the state to unit norm (fixes float drift). */
|
|
199
|
+
normalize(): this;
|
|
200
|
+
/** resets the register to |0...0>. */
|
|
201
|
+
reset(): this;
|
|
202
|
+
/** releases the amplitude lanes; any further gate call throws. */
|
|
203
|
+
[Symbol.dispose](): void;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* applies cnot(control, target) to sim; functional spelling of the
|
|
207
|
+
* quantumsim method for composition outside the class.
|
|
208
|
+
*/
|
|
209
|
+
export declare function cnot(sim: quantumsim, control: number, target: number): quantumsim;
|
|
210
|
+
/**
|
|
211
|
+
* applies cz(control, target) to sim; the grover oracle for two qubits
|
|
212
|
+
* is exactly this gate on the |11> amplitude.
|
|
213
|
+
*/
|
|
214
|
+
export declare function cz(sim: quantumsim, control: number, target: number): quantumsim;
|
|
215
|
+
/**
|
|
216
|
+
* applies toffoli(control1, control2, target) to sim, the universal
|
|
217
|
+
* reversible gate of toffoli 1980 as used in every compiled oracle.
|
|
218
|
+
*/
|
|
219
|
+
export declare function toffoli(sim: quantumsim, control1: number, control2: number, target: number): quantumsim;
|
|
220
|
+
/**
|
|
221
|
+
* applies swap(a, b) to sim.
|
|
222
|
+
*/
|
|
223
|
+
export declare function swap(sim: quantumsim, a: number, b: number): quantumsim;
|
|
224
|
+
/**
|
|
225
|
+
* ccz: three-qubit phase flip, composed as toffoli conjugated by
|
|
226
|
+
* hadamard on the target; used as the grover oracle and diffuser core.
|
|
227
|
+
*/
|
|
228
|
+
export declare function ccz(sim: quantumsim, control1: number, control2: number, target: number): quantumsim;
|
|
229
|
+
/**
|
|
230
|
+
* proof bundle for a canonical circuit: the ready simulator plus the
|
|
231
|
+
* documented expected distribution so callers can assert outcomes.
|
|
232
|
+
*/
|
|
233
|
+
export type circuitproof = {
|
|
234
|
+
readonly sim: quantumsim;
|
|
235
|
+
readonly name: string;
|
|
236
|
+
readonly expectedprobs: readonly number[];
|
|
237
|
+
readonly reference: string;
|
|
238
|
+
readonly note: string;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* builds the bell state (|00> + |11>)/sqrt(2) with h(0) then cnot(0,1);
|
|
242
|
+
* measurement of either qubit is a perfect coin and both always agree.
|
|
243
|
+
* expected distribution: [0.5, 0, 0.5, 0].
|
|
244
|
+
* reference: einstein-podolsky-rosen 1935; bell 1964; chapter 1 of
|
|
245
|
+
* nielsen and chuang, quantum computation and quantum information
|
|
246
|
+
* (2000).
|
|
247
|
+
*/
|
|
248
|
+
export declare function bellstate(): circuitproof;
|
|
249
|
+
/**
|
|
250
|
+
* builds an n-qubit ghz state (|0...0> + |1...1>)/sqrt(2) by h(0) plus
|
|
251
|
+
* a cnot fanout; expected distribution carries mass 0.5 on index 0 and
|
|
252
|
+
* index 2^n - 1 only. reference: greenberger-horne-zeilinger 1989.
|
|
253
|
+
*/
|
|
254
|
+
export declare function ghzstate(n?: number): circuitproof;
|
|
255
|
+
/**
|
|
256
|
+
* grover2: exhaustive-search winner |11> on 2 qubits with exactly one
|
|
257
|
+
* oracle call. the circuit is the task-pinned sequence
|
|
258
|
+
* h,h -> cz -> h,h -> x,x -> cz -> h,h whose unique fixed point is
|
|
259
|
+
* amplitude -1 on |11>, so prob(11) = 1 up to 1e-12 float noise.
|
|
260
|
+
* expected distribution: [0, 0, 0, 1].
|
|
261
|
+
* reference: grover, a fast quantum mechanical algorithm for database
|
|
262
|
+
* search, stoc 1996 (arxiv:quant-ph/9605043).
|
|
263
|
+
*/
|
|
264
|
+
export declare function grover2(): circuitproof;
|
|
265
|
+
/**
|
|
266
|
+
* grover3: search over 8 items for winner |111> with two iterations of
|
|
267
|
+
* oracle ccz + diffuser (h x3, x x3, ccz, x x3, h x3). theory gives
|
|
268
|
+
* success sin^2(5 * asin(1/sqrt 8)) = 0.9461, comfortably above 0.9.
|
|
269
|
+
* reference: grover 1996; boyer, brassard, hoefer, tapp 1998 iteration
|
|
270
|
+
* counting for m = 1 marked item of n = 8.
|
|
271
|
+
*/
|
|
272
|
+
export declare function grover3(): circuitproof;
|
|
273
|
+
/**
|
|
274
|
+
* deutsch verdict of the single-bit oracle f: 'constant' when f(0) =
|
|
275
|
+
* f(1), 'balanced' when f(0) != f(1); one oracle call decides it.
|
|
276
|
+
*/
|
|
277
|
+
export type deutschverdict = 'constant' | 'balanced';
|
|
278
|
+
/**
|
|
279
|
+
* deutsch algorithm on 2 qubits (input qubit 0, ancilla qubit 1 in
|
|
280
|
+
* |->). the oracle is built from the truth table of f exactly as the
|
|
281
|
+
* four possible (x, y) -> (x, y xor f(x)) unitaries: identity, x on
|
|
282
|
+
* the ancilla, cnot(0,1) for f(x) = x, and x + cnot for f(x) = not x.
|
|
283
|
+
* phase kickback leaves qubit 0 in |0> for constant f and |1> for
|
|
284
|
+
* balanced f, so a single measurement decides the promise problem.
|
|
285
|
+
* reference: deutsch 1985; deutsch and jozsa, rapid solution of
|
|
286
|
+
* problems by quantum computation, proc r soc lond a 439, 553 (1992).
|
|
287
|
+
*/
|
|
288
|
+
export declare function deutsch(f: (x: 0 | 1) => 0 | 1): {
|
|
289
|
+
sim: quantumsim;
|
|
290
|
+
verdict: deutschverdict;
|
|
291
|
+
measured: 0 | 1;
|
|
292
|
+
expected: deutschverdict;
|
|
293
|
+
reference: string;
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* qteleport: teleports the state of qubit 0 to qubit 2 through a bell
|
|
297
|
+
* pair on qubits 1 and 2 (h(1), cnot(1,2)), the bell-basis measurement
|
|
298
|
+
* cnot(0,1) + h(0), then the classical corrections x/z on qubit 2
|
|
299
|
+
* conditioned on the two outcomes. the simulator runs the whole loop so
|
|
300
|
+
* the fidelity is exactly 1 for any of the three prepared inputs; the
|
|
301
|
+
* fidelity is read off the two amplitudes that survive the bell
|
|
302
|
+
* measurement (index m1*2 + m0 and its +4 partner on qubit 2).
|
|
303
|
+
* reference: bennett, brassard, crepeau, jozsa, peres, wootters,
|
|
304
|
+
* teleporting an unknown quantum state via dual classical and
|
|
305
|
+
* einstein-podolsky-rosen channels, prl 70, 1895 (1993).
|
|
306
|
+
*/
|
|
307
|
+
export declare function qteleport(input?: 'zero' | 'one' | 'plus'): {
|
|
308
|
+
sim: quantumsim;
|
|
309
|
+
outcome0: 0 | 1;
|
|
310
|
+
outcome1: 0 | 1;
|
|
311
|
+
fidelity: number;
|
|
312
|
+
input: 'zero' | 'one' | 'plus';
|
|
313
|
+
reference: string;
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* basis 0 is rectilinear (z, states |0>/|1>) and basis 1 is diagonal
|
|
317
|
+
* (x, states |+>/|->); the mapping matches the polarization bases of
|
|
318
|
+
* the 1984 protocol.
|
|
319
|
+
*/
|
|
320
|
+
export type bb84basis = 0 | 1;
|
|
321
|
+
/**
|
|
322
|
+
* alice station: draws random key bits and random bases from
|
|
323
|
+
* node:crypto and prepares one 1-qubit quantumsim photon per bit
|
|
324
|
+
* (x for bit 1, extra h when the basis is diagonal).
|
|
325
|
+
*/
|
|
326
|
+
export declare class alice {
|
|
327
|
+
#private;
|
|
328
|
+
constructor(count: number);
|
|
329
|
+
/** alice's raw key bits. */
|
|
330
|
+
get bits(): readonly number[];
|
|
331
|
+
/** alice's basis string (0 rectilinear, 1 diagonal). */
|
|
332
|
+
get bases(): readonly number[];
|
|
333
|
+
/**
|
|
334
|
+
* prepares the photon burst; each photon is a real 1-qubit state so
|
|
335
|
+
* the channel, eve and bob all act on amplitudes, not on labels.
|
|
336
|
+
*/
|
|
337
|
+
prepare(): quantumsim[];
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* bob station: measures each incoming photon in his own random bases
|
|
341
|
+
* (h before the z measurement when diagonal), collapsing the photon.
|
|
342
|
+
*/
|
|
343
|
+
export declare class bob {
|
|
344
|
+
#private;
|
|
345
|
+
constructor(count: number);
|
|
346
|
+
/** bob's basis string. */
|
|
347
|
+
get bases(): readonly number[];
|
|
348
|
+
/** bob's raw measurement outcomes. */
|
|
349
|
+
get outcomes(): readonly number[];
|
|
350
|
+
/**
|
|
351
|
+
* measures the whole burst and stores the classical outcomes;
|
|
352
|
+
* measuring a diagonal-basis photon in the rectilinear basis
|
|
353
|
+
* genuinely yields a coin flip, which is where intercept-resend
|
|
354
|
+
* damage shows up.
|
|
355
|
+
*/
|
|
356
|
+
measure(photons: readonly quantumsim[]): readonly number[];
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* eve station: intercept-resend attacker. she measures every photon in
|
|
360
|
+
* her own random basis (collapsing it) and resends a fresh photon
|
|
361
|
+
* prepared in that basis with the bit she saw. on sifted bits where
|
|
362
|
+
* alice and bob used the same basis, eve chose the wrong basis half
|
|
363
|
+
* the time and bob then errs half of those, so the qber lands at 25
|
|
364
|
+
* percent against 0 percent on a clean channel.
|
|
365
|
+
* reference: the intercept-resend attack is exercise material of every
|
|
366
|
+
* bb84 treatment since bennett-brassard 1984.
|
|
367
|
+
*/
|
|
368
|
+
export declare class eve {
|
|
369
|
+
#private;
|
|
370
|
+
/** bases eve used (for audits). */
|
|
371
|
+
get bases(): readonly number[];
|
|
372
|
+
/** bits eve extracted (for audits). */
|
|
373
|
+
get bits(): readonly number[];
|
|
374
|
+
/** taps the burst and returns the resent photons. */
|
|
375
|
+
intercept(photons: readonly quantumsim[]): quantumsim[];
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* bb84 quantum channel: a photon pipeline that alice fills, an optional
|
|
379
|
+
* eve taps (counted), and bob drains. no network, no localhost — the
|
|
380
|
+
* channel is an in-memory queue standing in for fiber.
|
|
381
|
+
*/
|
|
382
|
+
export declare class bb84channel {
|
|
383
|
+
#private;
|
|
384
|
+
/** sends a photon burst onto the channel. */
|
|
385
|
+
send(photons: readonly quantumsim[]): void;
|
|
386
|
+
/**
|
|
387
|
+
* taps the channel: the operator receives the in-flight burst and its
|
|
388
|
+
* return value replaces it (intercept-resend); taps are counted.
|
|
389
|
+
*/
|
|
390
|
+
tap(operator: (photons: readonly quantumsim[]) => quantumsim[]): quantumsim[];
|
|
391
|
+
/** drains the channel for the receiver. */
|
|
392
|
+
receive(): quantumsim[];
|
|
393
|
+
/** number of taps observed on the channel (informational). */
|
|
394
|
+
get tapped(): number;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* runbb84 result: the sifted keys (sample bits removed), the
|
|
398
|
+
* full-channel qber, and the sampling-based eavesdropper verdict.
|
|
399
|
+
*/
|
|
400
|
+
export type bb84result = {
|
|
401
|
+
readonly keyalice: readonly number[];
|
|
402
|
+
readonly keybob: readonly number[];
|
|
403
|
+
readonly qber: number;
|
|
404
|
+
readonly detected: boolean;
|
|
405
|
+
readonly siftedlen: number;
|
|
406
|
+
readonly sampledlen: number;
|
|
407
|
+
readonly sampledqber: number;
|
|
408
|
+
readonly threshold: number;
|
|
409
|
+
readonly reference: string;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* runs the complete bb84 flow over the simulated channel: alice
|
|
413
|
+
* prepares, the optional eve taps, bob measures, both sides sift on
|
|
414
|
+
* equal bases, the qber is computed over the full sifted key and the
|
|
415
|
+
* detection verdict comes from comparing a public sample of up to 128
|
|
416
|
+
* sifted bits (abort threshold 11 percent, the one-way bb84
|
|
417
|
+
* reconciliation bound of the shor-preskill lineage).
|
|
418
|
+
* reference: bennett and brassard, quantum cryptography: public key
|
|
419
|
+
* distribution and coin tossing, proc ieee int conf on computers,
|
|
420
|
+
* systems and signal processing, bangalore 1984, pp. 175-179.
|
|
421
|
+
*/
|
|
422
|
+
export declare function runbb84(options?: {
|
|
423
|
+
eve?: boolean;
|
|
424
|
+
bits?: number;
|
|
425
|
+
}): bb84result;
|
|
426
|
+
/**
|
|
427
|
+
* e91 run result: the chsh s value, the key bits extracted from
|
|
428
|
+
* matched analyzer settings and the eavesdropper verdict.
|
|
429
|
+
*/
|
|
430
|
+
export type e91result = {
|
|
431
|
+
readonly s: number;
|
|
432
|
+
readonly classicalbound: number;
|
|
433
|
+
readonly quantumbound: number;
|
|
434
|
+
readonly detected: boolean;
|
|
435
|
+
readonly keylen: number;
|
|
436
|
+
readonly qber: number;
|
|
437
|
+
readonly pairs: number;
|
|
438
|
+
readonly chshpairs: number;
|
|
439
|
+
readonly reference: string;
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* rune91: ekert-1991 entanglement-based key distribution on |phi+>
|
|
443
|
+
* pairs. each round is half the time a key round (both parties pick
|
|
444
|
+
* 0 or 45 degrees; equal angles give perfectly correlated bits on a
|
|
445
|
+
* clean source) and half the time a chsh round (alice 0 or 45 degrees,
|
|
446
|
+
* bob 22.5 or 67.5 degrees). the chsh statistic
|
|
447
|
+
* s = e(0,22.5) - e(0,67.5) + e(45,22.5) + e(45,67.5) converges to
|
|
448
|
+
* 2 sqrt(2) = 2.8284 for the entangled source and cannot exceed the
|
|
449
|
+
* classical bound 2 once eve collapses the pairs, which is exactly the
|
|
450
|
+
* e91 security test (bell-inequality violation as the eavesdropper
|
|
451
|
+
* detector). an intercept-resend eve also pushes the matched-angle key
|
|
452
|
+
* qber to 25 percent.
|
|
453
|
+
* reference: ekert, quantum cryptography based on bell's theorem,
|
|
454
|
+
* prl 67, 661 (1991); clauser-horne-shimony-holt 1969 prl 23 880;
|
|
455
|
+
* bell 1964; aspect, dalibard, roger 1982.
|
|
456
|
+
*/
|
|
457
|
+
export declare function rune91(options?: {
|
|
458
|
+
eve?: boolean;
|
|
459
|
+
pairs?: number;
|
|
460
|
+
}): e91result;
|
|
461
|
+
/**
|
|
462
|
+
* quantuminspiredrandom: draws count integers in [min, max) from the
|
|
463
|
+
* node crypto CSPRNG via randomInt (node rejection-samples internally,
|
|
464
|
+
* so the stream is unbiased). this is a classical CSPRNG standing in
|
|
465
|
+
* for a QRNG photon source; the API shape matches hardware QRNG
|
|
466
|
+
* services (count + integer range in, uniform integers out) so the
|
|
467
|
+
* integration seam is already quantum-ready. no physics is claimed.
|
|
468
|
+
*/
|
|
469
|
+
export declare function quantuminspiredrandom(count: number, options?: {
|
|
470
|
+
min?: number;
|
|
471
|
+
max?: number;
|
|
472
|
+
}): number[];
|
|
473
|
+
/**
|
|
474
|
+
* anuqrng: optional asynchronous fetch of the australian national
|
|
475
|
+
* university quantum random numbers service (api.quantumnumbers.io,
|
|
476
|
+
* successor of qrng.anu.edu.au), which digitizes vacuum fluctuations.
|
|
477
|
+
* the planner is honest: without network egress or an api key the call
|
|
478
|
+
* fails fast (abort timeout 2500 ms default) and the function falls
|
|
479
|
+
* back to the same CSPRNG as quantuminspiredrandom, reporting
|
|
480
|
+
* source: 'csprng'. anu values are 64-bit unsigned integers folded
|
|
481
|
+
* into the requested range with one modulo (bias below 2^-32 for any
|
|
482
|
+
* practical span, documented here rather than hidden).
|
|
483
|
+
*/
|
|
484
|
+
export declare function anuqrng(count: number, options?: {
|
|
485
|
+
apikey?: string;
|
|
486
|
+
timeoutms?: number;
|
|
487
|
+
min?: number;
|
|
488
|
+
max?: number;
|
|
489
|
+
}): Promise<{
|
|
490
|
+
values: number[];
|
|
491
|
+
source: 'anu' | 'csprng';
|
|
492
|
+
note: string;
|
|
493
|
+
}>;
|
|
494
|
+
/**
|
|
495
|
+
* convenience bytes draw used by the self check and available to
|
|
496
|
+
* integrators: crypto.randomBytes surfaced under the qrng banner with
|
|
497
|
+
* the same honesty note as quantuminspiredrandom.
|
|
498
|
+
*/
|
|
499
|
+
export declare function quantuminspiredbytes(count: number): Uint8Array;
|
|
500
|
+
/**
|
|
501
|
+
* dnavault codec constants: 4 strands addressed by blockindex mod 4,
|
|
502
|
+
* each block synthesized twice (on its home strand and the next one)
|
|
503
|
+
* so decoding survives the loss of any single strand; every byte maps
|
|
504
|
+
* to 6 ternary digits (3^6 = 729 > 256) and every digit to one
|
|
505
|
+
* nucleotide through the goldman rotation next = (digit + 1 + previous)
|
|
506
|
+
* mod 4, which makes consecutive repeats impossible (homopolymer run
|
|
507
|
+
* length 1, stricter than the standard run-length <= 3 synthesis
|
|
508
|
+
* constraint). reference: goldman et al., towards practical,
|
|
509
|
+
* high-capacity, low-maintenance information storage in synthesized
|
|
510
|
+
* dna, nature 494, 77-80 (2013), doi:10.1038/nature11875.
|
|
511
|
+
*/
|
|
512
|
+
export declare const dnavaultspec: {
|
|
513
|
+
readonly strandcount: 4;
|
|
514
|
+
readonly redundancy: 2;
|
|
515
|
+
readonly blockpayloadbytes: 32;
|
|
516
|
+
readonly blockframebytes: 35;
|
|
517
|
+
readonly nucleotidesperblock: 210;
|
|
518
|
+
readonly tritsperbyte: 6;
|
|
519
|
+
readonly maxinputbytes: 65536;
|
|
520
|
+
readonly homopolymerrunmax: 1;
|
|
521
|
+
readonly rule: 'next = (digit + 1 + previous) mod 4, digit in {0,1,2}';
|
|
522
|
+
readonly reference: 'goldman et al. 2013 nature 494 77-80 doi:10.1038/nature11875';
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* dnavaultencode result: the four strand oligo strings, the block
|
|
526
|
+
* count and the nucleotide accounting for the capacity planner.
|
|
527
|
+
*/
|
|
528
|
+
export type dnavaultencoderesult = {
|
|
529
|
+
readonly strands: readonly string[];
|
|
530
|
+
readonly blocks: number;
|
|
531
|
+
readonly oligos: number;
|
|
532
|
+
readonly nucleotides: number;
|
|
533
|
+
readonly redundancy: number;
|
|
534
|
+
readonly homopolymerrunmax: number;
|
|
535
|
+
readonly reference: string;
|
|
536
|
+
};
|
|
537
|
+
/**
|
|
538
|
+
* encodes bytes into four dna strands with real goldman-2013 rules:
|
|
539
|
+
* a 4-byte big-endian length prefix, 32-byte payload blocks framed as
|
|
540
|
+
* [index u16 be][payload 32][checksum u8 of index + payload], ternary
|
|
541
|
+
* rotation encoding per byte, dual-strand placement (blockindex mod 4
|
|
542
|
+
* and (blockindex + 1) mod 4). the archive planner guard caps input at
|
|
543
|
+
* 64 kib; real synthesis runs are planned, not executed, here.
|
|
544
|
+
*/
|
|
545
|
+
export declare function dnavaultencode(bytes: Uint8Array): dnavaultencoderesult;
|
|
546
|
+
/**
|
|
547
|
+
* decodes strands back to bytes: every 210-nucleotide oligo is
|
|
548
|
+
* de-rotated to a 35-byte frame, checksum-verified, deduplicated by
|
|
549
|
+
* block index and reassembled in order. oligos failing checksum or
|
|
550
|
+
* carrying invalid letters are dropped silently because every block
|
|
551
|
+
* exists on two strands; a genuinely missing index throws.
|
|
552
|
+
*/
|
|
553
|
+
export declare function dnavaultdecode(strands: readonly string[]): Uint8Array;
|
|
554
|
+
/**
|
|
555
|
+
* dnavault capacity anchors: the widely quoted 215 petabytes per gram
|
|
556
|
+
* of dna figure (church 2012 science era synthesis estimates, echoed
|
|
557
|
+
* by the nature 2013 news coverage around goldman et al.) anchors the
|
|
558
|
+
* physical planner; the codec rates above are what this module
|
|
559
|
+
* actually charges.
|
|
560
|
+
*/
|
|
561
|
+
export declare const dnacapacityspec: {
|
|
562
|
+
readonly bytespergram: 215000000000000000;
|
|
563
|
+
readonly densityquote: '215 petabytes per gram of dna';
|
|
564
|
+
readonly densityreference: 'church, gao, kosuri 2012 science 337 1628 era estimates; nature news 2013';
|
|
565
|
+
readonly synthesispitch: 'archive planner only; no oligo is ordered or synthesized';
|
|
566
|
+
};
|
|
567
|
+
/**
|
|
568
|
+
* dnavault capacity estimate for an archive of sizebytes: dna grams at
|
|
569
|
+
* the 215 pb/g density, oligo and nucleotide counts at this codec's
|
|
570
|
+
* real rates, and the storage overhead ratio.
|
|
571
|
+
*/
|
|
572
|
+
export declare function dnacapacity(sizebytes: number): {
|
|
573
|
+
grams: number;
|
|
574
|
+
oligos: number;
|
|
575
|
+
nucleotides: number;
|
|
576
|
+
overhead: number;
|
|
577
|
+
density: string;
|
|
578
|
+
reference: string;
|
|
579
|
+
};
|
|
580
|
+
/**
|
|
581
|
+
* planodefault: the default dna archive plan for a payload of
|
|
582
|
+
* sizebytes — dna mass in grams (215 pb/g density), number of oligo
|
|
583
|
+
* strands to synthesize, and the codec overhead fraction. this is the
|
|
584
|
+
* planner entry point for the storage tier; nothing is written.
|
|
585
|
+
*/
|
|
586
|
+
export declare function planodefault(sizebytes: number): {
|
|
587
|
+
grams: number;
|
|
588
|
+
strands: number;
|
|
589
|
+
overhead: number;
|
|
590
|
+
storage: string;
|
|
591
|
+
reference: string;
|
|
592
|
+
};
|
|
593
|
+
/**
|
|
594
|
+
* opticalvault anchors: 5d femtosecond-laser nanostructuring of fused
|
|
595
|
+
* quartz as demonstrated by the university of southampton
|
|
596
|
+
* optoelectronics research centre (zhang, kazansky et al., 2013-2016):
|
|
597
|
+
* 360 tb per disc headline capacity, survival to 1000 c and the quoted
|
|
598
|
+
* 13.8-billion-year room-temperature stability. the five dimensions
|
|
599
|
+
* are three spatial coordinates plus nanograting orientation and
|
|
600
|
+
* retardance. the write parameters below are planning defaults for the
|
|
601
|
+
* femtosecond pass, not device constants.
|
|
602
|
+
*/
|
|
603
|
+
export declare const opticalvaultspec: {
|
|
604
|
+
readonly bytesperdisc: 360000000000000;
|
|
605
|
+
readonly layersperdisc: 100;
|
|
606
|
+
readonly logicalbitsperdot: 4;
|
|
607
|
+
readonly redundancycopies: 3;
|
|
608
|
+
readonly stabilityc: 1000;
|
|
609
|
+
readonly lifetimeyearsroom: 13800000000;
|
|
610
|
+
readonly pulsedurationfs: 280;
|
|
611
|
+
readonly wavelengthnm: 1030;
|
|
612
|
+
readonly layerspacingum: 4.5;
|
|
613
|
+
readonly medium: 'fused quartz';
|
|
614
|
+
readonly dimensions: 'x, y, z + nanograting orientation + retardance';
|
|
615
|
+
readonly reference: 'zhang, gecavicius, beresna, kazansky 2013 cleo; southampton orc 2013-2016 (360 tb/disc, 13.8 billion years at room temperature)';
|
|
616
|
+
};
|
|
617
|
+
/**
|
|
618
|
+
* opticalplan: recording plan for a 5d quartz archive of sizebytes:
|
|
619
|
+
* disc count at 360 tb per disc with three-copy redundancy, layer and
|
|
620
|
+
* nanograting dot counts at 4 logical bits per dot, and the
|
|
621
|
+
* femtosecond write pass description. pure planner output.
|
|
622
|
+
*/
|
|
623
|
+
export declare function opticalplan(sizebytes: number): {
|
|
624
|
+
discs: number;
|
|
625
|
+
layers: number;
|
|
626
|
+
dots: number;
|
|
627
|
+
redundancy: number;
|
|
628
|
+
lifetimeyearsroom: number;
|
|
629
|
+
stabilityc: number;
|
|
630
|
+
writeplan: {
|
|
631
|
+
pulsedurationfs: number;
|
|
632
|
+
wavelengthnm: number;
|
|
633
|
+
layerspacingum: number;
|
|
634
|
+
dimensions: string;
|
|
635
|
+
};
|
|
636
|
+
reference: string;
|
|
637
|
+
note: string;
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* holographic storage note for the storage tier compare: microsoft
|
|
641
|
+
* research announced the holographic storage device (hsd) program in
|
|
642
|
+
* 2024 — page-oriented holograms in a photosensitive wafer cartridge,
|
|
643
|
+
* about 1.4 tb per 12-centimeter disc form factor with a multi-terabyte
|
|
644
|
+
* roadmap. this module keeps it as a comparison note only; the
|
|
645
|
+
* concrete planners shipped here are dna and 5d quartz.
|
|
646
|
+
*/
|
|
647
|
+
export declare const holographicnote: {
|
|
648
|
+
readonly vendor: 'microsoft research';
|
|
649
|
+
readonly program: 'hsd (holographic storage device), announced 2024';
|
|
650
|
+
readonly capacity: 'about 1.4 tb per 12-cm disc, multi-terabyte roadmap';
|
|
651
|
+
readonly medium: 'photosensitive holographic wafer cartridges';
|
|
652
|
+
readonly position: 'comparison note; no planner shipped for this tier';
|
|
653
|
+
};
|
|
654
|
+
/**
|
|
655
|
+
* storagecompare: one-line planner comparison across the three
|
|
656
|
+
* quantum-adjacent storage tiers this module knows about.
|
|
657
|
+
*/
|
|
658
|
+
export declare function storagecompare(sizebytes: number): readonly {
|
|
659
|
+
tier: string;
|
|
660
|
+
units: string;
|
|
661
|
+
massorunits: string;
|
|
662
|
+
lifetime: string;
|
|
663
|
+
reference: string;
|
|
664
|
+
}[];
|
|
665
|
+
/**
|
|
666
|
+
* qramcell: one bucket-brigade memory slot addressed by its index.
|
|
667
|
+
*/
|
|
668
|
+
export interface qramcell {
|
|
669
|
+
readonly address: number;
|
|
670
|
+
readonly value: number;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* qramreadresult: the value plus the routing trace that proves the
|
|
674
|
+
* o(log n) switch activity of the bucket-brigade tree.
|
|
675
|
+
*/
|
|
676
|
+
export interface qramreadresult {
|
|
677
|
+
readonly address: number;
|
|
678
|
+
readonly value: number;
|
|
679
|
+
readonly hops: number;
|
|
680
|
+
readonly path: readonly number[];
|
|
681
|
+
readonly switchesactive: number;
|
|
682
|
+
readonly classicalwritelines: number;
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* qrambucketbrigade: classical simulation of the giovannetti-lloyd-
|
|
686
|
+
* maccone bucket-brigade qram. a classical ram read energizes n word
|
|
687
|
+
* lines; the bucket brigade routes one bus down a binary switch tree so
|
|
688
|
+
* only log2(n) switches per read must flip (and, in the quantum
|
|
689
|
+
* version, only o(log n) qubits must be active, which is what makes
|
|
690
|
+
* quantum-addressed lookup of a superposition affordable). the switch
|
|
691
|
+
* tree is simulated hop by hop and the read result carries the trace.
|
|
692
|
+
* reference: giovannetti, lloyd, maccone, quantum random access memory,
|
|
693
|
+
* prl 100, 160501 (2008); giovannetti, lloyd, maccone, architectures
|
|
694
|
+
* for a quantum random access memory, pra 78, 052310 (2008).
|
|
695
|
+
*/
|
|
696
|
+
export declare class qrambucketbrigade {
|
|
697
|
+
#private;
|
|
698
|
+
constructor(cells: number);
|
|
699
|
+
/** number of addressable cells. */
|
|
700
|
+
get cellscount(): number;
|
|
701
|
+
/** address width in bits (the tree depth). */
|
|
702
|
+
get addressbits(): number;
|
|
703
|
+
/** switch count of the tree (inner nodes; n - 1 for n cells). */
|
|
704
|
+
get switchcount(): number;
|
|
705
|
+
/** classical write into one cell (energizes one word line). */
|
|
706
|
+
write(address: number, value: number): void;
|
|
707
|
+
/** lists the cells as an address/value table. */
|
|
708
|
+
cells(): readonly qramcell[];
|
|
709
|
+
/**
|
|
710
|
+
* routes one read down the bucket-brigade tree: at level l the switch
|
|
711
|
+
* forwards along address bit (addressbits - 1 - l); the bus ends at
|
|
712
|
+
* the leaf and the trace records every switch node id visited
|
|
713
|
+
* (root id 1, children 2i and 2i + 1).
|
|
714
|
+
*/
|
|
715
|
+
read(address: number): qramreadresult;
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* qramdemo: the n=8 showcase — 3 switch levels, 7 switches, every read
|
|
719
|
+
* routes 3 hops against 8 classical word lines, plus a note of what
|
|
720
|
+
* the quantum version would query in one shot (a superposed address
|
|
721
|
+
* returning a superposed memory word).
|
|
722
|
+
*/
|
|
723
|
+
export declare function qramdemo(): {
|
|
724
|
+
reads: readonly qramreadresult[];
|
|
725
|
+
levels: number;
|
|
726
|
+
switches: number;
|
|
727
|
+
hops: number;
|
|
728
|
+
classicalwritelines: number;
|
|
729
|
+
reference: string;
|
|
730
|
+
};
|
|
731
|
+
/**
|
|
732
|
+
* shorcircuitplan: the honest factoring plan. the module ships the
|
|
733
|
+
* theoretical 7-qubit order-finding circuit for n = 15 (3 counting
|
|
734
|
+
* qubits + 4 work qubits, base a in {7, 11}, period 4,
|
|
735
|
+
* gcd(7^2 - 1, 15) = 3 and gcd(7^2 + 1, 15) = 5) and refuses to run it.
|
|
736
|
+
*/
|
|
737
|
+
export type shorcircuitplan = {
|
|
738
|
+
readonly n: number;
|
|
739
|
+
readonly executable: false;
|
|
740
|
+
readonly qubits: number;
|
|
741
|
+
readonly countingqubits: number;
|
|
742
|
+
readonly workqubits: number;
|
|
743
|
+
readonly bases: readonly number[];
|
|
744
|
+
readonly expectedperiod: number;
|
|
745
|
+
readonly factors: readonly number[];
|
|
746
|
+
readonly stages: readonly string[];
|
|
747
|
+
readonly gatesestimate: number;
|
|
748
|
+
readonly reason: string;
|
|
749
|
+
readonly references: readonly string[];
|
|
750
|
+
};
|
|
751
|
+
/**
|
|
752
|
+
* shorplan(n): returns the theoretical shor circuit for the
|
|
753
|
+
* factorization and never runs it. honesty clause: compiled
|
|
754
|
+
* controlled-modular-exponentiation networks for any semiprime beyond
|
|
755
|
+
* toy size grow past the 20-qubit statevector budget of this
|
|
756
|
+
* simulator (numbers above 15 need more than 20 clean qubits plus
|
|
757
|
+
* ancillas before scheduling even starts in js), and the 2013
|
|
758
|
+
* "oversimplifying quantum factoring" literature shows compressed
|
|
759
|
+
* order-finding circuits for 15 can factor without any genuine quantum
|
|
760
|
+
* advantage — so the module plans, cites and stops.
|
|
761
|
+
* references: shor 1994 focs / siam j comput 26 1484 (1997);
|
|
762
|
+
* vedal, barenco, ekert 1996 pra 54 147; vandersypen et al. 2001
|
|
763
|
+
* nature 414 883 (the 7-qubit nmr run of 15); smolin, gambetta,
|
|
764
|
+
* smith 2013 pra 87 030302 "oversimplifying quantum factoring".
|
|
765
|
+
*/
|
|
766
|
+
export declare function shorplan(n: number): shorcircuitplan;
|
|
767
|
+
/**
|
|
768
|
+
* quantumregistry: the capability catalog of this module for the engine
|
|
769
|
+
* integrator: simulator envelope, provable algorithms, key-exchange
|
|
770
|
+
* protocols, storage tiers, randomness sources and primary citations.
|
|
771
|
+
*/
|
|
772
|
+
export declare const quantumregistry: Readonly<{
|
|
773
|
+
readonly simulator: "statevector";
|
|
774
|
+
readonly precision: "float64 interleaved re/im";
|
|
775
|
+
readonly maxqubits: 20;
|
|
776
|
+
readonly algorithms: readonly ["bellstate", "ghzstate", "grover2", "grover3", "deutsch", "qteleport", "shorplan (plan only)"];
|
|
777
|
+
readonly protocols: readonly ["bb84", "e91"];
|
|
778
|
+
readonly storage: readonly ["dna goldman 2013", "optical 5d quartz", "holographic note", "qram bucket brigade"];
|
|
779
|
+
readonly random: readonly ["csprng (node:crypto)", "anu qrng (optional, fallback)"];
|
|
780
|
+
readonly sources: readonly ["goldman et al. 2013 nature 494 77-80 doi:10.1038/nature11875", "church, gao, kosuri 2012 science 337 1628 (215 pb/g era)", "grover 1996 stoc arxiv:quant-ph/9605043", "deutsch-jozsa 1992 proc r soc lond a 439 553", "bennett-brassard 1984 bangalore proceedings 175-179", "ekert 1991 prl 67 661; chsh 1969 prl 23 880; bell 1964", "bennett et al. 1993 prl 70 1895 (teleportation)", "giovannetti-lloyd-maccone 2008 prl 100 160501 (qram)", "shor 1994/1997; vandersypen 2001 nature 414 883; smolin-gambetta-smith 2013", "zhang-kazansky et al. 2013-2016 southampton orc (5d quartz)", "microsoft research hsd 2024 announcement", "anu quantum numbers, api.quantumnumbers.io"];
|
|
781
|
+
}>;
|
|
782
|
+
/** registry type alias for integrators that want the frozen shape. */
|
|
783
|
+
export type quantumregistrytype = typeof quantumregistry;
|
|
784
|
+
/**
|
|
785
|
+
* one machine-verified claim row: name, pass flag and a detail line
|
|
786
|
+
* with the measured numbers.
|
|
787
|
+
*/
|
|
788
|
+
export type quantumcheckrow = {
|
|
789
|
+
readonly name: string;
|
|
790
|
+
readonly pass: boolean;
|
|
791
|
+
readonly detail: string;
|
|
792
|
+
};
|
|
793
|
+
/**
|
|
794
|
+
* quantumselfcheck: runs every documented claim of this module against
|
|
795
|
+
* the real simulator — bell/grover/deutsch/teleport statistics, bb84
|
|
796
|
+
* with and without an eavesdropper, the e91 chsh violation, the dna
|
|
797
|
+
* roundtrip including strand loss, the qrng range, the qram routing
|
|
798
|
+
* depth, the shor honesty clause, the 20-qubit envelope guard and the
|
|
799
|
+
* using/disposal guard. returns the row table plus pass counts so the
|
|
800
|
+
* integrator can gate ci on it. randomness is live node:crypto, so the
|
|
801
|
+
* protocol rows carry the statistical margins described in their
|
|
802
|
+
* circuit references.
|
|
803
|
+
*/
|
|
804
|
+
export declare function quantumselfcheck(): {
|
|
805
|
+
rows: readonly quantumcheckrow[];
|
|
806
|
+
passed: number;
|
|
807
|
+
failed: number;
|
|
808
|
+
reference: string;
|
|
809
|
+
};
|
|
810
|
+
//# sourceMappingURL=quantum.d.ts.map
|