diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 0000000..ec59d90 --- /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-24.04 + 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..7a42d92 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 @@ -18,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} @@ -33,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) @@ -41,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. @@ -376,19 +376,19 @@ The [scientific account](../science/README.md) supplies the spin-specific defini **Sources and anchor:** [Anisotropic Casimir factorization](../science/anisotropic_diffusion.md#1-upper-bound-from-the-adjoint-casimir), [optimal pole and bracket](../science/anisotropic_diffusion.md#24-optimal-pole-for-this-witness-and-the-sandwich), and [capacity without covariance](../science/anisotropic_diffusion.md#3-classical-capacity-without-covariance). Holevo, Chapter 6, supports the channel evolution and Chapters 7–8 the entropy and classical-capacity framework; the anisotropic coefficients are derived locally. -### M27 — Locate the limits of deterministic rotations and missing noise axes +### M27 — Separate the rank-two local contraction from a global EB theorem **Phase:** Narrative/innovation. -**Central question:** Which changes to the dynamics preserve the argument, and which change its inverse-spin conclusion? +**Central question:** When one noise direction is absent, what does the nonlinear local limit establish and what remains a global channel problem? -**Understanding target:** Explain the integrated minimum diffusion strength $`\kappa(T)=\int_0^T\lambda_{\min}(D(s))\,ds`$ and the upper condition $`n\kappa(T)\ge1`$ in the presence of deterministic linear spin Hamiltonians. Distinguish this upper statement, which permits strong rotations, from the unchanged lower limit proved for rotation rates bounded independently of $`n`$. Recognize the integrated-trace entropy bound for classical communication and the positive lower witness at every fixed inverse-spin time when a fixed diffusion matrix is rank deficient and rotation rates remain bounded. Keep nonlinear Hamiltonians and spin-dependent degenerating rates outside the stated fixed-rate conclusion. +**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, M09, M20, and M26. It turns robustness into explicit conditions on dynamics and resources, rather than a generic claim about control. +**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. -**Conceptual connection:** Centrality of the Casimir protects the upper factorization; transverse fluctuations determine the local converse. These mechanisms have different assumptions and must remain separate. +**Conceptual connection:** The nonlinear sister supplies conditional covariance and finite-energy witnesses. Controlled local trace convergence transfers a witness into the finite spin, but does not replace a globally CP/TP EB comparator or a diamond bound over every encoding. Brownian paths remain unobserved. Hörmander/Grushin noise spreading is inherited mechanism; its local presence is not a global classicalization theorem. -**Sources and anchor:** [Deterministic rotations and time-dependent rates](../science/anisotropic_diffusion.md#5-deterministic-hamiltonian-rotations-and-time-dependent-rates) and [limits of robustness](../science/anisotropic_diffusion.md#6-limits-of-the-robustness-claim). Holevo, Chapter 6, supplies the evolution framework and Chapter 7 the entropy foundation; the control and rank-deficiency statements are local results. +**Sources and anchor:** [Rank-two contraction, witnesses and global gap](../science/rank_two_diffusion.md), [deterministic rotations](../science/anisotropic_diffusion.md#5-deterministic-hamiltonian-rotations-and-time-dependent-rates), and the [nonlinear sister's conditional covariance](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/conditional_gaussian.md) and [finite-energy converse](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement/blob/9c0ee02e018cf6940bcbb7916a666495331e8852/science/exact_threshold.md). Holevo, §6.4, §§11.1, 11.5, 11.7, §§12.2.1–12.2.3, §12.4.4 and §12.6.2, supplies verified topic locations for channels, convergence, input constraints, canonical transformations and Gaussian EB. The research accounts supply the contraction and stochastic estimates. ### M28 — Resolve the normalized Choi partial transpose in the singlet sector @@ -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. @@ -424,10 +424,10 @@ The [scientific account](../science/README.md) supplies the spin-specific defini **Central question:** What has the combined analysis established, why does it matter, and which claims remain separate? -**Understanding target:** Explain the complete chain from a known coherent-measurement kernel, through a uniform shrinking-time comparison and matching two-level witness, to the sharp distance-to-EB boundary and simultaneous communication separation. Integrate the anisotropic bracket, its exact axisymmetric case, deterministic-rotation scope, and residual Choi NPT. State the irreducible-carrier and independent-use assumptions. Distinguish imported representation and continuity results from the estimates derived here, analytical proofs from finite numerical checks, and established conclusions from the open general anisotropic coefficient, exact EB/PPT times, and quantum-capacity boundary below $`\nu=1`$. +**Understanding target:** Explain the complete chain from a known coherent-measurement kernel, through a uniform shrinking-time comparison and matching two-level witness, to the sharp distance-to-EB boundary and simultaneous communication separation. Integrate the anisotropic bracket, its exact axisymmetric case, deterministic-rotation scope, rank-two growing-excitation contraction and residual Choi NPT. Contrast the isotropic finite coefficient with the absence of any finite sharp coefficient on the rank-two $`n^{-2/3}`$ crossover scale; retain the open global sufficiency question. State the irreducible-carrier and independent-use assumptions. Distinguish imported representation and continuity results from the estimates derived here, analytical proofs from finite numerical checks, and established conclusions from the open general anisotropic coefficient, the sharper global rank-two EB approximation, exact EB/PPT times, and quantum-capacity boundary below $`\nu=1`$. **Dependencies and story role:** Integrates M13–M29 using the problem formulation in M12. This closes the narrative phase by connecting the mechanism, consequences, robustness, and limits into one scientific contribution. **Conceptual connection:** A large spin can remain a high-capacity classical carrier while every encoding in that same irreducible carrier faces a quantum-transmission converse. Operational approximation, exact entanglement, and communication capacity remain distinct quantities throughout that statement. -**Sources and anchor:** [Scientific account](../science/README.md), [physical interpretation and boundaries](../science/interpretation.md), [attribution and closest predecessors](../references/RELATED_WORK.md#established-ingredients-and-the-contribution-of-this-analysis), and [the scope of numerical verification](../verification/README.md). Holevo, Chapters 3, 6, 7, 8, and 10, provide the integrated quantum-information foundation, with Chapter 12 as a limited Gaussian comparison; the canonical project pages supply the actual research claims. +**Sources and anchor:** [Scientific account](../science/README.md), [physical interpretation and boundaries](../science/interpretation.md), [attribution and closest predecessors](../references/RELATED_WORK.md#established-ingredients-and-the-contribution-of-this-analysis), and [the scope of numerical verification](../verification/README.md). Holevo, Chapters 3, 6, 7, 8, and 10, provide the integrated quantum-information foundation, with Chapters 11–12 supporting the qualified local oscillator connection; the canonical project pages supply the actual research claims. diff --git a/learning/README.md b/learning/README.md index ce825a4..646a2fa 100644 --- a/learning/README.md +++ b/learning/README.md @@ -2,7 +2,7 @@ [Project overview](../README.md) · [Scientific account](../science/README.md) · [Verification](../verification/README.md) -A large spin can retain an accurate direction while its ability to preserve quantum information changes substantially. The learning route explains how to make that statement precise for every encoding in one irreducible spin, why the threshold occurs on an inverse-spin time scale, and how classical communication survives it. +A large spin can retain an accurate direction while its ability to preserve quantum information changes substantially. The learning route explains how to make that statement precise for every encoding in one irreducible spin, why the isotropic threshold occurs on an inverse-spin time scale, and how classical communication survives it. Rank-two noise then tests the boundary of that argument: growing-excitation states connect it to the nonlinear sister model, while a local contraction and a global EB approximation remain separate obligations. The single educational anchor is **Alexander S. Holevo, _Quantum Systems, Channels, Information: A Mathematical Introduction_, second revised and expanded edition (2019)**. The [source bridge](ANCHOR.md) identifies the verified chapter locations, fixes the project's conventions, and connects the textbook topics to the spin-specific arguments. The tutorial supplies the explanations needed to enter the project; reading the entire book is not a prerequisite. @@ -19,7 +19,7 @@ The single educational anchor is **Alexander S. Holevo, _Quantum Systems, Channe ## How the 30 milestones fit together -The allocation follows the scientific dependencies. **Twelve background milestones** connect the spin carrier, entanglement, channels, probability, entropy, and coding into the operational question. **Eighteen narrative milestones** assemble the two sides of the theorem, derive its consequences, and test its scope. Each phase moves from individual objects and arguments toward a synthesis. +The allocation follows the scientific dependencies. **Twelve background milestones** connect the spin carrier, entanglement, channels, probability, entropy, and coding into the operational question. **Eighteen narrative milestones** assemble the two sides of the theorem, derive its consequences, and test its scope, including the singular rank-two limit. Each phase moves from individual objects and arguments toward a synthesis. | Milestones | Part of the story | |---|---| @@ -29,12 +29,16 @@ The allocation follows the scientific dependencies. **Twelve background mileston | M13–M18 | Build the EB comparator, compare rotation kernels uniformly, and extend the bound to later times. | | M19–M21 | Construct the two-level witness, evaluate its local limit, and establish the sharp boundary. | | M22–M25 | Constrain arbitrary recovery, retain classical bits, bound quantum capacity, and extend the separation across time scales. | -| M26–M27 | Unequal diffusion strengths, deterministic rotations, and missing noise directions. | +| M26–M27 | Unequal diffusion strengths and deterministic rotations; the rank-two growing-excitation contraction, reference witnesses and unresolved global scale. | | M28–M29 | Exact Choi partial transpose and the residual entanglement that can coexist with operational classicality. | | M30 | Whole-project synthesis: mechanism, contribution, attribution, and resource scope. | The map selects what is needed to understand the project as a whole. The canonical science pages retain the specialist lemmas and calculations behind each target. The tutorial follows this settled map and uses the exactly solvable qubit channel to connect physical preparation, noisy output, measurement, entanglement, and channel distance in one example. +## The rank-two sister connection + +[Nonlinear-Diffusion-Entanglement](https://github.com/GoGoKo699/Nonlinear-Diffusion-Entanglement) supplies conditional covariance, exceptional-path estimates and all-finite-time reference witnesses for the limiting nonlinear channel. The [rank-two spin account](../science/rank_two_diffusion.md) owns the controlled growing-excitation contraction and its finite-spin consequences. M27 and the corresponding tutorial section explain why $`n^{-2/3}`$ has no finite sharp coefficient for vanishing EB distance, and why a global sufficient regime at that scale remains open. The common Holevo anchor supports distinct learning routes in the two repositories. + ## Three quantities to keep in view The central boundary concerns **distance to the set of entanglement-breaking channels as the spin grows**. Exact EB at a fixed spin, the survival of an entangled output, and an unassisted quantum communication rate are related but distinct questions. The tutorial carries their definitions through the arguments so that the upper comparator, lower witness, capacity bounds, and residual Choi eigenvalue can be read together. diff --git a/learning/TUTORIAL.md b/learning/TUTORIAL.md index d875d28..e5503fc 100644 --- a/learning/TUTORIAL.md +++ b/learning/TUTORIAL.md @@ -4,7 +4,7 @@ A growing spin carrier can retain its direction and almost all its classical communication capacity while its quantum communication rate tends to zero. This tutorial develops the objects and mechanism behind that statement. The crucial comparison concerns the entire noisy channel, including inputs entangled with an external reference. -The sections follow the settled M01–M30 map. Holevo's *Quantum Systems, Channels, Information* supplies the educational anchor: Chapters 3 and 6 for composite systems and channels, Chapters 7–8 for entropy and classical communication, Chapter 10 for quantum transmission, and Chapter 12 for a limited local Gaussian interpretation. These are the [verified chapter-level pointers](ANCHOR.md#verified-chapter-locations-and-their-role); the spin-specific claims and detailed proofs come from the linked scientific pages. +The sections follow the settled M01–M30 map. Holevo's *Quantum Systems, Channels, Information* supplies the educational anchor: Chapters 3 and 6 for composite systems and channels, Chapters 7–8 for entropy and classical communication, Chapter 10 for quantum transmission, and Chapters 11–12 for constrained inputs, canonical transformations and the controlled local oscillator connection. These are the [verified chapter and preview-section pointers](ANCHOR.md#verified-chapter-locations-and-their-role); the spin-specific claims and detailed proofs come from the linked scientific pages. ## 1. The carrier, its reference, and its channel — M01–M03 @@ -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), @@ -416,9 +416,9 @@ C(\Phi_{t_n})\ge\alpha\log_2n-\log_2e+o(1), Thus the classical rate diverges across a range of shrinking times. The [communication proof](../science/communication.md) supplies the coding attribution, continuity theorem, and resource qualifications. -## 9. Unequal noise strengths and deterministic rotations — M26–M27 +## 9. Unequal strengths, rotations and rank-two diffusion — M26–M27 -Replace isotropy by a fixed real symmetric positive-definite matrix $`D`$, with eigenvalues $`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[\mathrm{Var}(J_y)+\mathrm{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 @@ -484,14 +559,14 @@ R_n(\nu/n)\sim \frac{e^{-2\nu}}{\cosh\nu}\,n e^{-\nu n}. ``` -When $`0<\nu<\pi/2`$, the tail decays more slowly and dominates. Division by $`(n+1)^2`$ gives +When $`0\lt \nu\lt \pi/2`$, the tail decays more slowly and dominates. Division by $`(n+1)^2`$ gives ```math \lambda_{0,n}(\nu/n)\sim -\frac{e^{-2\nu}}{\cosh\nu}\frac{e^{-\nu n}}n. ``` -Thus fixed $`1\le\nu<\pi/2`$ supports both vanishing distance to EB and an NPT Choi state along sufficiently large odd $`n`$, corresponding to half-integer spins. At $`\nu=1`$, a finite certificate proves negativity for every odd $`n\ge5`$. At the endpoint $`\nu=\pi/2`$, the heat term's larger polynomial prefactor makes this particular eigenvalue eventually positive. +Thus fixed $`1\le\nu\lt \pi/2`$ supports both vanishing distance to EB and an NPT Choi state along sufficiently large odd $`n`$, corresponding to half-integer spins. At $`\nu=1`$, a finite certificate proves negativity for every odd $`n\ge5`$. At the endpoint $`\nu=\pi/2`$, the heat term's larger polynomial prefactor makes this particular eigenvalue eventually positive. Parity determines the tail's first sign: odd $`n`$ makes the first omitted rank even and its contribution positive. The asymptotic argument controls the whole tail by an absolutely summable majorant after writing its ranks as $`n+1+k`$. It therefore requires fixed positive $`\nu`$ and compares complete sums, not just two individual terms. The endpoint changes because the exponential rates agree there and the polynomial prefactors become decisive. @@ -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..69f1124 100644 --- a/references/RELATED_WORK.md +++ b/references/RELATED_WORK.md @@ -23,7 +23,7 @@ The question concerns preservation of entanglement with an external reference, u | Berezin transform approximates heat flow | Uniform Sobolev-operator estimate already proved in [Ioos2020], Proposition 3.9, Eq. (3.30); spin measurement/diffusion comparison in [Brody2026]. | Neither the heat analogy nor norm approximation in general is new. The norm, domain, and ancillary-system uniformity matter. | | Classical group kernels control quantum-channel distances | Established transference framework [Bardet2021], especially Sections III and IV.C. | The elementary total-variation-to-diamond transfer is not itself the new step. | | At $`t=1/n`$, the spin diffusion channel is within $`O(n^{-1})`$ in diamond norm of the coherent measure-and-prepare channel | Estimate derived in the accompanying analysis, using the imported central kernel and a shrinking-time heat-kernel comparison. | The bound is uniform over input states and arbitrary reference systems despite growing spin dimension. | -| For every fixed $`0\leq\nu<1`$, distance from all entanglement-breaking channels remains bounded below | Derived from the two-level north-pole encoding and a partial-transpose witness in the accompanying analysis. | This supplies the lower side of the asymptotic channel-classicalization threshold; it does not establish a positive quantum-capacity threshold. | +| For every fixed $`0\leq\nu\lt 1`$, distance from all entanglement-breaking channels remains bounded below | Derived from the two-level north-pole encoding and a partial-transpose witness in the accompanying analysis. | This supplies the lower side of the asymptotic channel-classicalization threshold; it does not establish a positive quantum-capacity threshold. | | Bounds for every encoding and final recovery, and $`Q=O(\log n/n)`$ above threshold | Consequences of the uniform estimate, the standard entanglement-breaking fidelity bound, and capacity continuity [LeungSmith2009]. | The general continuity theorem is imported; its shrinking-time application to this spin family is derived. | | $`C\geq\log_2(n+1)-g(\nu)`$, where $`g(x)=(x+1)\log_2(x+1)-x\log_2x`$ | Coherent-ensemble calculation in the accompanying analysis; uses covariance and the standard entropy bound at fixed mean occupation. | This retains nearly maximal classical information at the same scale where the quantum upper bound vanishes. | | Singlet eigenvalue of the partially transposed heat-channel Choi state and its odd-$`n`$ asymptotics | Specialization derived in the accompanying analysis. The SU(2) partial-transpose multiplet method is established [Schliemann2003]. | This distinguishes exact residual entanglement from operational distance to entanglement breaking; it does not determine the full PPT or entanglement-breaking time. | @@ -123,15 +123,24 @@ For the normalized heat-channel Choi state, the accompanying analysis derives th \sum_{\ell=0}^{n}(-1)^\ell(2\ell+1)e^{-t\ell(\ell+1)}. ``` -Along odd $`n`$, at fixed $`0<\nu<\pi/2`$ and $`t=\nu/n`$, the derived asymptotic is +Along odd $`n`$, at fixed $`0\lt \nu\lt \pi/2`$ and $`t=\nu/n`$, the derived asymptotic is ```math \lambda_0(j,\nu/n)\sim -\frac{e^{-2\nu}}{\cosh\nu}\frac{e^{-\nu n}}{n}. ``` -Thus, for fixed $`1\leq\nu<\pi/2`$ and sufficiently large odd $`n`$, an exact nonpositive-partial-transpose witness coexists with a vanishing operational distance to the entanglement-breaking set. The negative eigenvalue is exponentially small. This is not an exact PPT/entanglement-breaking-time determination or a lower bound on quantum communication capacity. The structural comparison with [Rudnicki2026] is given above. +Thus, for fixed $`1\leq\nu\lt \pi/2`$ and sufficiently large odd $`n`$, an exact nonpositive-partial-transpose witness coexists with a vanishing operational distance to the entanglement-breaking set. The negative eigenvalue is exponentially small. This is not an exact PPT/entanglement-breaking-time determination or a lower bound on quantum communication capacity. The structural comparison with [Rudnicki2026] is given above. 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..fe8c4c8 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. @@ -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`$, 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. -6. **No universal anisotropic coefficient is proved.** For $`a0`$. 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\lt u\le1. +``` + +Cauchy–Schwarz therefore bounds the joint horizontal $`L^1`$ gradient by $`8/\sqrt u`$ and $`\|Zp_u^{\mathrm{BB}}\|_1`$ by $`8\sqrt3/u`$. For $`V=aX+dY+fZ`$, integrating along $`h\exp(-vV)`$, $`0\le v\le1`$, yields + +```math +\|p_u^{\mathrm{BB}}(\,\cdot\,e^{-V})-p_u^{\mathrm{BB}}\|_1 +\le\frac{8\sqrt{a^2+d^2}}{\sqrt u} ++\frac{8\sqrt3|f|}u +\le\frac{C\|V\|}u. +``` + +Translation preserves Haar measure. Choose the principal logarithm after passing to SO(3); its norm is proportional to the physical angle $`\theta\in[0,\pi]`$. Total variation contracts under this quotient, so no choice between the two central SU(2) representatives affects the estimate. The paper's fields are twice the physical spin-rotation fields, hence $`u=bt/4`$; constants absorb this fixed normalization. + +The coherent kernel has the [proved radial domination](classicalization.md#the-coherent-measurement-kernel) + +```math +\mathbb E_{k_n}\theta^2\le\frac{6A_n}{n}, +\qquad A_n\le(1+1/n)e^{1/(6n)}. +``` + +Average the translation estimate against $`k_n`$ and use $`\mathbb E\theta\le\sqrt{\mathbb E\theta^2}`$. It follows that + +```math +\mathrm{TV}(p_t,p_t*k_n) +\le\frac{C_b}{t}\mathbb E_{k_n}\theta +\le\frac{C'_b}{\sqrt n\,t}. +``` + +This proves the global upper bound. If a sequence with $`\sqrt n\,t_n\to\infty`$ does not tend to zero, monotonicity permits replacement by a smaller sequence tending to zero with the same divergence, so the sufficient condition still applies. The cited derivative theorem is for equal horizontal rates. Noncommuting Trotter factors do not by themselves extend this argument to arbitrary $`b\ne c`$. + +## 7. What the remaining global question requires + +At $`t=s n^{-2/3}`$, the missing group-coordinate width is $`t\asymp n^{-2/3}`$, while the coherent kernel adds isotropic angular width $`n^{-1/2}`$. The comparator above is not a small approximate identity in that missing direction; its proved upper estimate is then vacuous. Failure of this comparator is not an obstruction to every possible EB approximation. + +A matching sufficient result would require globally CP and TP, input-independent EB maps $`\mathcal E_{j,t}`$ satisfying, in a specified regime, + +```math +\tfrac12\|\Phi^{(j)}_{b,c,t}-\mathcal E_{j,t}\|_\diamond +\le\epsilon_{j,t}+\Pr(\text{exceptional paths}), +\qquad \epsilon_{j,t}\longrightarrow0. +``` + +All localization disturbance, path truncation and finite-spin errors must be included. A coherent-patch decomposition would itself need a valid quantum instrument and a uniform bound on entangled inputs. The local contraction and oscillator good-path EB replacements do not construct such an instrument or global channel. + +The shared-result ownership is therefore precise: the nonlinear sister owns the conditional covariance, exceptional-path oscillator bound and finite-time oscillator NPT witness; this page owns their controlled growing-excitation transfer to rank-two spin diffusion, the finite-spin converse and the separate equal-rate global comparator. The inherited hypoelliptic and Gaussian mechanisms retain the attributions in Section 2. Neither project claims that local contraction closes the global gap. diff --git a/science/residual_entanglement.md b/science/residual_entanglement.md index 5571f79..f287d87 100644 --- a/science/residual_entanglement.md +++ b/science/residual_entanglement.md @@ -36,13 +36,13 @@ be the total-spin-zero vector. \sum_{\ell=0}^{n}(-1)^\ell(2\ell+1)e^{-t\ell(\ell+1)}.} ``` -For every fixed $`0<\nu<\pi/2`$, along odd $`n\to\infty`$, +For every fixed $`0\lt \nu\lt \pi/2`$, along odd $`n\to\infty`$, **Equation (2).** ```math \boxed{\lambda_{0,n}(\nu/n) -\sim-\frac{e^{-2\nu}}{\cosh\nu}\frac{e^{-\nu n}}n<0.} +\sim-\frac{e^{-2\nu}}{\cosh\nu}\frac{e^{-\nu n}}n\lt 0.} ``` Consequently the channel has an NPT Choi state, and is not entanglement breaking, for all sufficiently large half-integer spins at each such fixed $`\nu`$. At $`\nu=1`$, the stronger finite statement holds: **every odd $`n\ge5`$** has a negative singlet eigenvalue. @@ -54,7 +54,7 @@ This is compatible with the independent channel-level bound \le\frac{2.4}{n},\qquad \nu\ge1. ``` -Thus, for $`1\le\nu<\pi/2`$, arbitrarily good approximation by entanglement-breaking channels coexists with exact Choi NPT along half-integer spins. Equation (2) describes **one identified partial-transpose eigenvalue**. It is not an upper bound on all residual entanglement, nor a determination of the exact PPT or EB time. +Thus, for $`1\le\nu\lt \pi/2`$, arbitrarily good approximation by entanglement-breaking channels coexists with exact Choi NPT along half-integer spins. Equation (2) describes **one identified partial-transpose eigenvalue**. It is not an upper bound on all residual entanglement, nor a determination of the exact PPT or EB time. ## 1. Exact singlet eigenvalue @@ -157,7 +157,7 @@ h_t(\theta)=\frac{e^{t/4}}{\sqrt\pi t^{3/2}}\sin(\theta/2) and use $`p_t(\pi)=\pi h_t(\pi)/2`$. Pairing $`q=0,1`$, then $`q=-1,2`$, and so on gives (7). -For $`00. @@ -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 fbc429b..3b5eda6 100644 --- a/verification/README.md +++ b/verification/README.md @@ -1,6 +1,6 @@ # Reproduce the finite checks -[Overview](../README.md) · [Scientific account](../science/README.md) +[Overview](../README.md) · [Scientific account](../science/README.md) · [Bounded review](SANITY_CHECK.md) The repository's general statements are analytical. These checks compare independent formulas, fix normalization and indexing conventions, and test finite-spin behavior. They do not compute an optimized diamond distance, determine a quantum capacity, or replace the asymptotic proofs. @@ -33,9 +33,10 @@ Each check is also directly executable with `--output path/to/report.json`: python verification/check_core.py python verification/check_anisotropic.py python verification/check_residual_npt.py +python verification/check_rank_two.py ``` -No network access, random seed, external data, quantum optimizer or arbitrary-precision package is required. The very small residual eigenvalues use Python's standard-library `decimal` arithmetic. Runtime depends on the machine; the reference manifest records the measured duration, and no wall-clock speed is part of a theorem. +No network access, external data, quantum optimizer or arbitrary-precision package is required. The rank-two full-generator controls use a fixed pseudorandom seed for their test vectors. The very small residual eigenvalues use Python's standard-library `decimal` arithmetic. Runtime depends on the machine; the reference manifest records the measured duration, and no wall-clock speed is part of a theorem. ## What is checked @@ -43,6 +44,7 @@ No network access, random seed, external data, quantum optimizer or arbitrary-pr |---|---|---| | [Core](check_core.py) | Haar quadrature versus the exact Berezin multipliers; character sum versus Poisson images for heat; invariant Lindblad sectors for the Bell block | Seven kernel sizes through $`n=1000`$; 56 multipliers; four exact qubit cases; 25 Bell-sector cases | | [Anisotropic](check_anisotropic.py) | Full sparse double-commutator generator versus the analytical tangent-plane witness limit | Four diffusion matrices, each at $`n=16,32,64`$, including longitudinal–transverse cross terms and rank-deficient noise | +| [Rank-two diffusion](check_rank_two.py) | Exact symmetry-reduced finite-spin evolution versus a full Kronecker generator; squeezed-state reference witness and independent generator/vector limits | 15 full-generator controls through $`n=7`$; 16 witness cases at $`n=16,32,64,128`$; seven growing-excitation cases through $`n=4096`$ | | [Residual NPT](check_residual_npt.py) | Dense normalized Choi construction versus the singlet character sum; high-precision finite sum versus heat images minus the representation tail | 35 full-Choi cases through $`n=9`$ and 17 high-precision cases through $`n=401`$ | ### Core normalization and the complete-channel bound @@ -73,11 +75,43 @@ D=\begin{pmatrix}1&0.3&0.4\\0.3&2&0.2\\0.4&0.2&5\end{pmatrix} with the coherent pole along the third coordinate. Thus the check exercises the derivation with longitudinal correlations, rather than assuming diagonal noise throughout. [Analytical proof and finite table](../science/anisotropic_diffusion.md). +### Rank-two diffusion, growing excitation and a finite reference + +[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=-\mathrm{ad}_{J_y}^{2}-\mathrm{ad}_{J_z}^{2}, +\qquad t=s n^{-2/3}. +``` + +The input code consists of normalized finite-ladder projections of $`S(r)|0\rangle`$ and $`S(r)|1\rangle`$, with $`r=(\log n)/6`$. Their excitation grows as $`O(n^{1/3})`$; a qubit reference is prepared in an encoded Bell state. A fixed unitary rotation maps the problem to noisy axes $`x,y`$, where coherence-order sectors of the exact generator are real symmetric tridiagonal matrices. Independent dense exponentiation of the full double-commutator superoperator checks this sector construction at small sizes; the largest disagreement in the registered controls is below $`2\times10^{-15}`$. Population outputs are checked for positivity, unit trace and Hermiticity. At zero time the reference witness equals $`-1/2`$ and Bell fidelity equals one. + +For $`s=1`$, the partial-transpose block minima are approximately $`-0.0444294`$, $`-0.0453255`$, $`-0.0455306`$ and $`-0.0454800`$ at the four registered spin sizes. The corresponding witness gives a lower bound on the same half-diamond distance to EB used in the scientific account. At $`s=2`$ this particular witness has positive expectation; its failure to detect entanglement is recorded without an EB conclusion. + +A separate analytic consistency check uses the exact finite-dimensional inequality + +```math +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. + +The generator/vector calculation compares $`n^{-1/3}J_y`$ and its square on a squeezed vacuum to their oscillator targets. At $`n=64,128,256,512,1024,2048,4096`$, the errors multiplied by $`n^{2/3}`$ stay below the registered finite-case envelopes $`0.18`$ and $`0.35`$. Excitation moments and the discarded-ladder tail are also recorded. These numerical envelopes are not universal error constants and this calculation does not establish channel-output convergence, a diamond-norm contraction or a global finite-spin EB upper bound. + +The bounded check is part of `run_all.py`. To reproduce a committed reference manifest, or to run the optional larger finite-spin grid: + +```bash +OPENBLAS_NUM_THREADS=1 python verification/run_all.py --output-dir verification/results +OPENBLAS_NUM_THREADS=1 python verification/check_rank_two.py --full --output verification/local_results/rank_two_full.json +``` + +The optional run adds witness sizes $`n=256,512`$. Its $`s=1`$ block minimum at $`n=512`$ is approximately $`-0.0452335`$. `check_rank_two.py` is portable to any working directory; its direct-execution default is `verification/results/rank_two.json`, resolved relative to the script. Its `--output` option can select a disposable destination. None of these runs measures the Brownian environment, optimizes over all encodings, or implements an intermediate correction. + ### Exponentially small Choi eigenvalue 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 @@ -86,13 +120,30 @@ The [manifest](results/manifest.json) identifies a completed run. Its reports co - [Core checks](results/core.json) - [Anisotropic checks](results/anisotropic.json) - [Residual-entanglement checks](results/residual_npt.json) +- [Rank-two checks](results/rank_two.json) +- [Optional larger rank-two witness grid](results/rank_two_full.json) The figures are generated from those reports by [make_figures.py](make_figures.py). No data points are hand edited. Dashed asymptotic curves are evaluated from the displayed analytical formulas. ![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) Only negative singlet values are plotted in the residual-entanglement figure; every retained point therefore certifies NPT. Its second panel plots the ratio to $`-\beta(\nu)e^{-\nu n}/n`$, with $`\beta(\nu)=e^{-2\nu}/\cosh\nu`$. The $`n=11`$, $`\nu=1.5`$ singlet value is positive and is omitted from this negative-eigenvalue plot; it remains in the numerical report. The statements concern this sector and do not determine the full PPT/EB boundary. + +## Sister navigation and learning-map consistency + +[check_navigation.py](check_navigation.py) checks local Markdown file targets, exactly one heading for each of M01–M30, and the README link to the sister repository. With an optional local sister checkout it also checks reciprocal README links, the counterpart's local file targets and 30 IDs, directly linked sister files, and the selected common book DOI. External URLs and section fragments are outside this offline file-target check. + +```bash +python verification/check_navigation.py +python verification/check_navigation.py --sister-root ../Nonlinear-Diffusion-Entanglement +``` + +Its report is [navigation.json](results/navigation.json). These checks support navigation and consistency; they do not certify the contents of the cited book, the scientific proof, or mathematical rendering on GitHub. Final hosted rendering remains a separate check of the actual integrated revisions. + +## Hosted mathematical comparison + +The read-only CI workflow uses the [pinned hosted helpers](hosted_tools/README.md) to compare every tracked Markdown page at the exact checked commit with real GitHub MathML at widths 1440 and 760. This includes the new rank-two proof and learning routes. Reports and screenshots are workflow artifacts; separate visual inspection is required. Local scientific/navigation checks do not replace these hosted checks. diff --git a/verification/SANITY_CHECK.md b/verification/SANITY_CHECK.md new file mode 100644 index 0000000..694db36 --- /dev/null +++ b/verification/SANITY_CHECK.md @@ -0,0 +1,46 @@ +# Bounded scientific and navigation review + +Review date: 2 November 2026. [Reproduction](README.md) · [Scientific report manifest](results/manifest.json) · [Rank-two account](../science/rank_two_diffusion.md) + +This review covers the local scientific computations, their stated scope and authored file navigation. Actual GitHub mathematical rendering, final integrated revision identity, merge status and preservation are separate checks. A successful local run alone establishes none of those statuses. + +## Scientific checks performed + +The following commands completed successfully with Python 3.12.14, NumPy 2.3.5, SciPy 1.17.0 and Matplotlib 3.10.8: + +```bash +OPENBLAS_NUM_THREADS=1 python verification/run_all.py --output-dir verification/results +OPENBLAS_NUM_THREADS=1 python verification/check_rank_two.py --full --output verification/results/rank_two_full.json +python verification/check_navigation.py --sister-root ../Nonlinear-Diffusion-Entanglement +``` + +The runner's manifest records all four scientific modules passing, including the three existing isotropic, anisotropic and residual-entanglement modules. The additional rank-two calculations retain their inputs, residuals and results in [the bounded report](results/rank_two.json) and [the optional larger grid](results/rank_two_full.json). + +| Evidence | Observed result | Practical limit | +|---|---|---| +| Exact coherence-order evolution versus independent full Kronecker double commutator | 15 controls through $`n=7`$; largest matrix discrepancy $`1.65\times10^{-15}`$ | Floating-point checks at registered sizes; not an interval certificate | +| Encoded Bell state at zero time | Partial-transpose block minimum $`-1/2`$ and entanglement fidelity one | Fixes the code, reference and transpose normalization | +| Original finite-spin channel on squeezed reference inputs | 16 bounded cases through $`n=128`$; optional grid adds $`n=256,512`$ | A selected witness, not optimization over every input | +| Population output normalization and positivity | Full-grid trace errors below $`1.3\times10^{-13}`$; Hermiticity and positivity tolerances pass | Numerical evolution diagnostics | +| Independent finite-spin fidelity inequality | Evolved fidelity exceeds its exact semigroup tangent lower bound in every registered case | Conservative bound; it can become uninformative before the NPT test does | +| Growing-excitation first and squared generators | Seven sizes $`n=64,\ldots,4096`$; scaled errors about $`0.147\ldots0.160`$ and $`0.292\ldots0.309`$ | Vector/generator tests, not an output-convergence or full-diamond proof | + +At $`t=n^{-2/3}`$, the optional $`n=512`$ witness expectation is approximately $`-0.04523346`$. At $`t=2n^{-2/3}`$ it is approximately $`+0.03436729`$. The positive value is recorded as failure of that particular detector; no EB conclusion is drawn from it. + +## Scope and attribution review + +The [rank-two account](../science/rank_two_diffusion.md) retains these distinctions: + +- The direct finite-spin fidelity witness gives the lower bound $`[1/2-13s/8]_+`$ for the unit-rate, unit-squeeze example at $`t=s n^{-2/3}`$. It uses exact finite-dimensional spectral calculus and squeezed-state moments. +- The controlled contraction concerns fixed finite Schwartz input spans, fixed finite references and bounded intervals of scaled time. Its constants depend on the selected inputs and interval. The growing excitation is $`O(n^{1/3})`$; a hard growing cutoff is not claimed invariant. +- The all-finite-$`s`$ converse transfers the sister account's finite-energy oscillator witnesses using the local output estimate. The particular two-state numerical detector is not claimed to detect every such time. +- The exceptional-path covariance estimate bounds the oscillator channel. It supplies no global finite-spin EB comparator. The separately established equal-rate global upper regime is $`\sqrt n\,t\to\infty`$, leaving the stronger $`n^{2/3}t\to\infty`$ sufficiency question open. +- Hörmander/Grushin noise spreading, the rank-two SU(2) heat kernel and contraction, the nonlinear model and Mehler methods, and the Gaussian EB criterion retain their cited antecedents. The shared contribution is the controlled finite-spin transfer and its operational converse, with explicit ownership of the inherited oscillator results. + +The numerical checks support normalization, finite examples and the generator estimates. The analytical output-convergence argument and global derivative estimate are assessed in the scientific account; the program does not turn those proofs into automatic certificates. + +## Navigation and learning consistency + +[The navigation report](results/navigation.json) records local file-target checks, exactly one heading for every milestone M01–M30, the sister README link and, in the joint-checkout run, reciprocity and directly linked counterpart files. Both learning routes identify the selected Holevo book DOI. The checker excludes mathematical/code expressions from link parsing and reports its scope explicitly. + +External URLs, section-fragment targets and hosted mathematical rendering require separate inspection. A navigation pass is not a scientific correctness or release-readiness verdict. diff --git a/verification/check_navigation.py b/verification/check_navigation.py new file mode 100644 index 0000000..fff4227 --- /dev/null +++ b/verification/check_navigation.py @@ -0,0 +1,103 @@ +"""Check authored local links, milestone IDs and optional sister consistency. + +This is a document/navigation check. It does not certify scientific claims, +external source contents, hosted mathematical rendering or release readiness. +""" +from __future__ import annotations + +import argparse +from collections import Counter +import json +from pathlib import Path +import re +from urllib.parse import unquote, urlsplit + +REPOSITORY = "Spin-Diffusion-Classicalization" +SISTER = "Nonlinear-Diffusion-Entanglement" +ROOT = Path(__file__).resolve().parent.parent +LINK = re.compile(r"!?\[[^\]]*\]\(([^\s)]+)(?:\s+\"[^\"]*\")?\)") + + +def inspect_repository(root, name, counterpart, counterpart_root=None): + missing, checked, external_sister_files = [], [], [] + for source in sorted(root.rglob("*.md")): + if any(part.startswith(".") for part in source.relative_to(root).parts): + continue + text = source.read_text() + # Mathematical/code expressions such as D[L](rho) are not links. + text = re.sub(r"^```[^\n]*\n.*?^```[^\n]*$", "", text, flags=re.MULTILINE | re.DOTALL) + text = re.sub(r"`[^`\n]*`", "", text) + for raw in LINK.findall(text): + target = raw.strip("<>") + 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..9e6be5c --- /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/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/bf31418c10302d1786451ddee9b9840f4d9983c8/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