From bf31418c10302d1786451ddee9b9840f4d9983c8 Mon Sep 17 00:00:00 2001 From: Ruge Lin Date: Mon, 2 Nov 2026 18:46:10 +0800 Subject: [PATCH 1/4] Connect rank-two spin diffusion to nonlinear conditional covariance --- .github/workflows/verify.yml | 52 ++ README.md | 9 +- learning/ANCHOR.md | 35 +- learning/MILESTONES.md | 18 +- learning/README.md | 10 +- learning/TUTORIAL.md | 83 +- llms.txt | 7 + references/RELATED_WORK.md | 9 + references/references.bib | 28 + science/README.md | 5 +- science/anisotropic_diffusion.md | 4 +- science/rank_two_diffusion.md | 370 ++++++++ verification/README.md | 55 +- verification/SANITY_CHECK.md | 46 + verification/check_navigation.py | 103 ++ verification/check_rank_two.py | 227 +++++ verification/hosted_tools/README.md | 5 + .../hosted_tools/capture_hosted_math.cjs | 274 ++++++ .../hosted_tools/check_rendered_math.py | 370 ++++++++ verification/results/manifest.json | 16 +- verification/results/navigation.json | 125 +++ verification/results/rank_two.json | 646 +++++++++++++ verification/results/rank_two_full.json | 878 ++++++++++++++++++ verification/run_all.py | 6 +- 24 files changed, 3345 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/verify.yml create mode 100644 science/rank_two_diffusion.md create mode 100644 verification/SANITY_CHECK.md create mode 100644 verification/check_navigation.py create mode 100644 verification/check_rank_two.py create mode 100644 verification/hosted_tools/README.md create mode 100644 verification/hosted_tools/capture_hosted_math.cjs create mode 100644 verification/hosted_tools/check_rendered_math.py create mode 100644 verification/results/navigation.json create mode 100644 verification/results/rank_two.json create mode 100644 verification/results/rank_two_full.json diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 0000000..51cf24a --- /dev/null +++ b/.github/workflows/verify.yml @@ -0,0 +1,52 @@ +name: Verify science and hosted mathematics +on: + pull_request: + branches: [main] + push: + branches: [main] +permissions: + contents: read +concurrency: + group: verify-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 25 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + persist-credentials: false + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Install numerical dependencies + run: python -m pip install -r verification/requirements.txt + - name: Scientific and learning checks + env: + OPENBLAS_NUM_THREADS: '1' + run: | + mkdir -p verification/local_results + python verification/run_all.py --output-dir verification/local_results + python verification/check_navigation.py --output verification/local_results/navigation.json + - name: Install hosted comparison dependencies + run: | + npm install --prefix "$RUNNER_TEMP/hosted-deps" playwright@1.56.1 mathjax-full@3.2.1 + "$RUNNER_TEMP/hosted-deps/node_modules/.bin/playwright" install --with-deps chromium + - name: Compare actual GitHub mathematical rendering + env: + SOURCE_REF: ${{ github.event.pull_request.head.sha || github.sha }} + run: | + NODE_PATH="$RUNNER_TEMP/hosted-deps/node_modules" node verification/hosted_tools/capture_hosted_math.cjs \ + --root "$GITHUB_WORKSPACE" --repository "$GITHUB_REPOSITORY" \ + --revision "$SOURCE_REF" --output verification/local_results/hosted + - uses: actions/upload-artifact@v4 + if: always() + with: + name: verification-${{ github.event.pull_request.head.sha || github.sha }} + path: verification/local_results/ + retention-days: 7 diff --git a/README.md b/README.md index ce3ed9e..b8ad9e2 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ For isotropic rotational diffusion on one irreducible spin, this account proves a sharp large-spin threshold for proximity to entanglement-breaking channels. At the threshold, every encoding and final recovery is constrained, quantum capacity tends to zero, and classical capacity remains within two bits of its dimensional maximum. The result concerns the complete channel, including arbitrary external reference systems. +## Sister project: nonlinear diffusion + +[**Nonlinear-Diffusion-Entanglement**](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement) supplies a conditional-covariance method, an exceptional-path EB bound and finite-energy reference-entanglement witnesses for a nonlinear oscillator. The [rank-two spin account](science/rank_two_diffusion.md) proves a controlled transfer to spin diffusion with $`D=\mathrm{diag}(0,b,c)`$: squeezing near a coherent pole uses $`O(n^{1/3})`$ excitations and gives the nonlinear limit at $`t=s n^{-2/3}`$. + +The transferred witnesses show that the spin channel stays a positive distance from EB at **every fixed finite** $`s`$. Thus vanishing distance requires $`n^{2/3}t\to\infty`$. A separate global argument for equal positive rates proves sufficiency when $`\sqrt n\,t\to\infty`$. Matching global sufficiency remains open; local covariance is not a global EB approximation. This repository owns the controlled spin proof and finite-spin tests; its sister owns the inherited nonlinear-channel results. Both remain independently readable, with Holevo (2019) as their common educational anchor. + ## Principal result Write $`n=2j`$, $`d=n+1`$, and use the dimensionless noise convention @@ -68,10 +74,11 @@ At $`\nu=1`$, this singlet eigenvalue is negative for every odd $`n\ge5`$. The e | What exactly is assumed and proved? | [Model, conventions and claims](science/model.md) | | How does the complete argument fit together? | [Scientific account](science/README.md) | | Why does the result constrain every spin code? | [Uniform threshold proof](science/classicalization.md) and [recovery converse](science/communication.md#1-every-encoding-and-final-recovery) | +| What changes for rank-two noise, and what remains open globally? | [Controlled contraction and global gap](science/rank_two_diffusion.md) | | Which ingredients are established prior work? | [Related work and source map](references/RELATED_WORK.md), with [BibTeX bibliography](references/references.bib) | | How can I reproduce the finite checks and figures? | [Verification](verification/README.md) | -The [learning route](learning/README.md) uses **Holevo, _Quantum Systems, Channels, Information_, second revised and expanded edition (2019)** as its single educational anchor. Twelve background milestones and eighteen narrative milestones connect the physical carrier to the theorem, its communication consequences, and its limits. The tutorial includes an exactly solved qubit example; the source bridge records the verified chapter locations and the additional spin-specific steps supplied here. +The [learning route](learning/README.md) uses **Holevo, _Quantum Systems, Channels, Information_, second revised and expanded edition (2019)** as its single educational anchor. Twelve background milestones and eighteen narrative milestones connect the physical carrier to the theorem, its communication consequences, growing-excitation rank-two noise, and its limits. The tutorial includes an exactly solved qubit example; the source bridge records the verified chapter locations and the additional spin-specific steps supplied here. ## Reproduce diff --git a/learning/ANCHOR.md b/learning/ANCHOR.md index a9dfc50..b7ff31c 100644 --- a/learning/ANCHOR.md +++ b/learning/ANCHOR.md @@ -4,9 +4,9 @@ The single educational anchor for this project is **Alexander S. Holevo, _Quantum Systems, Channels, Information: A Mathematical Introduction_, second revised and expanded edition, De Gruyter, 2019**. The [publisher's book record](https://www.degruyterbrill.com/document/doi/10.1515/9783110642490/html) identifies the edition; the book DOI is [10.1515/9783110642490](https://doi.org/10.1515/9783110642490). -The book provides the language for connecting physical noise, entanglement, and communication. This page maps that language to one irreducible spin undergoing angular diffusion. The project-specific channel estimates and their proofs are in the linked scientific account; research-paper attribution remains in the separate [source map](../references/RELATED_WORK.md). +The book provides the language for connecting physical noise, entanglement, and communication. This page maps that language to one irreducible spin undergoing angular diffusion and its controlled rank-two connection to [Nonlinear-Diffusion-Entanglement](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement), which uses the same single anchor. The project-specific channel estimates and their proofs are in the linked scientific account; research-paper attribution remains in the separate [source map](../references/RELATED_WORK.md). -**Source access and precision.** Chapter titles and starting pages below were checked against the publisher's [contents](https://www.degruyterbrill.com/document/doi/10.1515/9783110642490-toc/html) and publicly indexed publisher chapter metadata on 23 October 2026. Full chapter text was unavailable for inspection. Consequently, the reading pointers remain at chapter level; no subsection, theorem, exercise, or equation number from the book is asserted. The notation below is the repository's convention, not a claim to reproduce Holevo's exact symbols or normalization. +**Source access and precision.** Chapter titles and starting pages below were checked against the publisher's [contents](https://www.degruyterbrill.com/document/doi/10.1515/9783110642490-toc/html) and publicly indexed publisher chapter metadata on 23 October 2026. Full chapter text was unavailable for inspection. The retained chapter map below records that check. For the rank-two bridge, the [publisher-distributed preview](https://api.pageplace.de/preview/DT0400.9783110642490_A39059069/preview-9783110642490_A39059069.pdf), contents pp. XI–XV, was also inspected on 2 November 2026: §6.4 starts on p. 110; §§11.1, 11.5 and 11.7 on pp. 233, 243 and 248; §§12.2.1–12.2.3 on pp. 265–269; §§12.4.4 and 12.6.2 on pp. 294 and 324. These are verified topic locations, not inspected theorem statements. No theorem, exercise, or equation number from the unavailable chapter bodies is asserted. The notation below is the repository's convention, not a claim to reproduce Holevo's exact symbols or normalization. ## Verified chapter locations and their role @@ -21,7 +21,7 @@ The page numbers are chapter starts in the selected 2019 edition. The final two | 10. Transmission of Quantum Information | 187 | Preservation and transmission of quantum information. | How does a uniform channel approximation constrain all encodings and the regularized quantum capacity? | | 12. Gaussian Systems | 255 | Gaussian quantum systems as a local description. | Which features of the shrinking-time spin problem have an oscillator interpretation, and which require a global finite-spin proof? | -These six locations are verified by the [publisher's table of contents](https://www.degruyterbrill.com/document/doi/10.1515/9783110642490-toc/html). They form a conceptual map, independent of any order of exercises or research milestones. +These six chapter locations are verified by the [publisher's table of contents](https://www.degruyterbrill.com/document/doi/10.1515/9783110642490-toc/html). They form a conceptual map, independent of any order of exercises or research milestones. ## The project in the language of channels @@ -64,7 +64,7 @@ Use this table when translating textbook formulas into the project. It fixes the |---|---|---| | State and channel | $`\rho\ge0`$, $`\mathrm{Tr}\rho=1`$; $`\Phi`$ is completely positive and trace preserving. | $`\Phi`$ acts on states. Its Heisenberg dual satisfies $`\mathrm{Tr}[\Phi(\rho)X]=\mathrm{Tr}[\rho\Phi^*(X)]`$. | | Size variables | $`n=2j`$, $`d=n+1`$; use $`m`$ for the number of independent channel uses. | The spin-size limit $`n\to\infty`$ is different from coding over $`m\to\infty`$ uses at each fixed $`n`$. | -| Time | $`\nu=nt`$. For $`d\rho/ds=\gamma\sum_a\mathcal D[J_a](\rho)`$, $`t=\gamma s/2`$. | A factor of two in the Lindblad generator changes the physical-time conversion. | +| Time | Isotropic scale $`\nu=nt`$; rank-two scale $`s=n^{2/3}t`$. For physical time $`u`$ with $`d\rho/du=\gamma\sum_a\mathcal D[J_a](\rho)`$, $`t=\gamma u/2`$. | A factor of two in the Lindblad generator changes the physical-time conversion. | | Distances | Trace distance is $`\frac12\Vert \rho-\sigma\Vert _1`$; channel distance is one half of the diamond norm. | A bound for the full diamond norm has twice the numerical error parameter. | | Logarithms | Entropies and classical rates use $`\log_2`$; $`Q`$ is in qubits per use. | If a source uses natural logarithms, divide entropy expressions by $`\ln2`$ to obtain bits. The book's logarithm convention was not verified from full text here. | | Coherent-state measure | $`d\Omega`$ has total mass one; $`d\int_{S^2}\lvert\Omega\rangle\langle\Omega\rvert\,d\Omega=I`$. | The POVM density includes the factor $`d=n+1`$. Haar measure on the rotation group is also normalized. | @@ -85,7 +85,7 @@ The transpose is on the second factor in the displayed $`J_z`$ basis. A conventi ## Finite carrier and local oscillator: two different uses -Chapter 12 is a useful conceptual bridge, but the project uses a Gaussian limit and a number-ladder entropy bound for different purposes. +Chapter 12 is a useful conceptual bridge. The project uses bounded-excitation fluctuations, a growing-excitation nonlinear contraction and a number-ladder entropy bound for different purposes. Chapter 11 and its input-constraint distinction help keep these local approximations separate from an unrestricted channel norm. ### Local fluctuations near a coherent pole @@ -115,6 +115,28 @@ In oscillator notation, the same local scaling corresponds to random quadrature The global upper bound has a different source: it compares probability densities on the rotation group before choosing the spin representation. That is why it controls arbitrary encodings, including states outside the local pole region. +### Rank-two diffusion requires growing excitation + +For fixed rank-two noise $`D=\mathrm{diag}(0,b,c)`$, $`00. +``` + +This rules out an inverse-spin threshold for rank-two noise. It does not locate a longer sufficient scale. Setting the missing rate to zero in an upper bound containing $`1/a`$ cannot answer that question. + +The next test uses states whose excitation grows with the spin. Let $`N=j-J_z`$, and identify its finite ladder with oscillator number states. Squeeze a fixed smooth oscillator input using + +```math +q=n^{1/6}Q,\qquad p=n^{-1/6}P, +\qquad [Q,P]=i,\qquad t=s n^{-2/3}. +``` + +The large and small transverse fluctuations balance: $`J_y\simeq\sqrt{n/2}\,p`$ is of order $`n^{1/3}`$, and $`J_z-j=-N\simeq-n^{1/3}Q^2/2`$ has the same order. Their double commutators therefore survive on the proposed time scale. The limiting generator is + +```math +\mathcal G=-\frac b2[P,[P,\cdot]] +-c[Q^2/2,[Q^2/2,\cdot]]. +``` + +The squeeze raises mean physical excitation to $`O(n^{1/3})`$. It is still small compared with $`n`$, but it is not the bounded-excitation limit used for the isotropic two-level proof. [The rank-two proof](../science/rank_two_diffusion.md) controls the Holstein–Primakoff remainder and excitation tails, normalizes the projected input span by an isometry, and bounds output trace error by $`O(n^{-2/3})`$ on each fixed finite Schwartz input span, finite reference and bounded interval of $`s`$. Schwartz vectors are smooth wavefunctions whose derivatives decay faster than any inverse power; their moments control the unbounded operators and discarded tails. The error constant depends on this span and interval. There is no bound uniform over the whole spin Hilbert space or scaled times growing with $`n`$. + +### What the nonlinear sister contributes + +Exchange the canonical quadratures. The limit becomes the model studied in [Nonlinear-Diffusion-Entanglement](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement), with position-generated diffusion strength $`D_{\mathrm{osc}}=b/2`$, quadratic-noise strength $`\kappa=c`$, and $`\eta=\omega=0`$. Conditioning mathematically on the quadratic Brownian noise produces a Gaussian displacement channel followed by a shear. Its covariance determinant is + +```math +\det V=8D_{\mathrm{osc}}^2\kappa s^3 Z +=2b^2c\,s^3 Z, +``` + +where $`Z`$ is the integrated square of a Brownian path after subtraction of its time average. The one-mode Gaussian EB criterion tests whether $`\sqrt{\det V}\ge1`$. The canonical cubic variable is $`D_{\mathrm{osc}}^2\kappa s^3=(b^2c/4)s^3`$, equivalent to $`(b^2c/4)n^2t^3`$ in spin time. + +The conditional channel can be EB on most paths. The unconditional mixture is generally non-Gaussian, and a collection of non-EB conditional channels need not remain non-EB after averaging. The sister therefore proves a separate finite-energy, qubit-reference NPT witness for the unconditional output at every finite scaled time. No observer receives a Brownian path or conditions their experiment on it; conditioning is part of the proof. + +The controlled contraction transfers each such witness into the original finite spin. For every fixed finite $`s>0`$, + +```math +\liminf_{n\to\infty} + e_{n/2,D}(s n^{-2/3})>0. +``` + +The positive constant depends on $`s,b,c`$ and the input/test packets, and can be extremely small. This is stronger than failure of one chosen detector: it rules out a finite sharp coefficient $`s_*`$ above which the EB distance would vanish. Monotonicity in time implies that $`n^2t_n^3\to\infty`$ is necessary for vanishing distance. Its sufficiency is still open. + +An independent finite-spin bound makes the test concrete. Prepare a Bell state from the normalized finite-ladder projections of squeezed oscillator $`|0\rangle`$ and $`|1\rangle`$. Their opposite parity makes the two code states exactly orthogonal. For $`b=c=1`$, the sum of noisy-spin variances is $`(13/16)n^{2/3}+O(n^{1/3})`$. Positivity of the double-commutator generator on Hilbert–Schmidt space gives + +```math +F_e(t)\ge1-2t[\operatorname{Var}(J_y)+\operatorname{Var}(J_z)], +\qquad +\liminf_{n\to\infty}e_{n/2,D}(s n^{-2/3}) +\ge[1/2-13s/8]_+. +``` + +Here $`F_e`$ is the overlap of the noisy encoded Bell state with that same Bell state, and the variances are evaluated in the equal mixture of the two code states. This conservative lower bound follows directly at finite spin, independently of the contraction. Exact finite-spin evolution gives a negative reference partial-transpose witness near $`-0.0455`$ at $`n=128,s=1`$ and $`-0.0452`$ at $`n=512,s=1`$. These numerical values test the original spin generator and a particular normalized input. A nonnegative result for that detector at a later time would only mean that the detector stopped witnessing entanglement. + +### Why a global EB approximation remains separate + +The oscillator's exceptional-path method bounds its own unrestricted channel distance: replace bad conditional components by EB maps and pay their probability. In the exact spin problem, conditioning on one noisy rotation leaves another spin generator rotating with the path. Its time-ordered commutators are spin operators, not scalar phases on the entire carrier. The local Gaussian replacement therefore does not define a global finite-spin EB channel by itself. + +A weaker global result is available for equal positive rates $`b=c`$. Compose the actual spin diffusion with the coherent-state measure-and-prepare channel $`\mathcal B_j`$. This is an EB map on the whole spin, and subelliptic heat-kernel smoothing yields, at sufficiently small positive times, + +```math +e_{j,D}(t)\le +\min\{1,C_b/(\sqrt n\,t)\}. +``` + +Thus $`t_n\sqrt n\to\infty`$ is a proved sufficient regime in that equal-rate family. It is later than the candidate $`n^{-2/3}`$ crossover, so the two statements leave a real gap. Closing it requires a globally CP/TP EB comparator and a diamond-error estimate uniform over every spin encoding and reference, including localization disturbance if patches are used. It cannot be inferred by multiplying a local contraction error with an oscillator exceptional-path bound. + +Commutator-generated noise spreading and delayed powers of time are established hypoelliptic mechanisms: Baudoin–Bonnefont analyze rank-two SU(2) heat flow, Schubert–Plastow analyze Hörmander-delayed decoherence, and Speed–Lyu–Schubert introduce and solve the nonlinear diffusion model. The [research source map](../references/RELATED_WORK.md) distinguishes these ingredients from the controlled spin transfer and its operational lower consequence. Holevo's verified §§6.4, 11.1, 11.5, 11.7, 12.2, 12.4.4 and 12.6.2 supply the channel, convergence and covariance vocabulary; they are not a textbook proof of the new contraction or the missing global bound. + ## 10. Exact residual entanglement — M28–M29 Approximation by EB channels can coexist with an exactly negative Choi partial-transpose eigenvalue. Use the normalized Choi state defined above, with transpose on its second factor in the $`J_z`$ basis. Covariance makes its partial transpose commute with $`U_j\otimes U_j`$. The total-spin decomposition is multiplicity free, so the singlet @@ -499,10 +574,10 @@ The singlet witness also yields $`e_j(t)\ge-d\lambda_{0,n}(t)/2`$ when the eigen ## 11. The combined mechanism and its attribution — M30 -The global and local arguments do different jobs. Comparing rotation distributions gives a uniform channel approximation that protects the conclusion against every encoding within the irreducible carrier. A two-level reference witness prevents that approximation below the limiting boundary. Entropy then quantifies the surviving classical messages, while capacity continuity constrains quantum transmission. Anisotropy tests which parts rely on isotropy; the singlet calculation exposes the difference between operational approximation and exact entanglement death. +The global and local arguments do different jobs. Comparing rotation distributions gives a uniform channel approximation that protects the conclusion against every encoding within the irreducible carrier. A two-level reference witness prevents that approximation below the limiting boundary. Entropy then quantifies the surviving classical messages, while capacity continuity constrains quantum transmission. Anisotropy tests which parts rely on isotropy; the singular rank-two case changes the excitation and time scale, transferring a nonlinear reference witness without transferring a global upper bound. The singlet calculation exposes the further difference between operational approximation and exact entanglement death. Several ingredients are established prior work. Aschieri–Ruba–Solovej supply the coherent-channel identities. Berezin–heat comparisons, group-to-channel norm transfer, and spin diffusion have substantial precedents, including Ioos and collaborators, Bardet and collaborators, and Brody–Graefe–Melanathuru. EB characterizations, classical coding, and quantum-capacity continuity are imported tools. The [source map](../references/RELATED_WORK.md#established-ingredients-and-the-contribution-of-this-analysis) records these dependencies and the closest overlaps. -The analysis here combines the explicit shrinking-time, dimension-uniform comparison with the matching reference witness, communication consequences, qualified robustness results, and odd-spin residual asymptotics. The [verification record](../verification/README.md) provides reproducible finite checks; analytical estimates establish the asymptotic claims. Remaining questions include the general anisotropic coefficient, exact finite-spin PPT and EB times, and the quantum-capacity boundary below $`\nu=1`$. +The analysis here combines the explicit shrinking-time, dimension-uniform comparison with the matching reference witness, communication consequences, qualified robustness results, and odd-spin residual asymptotics. The [verification record](../verification/README.md) provides reproducible finite checks; analytical estimates establish the asymptotic claims. Remaining questions include the general positive-anisotropy coefficient, a sharper global rank-two EB approximation, exact finite-spin PPT and EB times, and the quantum-capacity boundary below $`\nu=1`$. The rank-two reference witness makes no positive-capacity or fixed-quality storage claim. The common result is a separation within one specified physical carrier: almost maximal classical communication can persist while every encoding faces a quantum-transmission converse. The [milestone map](MILESTONES.md), [educational anchor](ANCHOR.md), and [scientific route](../science/README.md) provide complementary paths through the definitions, background, and complete proofs. diff --git a/llms.txt b/llms.txt index e3f3b0d..8bafe11 100644 --- a/llms.txt +++ b/llms.txt @@ -14,6 +14,7 @@ This repository studies isotropic and anisotropic rotational diffusion on one ir - Explicit coherent-measurement comparator, uniform heat-kernel estimate and matching two-level converse: science/classicalization.md - Arbitrary encoding/recovery, finite classical bound, finite quantum-capacity converse and intermediate timescales: science/communication.md - Unequal diffusion strengths, sharp two-equal-smallest-rate family, rank-deficient cases and deterministic rotations: science/anisotropic_diffusion.md +- Rank-two growing-excitation contraction, all-finite-scaled-time NPT converse, finite-spin code and separate equal-rate global EB bound: science/rank_two_diffusion.md - Exact normalized-Choi singlet eigenvalue, odd-spin asymptotic and finite NPT certificates: science/residual_entanglement.md - Physical story, interpretation and boundaries: science/interpretation.md - Imported results, precise predecessor comparison and source versions: references/RELATED_WORK.md @@ -39,3 +40,9 @@ The residual Choi theorem identifies one negative partial-transpose eigenvalue f The carrier is irreducible. An arbitrary initial encoding and final recovery are permitted, but intermediate active correction and a quantum bypass are additional resources. Capacities use independent channel copies, not a common rotation shared across all carriers. Follow the source map for attribution: coherent-channel rotation identities, Berezin/heat comparisons, transference methods, rotational partial-transpose structure and capacity continuity have established predecessors. Numerical checks verify conventions and sampled finite behavior; the proofs carry the general statements. + +## Sister relationship and rank-two scope + +Nonlinear-Diffusion-Entanglement (https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement) owns the inherited conditional Gaussian covariance, exceptional-path oscillator EB bound and finite-energy NPT witness. This repository owns their controlled spin application in science/rank_two_diffusion.md. The single common source remains Holevo (2019); each project has its own 30-milestone route. + +For fixed D=diag(0,b,c), t=s n^(-2/3) and a fixed Schwartz input span/finite reference, the squeezed limit is -(b/2)ad_P²-c ad_(Q²/2)², with physical excitation O(n^(1/3)). Positive EB-distance liminf at every fixed finite s makes n^(2/3)t->infinity necessary. Only the equal-rate family has the separate global bound C_b/(sqrt(n)t), sufficient at sqrt(n)t->infinity. Do not infer matching global sufficiency, a finite coefficient threshold, exact EB, or positive quantum capacity from the local contraction. diff --git a/references/RELATED_WORK.md b/references/RELATED_WORK.md index 8b8a744..1e6f588 100644 --- a/references/RELATED_WORK.md +++ b/references/RELATED_WORK.md @@ -135,3 +135,12 @@ Thus, for fixed $`1\leq\nu<\pi/2`$ and sufficiently large odd $`n`$, an exact no Primary author text: . Version record: (v3, 12 July 2003); publication: , 11 July 2003. The generated HTML date is not the paper's publication or revision date. Anisotropic thresholds are another separate statement. Anisotropic spin dynamics already appears in [DenisMartin2022]; any sharp coefficient or general sandwich bound must be justified by its own derivation and its exact ordering assumptions on the diffusion coefficients. + + +## Rank-two spin contraction and its nonlinear sister + +The [rank-two account](../science/rank_two_diffusion.md) uses an established hypoelliptic mechanism. **Baudoin and Bonnefont**, *The subelliptic heat kernel on SU(2): representations, asymptotics and gradient bounds*, arXiv:0802.3320v2 (5 March 2008), *Mathematische Zeitschrift* **263** (2009), 647–672, [DOI](https://doi.org/10.1007/s00209-008-0436-0), study the exact rank-two SU(2) heat law. Sections 2 and 3.4 identify its bracket geometry and Heisenberg scaling. Theorem 4.3 and Remark 4.4 give the gradient estimate used here for the **equal-positive-rate** global EB comparison. Their fields satisfy $`[X,Y]=2Z`$; the spin proof includes the time conversion. [Primary text](https://arxiv.org/pdf/0802.3320). + +**Schubert and Plastow**, *Decoherence Time Scales and the Hörmander Condition*, [arXiv:2307.08799v1](https://arxiv.org/html/2307.08799v1), Theorem I.2 and Section III, describe bracket-delayed decoherence and odd powers of time for Gaussian dynamics. Their coherent-cross-term Hilbert–Schmidt estimates do not directly give an arbitrary-reference diamond approximation to EB. **Speed, Lyu and Schubert**, *Beyond Gaussian Quantum Channels: A model case*, [arXiv:2305.08467v1](https://arxiv.org/pdf/2305.08467), introduce and solve the nonlinear position/kinetic-energy Lindblad model through Grushin/Mehler methods. The model, bracket spreading and cubic scaling are inherited, not discoveries of this spin application. + +The sister [Nonlinear-Diffusion-Entanglement at 9c0ee02](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/tree/9c0ee02e018cf6940bcbb7916a666495331e8852) owns the conditional covariance, exceptional-path oscillator EB estimate and finite-energy NPT theorem at every finite time without direct noise regularization. The new spin account proves a controlled growing-excitation contraction, transfers those finite-energy witnesses into a necessary condition $`n^{2/3}t\to\infty`$, and gives an independent finite-spin fidelity lower bound. It separately constructs the equal-rate global comparator $`\Phi_t\circ\mathcal B_j`$ and derives a weaker sufficient regime $`\sqrt n\,t\to\infty`$ from the imported heat estimate. Neither the local determinant nor oscillator good-path replacements establish matching global spin sufficiency. No separate discovery is claimed for the inherited oscillator theorem, coherent comparator identity, Gaussian EB criterion or group transference. diff --git a/references/references.bib b/references/references.bib index deb1755..ab4e2b5 100644 --- a/references/references.bib +++ b/references/references.bib @@ -192,3 +192,31 @@ @article{Schliemann2003 note = {Published 11 July 2003. Author text inspected: arXiv:quant-ph/0212114v3, 12 July 2003, Section II} } + + +@article{BaudoinBonnefont2009, + author = {Baudoin, Fabrice and Bonnefont, Michel}, + title = {The subelliptic heat kernel on {SU(2)}: representations, asymptotics and gradient bounds}, + journal = {Mathematische Zeitschrift}, + volume = {263}, pages = {647--672}, year = {2009}, + doi = {10.1007/s00209-008-0436-0}, + eprint = {0802.3320}, archivePrefix = {arXiv}, + url = {https://arxiv.org/abs/0802.3320v2}, + note = {Version 2; Sections 2 and 3.4; Theorem 4.3 and Remark 4.4} +} + +@misc{SchubertPlastow2023, + author = {Schubert, Roman and Plastow, Thomas}, + title = {Decoherence Time Scales and the {H\"ormander} Condition}, + year = {2023}, eprint = {2307.08799}, archivePrefix = {arXiv}, + url = {https://arxiv.org/abs/2307.08799v1}, + note = {Theorem I.2 and Section III concern Gaussian coherent-cross-term decoherence} +} + +@misc{SpeedLyuSchubert2023, + author = {Speed, Daniel and Lyu, Wenyang and Schubert, Roman}, + title = {Beyond {Gaussian} Quantum Channels: A model case}, + year = {2023}, eprint = {2305.08467}, archivePrefix = {arXiv}, + url = {https://arxiv.org/abs/2305.08467v1}, + note = {Nonlinear model and Grushin/Mehler propagator are inherited} +} diff --git a/science/README.md b/science/README.md index ed419db..6227f81 100644 --- a/science/README.md +++ b/science/README.md @@ -2,7 +2,7 @@ **At what noise scale does a large spin become operationally classical, and how much information does it still carry?** -The central result is a sharp threshold for approximating isotropic spin diffusion by an entanglement-breaking channel. At the threshold, quantum capacity tends to zero while classical capacity remains within two bits of the dimensional maximum. Anisotropic bounds and a residual-entanglement theorem explain the robustness and limits of that conclusion. +The central result is a sharp threshold for approximating isotropic spin diffusion by an entanglement-breaking channel. At the threshold, quantum capacity tends to zero while classical capacity remains within two bits of the dimensional maximum. Anisotropic bounds and a residual-entanglement theorem explain the robustness and limits of that conclusion. Rank-two diffusion has a different local limit, linked to [Nonlinear-Diffusion-Entanglement](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement), with a proved converse and a separate global approximation gap. | Topic | Authoritative account | |---|---| @@ -10,6 +10,7 @@ The central result is a sharp threshold for approximating isotropic spin diffusi | Uniform EB approximation and matching encoded witness | [Classicalization](classicalization.md) | | Arbitrary recovery, classical capacity and quantum-capacity converse | [Communication](communication.md) | | Unequal diffusion strengths and the axisymmetric sharp case | [Anisotropic diffusion](anisotropic_diffusion.md) | +| Rank-two noise, controlled nonlinear contraction and the global EB gap | [Rank-two diffusion](rank_two_diffusion.md) | | Exact Choi witness beyond the operational boundary | [Residual entanglement](residual_entanglement.md) | | Physical mechanism, resource boundaries and applications | [Interpretation](interpretation.md) | | Imported theorems and closest comparisons | [Related work](../references/RELATED_WORK.md) | @@ -19,7 +20,7 @@ The central result is a sharp threshold for approximating isotropic spin diffusi Start with the model to fix the time and norm conventions. The classicalization proof then compares a heat kernel with the known random-rotation representation of coherent measurement. Its upper bound is uniform over all encodings; its lower bound uses only the two highest-weight levels. -The communication page turns that channel theorem into operational consequences. The anisotropic page tests which symmetry is essential. The residual-entanglement page separates approximation by EB channels from exact membership in that set. The interpretation page connects the results to a spin's use as a classical or quantum carrier. +The communication page turns that channel theorem into operational consequences. The anisotropic page tests which symmetry is essential. The rank-two page transfers a finite-energy nonlinear-diffusion witness through a growing-excitation contraction, while keeping its global heat-kernel upper bound separate. The residual-entanglement page separates approximation by EB channels from exact membership in that set. The interpretation page connects the results to a spin's use as a classical or quantum carrier. The proofs and references on these pages provide a direct specialist route. For a guided explanation of the same science, start with the [learning route](../learning/README.md), the [tutorial](../learning/TUTORIAL.md), or the [30-milestone map](../learning/MILESTONES.md). The selected [Holevo bridge](../learning/ANCHOR.md) connects the quantum-information foundations to the project's conventions and proofs. diff --git a/science/anisotropic_diffusion.md b/science/anisotropic_diffusion.md index b4fa9e4..8dfb01a 100644 --- a/science/anisotropic_diffusion.md +++ b/science/anisotropic_diffusion.md @@ -1,6 +1,6 @@ # Anisotropic diffusion and deterministic rotations -[Model](model.md) · [Threshold proof](classicalization.md) · [Communication](communication.md) +[Model](model.md) · [Threshold proof](classicalization.md) · [Communication](communication.md) · [Rank-two diffusion](rank_two_diffusion.md) Unequal rotation-noise strengths preserve an inverse-spin operational boundary. Two-sided bounds locate it exactly when the two smallest diffusion strengths coincide, even if the third is arbitrarily stronger and fixed. @@ -408,7 +408,7 @@ The trace inequality uses $`|\mathrm{Tr}(AM)|\le\mathrm{Tr}(A)\|M\|_{\mathrm{op} ## 6. Limits of the robustness claim 1. **Fixed positive anisotropy matters.** For a fixed $`D>0`$, the EB upper bound has no condition-number prefactor, and the classical deficit at $`\tau=1/a`$ remains the finite constant $`g(\mathrm{Tr}D/(3a))`$. If $`a`$ depends on $`n`$ and tends to zero, that deficit can grow, and the advertised fixed-anisotropy separation must be reassessed. -2. **Rank-deficient noise has a different limit.** The lower-bound proof remains valid for $`D\ge0`$. If $`a=0`$, the pole along the largest-eigenvalue axis has tangent rates $`0,b`$ and gives the strictly positive lower bound $`1/[2(1+\tau b)^{3/2}]`$ for every finite $`\tau`$. Thus bounded-rate rotations do not produce asymptotic EB proximity at any fixed inverse-spin time under rank-deficient $`D`$. No claim about its longer timescale is made here. +2. **Rank-deficient noise has a different limit.** The lower-bound proof remains valid for $`D\ge0`$. If $`a=0`$, the pole along the largest-eigenvalue axis has tangent rates $`0,b`$ and gives the strictly positive lower bound $`1/[2(1+\tau b)^{3/2}]`$ for every finite $`\tau`$. Thus bounded-rate rotations do not produce asymptotic EB proximity at any fixed inverse-spin time under rank-deficient $`D`$. For fixed rank-two noise without an added Hamiltonian, the separate [growing-excitation contraction](rank_two_diffusion.md) strengthens this: vanishing distance requires $`n^{2/3}t_n\to\infty`$. An equal-positive-rate global bound proves sufficiency only in the weaker regime $`\sqrt n\,t_n\to\infty`$; matching sufficiency remains open. 3. **Irreducibility is essential.** Collective noise on the full tensor product of distinguishable spins has noiseless multiplicity spaces. They are absent from $`\mathcal H_j`$ and are outside this theorem. 4. **Uses must be independent for capacities.** A common rotation applied jointly to many carriers is a different communication channel. Equations (5) and (18) do not rule out relational or multiplicity encodings in that model. 5. **No active intermediate correction.** Encoding and recovery at the two ends are unrestricted, but intervention with noiseless ancillas during the interval is not part of this channel model. diff --git a/science/rank_two_diffusion.md b/science/rank_two_diffusion.md new file mode 100644 index 0000000..6105be2 --- /dev/null +++ b/science/rank_two_diffusion.md @@ -0,0 +1,370 @@ +# Rank-two diffusion: a local cubic scale and a global gap + +[Model](model.md) · [Positive anisotropy](anisotropic_diffusion.md) · [Nonlinear diffusion sister](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement) + +Rank-two angular noise generates the missing rotation direction through commutators. Near a suitable coherent pole, a growing-excitation contraction turns this mechanism into the nonlinear oscillator channel studied in **Nonlinear-Diffusion-Entanglement**. This gives a stronger finite-spin obstruction to entanglement-breaking approximation. A separate global heat-kernel argument proves a weaker sufficient regime when the positive diffusion rates coincide. The two statements leave a genuine gap. + +## 1. Model and established conclusions + +Fix $`00`$. Its witness transfers to exact spin states, giving + +```math +\boxed{\forall s\in(0,\infty):\quad +\liminf_{n\to\infty}e_{n/2;b,c}(s n^{-2/3})>0.} +``` + +Consequently, for any sequence of times, + +```math +\boxed{e_{n/2;b,c}(t_n)\longrightarrow0 +\quad\Longrightarrow\quad n^{2/3}t_n\longrightarrow\infty.} +``` + +**Global sufficient regime, equal rates.** For $`b=c`$, an actual coherent-state measurement comparator and a subelliptic heat-kernel estimate give, for sufficiently small $`t>0`$, + +```math +\boxed{e_{n/2;b,b}(t)\le +\min\left\{1,\frac{C_b}{\sqrt n\,t}\right\}.} +``` + +In particular $`\sqrt n\,t_n\to\infty`$ is sufficient for global proximity to EB in this equal-rate family. There is no proved matching sufficiency at $`n^{2/3}t_n\to\infty`$, and this upper proof does not establish the fixed unequal-rate case. + +The scale $`n^{-2/3}`$ is therefore a local cubic crossover and a necessary lower scale. It is **not** a proved sharp global classicalization scale, and no finite coefficient multiplying it makes the distance vanish in the large-spin limit. + +## 2. Conditional covariance and inherited mechanisms + +The horizontal Brownian coordinates of rank-two rotation noise have size $`\sqrt t`$; their bracket generates a coordinate of size $`t`$. At the $`z`$ pole, one noisy axis is longitudinal and rotates the remaining tangent-noise direction. The tangent displacement covariance has eigenvalue orders $`nt`$ and $`nt^2`$, giving a determinant of order $`n^2t^3`$. + +This commutator mechanism is inherited. [Baudoin–Bonnefont](https://arxiv.org/abs/0802.3320v2), Sections 2 and 3.4, treat the rank-two SU(2) heat kernel and its Heisenberg contraction. [Schubert–Plastow](https://arxiv.org/abs/2307.08799v1), Theorem I.2 and Section III, identify delayed $`t^{2k+1}`$ decoherence in quadratic-Hamiltonian, linear-Lindblad models. Their Hilbert–Schmidt coherent-cross-term conclusions do not give diamond distance to EB. [Speed–Lyu–Schubert](https://arxiv.org/abs/2305.08467v1) introduce and solve the nonlinear oscillator model using Grushin and Mehler methods. A new notation for the cubic variable would not be a new hypoelliptic mechanism. + +Exchanging $`Q,P`$ puts $`\mathcal G`$ into the nonlinear sister's convention with $`D=b/2`$, $`\kappa=c`$ and $`\eta=\omega=0`$. Its [conditional covariance](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/conditional_gaussian.md) has determinant + +```math +\det V=8\Lambda Z,\qquad +\Lambda=\frac{b^2c}{4}s^3, +\qquad +Z=\int_0^1\left(B_u-\int_0^1B_v\,dv\right)^2du. +``` + +Here $`B`$ is standard Brownian motion and + +```math +\mathbb E e^{-qZ} +=\left[\frac{\sqrt{2q}}{\sinh\sqrt{2q}}\right]^{1/2}. +``` + +On $`8\Lambda Z\ge1`$ the conditional additive Gaussian channel is EB by Holevo's Gaussian-channel criterion. Replacing exceptional paths by a preparation channel gives the **oscillator** distance bound + +```math +e_{\mathrm{osc}}(s)\le +\min\left\{1, +\sqrt{\frac{8\Lambda}{1-e^{-8\Lambda}}}\,e^{-\Lambda}\right\}. +``` + +The [nonlinear distance proof](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/cubic_distance.md) owns this exceptional-path argument and its operational interpretation. It does not supply a finite-spin global EB approximant. At finite spin the conditional generators have operator-valued commutators; their time ordering is not merely a scalar phase. + +## 3. A finite-spin reference witness before taking a contraction + +There is a direct finite-dimensional check of the proposed scale. For any orthonormal spin states $`u_0,u_1`$, put + +```math +|\Xi\rangle=\frac{|u_0\rangle|0\rangle+|u_1\rangle|1\rangle}{\sqrt2}, +\qquad \rho_A=\tfrac12(|u_0\rangle\langle u_0|+|u_1\rangle\langle u_1|). +``` + +The Hilbert–Schmidt operator $`\mathcal C=b\,\mathrm{ad}_{J_y}^2+c\,\mathrm{ad}_{J_z}^2`$ is positive and self-adjoint, also after tensoring with the reference identity. The scalar inequality $`e^{-tx}\ge1-tx`$ and spectral calculus give the exact entanglement-fidelity bound + +```math +F_\Xi(t)\ge1-2t\left[b\,\mathrm{Var}_{\rho_A}(J_y) ++c\,\mathrm{Var}_{\rho_A}(J_z)\right]. +``` + +Every separable output has overlap at most $`1/2`$ with $`\Xi`$. Testing the rank-one effect $`|\Xi\rangle\langle\Xi|`$ therefore gives + +```math +e_{j;b,c}(t)\ge +\left[\frac12-2t\left(b\,\mathrm{Var}_{\rho_A}(J_y) ++c\,\mathrm{Var}_{\rho_A}(J_z)\right)\right]_+. +``` + +### A code with growing excitation + +Identify $`|k\rangle`$ with $`|j,j-k\rangle`$ for $`0\le k\le n`$. Let $`S(r)=e^{r(a^{\dagger2}-a^2)/2}`$, so $`S(r)^\dagger qS(r)=e^r q`$ and $`S(r)^\dagger pS(r)=e^{-r}p`$. Project $`S(r_n)|0\rangle`$ and $`S(r_n)|1\rangle`$ onto this ladder and normalize separately, with + +```math +r_n=\frac{\log n}{6}+\log\zeta,\qquad \zeta>0\ \text{fixed}. +``` + +Parity makes the two projected states exactly orthogonal. The unprojected coefficients are + +```math +\langle2k|S(r)|0\rangle +=\frac{\sqrt{(2k)!}\,\tanh^k r}{2^k k!\sqrt{\cosh r}}, +\qquad +\langle2k+1|S(r)|1\rangle +=\frac{\sqrt{(2k+1)!}\,\tanh^k r}{2^k k!\cosh^{3/2}r}. +``` + +For their equal mixture, before projection, + +```math +\langle N\rangle=\tfrac12+2\sinh^2r, +\qquad \langle p^2\rangle=e^{-2r}, +\qquad \mathrm{Var}(N)=\tfrac14+5\sinh^2r\cosh^2r. +``` + +At $`r=r_n`$, the excitation is $`O(n^{1/3})`$, with $`r`$th moments $`O(n^{r/3})`$. Discarded polynomially weighted tails are exponentially small in $`n^{2/3}`$. Since $`J_z=j-N`$ exactly and the Holstein–Primakoff remainder in $`J_y=\sqrt{n/2}\,p+R_n`$ has norm $`O(1)`$ on these states, + +```math +b\,\mathrm{Var}(J_y)+c\,\mathrm{Var}(J_z) +=\left(\frac b{2\zeta^2}+\frac{5c\zeta^4}{16}\right)n^{2/3} ++O(n^{1/3}). +``` + +The remainder bound follows from $`\sqrt n-\sqrt{n-k}\le k/\sqrt n`$ and the third excitation moment; it does not assume convergence of the noisy channel. Thus at $`t=s n^{-2/3}`$, + +```math +\liminf_n e_{n/2;b,c}(s n^{-2/3}) +\ge\left[\frac12-2s\left(\frac b{2\zeta^2} ++\frac{5c\zeta^4}{16}\right)\right]_+. +``` + +For $`b=c=\zeta=1`$ this is $`[1/2-13s/8]_+`$. Optimizing $`\zeta^6=4b/(5c)`$ replaces the parenthesis by $`K_*=(3/4)b^{2/3}(5c/4)^{1/3}`$. The direct witness alone proves a positive interval of scaled times and $`\liminf e_{n/2;b,c}(t_n)\ge1/2`$ when $`t_n=o(n^{-2/3})`$. + +### Exact-channel numerical test + +For the normalized projected code, compute + +```math +D_{01}=\langle u_1|\Phi_t(|u_0\rangle\langle u_0|)|u_1\rangle, +\quad D_{10}=\langle u_0|\Phi_t(|u_1\rangle\langle u_1|)|u_0\rangle, +\quad C_{01}=\langle u_0|\Phi_t(|u_0\rangle\langle u_1|)|u_1\rangle. +``` + +An equal-Schmidt partial-transpose witness, with optimized phase, has expectation $`w=(D_{01}+D_{10}-2|C_{01}|)/4`$ and operator norm $`1/2`$. Every separable state has nonnegative expectation, so $`e_{j;b,c}(t)\ge[-w]_+`$ for the actual output. For $`b=c=\zeta=1`$, at $`t=s n^{-2/3}`$: + +| $`n`$ | $`s=0.1`$ | $`s=0.5`$ | $`s=1`$ | $`s=2`$ | +|---:|---:|---:|---:|---:| +| 64 | −0.40266331 | −0.17185328 | −0.04553065 | +0.03655966 | +| 256 | −0.40186085 | −0.17061946 | −0.04535716 | +0.03475758 | +| 512 | −0.40162407 | −0.17022650 | −0.04523346 | +0.03436729 | + +These are floating-point reference-entanglement tests, not interval certificates. A positive entry is a failure of this particular detector, not evidence of EB. The [verification route](../verification/README.md) explains the exact finite-spin tridiagonal algorithm, independent dense-generator controls and residuals. No oscillator evolution approximation is used in this table. + +## 4. Controlled growing-excitation contraction + +The direct witness is deliberately conservative. A controlled contraction transfers the nonlinear sister's finite-time converse to **every** finite scaled time. + +### Exact extension and squeezing + +On the oscillator ladder let $`\Pi_n=1_{N\le n}`$. The exact spin formulas on this subspace are + +```math +J_+=\sqrt{n-N}\,a,\qquad +J_-=a^\dagger\sqrt{n-N},\qquad J_z=n/2-N. +``` + +Extend $`J_y`$ by zero outside $`\Pi_n\mathcal H`$ and keep the full oscillator $`N`$. Let $`S_n=S((\log n)/6)`$. In canonical variables $`Q,P`$, + +```math +S_n^\dagger qS_n=n^{1/6}Q,\qquad +S_n^\dagger pS_n=n^{-1/6}P. +``` + +Set + +```math +A_n=n^{-1/3}S_n^\dagger\Pi_nJ_y\Pi_nS_n, +\qquad +C_n=-n^{-1/3}S_n^\dagger(N+\tfrac12)S_n +=-\tfrac12(Q^2+n^{-2/3}P^2). +``` + +The squeezed spin subspace is invariant under both generators. On it, $`C_n`$ differs from $`n^{-1/3}S_n^\dagger J_zS_n`$ only by a scalar, which disappears from double commutators. The exact rescaled channel is therefore the restriction of $`e^{s\mathcal G_n}`$, where + +```math +\mathcal G_n=-b\,\mathrm{ad}_{A_n}^2-c\,\mathrm{ad}_{C_n}^2. +``` + +### Vector estimates, including the squared generator + +For a fixed Schwartz vector $`\psi`$ and every integer $`r\ge1`$, + +```math +\|N^rS_n\psi\|\le C_{\psi,r}n^{r/3},\qquad +\|1_{N>n/2}S_n\psi\|\le C_{\psi,r}n^{-2r/3}. +``` + +Taylor expansion is controlled on $`N\le n/2`$ and the complementary tail is bounded by arbitrarily high moments. The cancellation in + +```math +J_y=\frac{\{f(N),p\}}{2\sqrt2} ++\frac{[f(N),q]}{2i\sqrt2},\qquad f(N)=\sqrt{n-N}, +``` + +gives, in vector norm on Schwartz vectors, + +```math +A_n\psi=\frac P{\sqrt2}\psi +-\frac{n^{-2/3}}{8\sqrt2}\{Q^2,P\}\psi+O_\psi(n^{-1}). +``` + +This leading remainder cannot simply be multiplied by the growing full operator norm. To justify squaring, retain + +```math +f_{n,2}(N)=\sqrt n\left(1-\frac N{2n}-\frac{N^2}{8n^2}\right) +``` + +and let $`B_n`$ be its squeezed, rescaled polynomial in place of $`A_n`$. On $`N\le n/2`$, the unsqueezed remainder is bounded by $`C n^{-5/2}N^3`$. Including the adjacent ladder operator and the $`n^{-1/3}`$ prefactor yields + +```math +\|(A_n-B_n)\psi\| +\le Cn^{-17/6}\|(N+1)^{7/2}S_n\psi\| ++\text{complementary tails} +\le C_\psi n^{-5/3}. +``` + +The tails have any required inverse-power order. After cancellation, $`B_n`$ is a fixed-degree polynomial in $`Q,P`$ with uniformly bounded coefficients; every coefficient of $`B_n-P/\sqrt2`$ is $`O(n^{-2/3})`$. Thus its action preserves uniformly bounded Schwartz seminorms on each fixed vector. With $`A=P/\sqrt2`$ and $`\|A_n\|\le n^{2/3}/2`$, + +```math +A_n^2-A^2=A_n(A_n-B_n)+(A_n-B_n)B_n+(B_n^2-A^2). +``` + +The three terms on a fixed Schwartz vector are respectively $`O(n^{-1})`$, $`O(n^{-5/3})`$ and $`O(n^{-2/3})`$. Hence + +```math +\|(A_n^2-P^2/2)\psi\|\le C_\psi n^{-2/3}. +``` + +The exact expression for $`C_n`$ supplies the analogous estimates for $`C_n-C`$ and $`C_n^2-C^2`$, with $`C=-Q^2/2`$. Constants in these statements are bounded by finitely many Schwartz seminorms, not by an energy-independent operator norm. + +### From generators to actual outputs + +For $`\rho=|\psi\rangle\langle\phi|`$, + +```math +\mathrm{ad}_A^2(\rho) +=|A^2\psi\rangle\langle\phi| ++|\psi\rangle\langle A^2\phi| +-2|A\psi\rangle\langle A\phi|. +``` + +The rank-one trace norm and the estimates above bound $`\|(\mathcal G_n-\mathcal G)\rho\|_1`$ by $`n^{-2/3}`$ times finitely many Schwartz seminorms. Finite matrix-valued sums cover each fixed finite reference. + +The limiting random-unitary propagator consists of a quadratic shear and Weyl displacements. Its affine metaplectic coefficients have finite polynomial moments uniformly on bounded time intervals, by the conditional Brownian representation. It preserves Schwartz vectors pathwise, with integrable bounds on the required seminorms. For each $`n`$, the extended evolution is also well-defined: $`A_n`$ is bounded, and interaction with the quadratic self-adjoint $`C_n`$ gives a bounded stochastic perturbation. On these smooth trace-class inputs, variation of constants is valid: + +```math +(e^{s\mathcal G_n}-e^{s\mathcal G})\rho +=\int_0^s e^{(s-u)\mathcal G_n} +(\mathcal G_n-\mathcal G)e^{u\mathcal G}\rho\,du. +``` + +CPTP trace-norm contraction and the integrable seminorm bounds prove the claimed $`O(n^{-2/3})`$ output estimate for fixed inputs and $`s\le T`$. Formal generator convergence alone is not used as a substitute for this step. + +To obtain exact physical encodings, restrict $`\Pi_nS_n`$ to a fixed finite Schwartz span $`E`$. Its Gram matrix is $`I_E+O(n^{-K})`$ for every fixed $`K`$. Polar normalization gives an exact isometry $`V_n:E\to\mathcal H_j`$ differing by the same tail order. There is no postselection or loss of normalization. Mean excitation is $`O(n^{1/3})`$; mass above $`n^{1/3+\epsilon}`$ is smaller than any fixed inverse power for every $`\epsilon>0`$. This tail statement does not say that a hard growing cutoff is invariant under the channel. + +## 5. All finite scaled times retain a reference witness + +The nonlinear sister's [exact-threshold proof](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/exact_threshold.md), Sections 3–5, provides Gaussian packets and a qubit reference with a strictly negative partial-transpose expectation at each finite time when $`\eta=0`$. The packets are Schwartz, although their sufficient preparation parameters depend on time. + +For fixed $`s,b,c`$, select those finite parameters once. Encode the fixed span containing both input packets and both test packets by $`V_n`$. The controlled output estimate preserves the strict negative witness margin for all sufficiently large $`n`$. The witness operator has a finite operator norm, so its negative expectation bounds the half trace distance from every separable output, and hence the half-diamond distance from every EB channel. This proves the all-finite-$`s`$ lower bound in Section 1. Its positive constant can be very small and is not a practical-memory guarantee. + +If $`n^{2/3}t_n`$ had a bounded subsequence, it would be at most some finite $`S>0`$ there. Semigroup postprocessing makes the distance nonincreasing, so + +```math +e_{n/2;b,c}(t_n)\ge e_{n/2;b,c}(S n^{-2/3}). +``` + +The right side has positive liminf. This proves the necessary divergence condition, rather than extrapolating a local noise determinant into a global threshold. + +## 6. A separate global EB approximation for equal rates + +Let $`\mathcal B_j`$ be the [coherent-state measurement-and-preparation channel](classicalization.md#1-an-established-measurement-channel), with exact random-rotation kernel $`k_n`$ from Aschieri–Ruba–Solovej, Lemma 13. If $`p_t`$ is the physical rank-two heat law on SO(3), then + +```math +\Psi_{j,t}=\Phi^{(j)}_{b,b,t}\circ\mathcal B_j +``` + +is an actual EB channel on the entire spin carrier. The random-unitary transference bound gives + +```math +\tfrac12\|\Phi^{(j)}_{b,b,t}-\Psi_{j,t}\|_\diamond +\le\mathrm{TV}(p_t,p_t*k_n). +``` + +This is uniform over input energy, encodings and reference dimension. + +### Heat-kernel translation estimate + +[Baudoin–Bonnefont, Theorem 4.3 and Remark 4.4](https://arxiv.org/abs/0802.3320v2) use $`L=X^2+Y^2`$ and $`[X,Y]=2Z`$. Write $`u`$ for their time and $`p_u^{\mathrm{BB}}`$ for the normalized SU(2) heat kernel. With their parameter $`\alpha=3`$, integrating the gradient estimate against $`p_u^{\mathrm{BB}}`$ removes the $`Lp/p`$ term and gives + +```math +\int\Gamma(\log p_u^{\mathrm{BB}})p_u^{\mathrm{BB}} ++\frac u3\int(Z\log p_u^{\mathrm{BB}})^2p_u^{\mathrm{BB}} +\le\frac u3-4+\frac{64}u\le\frac{64}u, +\qquad 0") + parsed = urlsplit(target) + if parsed.scheme: + if counterpart_root is not None: + prefix = f"https://github.com/GoGoKo699/{counterpart}/blob/" + if target.startswith(prefix): + rest = parsed.path.split("/blob/", 1)[1] + _, separator, path = rest.partition("/") + if separator: + resolved = counterpart_root / unquote(path) + external_sister_files.append({"source": str(source.relative_to(root)), + "target": target, "local_counterpart": path}) + if not resolved.is_file(): + missing.append({"source": str(source.relative_to(root)), "target": target}) + continue + if not parsed.path: + continue + destination = (source.parent / unquote(parsed.path)).resolve() + record = {"source": str(source.relative_to(root)), "target": target} + checked.append(record) + if not destination.exists(): + missing.append(record) + milestones = (root / "learning" / "MILESTONES.md").read_text() + ids = re.findall(r"^#{2,4}\s+(M\d{2})\b", milestones, flags=re.MULTILINE) + counts = Counter(ids) + expected = {f"M{i:02d}" for i in range(1, 31)} + assert set(counts) == expected and all(n == 1 for n in counts.values()), counts + readme = (root / "README.md").read_text() + assert f"https://github.com/GoGoKo699/{counterpart}" in readme, "Missing README sister link" + assert not missing, json.dumps(missing, indent=2) + return {"repository": name, "local_link_count": len(checked), "missing_local_links": missing, + "milestone_ids": ids, "milestone_count": len(ids), + "readme_sister_link_present": True, "counterpart_file_links_checked": external_sister_files} + + +def run_checks(sister_root=None): + sister_root = Path(sister_root).resolve() if sister_root is not None else None + if sister_root is not None: + assert sister_root.is_dir(), "The supplied sister checkout is unavailable" + reports = [inspect_repository(ROOT, REPOSITORY, SISTER, sister_root)] + if sister_root is not None: + reports.append(inspect_repository(sister_root, SISTER, REPOSITORY, ROOT)) + # Both educational routes identify the exact selected book edition. + for root in (ROOT, sister_root): + anchor_files = list((root / "learning").glob("*.md")) + assert any("9783110642490" in path.read_text() for path in anchor_files), "Missing common-anchor DOI" + return {"scope": "File targets, exact M01–M30 IDs and README reciprocity; no scientific or hosted-rendering verdict", + "all_assertions_passed": True, "reciprocal_checkout_checked": sister_root is not None, + "reports": reports} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--sister-root", type=Path, help="Optional checkout to verify reciprocal links and milestones") + parser.add_argument("--output", type=Path, default=Path(__file__).parent / "results" / "navigation.json") + args = parser.parse_args() + args.output.parent.mkdir(parents=True, exist_ok=True) + # The authored documentation links this report. Mark an in-progress report + # before checking targets, and never retain a stale success after failure. + args.output.write_text(json.dumps({"status": "running", "all_assertions_passed": False}) + "\n") + try: + report = run_checks(args.sister_root) + except Exception as error: + args.output.write_text(json.dumps({"status": "failed", "all_assertions_passed": False, + "error": str(error)}, indent=2) + "\n") + raise + report["status"] = "passed" + args.output.write_text(json.dumps(report, indent=2, allow_nan=False) + "\n") + print(f"Navigation checks passed; report: {args.output}") + + +if __name__ == "__main__": + main() diff --git a/verification/check_rank_two.py b/verification/check_rank_two.py new file mode 100644 index 0000000..5cf5a01 --- /dev/null +++ b/verification/check_rank_two.py @@ -0,0 +1,227 @@ +"""Exact finite-spin reference witnesses and local generator checks. + +These bounded checks do not compute an optimized diamond distance or a global +entanglement-breaking approximation. See science/rank_two_diffusion.md. +""" +from __future__ import annotations + +import argparse +import json +from pathlib import Path + +import numpy as np +from scipy.linalg import eigh, eigh_tridiagonal, expm +from scipy.sparse import diags +from scipy.special import gammaln + + +def spin_operators(n): + """Jz basis |j,j-a>, j=n/2; [Jx,Jy]=iJz.""" + d = n + 1 + jp = np.diag(np.sqrt(np.arange(1, d) * np.arange(n, 0, -1)), 1) + return (jp + jp.T) / 2, (jp - jp.T) / (2j), np.diag(n / 2 - np.arange(d)) + + +def channel_blocks(n, t, rhos): + """Exact -ad_Jx^2-ad_Jy^2 evolution by conserved coherence order. + + This is the original finite-spin generator, not an oscillator evolution. + """ + d = n + 1 + j = n / 2 + outputs = [np.zeros((d, d), dtype=complex) for _ in rhos] + for delta in range(-n, n + 1): + a = np.arange(max(0, delta), min(d, d + delta)) + b = a - delta + diagonal = -2 * j * (j + 1) + (j - a) ** 2 + (j - b) ** 2 + aa, bb = a[:-1], b[:-1] + off = np.sqrt((n - aa) * (aa + 1) * (n - bb) * (bb + 1)) + values, vectors = eigh_tridiagonal(diagonal, off) + assert values[-1] < 2e-10, "Diffusion generator acquired a positive eigenvalue" + inputs = np.stack([rho[a, b] for rho in rhos], axis=1) + evolved = vectors @ (np.exp(t * values)[:, None] * (vectors.T @ inputs)) + for output, column in zip(outputs, evolved.T): + output[a, b] = column + return outputs + + +def squeezed_code(n): + """Normalized finite-ladder projections of S(r)|0>, S(r)|1>.""" + d = n + 1 + r = np.log(n) / 6 + inputs = np.zeros((d, 2)) + for a in range(d): + k = a // 2 + if a % 2 == 0: + logarithm = (0.5 * gammaln(2 * k + 1) - k * np.log(2) + - gammaln(k + 1) + k * np.log(np.tanh(r)) + - 0.5 * np.log(np.cosh(r))) + inputs[a, 0] = np.exp(logarithm) + else: + logarithm = (0.5 * gammaln(2 * k + 2) - k * np.log(2) + - gammaln(k + 1) + k * np.log(np.tanh(r)) + - 1.5 * np.log(np.cosh(r))) + inputs[a, 1] = np.exp(logarithm) + retained = np.sum(inputs ** 2, axis=0) + inputs /= np.sqrt(retained) + assert np.linalg.norm(inputs.T @ inputs - np.eye(2)) < 1e-12 + return inputs, retained + + +def witness_case(n, s): + """Noisy y,z axes with a z-pole code, evaluated after an exact rotation.""" + local, retained = squeezed_code(n) + _, jy, jz = spin_operators(n) + eigenvalues, vectors = eigh(jy) + rotation = (vectors * np.exp(-1j * np.pi * eigenvalues / 2)) @ vectors.conj().T + code = rotation @ local + rhos = [np.outer(code[:, 0], code[:, 0].conj()), + np.outer(code[:, 1], code[:, 1].conj()), + np.outer(code[:, 0], code[:, 1].conj())] + t = s * n ** (-2 / 3) + outputs = channel_blocks(n, t, rhos) + + def element(rho, a, b): + return np.vdot(code[:, a], rho @ code[:, b]) + + d01 = element(outputs[0], 1, 1).real + d10 = element(outputs[1], 0, 0).real + coherence = element(outputs[2], 0, 1) + block = np.array([[d01, coherence.conjugate()], [coherence, d10]]) / 2 + expectation = (d01 + d10 - 2 * abs(coherence)) / 4 + fidelity = (element(outputs[0], 0, 0).real + + element(outputs[1], 1, 1).real + 2 * coherence.real) / 4 + marginal = local @ local.T / 2 + + def variance(operator): + mean = np.trace(marginal @ operator).real + return np.trace(marginal @ operator @ operator).real - mean ** 2 + + variance_sum = variance(jy) + variance(jz) + fidelity_tangent = 1 - 2 * t * variance_sum + trace_error = max(abs(np.trace(x) - 1) for x in outputs[:2]) + hermiticity = max(np.linalg.norm(x - x.conj().T) for x in outputs[:2]) + output_min = min(np.linalg.eigvalsh(x)[0] for x in outputs[:2]) + assert trace_error < 2e-10 and hermiticity < 2e-10 + assert output_min > -2e-10 + assert abs(d01 - d10) < 2e-10 + assert fidelity + 2e-10 >= fidelity_tangent + assert abs(np.linalg.eigvalsh(block)[0] - expectation) < 2e-10 + if s <= 1: + assert expectation < -0.035, "Registered finite-spin witness lost its NPT margin" + excitation = np.sum(np.arange(n + 1)[:, None] * abs(local) ** 2, axis=0) + return { + "n": n, "scaled_time_s": s, "time_t": t, + "pt_block_min": float(np.linalg.eigvalsh(block)[0]), + "witness_expectation": float(expectation), + "distance_lower_from_witness": float(max(0, -expectation)), + "entanglement_fidelity": float(fidelity), + "fidelity_tangent_lower": float(fidelity_tangent), + "distance_lower_from_tangent": float(max(0, fidelity_tangent - 0.5)), + "variance_sum": float(variance_sum), + "variance_sum_over_n_two_thirds": float(variance_sum / n ** (2 / 3)), + "predicted_variance_limit": 13 / 16, + "mean_excitation": [float(x) for x in excitation], + "retained_probability_before_normalization": [float(x) for x in retained], + "tail_at_excitation_n_over_2": [float(x) for x in np.sum(abs(local[n // 2:]) ** 2, axis=0)], + "trace_error": float(trace_error), "hermiticity_error": float(hermiticity), + "population_output_min_eigenvalue": float(output_min), + } + + +def independent_generator_controls(): + """Compare block evolution with an independent full Kronecker generator.""" + rows = [] + for n in (1, 2, 3, 4, 7): + d = n + 1 + jx, jy, _ = spin_operators(n) + generator = np.zeros((d * d, d * d), dtype=complex) + for operator in (jx, jy): + commutator = np.kron(np.eye(d), operator) - np.kron(operator.T, np.eye(d)) + generator -= commutator @ commutator + random = np.random.default_rng(193 + n) + vector = random.normal(size=d) + 1j * random.normal(size=d) + vector /= np.linalg.norm(vector) + rho = np.outer(vector, vector.conj()) + for t in (0, 0.03, 0.7): + direct = (expm(t * generator) @ rho.reshape(-1, order="F")).reshape((d, d), order="F") + blocks = channel_blocks(n, t, [rho])[0] + error = np.linalg.norm(direct - blocks) + trace_error = abs(np.trace(blocks) - 1) + minimum = np.linalg.eigvalsh(blocks)[0] + assert error < 1e-12 and trace_error < 1e-12 and minimum > -1e-12 + rows.append({"n": n, "t": t, "full_generator_error": float(error), + "trace_error": float(trace_error), "output_min_eigenvalue": float(minimum)}) + for n in (16, 32): + initial = witness_case(n, 0) + assert abs(initial["pt_block_min"] + 0.5) < 1e-12 + assert abs(initial["entanglement_fidelity"] - 1) < 1e-12 + return rows + + +def growing_excitation_checks(): + """Exact Jy and Jy^2 versus their limiting vectors on a squeezed vacuum.""" + rows = [] + for n in (64, 128, 256, 512, 1024, 2048, 4096): + dim = n + 5 + r = np.log(n) / 6 + ch, sh = np.cosh(r), np.sinh(r) + k = np.arange((dim + 1) // 2) + even = np.exp(0.5 * gammaln(2 * k + 1) - k * np.log(2) - gammaln(k + 1) + + k * np.log(np.tanh(r)) - 0.5 * np.log(ch)) + v0 = np.zeros(dim) + v0[2 * k] = even + a = diags(np.sqrt(np.arange(1, dim)), 1, shape=(dim, dim), format="csr") + v1 = (ch * a.T - sh * a) @ v0 + v2 = (ch * a.T - sh * a) @ v1 / np.sqrt(2) + kk = np.arange(1, n + 1) + jp = diags(np.r_[np.sqrt(kk * (n - kk + 1)), np.zeros(dim - n - 1)], + 1, shape=(dim, dim), format="csr") + jy = (jp - jp.T) / (2j) + scaled = jy * n ** (-1 / 3) + first_error = np.linalg.norm(scaled @ v0 - 1j * v1 / 2) + second_error = np.linalg.norm(scaled @ (scaled @ v0) - (v0 - np.sqrt(2) * v2) / 4) + mean_number = np.sum(np.arange(dim) * v0 ** 2) + scaled_first = first_error * n ** (2 / 3) + scaled_second = second_error * n ** (2 / 3) + # Registered finite-case envelopes, not universal error constants. + assert abs(np.linalg.norm(v0) - 1) < 1e-11 + assert scaled_first < 0.18 and scaled_second < 0.35 + assert mean_number < 0.3 * n ** (1 / 3) + rows.append({"n": n, "error_A": float(first_error), "error_A_squared": float(second_error), + "n_two_thirds_times_error_A": float(scaled_first), + "n_two_thirds_times_error_A_squared": float(scaled_second), + "mean_excitation": float(mean_number), + "tail_above_spin_ladder": float(np.sum(v0[n + 1:] ** 2))}) + return rows + + +def run_checks(full=False): + sizes = (16, 32, 64, 128, 256, 512) if full else (16, 32, 64, 128) + controls = independent_generator_controls() + witnesses = [witness_case(n, s) for n in sizes for s in (0.1, 0.5, 1.0, 2.0)] + vectors = growing_excitation_checks() + return { + "model": "j=n/2; generator -ad_Jy^2-ad_Jz^2; t=s*n^(-2/3)", + "code": "Normalized finite-ladder S(log(n)/6)|0>, S(log(n)/6)|1>; qubit reference", + "scope": "Exact finite-spin witness and local generator/vector checks; no global EB upper or optimized diamond norm", + "all_assertions_passed": True, "full_witness_grid": bool(full), + "independent_generator_controls": controls, + "max_full_generator_error": max(x["full_generator_error"] for x in controls), + "finite_spin_witnesses": witnesses, "growing_excitation_generator_checks": vectors, + } + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--output", type=Path, default=Path(__file__).parent / "results" / "rank_two.json") + parser.add_argument("--full", action="store_true", help="Also evaluate finite witnesses at n=256,512") + args = parser.parse_args() + report = run_checks(full=args.full) + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(report, indent=2, allow_nan=False) + "\n") + print(f"Rank-two checks passed; report: {args.output}") + + +if __name__ == "__main__": + main() diff --git a/verification/hosted_tools/README.md b/verification/hosted_tools/README.md new file mode 100644 index 0000000..d48409d --- /dev/null +++ b/verification/hosted_tools/README.md @@ -0,0 +1,5 @@ +# Hosted mathematical comparison + +These two unchanged verification helpers are copied from Guinevere commit `1bf4ed4c9fec085f1f23437981637d8a66abbd86`, `plugins/merlin-arthur-research/skills/merlin-arthur-research/scripts/`. They compare the exact source expressions with MathML on commit-pinned GitHub pages at widths 1440 and 760. The report does not replace scientific review or visual inspection of screenshots. + +Install Playwright 1.56.1 and mathjax-full 3.2.1 outside the source checkout, then run `capture_hosted_math.cjs --root REPOSITORY_ROOT --repository OWNER/NAME --revision FULL_COMMIT_SHA --output NEW_EMPTY_DIRECTORY`. The default scope is every Markdown page tracked at the pinned commit. Outputs are reproducible diagnostics; screenshots require separate inspection. diff --git a/verification/hosted_tools/capture_hosted_math.cjs b/verification/hosted_tools/capture_hosted_math.cjs new file mode 100644 index 0000000..bd075f4 --- /dev/null +++ b/verification/hosted_tools/capture_hosted_math.cjs @@ -0,0 +1,274 @@ +#!/usr/bin/env node +'use strict'; +// Read-only collector for the real GitHub host. See ../references/hosted-rendering.md. +// Importing this module has no network effects; dependencies load only in run(). +const fs = require('node:fs'); +const path = require('node:path'); +const cp = require('node:child_process'); +const crypto = require('node:crypto'); +const VIEWPORTS = [{width:1440,height:1000}, {width:760,height:1000}]; +const sha256 = bytes => crypto.createHash('sha256').update(bytes).digest('hex'); + +function argumentsFor(argv) { + const args = {pages:[], python:'python3'}; + for (let i=0; i['.','..'].includes(p))) throw new Error('Use exact owner/name'); + if (!/^[a-f0-9]{40}$/.test(args.revision)) throw new Error('Use a full lowercase commit SHA'); + if (new Set(args.pages).size!==args.pages.length || args.pages.some(p=>!safePath(p))) throw new Error('Use unique safe page paths'); + return args; +} +function safePath(p) { + return typeof p==='string' && p.length>0 && !p.includes('\\') && !p.includes('\0') && + !p.startsWith('/') && p.split('/').every(x=>x && x!=='.' && x!=='..'); +} +function git(root, argv) { + return cp.execFileSync('git',['--no-replace-objects',...argv],{cwd:root,encoding:'utf8',maxBuffer:32*1024*1024}); +} +function pinnedPages(args) { + const commit=git(args.root,['rev-parse',args.revision+'^{commit}']).trim(); + if (commit!==args.revision) throw new Error('Revision does not identify the supplied commit'); + const files=git(args.root,['ls-tree','-r','--name-only','-z',commit]).split('\0').filter(Boolean); + const pages=args.pages.length?args.pages:files.filter(p=>/\.(md|markdown|mdown|mkdn|mkd)$/i.test(p)); + if (!pages.length || pages.some(p=>!safePath(p) || !files.includes(p))) throw new Error('No pages or a page is absent from the pinned tree'); + // Git symlinks are not rendered Markdown source and must not be followed. + for (const p of pages) { + const item=git(args.root,['ls-tree',commit,'--',p]); + if (!/^100644 blob |^100755 blob /.test(item)) throw new Error('Page must be a regular tracked file: '+p); + } + return {pages,tree:git(args.root,['rev-parse',commit+'^{tree}']).trim()}; +} +function mathCompiler() { + const {mathjax}=require('mathjax-full/js/mathjax.js'); + const {TeX}=require('mathjax-full/js/input/tex.js'); + const {SVG}=require('mathjax-full/js/output/svg.js'); + const {liteAdaptor}=require('mathjax-full/js/adaptors/liteAdaptor.js'); + const {RegisterHTMLHandler}=require('mathjax-full/js/handlers/html.js'); + const {AllPackages}=require('mathjax-full/js/input/tex/AllPackages.js'); + const {SerializedMmlVisitor}=require('mathjax-full/js/core/MmlTree/SerializedMmlVisitor.js'); + const {STATE}=require('mathjax-full/js/core/MathItem.js'); + RegisterHTMLHandler(liteAdaptor()); + const doc=mathjax.document('',{InputJax:new TeX({packages:AllPackages,tags:'none'}),OutputJax:new SVG({fontCache:'none'})}); + const visitor=new SerializedMmlVisitor(); + return (tex,display)=>visitor.visitTree(doc.convert(tex,{display,end:STATE.CONVERT})); +} + +// Self-contained function executed inside the hosted page, also exercised by the +// local-browser regression fixture. It never injects styling or renders TeX there. +function inspectArticle(root, expected) { + function canonical(e, inherited='') { + const tag=e.localName; + if (['annotation','annotation-xml','mspace'].includes(tag)) return []; + const variant=e.getAttribute('mathvariant') || inherited; + if (['mi','mo','mn','mtext','ms'].includes(tag)) { + const text=e.textContent.trim(); + return text?[[tag,text,variant]]:[]; + } + // Preserve each structural child slot: flattening numerator and denominator + // together would confuse (a+b)/c with a/(b+c), and similarly for scripts. + const children=[...e.children].filter(c=>!['annotation','annotation-xml','mspace'].includes(c.localName)) + .map(c=>canonical(c,variant)); + if (['math','mrow','mstyle','semantics'].includes(tag)) return children.flat(); + const semantic={}; + for (const name of ['notation','accent','accentunder','linethickness','bevelled','open','close','separators']) if(e.hasAttribute(name)) semantic[name]=e.getAttribute(name); + // A table cell is an inferred row (a sequence), not a fixed-arity operator. + // GitHub inserts empty mrow alignment nodes; ignore those inside the cell + // while preserving the cell and row themselves, including empty cells. + return [[tag,semantic,tag==='mtd'?children.flat():children]]; + } + function plain(math) { + const copy=math.cloneNode(true); + for (const e of copy.querySelectorAll('annotation,annotation-xml')) e.remove(); + return copy.textContent; + } + function geometry(math, host) { + const boxes=[...math.querySelectorAll('mi,mo,mn,mtext,ms')].map(e=>e.getBoundingClientRect()).filter(b=>b.width && b.height); + if (!boxes.length) return {measurable:false}; + const left=Math.min(...boxes.map(b=>b.left)),right=Math.max(...boxes.map(b=>b.right)); + const top=Math.min(...boxes.map(b=>b.top)),bottom=Math.max(...boxes.map(b=>b.bottom)); + const width=right-left,height=bottom-top; + return {measurable:true,width,height,available_width:root.clientWidth, + overflow:width>root.clientWidth+4,collapsed:height>Math.max(200,3*width),host_width:host.getBoundingClientRect().width}; + } + let hosts=[...root.querySelectorAll('math-renderer')]; + // Some host versions expose native MathML without a custom-element wrapper. + if (!hosts.length) hosts=[...root.querySelectorAll('math')].filter(e=>!e.parentElement?.closest('math,annotation,annotation-xml')); + const pageErrors=[...root.querySelectorAll('merror,[data-mjx-error],.katex-error,math-renderer .flash-error')] + .map(e=>e.textContent.trim() || 'empty renderer error'); + const math=hosts.map((host,i)=>{ + const nodes=host.localName==='math'?[host]:[...host.querySelectorAll('math')].filter(e=>!e.parentElement?.closest('math,annotation,annotation-xml')); + const errors=[]; + if(nodes.length!==1) errors.push('Expected one accessible MathML representation; found '+nodes.length); + const actual=nodes[0],want=expected[i]; + let expectedSignature=null,actualSignature=null; + if(actual) actualSignature=JSON.stringify(canonical(actual)); + if(want) { + const parsed=new DOMParser().parseFromString(want.mml,'application/xml'); + if(parsed.querySelector('parsererror,merror')) errors.push('Source compiler returned invalid/error MathML'); + else expectedSignature=JSON.stringify(canonical(parsed.documentElement)); + } + if(!want) errors.push('Unexpected extra hosted expression'); + const match=!!actual && !!expectedSignature && expectedSignature===actualSignature; + if(!match) errors.push('Source-to-host MathML structure mismatch'); + const measure=actual?geometry(actual,host):{measurable:false}; + if(want && ['math-fence','dollar-display'].includes(want.kind) && (!measure.measurable || measure.overflow || measure.collapsed)) + errors.push('Display geometry is unmeasurable, overflowing or collapsed'); + return {rendered:!!actual,errors,text_source:'mathml',text:actual?plain(actual):'', + source_sha256:want?.source_sha256,structural_match:match, + expected_signature:expectedSignature,actual_signature:actualSignature,geometry:measure}; + }); + return {errors:pageErrors,math}; +} + +function classifyFailure(error) { + const message=String(error); + if (/ERR_BLOCKED_BY_ADMINISTRATOR|blocked by.*policy|URLBlocklist|policy denied/i.test(message)) return 'policy_denied'; + if (/HTTP (401|403)|redirected away|sign.in|authentication/i.test(message)) return 'access_required'; + if (/Cannot find module|Executable doesn't exist|browser executable/i.test(message)) return 'capability_unavailable'; + if (/ERR_NAME_NOT_RESOLVED|ENOTFOUND|ERR_CONNECTION|ERR_EMPTY_RESPONSE|ERR_INTERNET_DISCONNECTED|ECONNRESET|Timeout|timed out/i.test(message)) return 'transport_failure'; + return 'verification_failure'; +} +function writeJSON(filename, value) {fs.writeFileSync(filename,JSON.stringify(value,null,2)+'\n');} +function artifact(directory, relative, kind) { + const bytes=fs.readFileSync(path.join(directory,relative)); + return {path:relative,sha256:sha256(bytes),size_bytes:bytes.length,kind}; +} +function boundReport(inventory, tree, viewports, artifacts, failures, at) { + const boundaries=inventory.pages.map(p=>{ + const counts=viewports.map(v=>v.boundaries?.find(b=>b.path===p.path)?.captured_hosts); + return {path:p.path,url:p.url,revision:inventory.revision,source_sha256:p.source_sha256, + source_expressions:p.expressions.length, + captured_hosts:counts.length===VIEWPORTS.length && counts.every(n=>Number.isInteger(n) && n===counts[0])?counts[0]:null}; + }); + const wanted=inventory.pages.reduce((n,p)=>n+p.expressions.length,0); + failures=[...failures]; + if(JSON.stringify(viewports.map(v=>({width:v.width,height:v.height})))!==JSON.stringify(VIEWPORTS)) + failures.push('Missing, duplicate or unexpected viewport coverage'); + for(const viewport of viewports) { + if(JSON.stringify((viewport.boundaries||[]).map(b=>b.path))!==JSON.stringify(inventory.pages.map(p=>p.path))) + failures.push(viewport.width+': page coverage differs from inventory'); + for(const source of inventory.pages) { + const boundary=viewport.boundaries?.find(b=>b.path===source.path); + if(!boundary || boundary.source_sha256!==source.source_sha256 || boundary.revision!==inventory.revision || + boundary.url!==source.url || boundary.source_expressions!==source.expressions.length || boundary.captured_hosts!==source.expressions.length) + failures.push(viewport.width+': incomplete source/host coverage for '+source.path); + } + } + const structural=viewports.length===VIEWPORTS.length && viewports.every(v=>v.structural_matches===wanted); + const pass=!failures.length && structural && viewports.length===VIEWPORTS.length && viewports.every(v=>v.status==='pass'); + return {schema_version:1,kind:'hosted_math',repository:inventory.repository,revision:inventory.revision,tree, + renderer_profile:'github',captured_at:at,capture_method:'playwright-github',status:pass?'pass':'fail', + required_pages:inventory.pages.map(p=>p.path),boundaries,viewports,artifacts,failures, + structural_comparison:{status:structural?'pass':'fail',expressions_checked:structural?wanted:0}, + visual_review_required:true, + limits:'Observed GitHub MathML structure, counts, labels, relations and bounded geometry only. No independent scientific proof, exhaustive pixel review, host authenticity certificate or cross-browser guarantee.'}; +} + +async function run(args) { + const output=path.resolve(args.output); + if(fs.existsSync(output) && fs.readdirSync(output).length) throw new Error('Use an empty output directory; preserve earlier failed evidence'); + fs.mkdirSync(output,{recursive:true}); + const pinned=pinnedPages(args); + const helper=path.join(__dirname,'check_rendered_math.py'); + cp.execFileSync(args.python,[helper,'inventory','--root',args.root,'--repository',args.repository, + '--revision',args.revision,...pinned.pages.flatMap(p=>['--page',p]),'--output',path.join(output,'math-source.json')],{stdio:'pipe'}); + const inventory=JSON.parse(fs.readFileSync(path.join(output,'math-source.json'),'utf8')); + const at=new Date().toISOString(),failures=[],artifacts=[artifact(output,'math-source.json','source_inventory')],viewports=[]; + let browser; + const runtime={node:process.version}; + if(args.contract) { + fs.copyFileSync(path.resolve(args.contract),path.join(output,'math-contract.json')); + artifacts.push(artifact(output,'math-contract.json','text_contract')); + } + try { + const {chromium}=require('playwright'); + runtime.playwright=require('playwright/package.json').version; + runtime.mathjax=require('mathjax-full/package.json').version; + const compile=mathCompiler(); + const expected=Object.fromEntries(inventory.pages.map(p=>[p.path,p.expressions.map(e=>({...e, + mml:compile(e.tex,['math-fence','dollar-display'].includes(e.kind))}))])); + writeJSON(path.join(output,'expected-mathml.json'),expected); + artifacts.push(artifact(output,'expected-mathml.json','expected_mathml')); + browser=await chromium.launch({headless:true}); + runtime.browser=browser.version(); + for(const viewport of VIEWPORTS) { + const context=await browser.newContext({viewport,deviceScaleFactor:1,colorScheme:'light'}); + const capture={schema_version:1,repository:args.repository,revision:args.revision,renderer_profile:'github', + captured_at:at,capture_method:'playwright-github',pages:[]}; + let fatal=false; + try { + for(let index=0;index{ + for(let y=0,steps=0;ysetTimeout(r,50)); + } + window.scrollTo(0,0); + }); + await page.waitForTimeout(1000); + Object.assign(item,await article.evaluate(inspectArticle,expected[source.path])); + const html=prefix+'.html',png=prefix+'.png'; + fs.writeFileSync(path.join(output,html),await page.content()); + await page.screenshot({path:path.join(output,png),fullPage:true,timeout:30000}); + artifacts.push(artifact(output,html,'hosted_html'),artifact(output,png,'screenshot')); + item.artifacts={html,screenshot:png}; + } catch(error) { + item.errors.push(String(error)); + const category=classifyFailure(error); + failures.push(source.path+' at '+viewport.width+': '+category+': '+String(error)); + // Do not seek another route after an access or policy block. + fatal=['policy_denied','access_required','transport_failure'].includes(category); + } finally {capture.pages.push(item);await page.close();} + if(fatal) break; + } + } finally {await context.close();} + const captureFile='math-capture-'+viewport.width+'.json',resultFile='math-result-'+viewport.width+'.json'; + writeJSON(path.join(output,captureFile),capture);artifacts.push(artifact(output,captureFile,'hosted_capture')); + const command=[helper,'check','--inventory',path.join(output,'math-source.json'),'--capture',path.join(output,captureFile), + '--output',path.join(output,resultFile)]; + if(args.contract) command.push('--contract',path.resolve(args.contract)); + const check=cp.spawnSync(args.python,command,{encoding:'utf8'}); + if(check.error || !fs.existsSync(path.join(output,resultFile))) throw new Error('Math checker did not produce a result: '+(check.error||check.stderr)); + const result=JSON.parse(fs.readFileSync(path.join(output,resultFile),'utf8')); + artifacts.push(artifact(output,resultFile,'math_result')); + failures.push(...result.failures.map(f=>viewport.width+': '+f)); + const matches=capture.pages.reduce((n,p)=>n+p.math.filter(m=>m.structural_match && !m.errors.length).length,0); + viewports.push({...viewport,status:result.status,structural_matches:matches,capture_path:captureFile,result_path:resultFile,boundaries:result.boundaries}); + if(fatal) break; + } + } catch(error) {failures.push(classifyFailure(error)+': '+String(error));} + finally {if(browser) await browser.close();} + const report={...boundReport(inventory,pinned.tree,viewports,artifacts,failures,at),runtime}; + writeJSON(path.join(output,'hosted-report.json'),report); + console.log(JSON.stringify({status:report.status,report:path.join(output,'hosted-report.json'),sha256:sha256(fs.readFileSync(path.join(output,'hosted-report.json'))),pages:report.required_pages.length,failures:report.failures.length})); + return report.status==='pass'?0:1; +} +module.exports={argumentsFor,safePath,pinnedPages,mathCompiler,inspectArticle,classifyFailure,artifact,boundReport,VIEWPORTS,run}; +if(require.main===module) { + (async()=>{ + const args=argumentsFor(process.argv.slice(2)); + if(args.help) {console.log('capture_hosted_math.cjs --root REPO --repository owner/name --revision FULLSHA --output EMPTY_DIR [--page PATH ...] [--contract JSON] [--python python3]');return;} + process.exitCode=await run(args); + })().catch(error=>{console.error(String(error));process.exitCode=2;}); +} diff --git a/verification/hosted_tools/check_rendered_math.py b/verification/hosted_tools/check_rendered_math.py new file mode 100644 index 0000000..1d3bf98 --- /dev/null +++ b/verification/hosted_tools/check_rendered_math.py @@ -0,0 +1,370 @@ +#!/usr/bin/env python3 +r"""Check captured mathematical text against pinned GitHub Markdown source. + +Usage (Python 3.10+, standard library only): + check_rendered_math.py inventory --root REPO --repository owner/name \ + --revision FULL_COMMIT --page README.md --page science/results.md \ + --output math-source.json + check_rendered_math.py check --inventory math-source.json \ + --capture math-capture.json [--contract math-contract.json] [--output result.json] + +Inventory reads Git objects at the requested commit, not the working tree. +It recognizes math fences, $`...`$, $$...$$ and single-dollar inline math, +excluding ordinary code fences/spans. This is a bounded Markdown scanner, +not the hosting renderer's parser. Inspect its inventory before capture. + +Capture schema (collect actual full accessible math text in document order): + {"schema_version": 1, "repository": "owner/name", "revision": "40 hex", + "renderer_profile": "github", "captured_at": "ISO-8601 with timezone", + "capture_method": "how the actual hosted DOM was inspected", + "pages": [{"path": "README.md", "url": "exact pinned inventory URL", + "revision": "40 hex", "source_sha256": "inventory source hash", + "errors": [], "math": [{"rendered": true, "errors": [], + "text_source": "mathml", "text": "full text, not a sample"}]}]} +Allowed text_source values: mathml, mathjax-assistive, katex-accessibility, +renderer-accessibility. Extract one accessible representation per host; +exclude TeX annotation nodes and duplicate visual/accessibility copies. +Native MathML is valid. Empty math lists are valid for math-free pages. + +Optional contract strengthens content checks without pretending to translate +arbitrary TeX. Each entry selects a path/index (1-based) and source_sha256 +(the expression hash in inventory), with expected_text and/or required_text: + {"schema_version": 1, "expressions": [{"path": "README.md", "index": 1, + "source_sha256": "expression hash", "required_text": ["d", "(C1)"], + "expected_text": "|A|", "le": "≤", "leq": "≤", "ge": "≥", "geq": "≥", + "ne": "≠", "neq": "≠", "in": "∈", "notin": "∉", "subset": "⊂", + "subseteq": "⊆", "supset": "⊃", "supseteq": "⊇", "approx": "≈", + "simeq": "≃", "equiv": "≡", "propto": "∝", "cong": "≅", "sim": "∼", + "to": "→", "rightarrow": "→", "Rightarrow": "⇒", "implies": "⇒", + "mapsto": "↦", "leftrightarrow": "↔", "Leftrightarrow": "⇔", "iff": "⇔", +} +RELATION_SYMBOLS = set("<>=") | set(RELATIONS.values()) +COMMAND = re.compile(r"\\([A-Za-z]+)") +LABEL = re.compile(r"\\tag(\*)?\{([^{}]+)\}|\\text\{\s*\(([^{}()]+)\)\s*\}") +FENCE = re.compile(r"^ {0,3}(`{3,}|~{3,})([^\n]*)\n?$") +SHA = re.compile(r"[0-9a-f]{40}") +TEXT_SOURCES = {"mathml", "mathjax-assistive", "katex-accessibility", "renderer-accessibility"} + + +def digest(text: str) -> str: + return hashlib.sha256(text.encode("utf-8")).hexdigest() + + +def compact(text: str) -> str: + return "".join(c for c in unicodedata.normalize("NFKC", text) + if not c.isspace() and unicodedata.category(c) != "Cf") + + +def escaped(text: str, index: int) -> bool: + backslashes = 0 + while index > 0 and text[index - 1] == "\\": + backslashes += 1 + index -= 1 + return bool(backslashes % 2) + + +def tex_body(text: str) -> str: + """Drop unescaped TeX comments; do not expand user macros.""" + return "\n".join(line[:next((i for i, c in enumerate(line) + if c == "%" and not escaped(line, i)), len(line))] + for line in text.splitlines()) + + +def relations(tex: str) -> dict[str, int]: + expanded = COMMAND.sub(lambda m: RELATIONS.get(m.group(1), m.group(0)), tex_body(tex)) + return dict(sorted(Counter(c for c in expanded if c in RELATION_SYMBOLS).items())) + + +def labels(tex: str) -> list[str]: + return [compact(tag if star else f"({tag or text})") + for star, tag, text in LABEL.findall(tex_body(tex))] + + +def expressions(source: str) -> list[dict]: + """Return ordered source spans; reject unterminated recognized delimiters.""" + found: list[dict] = [] + + def add(tex: str, offset: int, end: int, kind: str) -> None: + found.append({"line_start": source.count("\n", 0, offset) + 1, + "line_end": source.count("\n", 0, end) + 1, + "kind": kind, "tex": tex, "source_sha256": digest(tex), + "relations": relations(tex), "labels": labels(tex)}) + + def prose(start: int, end: int) -> None: + i = start + while i < end: + if source[i] == "$" and not escaped(source, i): + opener, closer, kind = ("$`", "`$", "github-inline") if source.startswith("$`", i) else ( + ("$$", "$$", "dollar-display") if source.startswith("$$", i) + else ("$", "$", "dollar-inline")) + j = source.find(closer, i + len(opener), end) + while j >= 0 and escaped(source, j): + j = source.find(closer, j + len(closer), end) + if j < 0 or (kind == "dollar-inline" and "\n" in source[i:j]): + raise ValueError(f"unclosed {kind} at line {source.count(chr(10), 0, i) + 1}") + add(source[i + len(opener):j], i, j + len(closer) - 1, kind) + i = j + len(closer) + elif source[i] == "`" and not escaped(source, i): + n = 1 + while i + n < end and source[i + n] == "`": + n += 1 + j = source.find("`" * n, i + n, end) + i = j + n if j >= 0 else i + n + else: + i += 1 + + lines = source.splitlines(keepends=True) + offset = start = i = 0 + while i < len(lines): + match = FENCE.match(lines[i]) + if not match: + offset += len(lines[i]) + i += 1 + continue + prose(start, offset) + marker, info = match.groups() + begin = offset + offset += len(lines[i]) + body_start = offset + i += 1 + while i < len(lines): + closing = FENCE.match(lines[i]) + if closing and closing[1][0] == marker[0] and len(closing[1]) >= len(marker) and not closing[2].strip(): + break + offset += len(lines[i]) + i += 1 + if i == len(lines): + raise ValueError(f"unclosed code fence at line {source.count(chr(10), 0, begin) + 1}") + if info.strip() == "math": + add(source[body_start:offset], begin, offset, "math-fence") + offset += len(lines[i]) + i += 1 + start = offset + prose(start, len(source)) + for index, item in enumerate(found, 1): + item["index"] = index + return found + + +def safe_path(path: str) -> bool: + return isinstance(path, str) and bool(path) and "\\" not in path and not PurePosixPath(path).is_absolute() and all( + part not in {"", ".", ".."} for part in path.split("/")) + + +def make_inventory(repository: str, revision: str, sources: dict[str, str]) -> dict: + if not isinstance(repository, str) or not isinstance(revision, str) or not re.fullmatch( + r"[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+", repository) or not SHA.fullmatch(revision): + raise ValueError("use owner/name and an exact lowercase 40-character commit SHA") + if not isinstance(sources, dict) or not sources or not all( + safe_path(p) and isinstance(s, str) for p, s in sources.items()): + raise ValueError("supply at least one safe repository-relative page path") + return {"schema_version": 1, "repository": repository, "revision": revision, + "renderer_profile": "github", "pages": [ + {"path": path, "url": f"https://github.com/{repository}/blob/{revision}/{quote(path, safe='/')}", + "source_sha256": digest(source), "source_text": source, "expressions": expressions(source)} + for path, source in sources.items()]} + + +def validate(inventory: dict, capture: dict, contract: dict | None = None) -> dict: + """Return failures rather than equating a passing text check with readiness.""" + failures: list[str] = [] + boundaries: list[dict] = [] + exceptions: list[dict] = [] + if not isinstance(inventory, dict) or not isinstance(capture, dict): + raise ValueError("inventory and capture must be JSON objects") + if type(inventory.get("schema_version")) is not int or type(capture.get("schema_version")) is not int or inventory["schema_version"] != 1 or capture["schema_version"] != 1: + raise ValueError("unsupported inventory or capture schema_version") + pages = inventory.get("pages") + if not isinstance(pages, list) or not pages or any(not isinstance(p, dict) for p in pages): + raise ValueError("inventory needs a nonempty pages array") + paths = [p.get("path") for p in pages] + if any(not isinstance(p, str) for p in paths) or len(set(paths)) != len(paths): + raise ValueError("inventory page paths must be unique strings") + rebuilt = make_inventory(inventory.get("repository", ""), inventory.get("revision", ""), + {p["path"]: p["source_text"] for p in pages}) + if inventory != rebuilt: + raise ValueError("inventory does not match its embedded source bytes/expression inventory") + for field in ("repository", "revision", "renderer_profile"): + if capture.get(field) != inventory[field]: + failures.append(f"capture {field} mismatch") + try: + timestamp = datetime.fromisoformat(capture.get("captured_at", "").replace("Z", "+00:00")) + if timestamp.tzinfo is None: + raise ValueError() + except (ValueError, AttributeError, TypeError): + failures.append("capture needs captured_at with a timezone") + if not isinstance(capture.get("capture_method"), str) or not capture["capture_method"].strip(): + failures.append("capture needs a nonempty capture_method") + captured_pages = capture.get("pages") + if not isinstance(captured_pages, list) or any(not isinstance(p, dict) for p in captured_pages): + raise ValueError("capture pages must be an array of objects") + captured_paths = [p.get("path") for p in captured_pages] + if captured_paths != paths: + failures.append("capture page paths/order differ from inventory (missing, extra or duplicate page)") + + contract = {"schema_version": 1, "expressions": []} if contract is None else contract + if not isinstance(contract, dict) or type(contract.get("schema_version")) is not int or contract["schema_version"] != 1 or not isinstance(contract.get("expressions"), list): + raise ValueError("invalid text contract schema") + rules: dict[tuple, dict] = {} + known = {(p["path"], e["index"]): e for p in pages for e in p["expressions"]} + for rule in contract["expressions"]: + if not isinstance(rule, dict): + raise ValueError("contract expressions must be objects") + key = (rule.get("path"), rule.get("index")) + if not isinstance(key[0], str) or type(key[1]) is not int or key not in known or key in rules or rule.get("source_sha256") != known[key]["source_sha256"]: + raise ValueError("unknown, duplicate or stale expression contract") + allowed = {"path", "index", "source_sha256", "required_text", "expected_text", "relation_override", + "allow_html_like_inequality", "reason", "evidence"} + if set(rule) - allowed: + raise ValueError("unknown contract field (contracts cannot skip checks)") + if "expected_text" in rule and (not isinstance(rule["expected_text"], str) or not compact(rule["expected_text"])): + raise ValueError("expected_text must be nonempty text") + if not isinstance(rule.get("required_text", []), list) or any( + not isinstance(v, str) or not compact(v) for v in rule.get("required_text", [])): + raise ValueError("required_text must be an array of nonempty text") + if "expected_text" not in rule and not rule.get("required_text"): + raise ValueError("each expression contract needs expected_text or required_text") + if "allow_html_like_inequality" in rule and not isinstance(rule["allow_html_like_inequality"], bool): + raise ValueError("allow_html_like_inequality must be boolean") + if "relation_override" in rule: + override = rule["relation_override"] + if not isinstance(override, dict) or any(k not in RELATION_SYMBOLS or type(v) is not int or v < 0 + for k, v in override.items()): + raise ValueError("relation_override must map known symbols to nonnegative integer counts") + if "relation_override" in rule or rule.get("allow_html_like_inequality"): + if not all(isinstance(rule.get(k), str) and rule[k].strip() for k in ("expected_text", "reason", "evidence")): + raise ValueError("renderer exception requires expected_text, reason and evidence") + exceptions.append(rule) + rules[key] = rule + + by_path = {p.get("path"): p for p in captured_pages if isinstance(p.get("path"), str)} + checked = 0 + for page in pages: + path = page["path"] + current = by_path.get(path) + if current is None: + continue + boundaries.append({"path": path, "source_sha256": page["source_sha256"], "url": current.get("url"), + "revision": current.get("revision"), "source_expressions": len(page["expressions"]), + "source_spans": [{k: e[k] for k in ("index", "line_start", "line_end", "source_sha256")} + for e in page["expressions"]]}) + for field, expected in (("url", page["url"]), ("revision", inventory["revision"]), ("source_sha256", page["source_sha256"])): + if current.get(field) != expected: + failures.append(f"{path}: captured {field} mismatch") + if current.get("errors") != []: + failures.append(f"{path}: renderer errors present or error evidence missing") + hosts = current.get("math") + if not isinstance(hosts, list): + failures.append(f"{path}: missing math-host array") + continue + boundaries[-1]["captured_hosts"] = len(hosts) + if len(hosts) != len(page["expressions"]): + failures.append(f"{path}: {len(page['expressions'])} source expressions, {len(hosts)} captured hosts") + for expr, host in zip(page["expressions"], hosts): + label = f"{path}:{expr['line_start']} expression {expr['index']}" + rule = rules.get((path, expr["index"]), {}) + if not isinstance(host, dict) or host.get("rendered") is not True or host.get("errors") != []: + failures.append(f"{label}: missing/unrendered host or renderer-error evidence") + continue + if host.get("text_source") not in TEXT_SOURCES or not isinstance(host.get("text"), str) or not compact(host["text"]): + failures.append(f"{label}: missing full accessible mathematical text/source") + continue + checked += 1 + text = compact(host["text"]) + expected = {k: v for k, v in rule.get("relation_override", expr["relations"]).items() if v} + actual = dict(sorted(Counter(c for c in text if c in RELATION_SYMBOLS).items())) + if expected != actual: + failures.append(f"{label}: relation mismatch; expected {expected}, captured {actual}") + for equation_label in expr["labels"]: + if equation_label not in text: + failures.append(f"{label}: missing equation label {equation_label}") + if re.search(r"<\s*[A-Za-z]", tex_body(expr["tex"])) and not rule.get("allow_html_like_inequality"): + failures.append(f"{label}: GitHub HTML-like inequality hazard; use supported syntax or a traced exact-text exception") + if "expected_text" in rule and compact(rule["expected_text"]) != text: + failures.append(f"{label}: full expected_text mismatch") + for required in rule.get("required_text", []): + if compact(required) not in text: + failures.append(f"{label}: missing required_text {required!r}") + return {"schema_version": 1, "status": "fail" if failures else "pass", + "repository": inventory["repository"], "revision": inventory["revision"], + "renderer_profile": inventory["renderer_profile"], "captured_at": capture.get("captured_at"), + "capture_method": capture.get("capture_method"), "boundaries": boundaries, + "expressions_checked": checked, "text_contracts": len(rules), "renderer_exceptions": exceptions, + "failures": failures, "visual_review_required": True, + "limits": "Counts, supported relations/visible labels and explicit text contracts only. No arbitrary TeX equivalence, scientific correctness, capture authentication or visual-layout certification."} + + +def read_json(path: Path) -> dict: + return json.loads(path.read_text(encoding="utf-8")) + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + commands = parser.add_subparsers(dest="command", required=True) + inv = commands.add_parser("inventory", help="read math source from an exact local Git commit") + inv.add_argument("--root", type=Path, required=True) + inv.add_argument("--repository", required=True) + inv.add_argument("--revision", required=True) + inv.add_argument("--page", action="append", required=True) + inv.add_argument("--output", type=Path, required=True) + check = commands.add_parser("check", help="check pinned extracted capture; does not fetch or render") + check.add_argument("--inventory", type=Path, required=True) + check.add_argument("--capture", type=Path, required=True) + check.add_argument("--contract", type=Path) + check.add_argument("--output", type=Path) + args = parser.parse_args(argv) + try: + if args.command == "inventory": + if not SHA.fullmatch(args.revision) or len(set(args.page)) != len(args.page) or not all(safe_path(p) for p in args.page): + raise ValueError("use an exact commit SHA and unique safe page paths") + commit = subprocess.check_output(["git", "--no-replace-objects", "rev-parse", f"{args.revision}^{{commit}}"], cwd=args.root, text=True).strip() + if commit != args.revision: + raise ValueError("revision does not identify the supplied commit") + sources = {p: subprocess.check_output(["git", "--no-replace-objects", "show", f"{commit}:{p}"], cwd=args.root).decode("utf-8") for p in args.page} + result = make_inventory(args.repository, commit, sources) + else: + result = validate(read_json(args.inventory), read_json(args.capture), read_json(args.contract) if args.contract else None) + output = json.dumps(result, indent=2, ensure_ascii=False) + "\n" + if args.output: + args.output.write_text(output, encoding="utf-8") + else: + print(output, end="") + return 1 if result.get("status") == "fail" else 0 + except (OSError, UnicodeError, ValueError, KeyError, TypeError, subprocess.CalledProcessError) as error: + print(f"ERROR: {error}", file=sys.stderr) + return 2 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/verification/results/manifest.json b/verification/results/manifest.json index c08b3f7..fed000b 100644 --- a/verification/results/manifest.json +++ b/verification/results/manifest.json @@ -1,5 +1,5 @@ { - "started_at_utc": "2026-10-24T07:15:49.727353+00:00", + "started_at_utc": "2026-11-02T10:40:55.362757+00:00", "python": "3.12.14", "packages": { "numpy": "2.3.5", @@ -13,21 +13,27 @@ { "name": "core", "all_assertions_passed": true, - "elapsed_seconds": 0.918, + "elapsed_seconds": 1.025, "report": "core.json" }, { "name": "anisotropic", "all_assertions_passed": true, - "elapsed_seconds": 1.08, + "elapsed_seconds": 1.381, "report": "anisotropic.json" }, { "name": "residual_npt", "all_assertions_passed": true, - "elapsed_seconds": 3.128, + "elapsed_seconds": 2.989, "report": "residual_npt.json" + }, + { + "name": "rank_two", + "all_assertions_passed": true, + "elapsed_seconds": 0.49, + "report": "rank_two.json" } ], - "elapsed_seconds": 5.136 + "elapsed_seconds": 5.895 } diff --git a/verification/results/navigation.json b/verification/results/navigation.json new file mode 100644 index 0000000..49d7084 --- /dev/null +++ b/verification/results/navigation.json @@ -0,0 +1,125 @@ +{ + "scope": "File targets, exact M01\u2013M30 IDs and README reciprocity; no scientific or hosted-rendering verdict", + "all_assertions_passed": true, + "reciprocal_checkout_checked": true, + "reports": [ + { + "repository": "Spin-Diffusion-Classicalization", + "local_link_count": 252, + "missing_local_links": [], + "milestone_ids": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12", + "M13", + "M14", + "M15", + "M16", + "M17", + "M18", + "M19", + "M20", + "M21", + "M22", + "M23", + "M24", + "M25", + "M26", + "M27", + "M28", + "M29", + "M30" + ], + "milestone_count": 30, + "readme_sister_link_present": true, + "counterpart_file_links_checked": [ + { + "source": "learning/MILESTONES.md", + "target": "https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/conditional_gaussian.md", + "local_counterpart": "science/conditional_gaussian.md" + }, + { + "source": "learning/MILESTONES.md", + "target": "https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/exact_threshold.md", + "local_counterpart": "science/exact_threshold.md" + }, + { + "source": "science/rank_two_diffusion.md", + "target": "https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/conditional_gaussian.md", + "local_counterpart": "science/conditional_gaussian.md" + }, + { + "source": "science/rank_two_diffusion.md", + "target": "https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/cubic_distance.md", + "local_counterpart": "science/cubic_distance.md" + }, + { + "source": "science/rank_two_diffusion.md", + "target": "https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/exact_threshold.md", + "local_counterpart": "science/exact_threshold.md" + } + ] + }, + { + "repository": "Nonlinear-Diffusion-Entanglement", + "local_link_count": 173, + "missing_local_links": [], + "milestone_ids": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12", + "M13", + "M14", + "M15", + "M16", + "M17", + "M18", + "M19", + "M20", + "M21", + "M22", + "M23", + "M24", + "M25", + "M26", + "M27", + "M28", + "M29", + "M30" + ], + "milestone_count": 30, + "readme_sister_link_present": true, + "counterpart_file_links_checked": [ + { + "source": "references/RELATED_WORK.md", + "target": "https://github.com/GoGoKo699/Spin-Diffusion-Classicalization/blob/SPIN_SISTER_COMMIT/science/rank_two_diffusion.md", + "local_counterpart": "science/rank_two_diffusion.md" + }, + { + "source": "science/spin_contraction.md", + "target": "https://github.com/GoGoKo699/Spin-Diffusion-Classicalization/blob/SPIN_SISTER_COMMIT/science/rank_two_diffusion.md", + "local_counterpart": "science/rank_two_diffusion.md" + } + ] + } + ], + "status": "passed" +} diff --git a/verification/results/rank_two.json b/verification/results/rank_two.json new file mode 100644 index 0000000..bdbec28 --- /dev/null +++ b/verification/results/rank_two.json @@ -0,0 +1,646 @@ +{ + "model": "j=n/2; generator -ad_Jy^2-ad_Jz^2; t=s*n^(-2/3)", + "code": "Normalized finite-ladder S(log(n)/6)|0>, S(log(n)/6)|1>; qubit reference", + "scope": "Exact finite-spin witness and local generator/vector checks; no global EB upper or optimized diamond norm", + "all_assertions_passed": true, + "full_witness_grid": false, + "independent_generator_controls": [ + { + "n": 1, + "t": 0, + "full_generator_error": 1.2412670766236366e-16, + "trace_error": 3.3306888603030323e-16, + "output_min_eigenvalue": -1.1102230246251565e-16 + }, + { + "n": 1, + "t": 0.03, + "full_generator_error": 1.2412670766236366e-16, + "trace_error": 3.3306888603030323e-16, + "output_min_eigenvalue": 0.016529271348001112 + }, + { + "n": 1, + "t": 0.7, + "full_generator_error": 1.5700924586837752e-16, + "trace_error": 3.3306888603030323e-16, + "output_min_eigenvalue": 0.2635683211123033 + }, + { + "n": 2, + "t": 0, + "full_generator_error": 4.934426949698985e-16, + "trace_error": 6.662513699125169e-16, + "output_min_eigenvalue": -2.7303458078176696e-16 + }, + { + "n": 2, + "t": 0.03, + "full_generator_error": 4.606923918098424e-16, + "trace_error": 6.662513699125169e-16, + "output_min_eigenvalue": 0.003907697900894243 + }, + { + "n": 2, + "t": 0.7, + "full_generator_error": 3.015526256401336e-16, + "trace_error": 6.662513699125169e-16, + "output_min_eigenvalue": 0.13519281795036645 + }, + { + "n": 3, + "t": 0, + "full_generator_error": 6.72339075223201e-16, + "trace_error": 8.882442905918585e-16, + "output_min_eigenvalue": -4.2500899641379283e-16 + }, + { + "n": 3, + "t": 0.03, + "full_generator_error": 5.183544167520175e-16, + "trace_error": 7.772313974022533e-16, + "output_min_eigenvalue": 0.0022654971269420424 + }, + { + "n": 3, + "t": 0.7, + "full_generator_error": 4.727582981442167e-16, + "trace_error": 9.992592745220658e-16, + "output_min_eigenvalue": 0.15479534971977588 + }, + { + "n": 4, + "t": 0, + "full_generator_error": 7.223102968844821e-16, + "trace_error": 4.441108490844638e-16, + "output_min_eigenvalue": -5.051077435390251e-16 + }, + { + "n": 4, + "t": 0.03, + "full_generator_error": 4.566130289149005e-16, + "trace_error": 2.220878802311906e-16, + "output_min_eigenvalue": 0.0013090927666074839 + }, + { + "n": 4, + "t": 0.7, + "full_generator_error": 3.3471342248659513e-16, + "trace_error": 1.1110882779216384e-16, + "output_min_eigenvalue": 0.1359594174229409 + }, + { + "n": 7, + "t": 0, + "full_generator_error": 6.17838865167032e-16, + "trace_error": 1.306628259053209e-17, + "output_min_eigenvalue": -3.0924357830344065e-16 + }, + { + "n": 7, + "t": 0.03, + "full_generator_error": 4.232796376010767e-16, + "trace_error": 2.2242871738390455e-16, + "output_min_eigenvalue": 0.0018761105892366053 + }, + { + "n": 7, + "t": 0.7, + "full_generator_error": 1.6489889945945345e-15, + "trace_error": 4.218867727458377e-15, + "output_min_eigenvalue": 0.07724458578634597 + } + ], + "max_full_generator_error": 1.6489889945945345e-15, + "finite_spin_witnesses": [ + { + "n": 16, + "scaled_time_s": 0.1, + "time_t": 0.015749013123685915, + "pt_block_min": -0.4039997482755122, + "witness_expectation": -0.40399974827551216, + "distance_lower_from_witness": 0.40399974827551216, + "entanglement_fidelity": 0.868190091085441, + "fidelity_tangent_lower": 0.8500705425923607, + "distance_lower_from_tangent": 0.3500705425923607, + "variance_sum": 4.759963568198158, + "variance_sum_over_n_two_thirds": 0.7496472870381963, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.22917208304643624, + 1.687448921527103 + ], + "retained_probability_before_normalization": [ + 0.9999999446418194, + 0.9999955477514428 + ], + "tail_at_excitation_n_over_2": [ + 0.00035831993184055704, + 0.002738141620098663 + ], + "trace_error": 4.3298697960381105e-15, + "hermiticity_error": 5.229623856115348e-31, + "population_output_min_eigenvalue": 2.426372661256201e-11 + }, + { + "n": 16, + "scaled_time_s": 0.5, + "time_t": 0.07874506561842957, + "pt_block_min": -0.17334286590247033, + "witness_expectation": -0.17334286590247036, + "distance_lower_from_witness": 0.17334286590247036, + "entanglement_fidelity": 0.5526005279238834, + "fidelity_tangent_lower": 0.2503527129618037, + "distance_lower_from_tangent": 0.0, + "variance_sum": 4.759963568198158, + "variance_sum_over_n_two_thirds": 0.7496472870381963, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.22917208304643624, + 1.687448921527103 + ], + "retained_probability_before_normalization": [ + 0.9999999446418194, + 0.9999955477514428 + ], + "tail_at_excitation_n_over_2": [ + 0.00035831993184055704, + 0.002738141620098663 + ], + "trace_error": 6.106226635438361e-15, + "hermiticity_error": 2.675715221586608e-31, + "population_output_min_eigenvalue": 9.667396510753012e-07 + }, + { + "n": 16, + "scaled_time_s": 1.0, + "time_t": 0.15749013123685915, + "pt_block_min": -0.044429406987331915, + "witness_expectation": -0.044429406987331915, + "distance_lower_from_witness": 0.044429406987331915, + "entanglement_fidelity": 0.3636654973188133, + "fidelity_tangent_lower": -0.49929457407639255, + "distance_lower_from_tangent": 0.0, + "variance_sum": 4.759963568198158, + "variance_sum_over_n_two_thirds": 0.7496472870381963, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.22917208304643624, + 1.687448921527103 + ], + "retained_probability_before_normalization": [ + 0.9999999446418194, + 0.9999955477514428 + ], + "tail_at_excitation_n_over_2": [ + 0.00035831993184055704, + 0.002738141620098663 + ], + "trace_error": 8.215650382226158e-15, + "hermiticity_error": 1.8661349379577438e-31, + "population_output_min_eigenvalue": 3.672139982260539e-05 + }, + { + "n": 16, + "scaled_time_s": 2.0, + "time_t": 0.3149802624737183, + "pt_block_min": 0.04224644029929023, + "witness_expectation": 0.04224644029929022, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.20311297129438416, + "fidelity_tangent_lower": -1.998589148152785, + "distance_lower_from_tangent": 0.0, + "variance_sum": 4.759963568198158, + "variance_sum_over_n_two_thirds": 0.7496472870381963, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.22917208304643624, + 1.687448921527103 + ], + "retained_probability_before_normalization": [ + 0.9999999446418194, + 0.9999955477514428 + ], + "tail_at_excitation_n_over_2": [ + 0.00035831993184055704, + 0.002738141620098663 + ], + "trace_error": 1.1324274851176597e-14, + "hermiticity_error": 5.494960080677292e-32, + "population_output_min_eigenvalue": 0.0009061890363612642 + }, + { + "n": 32, + "scaled_time_s": 0.1, + "time_t": 0.009921256574801248, + "pt_block_min": -0.40326969049118083, + "witness_expectation": -0.40326969049118083, + "distance_lower_from_witness": 0.40326969049118083, + "entanglement_fidelity": 0.8650978547913422, + "fidelity_tangent_lower": 0.8459671705083798, + "distance_lower_from_tangent": 0.3459671705083798, + "variance_sum": 7.762768170054402, + "variance_sum_over_n_two_thirds": 0.7701641474581009, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.3724455903322913, + 2.1173366656705217 + ], + "retained_probability_before_normalization": [ + 0.9999999999630157, + 0.9999999965524826 + ], + "tail_at_excitation_n_over_2": [ + 6.634040265071573e-06, + 8.551893843137627e-05 + ], + "trace_error": 1.1102230246251565e-16, + "hermiticity_error": 5.405373973331259e-31, + "population_output_min_eigenvalue": 8.777908065678509e-18 + }, + { + "n": 32, + "scaled_time_s": 0.5, + "time_t": 0.04960628287400624, + "pt_block_min": -0.17265005104796274, + "witness_expectation": -0.17265005104796274, + "distance_lower_from_witness": 0.17265005104796274, + "entanglement_fidelity": 0.5454516928861514, + "fidelity_tangent_lower": 0.2298358525418992, + "distance_lower_from_tangent": 0.0, + "variance_sum": 7.762768170054402, + "variance_sum_over_n_two_thirds": 0.7701641474581009, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.3724455903322913, + 2.1173366656705217 + ], + "retained_probability_before_normalization": [ + 0.9999999999630157, + 0.9999999965524826 + ], + "tail_at_excitation_n_over_2": [ + 6.634040265071573e-06, + 8.551893843137627e-05 + ], + "trace_error": 2.55351295663786e-15, + "hermiticity_error": 3.248253533910024e-31, + "population_output_min_eigenvalue": 2.640541778147001e-10 + }, + { + "n": 32, + "scaled_time_s": 1.0, + "time_t": 0.09921256574801247, + "pt_block_min": -0.045325539893225006, + "witness_expectation": -0.045325539893225006, + "distance_lower_from_witness": 0.045325539893225006, + "entanglement_fidelity": 0.3559821034591499, + "fidelity_tangent_lower": -0.5403282949162016, + "distance_lower_from_tangent": 0.0, + "variance_sum": 7.762768170054402, + "variance_sum_over_n_two_thirds": 0.7701641474581009, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.3724455903322913, + 2.1173366656705217 + ], + "retained_probability_before_normalization": [ + 0.9999999999630157, + 0.9999999965524826 + ], + "tail_at_excitation_n_over_2": [ + 6.634040265071573e-06, + 8.551893843137627e-05 + ], + "trace_error": 4.9960036108132044e-15, + "hermiticity_error": 1.8158804112810014e-31, + "population_output_min_eigenvalue": 8.465630780360389e-08 + }, + { + "n": 32, + "scaled_time_s": 2.0, + "time_t": 0.19842513149602495, + "pt_block_min": 0.038573243162912496, + "witness_expectation": 0.038573243162912496, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.19580515510563173, + "fidelity_tangent_lower": -2.080656589832403, + "distance_lower_from_tangent": 0.0, + "variance_sum": 7.762768170054402, + "variance_sum_over_n_two_thirds": 0.7701641474581009, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.3724455903322913, + 2.1173366656705217 + ], + "retained_probability_before_normalization": [ + 0.9999999999630157, + 0.9999999965524826 + ], + "tail_at_excitation_n_over_2": [ + 6.634040265071573e-06, + 8.551893843137627e-05 + ], + "trace_error": 9.769962616701378e-15, + "hermiticity_error": 1.470889810973413e-31, + "population_output_min_eigenvalue": 1.86569447969291e-05 + }, + { + "n": 64, + "scaled_time_s": 0.1, + "time_t": 0.006250000000000002, + "pt_block_min": -0.40266331458717575, + "witness_expectation": -0.40266331458717575, + "distance_lower_from_witness": 0.40266331458717575, + "entanglement_fidelity": 0.8629633222898152, + "fidelity_tangent_lower": 0.843139672810746, + "distance_lower_from_tangent": 0.343139672810746, + "variance_sum": 12.54882617514032, + "variance_sum_over_n_two_thirds": 0.7843016359462701, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.5624999999999822, + 2.6874999999979057 + ], + "retained_probability_before_normalization": [ + 0.9999999999999994, + 0.9999999999999667 + ], + "tail_at_excitation_n_over_2": [ + 1.3702405871331892e-08, + 2.988387821845433e-07 + ], + "trace_error": 7.105427357601002e-15, + "hermiticity_error": 1.0966212424485631e-30, + "population_output_min_eigenvalue": -7.175185428213011e-16 + }, + { + "n": 64, + "scaled_time_s": 0.5, + "time_t": 0.03125000000000001, + "pt_block_min": -0.1718532833666965, + "witness_expectation": -0.1718532833666965, + "distance_lower_from_witness": 0.1718532833666965, + "entanglement_fidelity": 0.5405408656610879, + "fidelity_tangent_lower": 0.21569836405372977, + "distance_lower_from_tangent": 0.0, + "variance_sum": 12.54882617514032, + "variance_sum_over_n_two_thirds": 0.7843016359462701, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.5624999999999822, + 2.6874999999979057 + ], + "retained_probability_before_normalization": [ + 0.9999999999999994, + 0.9999999999999667 + ], + "tail_at_excitation_n_over_2": [ + 1.3702405871331892e-08, + 2.988387821845433e-07 + ], + "trace_error": 1.84297022087776e-14, + "hermiticity_error": 6.061007887891342e-31, + "population_output_min_eigenvalue": 9.75717001891606e-16 + }, + { + "n": 64, + "scaled_time_s": 1.0, + "time_t": 0.06250000000000001, + "pt_block_min": -0.04553064748982835, + "witness_expectation": -0.04553064748982835, + "distance_lower_from_witness": 0.04553064748982835, + "entanglement_fidelity": 0.3507748479369648, + "fidelity_tangent_lower": -0.5686032718925405, + "distance_lower_from_tangent": 0.0, + "variance_sum": 12.54882617514032, + "variance_sum_over_n_two_thirds": 0.7843016359462701, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.5624999999999822, + 2.6874999999979057 + ], + "retained_probability_before_normalization": [ + 0.9999999999999994, + 0.9999999999999667 + ], + "tail_at_excitation_n_over_2": [ + 1.3702405871331892e-08, + 2.988387821845433e-07 + ], + "trace_error": 3.086420008457935e-14, + "hermiticity_error": 3.2974765394390992e-31, + "population_output_min_eigenvalue": 6.061024403160686e-12 + }, + { + "n": 64, + "scaled_time_s": 2.0, + "time_t": 0.12500000000000003, + "pt_block_min": 0.03655966073076891, + "witness_expectation": 0.03655966073076891, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.19102269768307956, + "fidelity_tangent_lower": -2.137206543785081, + "distance_lower_from_tangent": 0.0, + "variance_sum": 12.54882617514032, + "variance_sum_over_n_two_thirds": 0.7843016359462701, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.5624999999999822, + 2.6874999999979057 + ], + "retained_probability_before_normalization": [ + 0.9999999999999994, + 0.9999999999999667 + ], + "tail_at_excitation_n_over_2": [ + 1.3702405871331892e-08, + 2.988387821845433e-07 + ], + "trace_error": 5.417888360170764e-14, + "hermiticity_error": 2.8222593673261704e-31, + "population_output_min_eigenvalue": 4.4956861804741746e-08 + }, + { + "n": 128, + "scaled_time_s": 0.1, + "time_t": 0.00393725328092148, + "pt_block_min": -0.4021986138213308, + "witness_expectation": -0.40219861382133076, + "distance_lower_from_witness": 0.40219861382133076, + "entanglement_fidelity": 0.8615120019480793, + "fidelity_tangent_lower": 0.8412159828540313, + "distance_lower_from_tangent": 0.3412159828540313, + "variance_sum": 20.164313268259786, + "variance_sum_over_n_two_thirds": 0.7939200857298436, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.8095273327688796, + 3.42858199830664 + ], + "retained_probability_before_normalization": [ + 0.9999999999999998, + 0.9999999999999999 + ], + "tail_at_excitation_n_over_2": [ + 8.751500041448851e-13, + 3.21989829457305e-11 + ], + "trace_error": 5.551115123125783e-15, + "hermiticity_error": 1.7018477577911934e-30, + "population_output_min_eigenvalue": -1.9820553020784952e-15 + }, + { + "n": 128, + "scaled_time_s": 0.5, + "time_t": 0.019686266404607397, + "pt_block_min": -0.17115874259293995, + "witness_expectation": -0.17115874259293995, + "distance_lower_from_witness": 0.17115874259293995, + "entanglement_fidelity": 0.53721810288729, + "fidelity_tangent_lower": 0.20607991427015637, + "distance_lower_from_tangent": 0.0, + "variance_sum": 20.164313268259786, + "variance_sum_over_n_two_thirds": 0.7939200857298436, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.8095273327688796, + 3.42858199830664 + ], + "retained_probability_before_normalization": [ + 0.9999999999999998, + 0.9999999999999999 + ], + "tail_at_excitation_n_over_2": [ + 8.751500041448851e-13, + 3.21989829457305e-11 + ], + "trace_error": 7.993605777301127e-15, + "hermiticity_error": 7.751365852672541e-31, + "population_output_min_eigenvalue": -6.62575388028609e-15 + }, + { + "n": 128, + "scaled_time_s": 1.0, + "time_t": 0.039372532809214794, + "pt_block_min": -0.04548004100486544, + "witness_expectation": -0.04548004100486544, + "distance_lower_from_witness": 0.04548004100486544, + "entanglement_fidelity": 0.347287182985325, + "fidelity_tangent_lower": -0.5878401714596873, + "distance_lower_from_tangent": 0.0, + "variance_sum": 20.164313268259786, + "variance_sum_over_n_two_thirds": 0.7939200857298436, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.8095273327688796, + 3.42858199830664 + ], + "retained_probability_before_normalization": [ + 0.9999999999999998, + 0.9999999999999999 + ], + "tail_at_excitation_n_over_2": [ + 8.751500041448851e-13, + 3.21989829457305e-11 + ], + "trace_error": 1.1546319456101628e-14, + "hermiticity_error": 3.986455969520367e-31, + "population_output_min_eigenvalue": -8.45210587120032e-15 + }, + { + "n": 128, + "scaled_time_s": 2.0, + "time_t": 0.07874506561842959, + "pt_block_min": 0.035419001576513065, + "witness_expectation": 0.03541900157651307, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.18789636650154162, + "fidelity_tangent_lower": -2.1756803429193745, + "distance_lower_from_tangent": 0.0, + "variance_sum": 20.164313268259786, + "variance_sum_over_n_two_thirds": 0.7939200857298436, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.8095273327688796, + 3.42858199830664 + ], + "retained_probability_before_normalization": [ + 0.9999999999999998, + 0.9999999999999999 + ], + "tail_at_excitation_n_over_2": [ + 8.751500041448851e-13, + 3.21989829457305e-11 + ], + "trace_error": 1.4988010832439613e-14, + "hermiticity_error": 2.3697094242974174e-31, + "population_output_min_eigenvalue": 3.593533283707911e-12 + } + ], + "growing_excitation_generator_checks": [ + { + "n": 64, + "error_A": 0.009174832225374826, + "error_A_squared": 0.018269445940966196, + "n_two_thirds_times_error_A": 0.14679731560599718, + "n_two_thirds_times_error_A_squared": 0.2923111350554591, + "mean_excitation": 0.5624999999999974, + "tail_above_spin_ladder": 2.417912779628802e-16 + }, + { + "n": 128, + "error_A": 0.005917360509736825, + "error_A_squared": 0.011762765820399132, + "n_two_thirds_times_error_A": 0.15029158876850104, + "n_two_thirds_times_error_A_squared": 0.29875562939771455, + "mean_excitation": 0.8095273327688794, + "tail_above_spin_ladder": 1.4730786066026277e-24 + }, + { + "n": 256, + "error_A": 0.0037963454551359107, + "error_A_squared": 0.007509853829632779, + "n_two_thirds_times_error_A": 0.1530590576511509, + "n_two_thirds_times_error_A_squared": 0.3027783334908148, + "mean_excitation": 1.1267735847774147, + "tail_above_spin_ladder": 1.3390360775587088e-37 + }, + { + "n": 512, + "error_A": 0.002426724470613791, + "error_A_squared": 0.0047716830982885, + "n_two_thirds_times_error_A": 0.1553103661192826, + "n_two_thirds_times_error_A_squared": 0.30538771829046396, + "mean_excitation": 1.5312499999999991, + "tail_above_spin_ladder": 2.8149030562574662e-58 + }, + { + "n": 1024, + "error_A": 0.0015469969013761126, + "error_A_squared": 0.003023370049929512, + "n_two_thirds_times_error_A": 0.15716508855270306, + "n_two_thirds_times_error_A_squared": 0.30715525105582425, + "mean_excitation": 2.0446452412267497, + "tail_above_spin_ladder": 4.6787984179518874e-91 + }, + { + "n": 2048, + "error_A": 0.0009840529299464155, + "error_A_squared": 0.0019123451105247543, + "n_two_thirds_times_error_A": 0.15869811208322732, + "n_two_thirds_times_error_A_squared": 0.3084036940049504, + "mean_excitation": 2.6944883703410087, + "tail_above_spin_ladder": 4.9554222582160635e-143 + }, + { + "n": 4096, + "error_A": 0.0006248550480534681, + "error_A_squared": 0.0012082719700165358, + "n_two_thirds_times_error_A": 0.15996289230168778, + "n_two_thirds_times_error_A_squared": 0.30931762432423304, + "mean_excitation": 3.5156249999999996, + "tail_above_spin_ladder": 1.8221635856468635e-225 + } + ] +} diff --git a/verification/results/rank_two_full.json b/verification/results/rank_two_full.json new file mode 100644 index 0000000..cc8ecb6 --- /dev/null +++ b/verification/results/rank_two_full.json @@ -0,0 +1,878 @@ +{ + "model": "j=n/2; generator -ad_Jy^2-ad_Jz^2; t=s*n^(-2/3)", + "code": "Normalized finite-ladder S(log(n)/6)|0>, S(log(n)/6)|1>; qubit reference", + "scope": "Exact finite-spin witness and local generator/vector checks; no global EB upper or optimized diamond norm", + "all_assertions_passed": true, + "full_witness_grid": true, + "independent_generator_controls": [ + { + "n": 1, + "t": 0, + "full_generator_error": 1.2412670766236366e-16, + "trace_error": 3.3306888603030323e-16, + "output_min_eigenvalue": -1.1102230246251565e-16 + }, + { + "n": 1, + "t": 0.03, + "full_generator_error": 1.2412670766236366e-16, + "trace_error": 3.3306888603030323e-16, + "output_min_eigenvalue": 0.016529271348001112 + }, + { + "n": 1, + "t": 0.7, + "full_generator_error": 1.5700924586837752e-16, + "trace_error": 3.3306888603030323e-16, + "output_min_eigenvalue": 0.2635683211123033 + }, + { + "n": 2, + "t": 0, + "full_generator_error": 4.934426949698985e-16, + "trace_error": 6.662513699125169e-16, + "output_min_eigenvalue": -2.7303458078176696e-16 + }, + { + "n": 2, + "t": 0.03, + "full_generator_error": 4.606923918098424e-16, + "trace_error": 6.662513699125169e-16, + "output_min_eigenvalue": 0.003907697900894243 + }, + { + "n": 2, + "t": 0.7, + "full_generator_error": 3.015526256401336e-16, + "trace_error": 6.662513699125169e-16, + "output_min_eigenvalue": 0.13519281795036645 + }, + { + "n": 3, + "t": 0, + "full_generator_error": 6.72339075223201e-16, + "trace_error": 8.882442905918585e-16, + "output_min_eigenvalue": -4.2500899641379283e-16 + }, + { + "n": 3, + "t": 0.03, + "full_generator_error": 5.183544167520175e-16, + "trace_error": 7.772313974022533e-16, + "output_min_eigenvalue": 0.0022654971269420424 + }, + { + "n": 3, + "t": 0.7, + "full_generator_error": 4.727582981442167e-16, + "trace_error": 9.992592745220658e-16, + "output_min_eigenvalue": 0.15479534971977588 + }, + { + "n": 4, + "t": 0, + "full_generator_error": 7.223102968844821e-16, + "trace_error": 4.441108490844638e-16, + "output_min_eigenvalue": -5.051077435390251e-16 + }, + { + "n": 4, + "t": 0.03, + "full_generator_error": 4.566130289149005e-16, + "trace_error": 2.220878802311906e-16, + "output_min_eigenvalue": 0.0013090927666074839 + }, + { + "n": 4, + "t": 0.7, + "full_generator_error": 3.3471342248659513e-16, + "trace_error": 1.1110882779216384e-16, + "output_min_eigenvalue": 0.1359594174229409 + }, + { + "n": 7, + "t": 0, + "full_generator_error": 6.17838865167032e-16, + "trace_error": 1.306628259053209e-17, + "output_min_eigenvalue": -3.0924357830344065e-16 + }, + { + "n": 7, + "t": 0.03, + "full_generator_error": 4.232796376010767e-16, + "trace_error": 2.2242871738390455e-16, + "output_min_eigenvalue": 0.0018761105892366053 + }, + { + "n": 7, + "t": 0.7, + "full_generator_error": 1.6489889945945345e-15, + "trace_error": 4.218867727458377e-15, + "output_min_eigenvalue": 0.07724458578634597 + } + ], + "max_full_generator_error": 1.6489889945945345e-15, + "finite_spin_witnesses": [ + { + "n": 16, + "scaled_time_s": 0.1, + "time_t": 0.015749013123685915, + "pt_block_min": -0.4039997482755122, + "witness_expectation": -0.40399974827551216, + "distance_lower_from_witness": 0.40399974827551216, + "entanglement_fidelity": 0.868190091085441, + "fidelity_tangent_lower": 0.8500705425923607, + "distance_lower_from_tangent": 0.3500705425923607, + "variance_sum": 4.759963568198158, + "variance_sum_over_n_two_thirds": 0.7496472870381963, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.22917208304643624, + 1.687448921527103 + ], + "retained_probability_before_normalization": [ + 0.9999999446418194, + 0.9999955477514428 + ], + "tail_at_excitation_n_over_2": [ + 0.00035831993184055704, + 0.002738141620098663 + ], + "trace_error": 4.3298697960381105e-15, + "hermiticity_error": 5.229623856115348e-31, + "population_output_min_eigenvalue": 2.426372661256201e-11 + }, + { + "n": 16, + "scaled_time_s": 0.5, + "time_t": 0.07874506561842957, + "pt_block_min": -0.17334286590247033, + "witness_expectation": -0.17334286590247036, + "distance_lower_from_witness": 0.17334286590247036, + "entanglement_fidelity": 0.5526005279238834, + "fidelity_tangent_lower": 0.2503527129618037, + "distance_lower_from_tangent": 0.0, + "variance_sum": 4.759963568198158, + "variance_sum_over_n_two_thirds": 0.7496472870381963, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.22917208304643624, + 1.687448921527103 + ], + "retained_probability_before_normalization": [ + 0.9999999446418194, + 0.9999955477514428 + ], + "tail_at_excitation_n_over_2": [ + 0.00035831993184055704, + 0.002738141620098663 + ], + "trace_error": 6.106226635438361e-15, + "hermiticity_error": 2.675715221586608e-31, + "population_output_min_eigenvalue": 9.667396510753012e-07 + }, + { + "n": 16, + "scaled_time_s": 1.0, + "time_t": 0.15749013123685915, + "pt_block_min": -0.044429406987331915, + "witness_expectation": -0.044429406987331915, + "distance_lower_from_witness": 0.044429406987331915, + "entanglement_fidelity": 0.3636654973188133, + "fidelity_tangent_lower": -0.49929457407639255, + "distance_lower_from_tangent": 0.0, + "variance_sum": 4.759963568198158, + "variance_sum_over_n_two_thirds": 0.7496472870381963, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.22917208304643624, + 1.687448921527103 + ], + "retained_probability_before_normalization": [ + 0.9999999446418194, + 0.9999955477514428 + ], + "tail_at_excitation_n_over_2": [ + 0.00035831993184055704, + 0.002738141620098663 + ], + "trace_error": 8.215650382226158e-15, + "hermiticity_error": 1.8661349379577438e-31, + "population_output_min_eigenvalue": 3.672139982260539e-05 + }, + { + "n": 16, + "scaled_time_s": 2.0, + "time_t": 0.3149802624737183, + "pt_block_min": 0.04224644029929023, + "witness_expectation": 0.04224644029929022, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.20311297129438416, + "fidelity_tangent_lower": -1.998589148152785, + "distance_lower_from_tangent": 0.0, + "variance_sum": 4.759963568198158, + "variance_sum_over_n_two_thirds": 0.7496472870381963, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.22917208304643624, + 1.687448921527103 + ], + "retained_probability_before_normalization": [ + 0.9999999446418194, + 0.9999955477514428 + ], + "tail_at_excitation_n_over_2": [ + 0.00035831993184055704, + 0.002738141620098663 + ], + "trace_error": 1.1324274851176597e-14, + "hermiticity_error": 5.494960080677292e-32, + "population_output_min_eigenvalue": 0.0009061890363612642 + }, + { + "n": 32, + "scaled_time_s": 0.1, + "time_t": 0.009921256574801248, + "pt_block_min": -0.40326969049118083, + "witness_expectation": -0.40326969049118083, + "distance_lower_from_witness": 0.40326969049118083, + "entanglement_fidelity": 0.8650978547913422, + "fidelity_tangent_lower": 0.8459671705083798, + "distance_lower_from_tangent": 0.3459671705083798, + "variance_sum": 7.762768170054402, + "variance_sum_over_n_two_thirds": 0.7701641474581009, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.3724455903322913, + 2.1173366656705217 + ], + "retained_probability_before_normalization": [ + 0.9999999999630157, + 0.9999999965524826 + ], + "tail_at_excitation_n_over_2": [ + 6.634040265071573e-06, + 8.551893843137627e-05 + ], + "trace_error": 1.1102230246251565e-16, + "hermiticity_error": 5.405373973331259e-31, + "population_output_min_eigenvalue": 8.777908065678509e-18 + }, + { + "n": 32, + "scaled_time_s": 0.5, + "time_t": 0.04960628287400624, + "pt_block_min": -0.17265005104796274, + "witness_expectation": -0.17265005104796274, + "distance_lower_from_witness": 0.17265005104796274, + "entanglement_fidelity": 0.5454516928861514, + "fidelity_tangent_lower": 0.2298358525418992, + "distance_lower_from_tangent": 0.0, + "variance_sum": 7.762768170054402, + "variance_sum_over_n_two_thirds": 0.7701641474581009, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.3724455903322913, + 2.1173366656705217 + ], + "retained_probability_before_normalization": [ + 0.9999999999630157, + 0.9999999965524826 + ], + "tail_at_excitation_n_over_2": [ + 6.634040265071573e-06, + 8.551893843137627e-05 + ], + "trace_error": 2.55351295663786e-15, + "hermiticity_error": 3.248253533910024e-31, + "population_output_min_eigenvalue": 2.640541778147001e-10 + }, + { + "n": 32, + "scaled_time_s": 1.0, + "time_t": 0.09921256574801247, + "pt_block_min": -0.045325539893225006, + "witness_expectation": -0.045325539893225006, + "distance_lower_from_witness": 0.045325539893225006, + "entanglement_fidelity": 0.3559821034591499, + "fidelity_tangent_lower": -0.5403282949162016, + "distance_lower_from_tangent": 0.0, + "variance_sum": 7.762768170054402, + "variance_sum_over_n_two_thirds": 0.7701641474581009, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.3724455903322913, + 2.1173366656705217 + ], + "retained_probability_before_normalization": [ + 0.9999999999630157, + 0.9999999965524826 + ], + "tail_at_excitation_n_over_2": [ + 6.634040265071573e-06, + 8.551893843137627e-05 + ], + "trace_error": 4.9960036108132044e-15, + "hermiticity_error": 1.8158804112810014e-31, + "population_output_min_eigenvalue": 8.465630780360389e-08 + }, + { + "n": 32, + "scaled_time_s": 2.0, + "time_t": 0.19842513149602495, + "pt_block_min": 0.038573243162912496, + "witness_expectation": 0.038573243162912496, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.19580515510563173, + "fidelity_tangent_lower": -2.080656589832403, + "distance_lower_from_tangent": 0.0, + "variance_sum": 7.762768170054402, + "variance_sum_over_n_two_thirds": 0.7701641474581009, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.3724455903322913, + 2.1173366656705217 + ], + "retained_probability_before_normalization": [ + 0.9999999999630157, + 0.9999999965524826 + ], + "tail_at_excitation_n_over_2": [ + 6.634040265071573e-06, + 8.551893843137627e-05 + ], + "trace_error": 9.769962616701378e-15, + "hermiticity_error": 1.470889810973413e-31, + "population_output_min_eigenvalue": 1.86569447969291e-05 + }, + { + "n": 64, + "scaled_time_s": 0.1, + "time_t": 0.006250000000000002, + "pt_block_min": -0.40266331458717575, + "witness_expectation": -0.40266331458717575, + "distance_lower_from_witness": 0.40266331458717575, + "entanglement_fidelity": 0.8629633222898152, + "fidelity_tangent_lower": 0.843139672810746, + "distance_lower_from_tangent": 0.343139672810746, + "variance_sum": 12.54882617514032, + "variance_sum_over_n_two_thirds": 0.7843016359462701, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.5624999999999822, + 2.6874999999979057 + ], + "retained_probability_before_normalization": [ + 0.9999999999999994, + 0.9999999999999667 + ], + "tail_at_excitation_n_over_2": [ + 1.3702405871331892e-08, + 2.988387821845433e-07 + ], + "trace_error": 7.105427357601002e-15, + "hermiticity_error": 1.0966212424485631e-30, + "population_output_min_eigenvalue": -7.175185428213011e-16 + }, + { + "n": 64, + "scaled_time_s": 0.5, + "time_t": 0.03125000000000001, + "pt_block_min": -0.1718532833666965, + "witness_expectation": -0.1718532833666965, + "distance_lower_from_witness": 0.1718532833666965, + "entanglement_fidelity": 0.5405408656610879, + "fidelity_tangent_lower": 0.21569836405372977, + "distance_lower_from_tangent": 0.0, + "variance_sum": 12.54882617514032, + "variance_sum_over_n_two_thirds": 0.7843016359462701, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.5624999999999822, + 2.6874999999979057 + ], + "retained_probability_before_normalization": [ + 0.9999999999999994, + 0.9999999999999667 + ], + "tail_at_excitation_n_over_2": [ + 1.3702405871331892e-08, + 2.988387821845433e-07 + ], + "trace_error": 1.84297022087776e-14, + "hermiticity_error": 6.061007887891342e-31, + "population_output_min_eigenvalue": 9.75717001891606e-16 + }, + { + "n": 64, + "scaled_time_s": 1.0, + "time_t": 0.06250000000000001, + "pt_block_min": -0.04553064748982835, + "witness_expectation": -0.04553064748982835, + "distance_lower_from_witness": 0.04553064748982835, + "entanglement_fidelity": 0.3507748479369648, + "fidelity_tangent_lower": -0.5686032718925405, + "distance_lower_from_tangent": 0.0, + "variance_sum": 12.54882617514032, + "variance_sum_over_n_two_thirds": 0.7843016359462701, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.5624999999999822, + 2.6874999999979057 + ], + "retained_probability_before_normalization": [ + 0.9999999999999994, + 0.9999999999999667 + ], + "tail_at_excitation_n_over_2": [ + 1.3702405871331892e-08, + 2.988387821845433e-07 + ], + "trace_error": 3.086420008457935e-14, + "hermiticity_error": 3.2974765394390992e-31, + "population_output_min_eigenvalue": 6.061024403160686e-12 + }, + { + "n": 64, + "scaled_time_s": 2.0, + "time_t": 0.12500000000000003, + "pt_block_min": 0.03655966073076891, + "witness_expectation": 0.03655966073076891, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.19102269768307956, + "fidelity_tangent_lower": -2.137206543785081, + "distance_lower_from_tangent": 0.0, + "variance_sum": 12.54882617514032, + "variance_sum_over_n_two_thirds": 0.7843016359462701, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.5624999999999822, + 2.6874999999979057 + ], + "retained_probability_before_normalization": [ + 0.9999999999999994, + 0.9999999999999667 + ], + "tail_at_excitation_n_over_2": [ + 1.3702405871331892e-08, + 2.988387821845433e-07 + ], + "trace_error": 5.417888360170764e-14, + "hermiticity_error": 2.8222593673261704e-31, + "population_output_min_eigenvalue": 4.4956861804741746e-08 + }, + { + "n": 128, + "scaled_time_s": 0.1, + "time_t": 0.00393725328092148, + "pt_block_min": -0.4021986138213308, + "witness_expectation": -0.40219861382133076, + "distance_lower_from_witness": 0.40219861382133076, + "entanglement_fidelity": 0.8615120019480793, + "fidelity_tangent_lower": 0.8412159828540313, + "distance_lower_from_tangent": 0.3412159828540313, + "variance_sum": 20.164313268259786, + "variance_sum_over_n_two_thirds": 0.7939200857298436, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.8095273327688796, + 3.42858199830664 + ], + "retained_probability_before_normalization": [ + 0.9999999999999998, + 0.9999999999999999 + ], + "tail_at_excitation_n_over_2": [ + 8.751500041448851e-13, + 3.21989829457305e-11 + ], + "trace_error": 5.551115123125783e-15, + "hermiticity_error": 1.7018477577911934e-30, + "population_output_min_eigenvalue": -1.9820553020784952e-15 + }, + { + "n": 128, + "scaled_time_s": 0.5, + "time_t": 0.019686266404607397, + "pt_block_min": -0.17115874259293995, + "witness_expectation": -0.17115874259293995, + "distance_lower_from_witness": 0.17115874259293995, + "entanglement_fidelity": 0.53721810288729, + "fidelity_tangent_lower": 0.20607991427015637, + "distance_lower_from_tangent": 0.0, + "variance_sum": 20.164313268259786, + "variance_sum_over_n_two_thirds": 0.7939200857298436, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.8095273327688796, + 3.42858199830664 + ], + "retained_probability_before_normalization": [ + 0.9999999999999998, + 0.9999999999999999 + ], + "tail_at_excitation_n_over_2": [ + 8.751500041448851e-13, + 3.21989829457305e-11 + ], + "trace_error": 7.993605777301127e-15, + "hermiticity_error": 7.751365852672541e-31, + "population_output_min_eigenvalue": -6.62575388028609e-15 + }, + { + "n": 128, + "scaled_time_s": 1.0, + "time_t": 0.039372532809214794, + "pt_block_min": -0.04548004100486544, + "witness_expectation": -0.04548004100486544, + "distance_lower_from_witness": 0.04548004100486544, + "entanglement_fidelity": 0.347287182985325, + "fidelity_tangent_lower": -0.5878401714596873, + "distance_lower_from_tangent": 0.0, + "variance_sum": 20.164313268259786, + "variance_sum_over_n_two_thirds": 0.7939200857298436, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.8095273327688796, + 3.42858199830664 + ], + "retained_probability_before_normalization": [ + 0.9999999999999998, + 0.9999999999999999 + ], + "tail_at_excitation_n_over_2": [ + 8.751500041448851e-13, + 3.21989829457305e-11 + ], + "trace_error": 1.1546319456101628e-14, + "hermiticity_error": 3.986455969520367e-31, + "population_output_min_eigenvalue": -8.45210587120032e-15 + }, + { + "n": 128, + "scaled_time_s": 2.0, + "time_t": 0.07874506561842959, + "pt_block_min": 0.035419001576513065, + "witness_expectation": 0.03541900157651307, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.18789636650154162, + "fidelity_tangent_lower": -2.1756803429193745, + "distance_lower_from_tangent": 0.0, + "variance_sum": 20.164313268259786, + "variance_sum_over_n_two_thirds": 0.7939200857298436, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 0.8095273327688796, + 3.42858199830664 + ], + "retained_probability_before_normalization": [ + 0.9999999999999998, + 0.9999999999999999 + ], + "tail_at_excitation_n_over_2": [ + 8.751500041448851e-13, + 3.21989829457305e-11 + ], + "trace_error": 1.4988010832439613e-14, + "hermiticity_error": 2.3697094242974174e-31, + "population_output_min_eigenvalue": 3.593533283707911e-12 + }, + { + "n": 256, + "scaled_time_s": 0.1, + "time_t": 0.0024803141437003125, + "pt_block_min": -0.4018608492821419, + "witness_expectation": -0.40186084928214183, + "distance_lower_from_witness": 0.40186084928214183, + "entanglement_fidelity": 0.8605394442776467, + "fidelity_tangent_lower": 0.8399266421796131, + "distance_lower_from_tangent": 0.3399266421796131, + "variance_sum": 32.26876688724152, + "variance_sum_over_n_two_thirds": 0.8003667891019344, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 1.1267735847774145, + 4.3803207543322475 + ], + "retained_probability_before_normalization": [ + 1.0, + 1.0000000000000002 + ], + "tail_at_excitation_n_over_2": [ + 2.244118398185104e-19, + 1.3845812486594273e-17 + ], + "trace_error": 2.930988785010413e-14, + "hermiticity_error": 5.5224996420142074e-30, + "population_output_min_eigenvalue": -2.222841850211688e-15 + }, + { + "n": 256, + "scaled_time_s": 0.5, + "time_t": 0.012401570718501561, + "pt_block_min": -0.170619462727514, + "witness_expectation": -0.170619462727514, + "distance_lower_from_witness": 0.170619462727514, + "entanglement_fidelity": 0.5350002526330025, + "fidelity_tangent_lower": 0.19963321089806563, + "distance_lower_from_tangent": 0.0, + "variance_sum": 32.26876688724152, + "variance_sum_over_n_two_thirds": 0.8003667891019344, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 1.1267735847774145, + 4.3803207543322475 + ], + "retained_probability_before_normalization": [ + 1.0, + 1.0000000000000002 + ], + "tail_at_excitation_n_over_2": [ + 2.244118398185104e-19, + 1.3845812486594273e-17 + ], + "trace_error": 3.863576125695545e-14, + "hermiticity_error": 3.1920806686678034e-30, + "population_output_min_eigenvalue": -5.9204209146185454e-15 + }, + { + "n": 256, + "scaled_time_s": 1.0, + "time_t": 0.024803141437003122, + "pt_block_min": -0.045357157555906115, + "witness_expectation": -0.04535715755590611, + "distance_lower_from_witness": 0.04535715755590611, + "entanglement_fidelity": 0.34497692295715887, + "fidelity_tangent_lower": -0.6007335782038687, + "distance_lower_from_tangent": 0.0, + "variance_sum": 32.26876688724152, + "variance_sum_over_n_two_thirds": 0.8003667891019344, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 1.1267735847774145, + 4.3803207543322475 + ], + "retained_probability_before_normalization": [ + 1.0, + 1.0000000000000002 + ], + "tail_at_excitation_n_over_2": [ + 2.244118398185104e-19, + 1.3845812486594273e-17 + ], + "trace_error": 5.084821452783217e-14, + "hermiticity_error": 2.548035340504922e-30, + "population_output_min_eigenvalue": -7.761747837362468e-15 + }, + { + "n": 256, + "scaled_time_s": 2.0, + "time_t": 0.049606282874006244, + "pt_block_min": 0.03475757581710784, + "witness_expectation": 0.03475757581710783, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.18586082393416675, + "fidelity_tangent_lower": -2.2014671564077375, + "distance_lower_from_tangent": 0.0, + "variance_sum": 32.26876688724152, + "variance_sum_over_n_two_thirds": 0.8003667891019344, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 1.1267735847774145, + 4.3803207543322475 + ], + "retained_probability_before_normalization": [ + 1.0, + 1.0000000000000002 + ], + "tail_at_excitation_n_over_2": [ + 2.244118398185104e-19, + 1.3845812486594273e-17 + ], + "trace_error": 8.049116928532385e-14, + "hermiticity_error": 1.4620623254503106e-30, + "population_output_min_eigenvalue": -8.074420693774835e-15 + }, + { + "n": 512, + "scaled_time_s": 0.1, + "time_t": 0.0015625000000000005, + "pt_block_min": -0.4016240688553866, + "witness_expectation": -0.4016240688553866, + "distance_lower_from_witness": 0.4016240688553866, + "entanglement_fidelity": 0.8598956305324089, + "fidelity_tangent_lower": 0.839073180493844, + "distance_lower_from_tangent": 0.33907318049384405, + "variance_sum": 51.496582241969904, + "variance_sum_over_n_two_thirds": 0.80463409753078, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 1.5312499999999991, + 5.59375 + ], + "retained_probability_before_normalization": [ + 1.0, + 0.9999999999999992 + ], + "tail_at_excitation_n_over_2": [ + 9.026899027641109e-30, + 9.273261634072829e-28 + ], + "trace_error": 2.1316282072803006e-14, + "hermiticity_error": 3.1242230814126626e-30, + "population_output_min_eigenvalue": -4.418868662273857e-15 + }, + { + "n": 512, + "scaled_time_s": 0.5, + "time_t": 0.007812500000000002, + "pt_block_min": -0.17022649791597494, + "witness_expectation": -0.17022649791597494, + "distance_lower_from_witness": 0.17022649791597494, + "entanglement_fidelity": 0.533536604093676, + "fidelity_tangent_lower": 0.19536590246922003, + "distance_lower_from_tangent": 0.0, + "variance_sum": 51.496582241969904, + "variance_sum_over_n_two_thirds": 0.80463409753078, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 1.5312499999999991, + 5.59375 + ], + "retained_probability_before_normalization": [ + 1.0, + 0.9999999999999992 + ], + "tail_at_excitation_n_over_2": [ + 9.026899027641109e-30, + 9.273261634072829e-28 + ], + "trace_error": 6.38378239159465e-14, + "hermiticity_error": 1.5398112793242732e-30, + "population_output_min_eigenvalue": -1.3132213699870358e-14 + }, + { + "n": 512, + "scaled_time_s": 1.0, + "time_t": 0.015625000000000003, + "pt_block_min": -0.04523346171493916, + "witness_expectation": -0.045233461714939166, + "distance_lower_from_witness": 0.045233461714939166, + "entanglement_fidelity": 0.3434609418202378, + "fidelity_tangent_lower": -0.6092681950615599, + "distance_lower_from_tangent": 0.0, + "variance_sum": 51.496582241969904, + "variance_sum_over_n_two_thirds": 0.80463409753078, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 1.5312499999999991, + 5.59375 + ], + "retained_probability_before_normalization": [ + 1.0, + 0.9999999999999992 + ], + "tail_at_excitation_n_over_2": [ + 9.026899027641109e-30, + 9.273261634072829e-28 + ], + "trace_error": 9.037215420448774e-14, + "hermiticity_error": 1.1178007587597439e-30, + "population_output_min_eigenvalue": -1.87329586504566e-14 + }, + { + "n": 512, + "scaled_time_s": 2.0, + "time_t": 0.03125000000000001, + "pt_block_min": 0.03436729054212618, + "witness_expectation": 0.03436729054212618, + "distance_lower_from_witness": 0.0, + "entanglement_fidelity": 0.1845416035147999, + "fidelity_tangent_lower": -2.21853639012312, + "distance_lower_from_tangent": 0.0, + "variance_sum": 51.496582241969904, + "variance_sum_over_n_two_thirds": 0.80463409753078, + "predicted_variance_limit": 0.8125, + "mean_excitation": [ + 1.5312499999999991, + 5.59375 + ], + "retained_probability_before_normalization": [ + 1.0, + 0.9999999999999992 + ], + "tail_at_excitation_n_over_2": [ + 9.026899027641109e-30, + 9.273261634072829e-28 + ], + "trace_error": 1.2168044349891716e-13, + "hermiticity_error": 6.882285879109528e-31, + "population_output_min_eigenvalue": -2.2289779481270578e-14 + } + ], + "growing_excitation_generator_checks": [ + { + "n": 64, + "error_A": 0.009174832225374826, + "error_A_squared": 0.018269445940966196, + "n_two_thirds_times_error_A": 0.14679731560599718, + "n_two_thirds_times_error_A_squared": 0.2923111350554591, + "mean_excitation": 0.5624999999999974, + "tail_above_spin_ladder": 2.417912779628802e-16 + }, + { + "n": 128, + "error_A": 0.005917360509736825, + "error_A_squared": 0.011762765820399132, + "n_two_thirds_times_error_A": 0.15029158876850104, + "n_two_thirds_times_error_A_squared": 0.29875562939771455, + "mean_excitation": 0.8095273327688794, + "tail_above_spin_ladder": 1.4730786066026277e-24 + }, + { + "n": 256, + "error_A": 0.0037963454551359107, + "error_A_squared": 0.007509853829632779, + "n_two_thirds_times_error_A": 0.1530590576511509, + "n_two_thirds_times_error_A_squared": 0.3027783334908148, + "mean_excitation": 1.1267735847774147, + "tail_above_spin_ladder": 1.3390360775587088e-37 + }, + { + "n": 512, + "error_A": 0.002426724470613791, + "error_A_squared": 0.0047716830982885, + "n_two_thirds_times_error_A": 0.1553103661192826, + "n_two_thirds_times_error_A_squared": 0.30538771829046396, + "mean_excitation": 1.5312499999999991, + "tail_above_spin_ladder": 2.8149030562574662e-58 + }, + { + "n": 1024, + "error_A": 0.0015469969013761126, + "error_A_squared": 0.003023370049929512, + "n_two_thirds_times_error_A": 0.15716508855270306, + "n_two_thirds_times_error_A_squared": 0.30715525105582425, + "mean_excitation": 2.0446452412267497, + "tail_above_spin_ladder": 4.6787984179518874e-91 + }, + { + "n": 2048, + "error_A": 0.0009840529299464155, + "error_A_squared": 0.0019123451105247543, + "n_two_thirds_times_error_A": 0.15869811208322732, + "n_two_thirds_times_error_A_squared": 0.3084036940049504, + "mean_excitation": 2.6944883703410087, + "tail_above_spin_ladder": 4.9554222582160635e-143 + }, + { + "n": 4096, + "error_A": 0.0006248550480534681, + "error_A_squared": 0.0012082719700165358, + "n_two_thirds_times_error_A": 0.15996289230168778, + "n_two_thirds_times_error_A_squared": 0.30931762432423304, + "mean_excitation": 3.5156249999999996, + "tail_above_spin_ladder": 1.8221635856468635e-225 + } + ] +} diff --git a/verification/run_all.py b/verification/run_all.py index 03ecd49..4e434cd 100644 --- a/verification/run_all.py +++ b/verification/run_all.py @@ -1,4 +1,4 @@ -"""Run the three bounded scientific checks and record versions and outputs.""" +"""Run the four bounded scientific checks and record versions and outputs.""" from __future__ import annotations @@ -14,6 +14,7 @@ from check_core import run_checks as check_core from check_anisotropic import run_checks as check_anisotropic from check_residual_npt import run_checks as check_residual_npt +from check_rank_two import run_checks as check_rank_two def write_manifest(destination, manifest): @@ -55,7 +56,8 @@ def main(): write_manifest(manifest_path, manifest) for name, function in (("core", check_core), ("anisotropic", check_anisotropic), - ("residual_npt", check_residual_npt)): + ("residual_npt", check_residual_npt), + ("rank_two", check_rank_two)): print(f"Running {name} checks...", flush=True) before = time.monotonic() manifest["active_check"] = name From 22d262b51168668cdefaabeff7c990fdae5807e7 Mon Sep 17 00:00:00 2001 From: Ruge Lin Date: Mon, 2 Nov 2026 18:47:31 +0800 Subject: [PATCH 2/4] Pin supported runner image for hosted mathematical verification --- .github/workflows/verify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 51cf24a..ec59d90 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -11,7 +11,7 @@ concurrency: cancel-in-progress: true jobs: verify: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 25 steps: - uses: actions/checkout@v4 From e779d8c80c910fdcbcedb081f84ff683994116b5 Mon Sep 17 00:00:00 2001 From: Ruge Lin Date: Mon, 2 Nov 2026 18:48:41 +0800 Subject: [PATCH 3/4] Bind joint navigation report to the actual sister proof pin --- verification/results/navigation.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/verification/results/navigation.json b/verification/results/navigation.json index 49d7084..9e6be5c 100644 --- a/verification/results/navigation.json +++ b/verification/results/navigation.json @@ -110,12 +110,12 @@ "counterpart_file_links_checked": [ { "source": "references/RELATED_WORK.md", - "target": "https://github.com/GoGoKo699/Spin-Diffusion-Classicalization/blob/SPIN_SISTER_COMMIT/science/rank_two_diffusion.md", + "target": "https://github.com/GoGoKo699/Spin-Diffusion-Classicalization/blob/bf31418c10302d1786451ddee9b9840f4d9983c8/science/rank_two_diffusion.md", "local_counterpart": "science/rank_two_diffusion.md" }, { "source": "science/spin_contraction.md", - "target": "https://github.com/GoGoKo699/Spin-Diffusion-Classicalization/blob/SPIN_SISTER_COMMIT/science/rank_two_diffusion.md", + "target": "https://github.com/GoGoKo699/Spin-Diffusion-Classicalization/blob/bf31418c10302d1786451ddee9b9840f4d9983c8/science/rank_two_diffusion.md", "local_counterpart": "science/rank_two_diffusion.md" } ] From 59e7198b6450f3857fc0c8d4f407b7caecfd5d0d Mon Sep 17 00:00:00 2001 From: Ruge Lin Date: Mon, 2 Nov 2026 18:54:17 +0800 Subject: [PATCH 4/4] Repair hosted math operators and silently truncated comparisons --- README.md | 8 ++++---- learning/ANCHOR.md | 10 +++++----- learning/MILESTONES.md | 14 +++++++------- learning/TUTORIAL.md | 20 ++++++++++---------- references/RELATED_WORK.md | 6 +++--- science/anisotropic_diffusion.md | 16 ++++++++-------- science/classicalization.md | 10 +++++----- science/communication.md | 4 ++-- science/interpretation.md | 2 +- science/model.md | 4 ++-- science/rank_two_diffusion.md | 4 ++-- science/residual_entanglement.md | 20 ++++++++++---------- verification/README.md | 8 ++++---- 13 files changed, 63 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index b8ad9e2..7a42d92 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Let $`e_j(t)`$ be the infimum of the half-diamond distance from $`\Phi_t`$ to al ```math \begin{aligned} \nu\ge1:&\qquad e_{n/2}(\nu/n)\le\min\{1,2.4/n\},\\ -0\le\nu<1:&\qquad +0\le\nu\lt 1:&\qquad \liminf_{n\to\infty}e_{n/2}(\nu/n) \ge\frac{1-\nu}{2(1+\nu)^2}>0. \end{aligned} @@ -39,7 +39,7 @@ The second line holds at every fixed subthreshold $`\nu`$. Thus **$`\nu=1`$ is t | Classical capacity at fixed scaled time | $`C\ge\log_2(n+1)-g(\nu)`$, where $`g(x)=(x+1)\log_2(x+1)-x\log_2x`$. | | At the boundary $`\nu=1`$ | The classical deficit is at most two bits; mean polarization is retained by the factor $`e^{-2/n}`$. | -These capacity statements allow arbitrary block codes over independent uses. The sharp boundary above is a channel-distance result; positive quantum capacity throughout $`\nu<1`$ is not established. [Communication bounds and proofs](science/communication.md). +These capacity statements allow arbitrary block codes over independent uses. The sharp boundary above is a channel-distance result; positive quantum capacity throughout $`\nu\lt 1`$ is not established. [Communication bounds and proofs](science/communication.md). ![Kernel comparison and encoded witness for spin diffusion](figures/operational_threshold.svg) @@ -47,7 +47,7 @@ These capacity statements allow arbitrary block codes over independent uses. The ## Robustness and residual entanglement -For a fixed positive diffusion matrix with eigenvalues $`00`$ and the exponential variable $`Z`$ with mean $`\nu`$ obtained from the two transverse coordinates. Identify the exact cancellation of the longitudinal phase in the relevant coherence product. Connect bounded matrix elements and tail truncation to convergence of expectations, leading to the negative expectation $`-(1-\nu)/[2(1+\nu)^2]`$ when $`0<\nu<1`$, with $`\nu=0`$ treated directly. +**Understanding target:** Explain the scaled Gaussian rotation coordinates at fixed $`\nu>0`$ and the exponential variable $`Z`$ with mean $`\nu`$ obtained from the two transverse coordinates. Identify the exact cancellation of the longitudinal phase in the relevant coherence product. Connect bounded matrix elements and tail truncation to convergence of expectations, leading to the negative expectation $`-(1-\nu)/[2(1+\nu)^2]`$ when $`0\lt \nu\lt 1`$, with $`\nu=0`$ treated directly. **Dependencies and story role:** Uses M06, M16, and M19. It supplies the nonzero limiting obstruction needed to match the upper bound's time scale. @@ -298,7 +298,7 @@ The [scientific account](../science/README.md) supplies the spin-specific defini **Central question:** In exactly what sense do the upper comparator and lower witness locate a sharp boundary? -**Understanding target:** Combine $`e_{n/2}(\nu/n)=O(1/n)`$ for $`\nu\ge1`$ with a strictly positive limiting lower bound at each fixed $`0\le\nu<1`$. Explain why their meeting point is $`\nu=1`$, even though their numerical bounds need not agree away from it. State the order of limits and distinguish this distance-to-EB boundary from finite-$`n`$ exact EB and from a proven boundary for positive quantum capacity. +**Understanding target:** Combine $`e_{n/2}(\nu/n)=O(1/n)`$ for $`\nu\ge1`$ with a strictly positive limiting lower bound at each fixed $`0\le\nu\lt 1`$. Explain why their meeting point is $`\nu=1`$, even though their numerical bounds need not agree away from it. State the order of limits and distinguish this distance-to-EB boundary from finite-$`n`$ exact EB and from a proven boundary for positive quantum capacity. **Dependencies and story role:** Integrates M17–M20 with the definitions in M12. It completes the central channel theorem before turning to its consequences and extensions. @@ -354,7 +354,7 @@ The [scientific account](../science/README.md) supplies the spin-specific defini **Central question:** Is the communication separation confined to one finely chosen time? -**Understanding target:** Use the exact finite bounds at $`t_n=n^{-\alpha}`$, with fixed $`0<\alpha<1`$, to obtain $`C\ge\alpha\log_2n-\log_2e+o(1)`$ while $`Q=O(\log n/n)`$ and polarization tends to one. Explain why $`nt_n`$ now grows rather than remaining fixed, and why the later-time upper bound and entropy estimate still apply without another channel approximation. +**Understanding target:** Use the exact finite bounds at $`t_n=n^{-\alpha}`$, with fixed $`0\lt \alpha\lt 1`$, to obtain $`C\ge\alpha\log_2n-\log_2e+o(1)`$ while $`Q=O(\log n/n)`$ and polarization tends to one. Explain why $`nt_n`$ now grows rather than remaining fixed, and why the later-time upper bound and entropy estimate still apply without another channel approximation. **Dependencies and story role:** Uses M18, M23, and M24. It broadens the fixed-$`\nu`$ conclusion into a range of experimentally interpretable shrinking diffusion times. @@ -368,7 +368,7 @@ The [scientific account](../science/README.md) supplies the spin-specific defini **Central question:** Which parts of classicalization require isotropy, and when can the anisotropic boundary still be located exactly? -**Understanding target:** For fixed $`D>0`$ with eigenvalues $`a\le b\le c`$, explain extraction of the isotropic component $`aI`$ through the central adjoint Casimir. Connect the tangent-plane witness to $`ab`$ at the pole along the strongest axis, giving $`1/\sqrt{ab}\le\tau_{\mathrm{op}}(D)\le1/a`$ for $`\tau=nt`$. Identify the exact case $`a=b\le c`$ and the unresolved gap when $`a0`$ with eigenvalues $`a\le b\le c`$, explain extraction of the isotropic component $`aI`$ through the central adjoint Casimir. Connect the tangent-plane witness to $`ab`$ at the pole along the strongest axis, giving $`1/\sqrt{ab}\le\tau_{\mathrm{op}}(D)\le1/a`$ for $`\tau=nt`$. Identify the exact case $`a=b\le c`$ and the unresolved gap when $`a\lt b`$. Explain why unitality and entropy averaging retain the classical bound without full rotation covariance. **Dependencies and story role:** Uses M05, M18, M20, M23, and M24. It tests the structural robustness of the completed isotropic argument. @@ -382,7 +382,7 @@ The [scientific account](../science/README.md) supplies the spin-specific defini **Central question:** When one noise direction is absent, what does the nonlinear local limit establish and what remains a global channel problem? -**Understanding target:** Retain the deterministic-rotation condition $`n\int_0^T\lambda_{\min}(D(u))du\ge1`$ and distinguish its upper scope from bounded-rate local converses. For fixed $`D=\mathrm{diag}(0,b,c)`$, explain why bounded-excitation inverse-spin tests do not locate the longer scale. Follow the squeeze $`q=n^{1/6}Q`$, $`p=n^{-1/6}P`$ and $`t=s n^{-2/3}`$ to the generator $`-(b/2)\operatorname{ad}_P^2-c\operatorname{ad}_{Q^2/2}^2`$, with physical excitation $`O(n^{1/3})`$. State the fixed finite Schwartz-span/reference/time quantifiers of the controlled trace-norm approximation. Transfer a finite-energy NPT witness at every finite $`s`$, making $`n^2t^3\to\infty`$ necessary for vanishing distance. Distinguish this lower conclusion from the weaker proved equal-rate global upper regime $`t\sqrt n\to\infty`$ and the unresolved sufficiency of the candidate crossover variable. +**Understanding target:** Retain the deterministic-rotation condition $`n\int_0^T\lambda_{\min}(D(u))du\ge1`$ and distinguish its upper scope from bounded-rate local converses. For fixed $`D=\mathrm{diag}(0,b,c)`$, explain why bounded-excitation inverse-spin tests do not locate the longer scale. Follow the squeeze $`q=n^{1/6}Q`$, $`p=n^{-1/6}P`$ and $`t=s n^{-2/3}`$ to the generator $`-(b/2)\mathrm{ad}_P^2-c\mathrm{ad}_{Q^2/2}^2`$, with physical excitation $`O(n^{1/3})`$. State the fixed finite Schwartz-span/reference/time quantifiers of the controlled trace-norm approximation. Transfer a finite-energy NPT witness at every finite $`s`$, making $`n^2t^3\to\infty`$ necessary for vanishing distance. Distinguish this lower conclusion from the weaker proved equal-rate global upper regime $`t\sqrt n\to\infty`$ and the unresolved sufficiency of the candidate crossover variable. **Dependencies and story role:** Uses M03, M06–M08, M20 and M26. It follows the failure of isotropic extraction into a different excitation regime, then returns to the original all-reference channel question. @@ -410,7 +410,7 @@ The [scientific account](../science/README.md) supplies the spin-specific defini **Central question:** How can a channel approach the EB set while an exact entanglement witness remains negative? -**Understanding target:** Separate the finite character sum into the positive antipodal heat term and the omitted representation tail. Compare their exponential rates to obtain $`\lambda_{0,n}(\nu/n)\sim-[e^{-2\nu}/\cosh\nu]e^{-\nu n}/n`$ for fixed $`0<\nu<\pi/2`$ along odd $`n`$. Explain the stronger certificate at $`\nu=1`$ for every odd $`n\ge5`$, the change in this sector's sign at the fixed-$`\nu`$ endpoint, and the coexistence of an exponentially small distance lower bound with the independent $`O(1/n)`$ upper bound. Do not identify this single eigenvalue with total residual entanglement or the exact PPT/EB time. +**Understanding target:** Separate the finite character sum into the positive antipodal heat term and the omitted representation tail. Compare their exponential rates to obtain $`\lambda_{0,n}(\nu/n)\sim-[e^{-2\nu}/\cosh\nu]e^{-\nu n}/n`$ for fixed $`0\lt \nu\lt \pi/2`$ along odd $`n`$. Explain the stronger certificate at $`\nu=1`$ for every odd $`n\ge5`$, the change in this sector's sign at the fixed-$`\nu`$ endpoint, and the coexistence of an exponentially small distance lower bound with the independent $`O(1/n)`$ upper bound. Do not identify this single eigenvalue with total residual entanglement or the exact PPT/EB time. **Dependencies and story role:** Uses M07, M16, M21, M24, and M28. It reconciles the project's operational conclusion with exact surviving entanglement. diff --git a/learning/TUTORIAL.md b/learning/TUTORIAL.md index b364559..e5503fc 100644 --- a/learning/TUTORIAL.md +++ b/learning/TUTORIAL.md @@ -296,7 +296,7 @@ Combining the two explicit bounds gives ```math \mathrm{TV}(p_{1/n},k_n)\le\frac{K_0}{n}, -\qquad K_0=2.393520645\ldots<2.4. +\qquad K_0=2.393520645\ldots\lt 2.4. ``` This is a conservative uniform estimate, not the optimized diamond distance. For later times, the comparator $`\Phi_{t-1/n}\circ\mathcal B_j`$ remains EB. Semigroup composition and contraction therefore yield @@ -352,14 +352,14 @@ The antisymmetric vector in this block has limiting partial-transpose expectatio ```math \liminf_{n\to\infty}e_{n/2}(\nu/n) \ge\frac{1-\nu}{2(1+\nu)^2}, -\qquad 0\le\nu<1. +\qquad 0\le\nu\lt 1. ``` For example, $`\nu=1/2`$ gives the nonzero lower bound $`1/9`$. At $`\nu=0`$, the Bell state is unchanged. Together with the upper bound, this places the sharp boundary for vanishing distance to EB at $`\nu=1`$. The [converse proof](../science/classicalization.md#4-a-two-level-converse-below-the-boundary) establishes that operational statement; it does not locate a positive-quantum-capacity boundary. -The lower formula is a bound obtained from one chosen input and measurement. It need not equal the limiting channel distance. Sharpness here refers to its strictly positive sign at every fixed $`\nu<1`$, together with a uniform upper bound that vanishes at and above one. +The lower formula is a bound obtained from one chosen input and measurement. It need not equal the limiting channel distance. Sharpness here refers to its strictly positive sign at every fixed $`\nu\lt 1`$, together with a uniform upper bound that vanishes at and above one. ## 8. Fidelity and the communication separation — M22–M25 @@ -406,7 +406,7 @@ Q(\Phi_t)\le The dimension factor is essential, and the theorem already accounts for arbitrary block lengths at each fixed spin. Its conservative constants need not give a useful finite-size improvement at moderate $`n`$. -The separation also holds for $`t_n=n^{-\alpha}`$, with fixed $`0<\alpha<1`$. Now $`nt_n`$ grows, but the later-time comparison still applies. Using $`g(x)=\log_2x+\log_2e+o(1)`$, +The separation also holds for $`t_n=n^{-\alpha}`$, with fixed $`0\lt \alpha\lt 1`$. Now $`nt_n`$ grows, but the later-time comparison still applies. Using $`g(x)=\log_2x+\log_2e+o(1)`$, ```math C(\Phi_{t_n})\ge\alpha\log_2n-\log_2e+o(1), @@ -418,7 +418,7 @@ Thus the classical rate diverges across a range of shrinking times. The [communi ## 9. Unequal strengths, rotations and rank-two diffusion — M26–M27 -Replace isotropy by a fixed real symmetric positive-definite matrix $`D`$, with eigenvalues $`0. Version record: (v3, 12 July 2003); publication: , 11 July 2003. The generated HTML date is not the paper's publication or revision date. diff --git a/science/anisotropic_diffusion.md b/science/anisotropic_diffusion.md index 8dfb01a..fe8c4c8 100644 --- a/science/anisotropic_diffusion.md +++ b/science/anisotropic_diffusion.md @@ -18,7 +18,7 @@ The eigenvalues of $`D`$ are physical angular diffusion rates. Our normalization Write ```math -0A\ge0`$ and the block has limiting negative eigenvalue $`-(B-A)/2`$. Let $`w=(|1,0\rangle-|0,1\rangle)/\sqrt2`$ and $`W=(|w\rangle\langle w|)^{\Gamma_R}`$. Its operator norm is $`1/2`$ and its expectation is nonnegative on every separable state. Thus the output's half trace-norm distance from separable states is at least $`(B-A)/2`$ in the limit. Every EB comparator sends this input to a separable state, proving (8). +When $`\tau\sqrt{\mu_1\mu_2}\lt 1`$, $`B>A\ge0`$ and the block has limiting negative eigenvalue $`-(B-A)/2`$. Let $`w=(|1,0\rangle-|0,1\rangle)/\sqrt2`$ and $`W=(|w\rangle\langle w|)^{\Gamma_R}`$. Its operator norm is $`1/2`$ and its expectation is nonnegative on every separable state. Thus the output's half trace-norm distance from separable states is at least $`(B-A)/2`$ in the limit. Every EB comparator sends this input to a separable state, proving (8). ### 2.4 Optimal pole for this witness and the sandwich @@ -268,7 +268,7 @@ Semigroup postprocessing makes $`e_{j,D}(t)`$ nonincreasing in $`t`$, and the pr \frac1{\sqrt{ab}}\le\tau_{\mathrm{op}}(D)\le\frac1a. ``` -Equality of the two rates $`a=b`$ closes this interval and proves (3). For $`a0. @@ -253,7 +253,7 @@ Equations (8) and (13) yield the finite bound e^{\nu/(4n)}e^{-n\Delta(\nu)}. ``` -Both terms on the right vanish. Since $`\beta(\nu)>0`$, $`S_n(\nu/n)<0`$ for all sufficiently large odd $`n`$, and +Both terms on the right vanish. Since $`\beta(\nu)>0`$, $`S_n(\nu/n)\lt 0`$ for all sufficiently large odd $`n`$, and **Equation (15).** @@ -287,7 +287,7 @@ Consequently the following fully explicit conditions certify a negative singlet ```math \begin{gathered} -0\pi^{3/2}t^{-3/2}e^{t/4-\pi^2/(4t)}. @@ -322,7 +322,7 @@ Their lower ratio bound is \frac{e^{(\pi^2/4-1)n}}{\sqrt n}. ``` -The right-hand side is increasing for $`n\ge5`$. At $`n=5`$, the elementary inequalities $`\pi>3`$, $`\pi^{3/2}<6`$, $`\sqrt5<9/4`$, $`e^2>7`$, and $`\sqrt e>3/2`$ already lower-bound it by $`1064/819>1`$. Thus $`R_n>H`$ for every odd $`n\ge5`$, proving the stated finite-spin result. For example, +The right-hand side is increasing for $`n\ge5`$. At $`n=5`$, the elementary inequalities $`\pi>3`$, $`\pi^{3/2}\lt 6`$, $`\sqrt5\lt 9/4`$, $`e^2>7`$, and $`\sqrt e>3/2`$ already lower-bound it by $`1064/819>1`$. Thus $`R_n>H`$ for every odd $`n\ge5`$, proving the stated finite-spin result. For example, ```math \lambda_{0,5}(1/5)=-6.77854310143684068\times10^{-5}. @@ -349,7 +349,7 @@ Let $`W=(|s_j\rangle\langle s_j|)^\Gamma`$. Since the singlet is maximally entan \|W\|_\infty=1/d. ``` -For every separable state $`\sigma`$, $`\mathrm{tr}(W\sigma)\ge0`$. When $`\lambda_{0,n}<0`$, Hölder's inequality gives +For every separable state $`\sigma`$, $`\mathrm{tr}(W\sigma)\ge0`$. When $`\lambda_{0,n}\lt 0`$, Hölder's inequality gives ```math \frac12\|\rho_{n,t}-\sigma\|_1\ge-\frac d2\lambda_{0,n}(t). @@ -364,7 +364,7 @@ Applying this to normalized Choi states of EB channels yields \ge-\frac{n+1}{2}\lambda_{0,n}(t). ``` -In particular, for fixed $`1\le\nu<\pi/2`$, along odd $`n`$, +In particular, for fixed $`1\le\nu\lt \pi/2`$, along odd $`n`$, **Equation (21).** diff --git a/verification/README.md b/verification/README.md index 2f2911b..3b5eda6 100644 --- a/verification/README.md +++ b/verification/README.md @@ -80,7 +80,7 @@ with the coherent pole along the third coordinate. Thus the check exercises the [The rank-two scientific account](../science/rank_two_diffusion.md) separates a squeezed local contraction from the missing global entanglement-breaking approximation. The new check uses the original finite-spin generator ```math -\mathcal L=-\operatorname{ad}_{J_y}^{2}-\operatorname{ad}_{J_z}^{2}, +\mathcal L=-\mathrm{ad}_{J_y}^{2}-\mathrm{ad}_{J_z}^{2}, \qquad t=s n^{-2/3}. ``` @@ -91,7 +91,7 @@ For $`s=1`$, the partial-transpose block minima are approximately $`-0.0444294`$ A separate analytic consistency check uses the exact finite-dimensional inequality ```math -F_e(t)\ge1-2t\bigl[\operatorname{Var}(J_y)+\operatorname{Var}(J_z)\bigr]. +F_e(t)\ge1-2t\bigl[\mathrm{Var}(J_y)+\mathrm{Var}(J_z)\bigr]. ``` The program verifies it against the independently evolved output and records the scaled variance approaching $`13/16`$. The proof and its scope are in the scientific account. This check supplies a conservative direct finite-spin lower bound, independently of the local output-convergence theorem. @@ -111,7 +111,7 @@ The optional run adds witness sizes $`n=256,512`$. Its $`s=1`$ block minimum at The dense construction exponentiates the Lindblad superoperator, reshapes it into a **normalized** Choi matrix, and then takes its partial transpose. It checks positivity and unit trace before comparing the singlet eigenpair with the scalar formula. This independently tests the factor $`(n+1)^{-2}`$ and the parity convention. -At larger $`n`$, ordinary floating-point subtraction can give a meaningless sign. The scalar checks use decimal precision $`90+\lceil2n/\ln10\rceil`$ for the registered $`\nu<2`$ cases. They compare the finite alternating sum with the separately evaluated Poisson heat term minus the omitted tail. After scaling by $`n e^{-\nu n}`$, the reconstruction errors are below $`10^{-55}`$, and the explicit tail-error bound passes in every registered case. The samples include $`\nu=1,1.5,1.55,\pi/2`$; the endpoint tests the positive asymptotic rather than assuming the negative sign persists there. [Analytical proof](../science/residual_entanglement.md). +At larger $`n`$, ordinary floating-point subtraction can give a meaningless sign. The scalar checks use decimal precision $`90+\lceil2n/\ln10\rceil`$ for the registered $`\nu\lt 2`$ cases. They compare the finite alternating sum with the separately evaluated Poisson heat term minus the omitted tail. After scaling by $`n e^{-\nu n}`$, the reconstruction errors are below $`10^{-55}`$, and the explicit tail-error bound passes in every registered case. The samples include $`\nu=1,1.5,1.55,\pi/2`$; the endpoint tests the positive asymptotic rather than assuming the negative sign persists there. [Analytical proof](../science/residual_entanglement.md). ## Recorded outputs @@ -127,7 +127,7 @@ The figures are generated from those reports by [make_figures.py](make_figures.p ![Operational threshold checks](../figures/operational_threshold.svg) -The lower witness tends to a positive distance bound at every fixed $`\nu<1`$. Above the boundary, the finite witness may become zero before other entanglement witnesses do; the theorem concerns its limiting bound. +The lower witness tends to a positive distance bound at every fixed $`\nu\lt 1`$. Above the boundary, the finite witness may become zero before other entanglement witnesses do; the theorem concerns its limiting bound. ![Residual Choi entanglement after the operational threshold](../figures/residual_entanglement.svg)