Repository navigation
Conversation
The simple update multiplies a tensor by the mean field lambda of its other bonds, decomposes it, and divides by lambda again. lambda is the square root of a Schmidt value, and both ends of a bond carry one factor of it. A component whose Schmidt value is below the machine epsilon, relative to the largest, is lost in the round-off of the decomposition once it is multiplied by lambda, and the division returns an error of eps / lambda in place of a component of size lambda: larger than the component itself for lambda below sqrt(eps) = 1.5e-8. The garbage then enters the next decomposition of that bond as a Schmidt value, and grows. lambda_cutoff is there to take such a lambda for zero. Its default, 1e-12, is a Schmidt value of 1e-24, which an SVD in double precision does not return for anything but an exact zero. The default is 1e-7 now. Two results that were wrong without a warning, both where a bond has fewer nonzero Schmidt values than its dimension: - Finite temperature, a bond that no term of the Hamiltonian uses. Decoupled dimers, D = 4 on every bond, beta = 1: +0.391957 per site against -0.124700. The run starts from the identity, with one component on every bond. This one came with 7a4fb38, which puts an identity gate on such bonds: the same executable as before it gives the same +0.391957 when the six identity gates are written into the input by hand. - Ground state, a Hamiltonian diagonal in the site basis, whose ground state is a product state. An Ising antiferromagnet in a staggered field on a honeycomb lattice laid out with one bond of each site along the diagonal missed the Neel state for 10 of 16 seeds, and for 4 of 16 with nearest-neighbour bonds only. It looked like a defect of the gate chain that carries the diagonal bond, since the chain is where most of the round-off comes from; the gates of a nearest-neighbour bond of such a model are diagonal and keep exact zeros exact. With lambda_cutoff from 1e-9 to 1e-4 all 16 seeds of the first layout reach -0.625; at 1e-10 one misses. The dimers are right at 1e-8 and above, and wrong at 1e-9 and at 1e-11 while right at 1e-10, so there is nothing to rely on below the threshold. 1e-7 leaves a factor of seven to it. The reference results of the test suite do not change. Two tests of the fermion gate chains (longrange_gate.cpp, unit_d1.cpp) require every lambda after an exact gate to be zero, more than a thousand times the cutoff, or below 1e-8 of the largest. The zeros of the SVD come out at 9.8e-9, 9.4e-9 and the like, six orders below the smallest kept value and just above that 1e-8: they passed as "more than a thousand times 1e-12", that is, as kept values. With the new default they are what the cutoff drops, and the third alternative now says so: at or below the cutoff. The comparison of the chain with the exact operator, which follows the check, holds as before. rank_deficient_bond is a new test with the dimers and with the smallest input that showed the second case: one Ising bond over two lattice spacings, six seeds, of which five missed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
yomichi
left a comment
There was a problem hiding this comment.
Thanks. The analysis is convincing, and I agree with 1e-7. rank_deficient_bond fails with lambda_cutoff = 1e-12 injected (the dimers, and 3 of the 6 seeds of the chain), and passes for 40 of 40 seeds with the new default. The tighter check in longrange_gate.cpp and unit_d1.cpp is an improvement: with the former cutoff, the forbidden band [1e-8 * lmax, 1e-9] was empty, since lmax >= D^(-1/4).
1. Normalization of lambda in the docs.
parameter_section.rst says lambda is "the square root of a Schmidt value normalized to the largest scale of the bond", and the description and NEWS speak of "the largest Schmidt value". The code (simple_update.cpp, around line 225) divides by the 2-norm: lambda_i = sqrt(s_i / ||s||_2). The conclusion does not change, but could the English docs say "divided by the 2-norm of the Schmidt values of the bond"? The Japanese text ("規格化された Schmidt 係数の平方根") is fine as it is.
2. (FYI) The table of cutoffs depends on the build.
With my build (Apple clang, Release, no MPI), 1e-10 gives a wrong value for the dimers, while the table says right. 1e-8, 3e-8, 1e-6 and 1e-5 were all right. This only confirms that the result below the threshold is a matter of chance; no change is needed.
Not tested: an MPI build.
Review of #121. parameter_section.rst said that lambda is the square root of a Schmidt value "normalized to the largest scale of the bond", and NEWS spoke of the largest Schmidt value. Simple_update_bond divides by the 2-norm: lambda_i = sqrt(s_i / ||s||_2). The largest value is between D^(-1/2) and 1 of that norm, so the threshold and the conclusion are the same. The Japanese text says "normalized" without naming the norm and stays as it is. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Thank you for checking this, and for the 40 seeds.
On #123: I reproduced it, and the fix is in |
Summary
The simple update gave wrong results, without any warning, where a bond had fewer nonzero Schmidt values than its dimension. The default of
[parameter.simple_update] lambda_cutoffwas too small to do what it is there for.beta = 1,D = 4on every bondThe remaining seed of the last row ends in the inverted Neel state, which is a local minimum of a classical model.
Cause
The simple update multiplies a tensor by the mean field
lambdaof its other bonds, decomposes it, and divides bylambdaagain.lambdais the square root of a Schmidt value, and both ends of a bond carry one factor of it.A component whose Schmidt value is below the machine epsilon, relative to the largest, is lost in the round-off of the decomposition once it is multiplied by
lambda. The division then returns an error ofeps / lambdain place of a component of sizelambda. The error is larger than the component forlambdabelowsqrt(eps) = 1.5e-8. It enters the next decomposition of that bond as a Schmidt value, and grows.lambda_cutofftakes such alambdafor zero. At1e-12it corresponds to a Schmidt value of1e-24, which an SVD in double precision does not return for anything but an exact zero.The two cases
Choice of the value
lambda_cutoffBelow the threshold the result is right or wrong by chance.
1e-7leaves a factor of seven tosqrt(eps).With the new default the honeycomb model also reaches -0.625 for 6 of 6 seeds at
D = 3and atD = 4, where 3 and 2 of 6 did before.The tables were measured with a build of a4ad153, by setting
lambda_cutoffin the input. The new test below shows the same failures with the currentdevelop.Behavior changes
lambda_cutoffis1e-7. Components with a Schmidt value below about1e-14of the largest are dropped in the simple update.lambda_cutoff = 1e-12in the input gives the former behavior.Note for reviewers: two existing tests are changed
test/fermion/longrange_gate.cppandtest/fermion/unit_d1.cpprequire everylambdaafter an exact gate to be zero, more than a thousand times the cutoff, or below1e-8of the largest.9.8e-9,9.4e-9and the like, just above that1e-8, and six orders below the smallest kept value (0.03).1e-12", that is, as kept values.The comparison of the chain with the exact operator, which follows this check, holds as before.
Documentation
parameter_section.rst: the new default, and a description oflambda_cutoff, which had none.output_format.rst: the example ofparameters.dat.NEWS.md.English and Japanese.
Tests
rank_deficient_bond, an end-to-end test with the dimers and with the smallest input that showed the second case: one Ising bond over two lattice spacings, six seeds. With a build ofdevelopthe dimers and five of the six seeds fail.test/input.cpp: the default.ctest: 78/78 (Apple clang, no MPI, Release).Not tested: an MPI build.
🤖 Generated with Claude Code