Independent checks and negative controls
A code can return the correct eigenvector and the wrong energy. On the four-site periodic XXX chain the alternating one-magnon wave is an eigenvector of both and . A test based only on vector overlap passes for both conventions. Comparing a fixed pair with an independently constructed bond Hamiltonian detects the sign immediately. A second state is needed to test the direction of translation.
Helpful background. Conditioning explains how a residual translates into a possible error. Refining one approximation at a time shows how to give a failed comparison a specific cause.
Construct the reference in the position basis
Section titled “Construct the reference in the position basis”Let have one down spin at site , relative to the all-up vacuum. Build by summing the exchange terms over all four adjacent bonds, including the closing bond. Here , and exchanges the two spins of its bond. A bond with two up spins gives zero. The two bonds touching the down spin give
Take , so and periodicity requires . Substitution gives . This is the one-spin-deviation sector of Bethe’s chain. Karbach and Müller write the same dispersion as because they retain the vacuum exchange energy. The shift by for a chain of sites sets that energy to zero. Bethe, one-spin-deviation sector · Karbach and Müller, Eqs. (4)–(8), PDF
For , the components alternate between and , and . The local bond action is independent of a root solver, so it can test the result of that solver. Coordinate matching and the periodic XXX Hamiltonian
Deliberately break one convention
Section titled “Deliberately break one convention”Set and use the exact pair above. For a proposed operator evaluate . The following are exact values, not solver tolerances.
| Change | Residual | Reason |
|---|---|---|
| Construct all four original bonds | 0 | The two neighboring amplitudes are both opposite in sign. |
| Reverse the sign of only | 4 | The defect is . |
| Add without shifting | The entire error lies along . | |
| Omit the bond between sites 3 and 0 | The omitted bond has amplitudes of magnitude on its two endpoints. |
The last result follows directly from . Its nonzero entries are the half-difference of the two endpoint amplitudes and its negative. The seam test would fail to diagnose a missing bond if the two endpoint amplitudes were equal. Similarly, the state has zero energy for this shifted Hamiltonian. It survives the global sign reversal. A negative control therefore needs a state for which the proposed mistake changes a checked quantity.
If the numerical implementation derives both and from the same sign-flipped routine, it can report . Freeze the analytical input and eigenvalue in the fixture, then build the matrix by applying spin exchanges in an independent representation. Testing an identity against another expression produced by the same symbolic simplifications exercises a narrower part of the pipeline.
A symmetry with an invisible error
Section titled “A symmetry with an invisible error”For active right translation , the eigenvalue of the above column vector is . At , and have the same eigenvalue. At they have eigenvalues and . Using the latter state, the wrong-test norm , even though its energy agrees exactly with the right-moving calculation. Indeed has the same energy on , so an eigensolver can return any orthonormal basis of this two-dimensional eigenspace. Compare subspace projectors for the energy alone or diagonalize the translation within it to identify a momentum state.
For two down spins a further question is whether all physical states have been constructed. Six vectors can all have small residuals and still repeat the same state. Form the matrix of normalized independent vectors, test its rank and compare its projector with the identity on the selected sector. The four-site construction also contains a singular Bethe pair where an apparent algebraic solution requires special treatment. Complete four-site sector · Reproduce the singular state
An input file needs a physically normalized prediction
Section titled “An input file needs a physically normalized prediction”For an independent time-evolution test, the open three-site Toda calculation takes and . Its Hamiltonian and symmetric tridiagonal matrix are
The two springs contribute two and the kinetic energy one, so the reference energy is three. The initial characteristic polynomial gives the independent reference eigenvalues , and . Its squared eigenvalues sum to . Omitting a spring lowers the energy even though a numerical method can preserve its own truncated Hamiltonian. The parameter file specifies the end time six and four step sizes. At step the saved Verlet run differs from the QR trajectory by in maximum coordinate or momentum error. At this falls to . Complete Toda experiment (ZIP) · Inputs · Calculation · Runtime requirements · Recorded results
Why include the asymmetric input in the same file? Multiply the tridiagonal matrix three times and take its trace. A closed three-step path contributing to the trace either stays at one site or traverses a bond twice with one diagonal step. The three cyclic choices for that step yield
Deliberately drop the bond sum. The symmetric trajectory has and , so the two bond terms cancel and the sum of momentum cubes is zero. The incomplete expression passes at every time on this trajectory. Now use the second input, with initial positions 0.2, −0.3 and 0.1 and momenta 0.7, −0.4 and 0.2 in site order. At the initial time the incomplete value is . The omitted term adds , bringing the matrix trace result to . This single initial-state test detects the missing term before the choice of time step can affect it. Open Toda trace invariants and their normalization
References
Section titled “References”Connected readings