The scaling function is checked against what Eq. (24) says it is - #154
Merged
Merged
Conversation
`f` reaches `InfiniteRandomnessEntanglementPBC` as a number, so the relation can only ask that it be positive. The callable is still visible in `finite_size_entropy_report`, and Eq. (24) states `f` through an expansion, `f(v) = Σₖ Aₖ sin((2k-1)πv)` under `Σₖ Aₖ(2k-1)π = 1`, from which two properties follow without knowing a coefficient: every basis function is symmetric about `v = 1/2`, so an admissible `f` is; and the normalisation IS `f'(0) = 1`. Both are now checked. The second is the one that mattered: an `f` off by a constant shifts `ln[L f]` by `ln` of that constant, which `c₁′` absorbs, so the wrong scaling function was reported as a PASS with a wrong non-universal constant rather than as a failure. Passing the chord `(L/π)sin(πℓ/L)` itself, rather than the dimensionless `sin(πv)/π`, is the way in. The form is still unchecked and this does not pretend otherwise. The higher harmonics are the entire difference between this and the conformal case, and separating them needs a disorder average that is not computed here. So the test that matters most is the one asserting a two-harmonic `f` is ACCEPTED: a check that admitted only `sin(πv)/π` would refuse the physics the relation exists for. The `@experimental` note now says which half is closed. Validated only where it is read, so an `f` no row consumes is not refused for being present. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The comments restated the docstring and the error messages restated the comments. Kept the two that say something the code does not: why a two-harmonic f must be accepted, and that a constant factor lands in c₁′ rather than in the residual. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Inserting `_check_scaling_function` before `function finite_size_entropy_report` put it inside the gap the docstring was spanning, so the docstring bound to the helper and the report lost its own. Nothing about the code changed and no test of the behaviour noticed; `test_docs_crossrefs` did, because an `@ref` to the report then pointed at a name with no rendered docstring. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
📚 Docs preview: https://qatlashub.github.io/AbstractQAtlas.jl/previews/PR154/ (updates on each push to this PR) |
Six review agents converged on the same defect and found two more. The check as written could refuse an `f` that was never going to be used, refuse an `f` that was correct, and accept one that was wrong. REFUSED WHAT IT NEVER READ. The guard ran once before any region was inspected, so it fired whenever `c̃`, `f` and PBC were present. A bag holding only a whole ring, which has no cuts, would take a normalisation failure and die on it, having never been going to evaluate `f` at all. The comment above the guard asserted the opposite in as many words. REFUSED A CORRECT `f`. The slope was probed at `v = 1e-5`, but `f` is read at `ℓ/N`, so nothing below `1/N` is ever asked of it. An `f` fitted from a disorder average on a chain of a few hundred sites is entitled to be undefined there, and was refused for a value it would never see. ACCEPTED A WRONG `f`. Symmetry was sampled at 0.1, 0.25 and 0.4, all multiples of 1/20, so `sin(20πv)` and `sin(40πv)` vanish at every one of them and at their reflections. Those are even harmonics, which Eq. (24) excludes, and a pair of them tuned to cancel in `f'(0)` passed both checks while being 20% asymmetric elsewhere. All three go away by asking on the grid. Symmetry is checked at each `ℓ/N` that feeds a row, so a component the check cannot see cannot reach a row either, and the check happens where and only where `f` is consumed. `f'(0)` comes from `f(1/N)` and `f(2/N)` by Richardson, error falling as `N^-4`, which are points `f` must support because they are the grid. The tolerance is loose deliberately: it separates an order-unity factor from the estimate's own truncation, and tightening it would refuse a strongly non-conformal `f` on a ring too short to resolve it. Also: a non-real or non-finite `f` now says so, instead of being reported as an asymmetry between two NaNs or reaching the kernel and failing on `isless`. Split into `_check_symmetry_at` and `_check_normalisation`, which name what they check rather than claiming to validate the function. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
freachesInfiniteRandomnessEntanglementPBCas a number, so the relation canonly ask that it be positive. The callable is still visible one layer up, in
finite_size_entropy_report, and Eq. (24) statesfthrough an expansion,from which two properties follow without knowing a single coefficient. Every
basis function is symmetric about
v = 1/2, sincesin((2k-1)π(1-v))equalssin((2k-1)πv)for odd2k-1, so any admissiblefis. And the normalisationIS
f'(0) = 1, which is what "tends tovasv → 0" means.Both are checked now. The second is the one that mattered. An
foff by aconstant shifts
ln[L f]bylnof that constant, andc₁′is a freenon-universal constant that absorbs it, so the wrong scaling function was
reported as a pass with a wrong constant rather than as a failure. Passing
the chord
(L/π)sin(πℓ/L)itself, rather than the dimensionlesssin(πv)/π, isthe way in.
What this does not do
The form is not checked and cannot be from here. The higher harmonics are the
entire difference between Eq. (24) and the conformal case, and separating them
needs a disorder average this package does not compute. The only form pinned
remains the one-harmonic reduction, which is
CFTEntanglementPBCexactly.So the load-bearing test is the one asserting a two-harmonic
fis accepted:(1/π - 0.06) sin(πv) + 0.02 sin(3πv), normalised the same way and demonstrablya different function. A check that admitted only
sin(πv)/πwould refuse thephysics the relation exists for, and would have passed every other test here.
The
@experimentalnote is rewritten to say which half is closed, rather thanclaiming the whole thing is unsettled.
Scope
Validated only where it is read:
c̃present,fpresent,bc isa PBC. Anfthat no row consumes is not refused for being present, and there is a test for
each of those two ways of not being read.
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com