feat(layer-101): Quantum Coherence Lab — in-browser phase/interference sandbox#23
Closed
slavazeph-coder wants to merge 1 commit into
Closed
feat(layer-101): Quantum Coherence Lab — in-browser phase/interference sandbox#23slavazeph-coder wants to merge 1 commit into
slavazeph-coder wants to merge 1 commit into
Conversation
…e sandbox Adds a single-qubit simulator running |0⟩ → H → RZ(θ) → H → M entirely in JavaScript, plus a panel that teaches superposition, phase, interference, observation, noise, and decoherence. - src/utils/quantumCoherence.js: complex/H/X/Z/RZ helpers, three experiments (phase / observation / decoherence), simple dephasing + bit-flip noise model, coherenceScore, and mapQuantumToBrainState (PFC↑ coherence · AMY↑ noise · THL↑ routing · HPC↑ survival · BG↑ dominance · CBL↑ correction · CTX↑ complexity). - src/components/QuantumCoherencePanel.jsx: theta / shots / noise / depth / observe-midway controls, scientific ↔ metaphor mode toggle, P(0)/P(1) bars, coherence score 0–100, plain-English explanation, and a circuit-row visualization. - App.jsx: wired with onApplyToBrain that nudges the 7 region levels. - layerCatalog: registered as L101 with new "experimental" group. - Tests: 18 cases via node:test (theta=0/π, observation, decoherence, noise/depth scaling, brain mapping). Run with `npm run test:quantum`. - Docs: README section explicitly disclaims literal multiverse / consciousness / Planck / spiritual claims; framed as a teaching sandbox; future backend can swap in IBM Quantum or OriginQ. No secrets added. npm install + npm run build pass. https://claude.ai/code/session_01VYArf8MTS6QdhmswtqNPox
Owner
Author
|
Closing as a duplicate of #22, which now ships both the offline Qiskit suite ( Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Layer 101 — Quantum Coherence Lab: a single-qubit simulator and panel that runs entirely in the browser, teaching the physical mechanism behind "alignment" — superposition, phase, interference, observation, noise, and decoherence.
src/utils/quantumCoherence.js— complex helpers (complex,addComplex,mulComplex,abs2,normalizeState), gates (applyH,applyX,applyZ,applyRZ), measurement (measureDistribution,sampleShots), three experiments (runPhaseExperiment,runObservationExperiment,runDecoherenceExperiment),coherenceScore, andmapQuantumToBrainState.src/components/QuantumCoherencePanel.jsx— θ slider (0 → π), shots picker (256 / 1024 / 4096), noise slider, X·X depth slider, observe-midway toggle, Scientific / Metaphor mode toggle, P(0) / P(1) bars, coherence score 0–100, plain-English explanation, and aH → RZ(θ) → H → Mcircuit row.App.jsx, listed inlayerCatalog.jsas L101 with a newexperimentalgroup.node:testrunner.npm run test:quantum.brainsnn-r3f-app/README.mdthat explicitly disclaims literal multiverse, consciousness collapse, Planck foam, and spiritual portal claims — those are framing metaphors only.No backend, no IBM/OriginQ keys, no secrets. The function surface is intentionally compatible with a future hardware-backed run.
Test plan
npm installsucceedsnpm run buildsucceeds (Vite, ~8s)npm run test:quantum— 18/18 passinghttps://claude.ai/code/session_01VYArf8MTS6QdhmswtqNPox
Generated by Claude Code