Skip to content

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 HH and −H-H. A test based only on vector overlap passes for both conventions. Comparing a fixed pair (E,v)(E,v) 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 ∣x⟩|x\rangle have one down spin at site x=0,1,2,3x=0,1,2,3, relative to the all-up vacuum. Build HH by summing the exchange terms (J/2)(I−P)(J/2)(I-P) over all four adjacent bonds, including the closing bond. Here J>0J\gt0, and PP exchanges the two spins of its bond. A bond with two up spins gives zero. The two bonds touching the down spin give

H∣x⟩=J∣x⟩−J2(∣x−1⟩+∣x+1⟩).H|x\rangle=J|x\rangle-\frac{J}{2}(|x-1\rangle+|x+1\rangle).

Take vx=eikx/2v_x=e^{ikx}/2, so ∥v∥2=1\|v\|_2=1 and periodicity requires k=2πm/4k=2\pi m/4. Substitution gives E=J(1−cos⁡k)E=J(1-\cos k). This is the one-spin-deviation sector of Bethe’s chain. Karbach and Müller write the same dispersion as E−E0E-E_0 because they retain the vacuum exchange energy. The shift by JN/4JN/4 for a chain of NN sites sets that energy to zero. Bethe, one-spin-deviation sector · Karbach and Müller, Eqs. (4)–(8), PDF

For k=πk=\pi, the components alternate between 1/21/2 and −1/2-1/2, and E=2JE=2J. 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

Set J=1J=1 and use the exact pair above. For a proposed operator H~\widetilde H evaluate R=∥H~v−Ev∥2R=\|\widetilde H v-Ev\|_2. The following are exact values, not solver tolerances.

ChangeResidualReason
Construct all four original bonds0The two neighboring amplitudes are both opposite in sign.
Reverse the sign of HH only4The defect is −2Ev-2Ev.
Add αI\alpha I without shifting EE∣α∣\lvert\alpha\rvertThe entire error lies along vv.
Omit the bond between sites 3 and 01/21/\sqrt2The omitted bond has amplitudes of magnitude 1/21/2 on its two endpoints.

The last result follows directly from (I−P30)v/2(I-P_{30})v/2. 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 k=0k=0 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 EE and HH from the same sign-flipped routine, it can report R=0R=0. 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.

For active right translation U∣x⟩=∣x+1⟩U|x\rangle=|x+1\rangle, the eigenvalue of the above column vector is e−ike^{-ik}. At k=πk=\pi, UU and U−1U^{-1} have the same eigenvalue. At k=π/2k=\pi/2 they have eigenvalues −i-i and +i+i. Using the latter state, the wrong-test norm ∥U−1v−e−ikv∥2=2\|U^{-1}v-e^{-ik}v\|_2=2, even though its energy agrees exactly with the right-moving calculation. Indeed HH has the same energy on k=±π/2k=\pm\pi/2, 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 q(0)=(0,0,0)q(0)=(0,0,0) and p(0)=(1,0,−1)p(0)=(1,0,-1). Its Hamiltonian and symmetric tridiagonal matrix are

H=12∑j=13pj2+∑j=12eqj−qj+1,Ljj=pj,Lj,j+1=Lj+1,j=e(qj−qj+1)/2.\begin{aligned} H&=\tfrac12\sum_{j=1}^3 p_j^2+\sum_{j=1}^2 e^{q_j-q_{j+1}},\\ L_{jj}&=p_j,\qquad L_{j,j+1}=L_{j+1,j}=e^{(q_j-q_{j+1})/2}. \end{aligned}

The two springs contribute two and the kinetic energy one, so the reference energy is three. The initial characteristic polynomial λ(λ2−3)\lambda(\lambda^2-3) gives the independent reference eigenvalues −3-\sqrt3, 00 and 3\sqrt3. Its squared eigenvalues sum to 2H2H. 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 0.080.08 the saved Verlet run differs from the QR trajectory by 0.001240060.00124006 in maximum coordinate or momentum error. At 0.040.04 this falls to 0.000309510.00030951. 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

I3=13tr⁡(L3)=13∑j=13pj3+∑j=12(pj+pj+1)eqj−qj+1.I_3=\tfrac13\operatorname{tr}(L^3) =\tfrac13\sum_{j=1}^3p_j^3 +\sum_{j=1}^2(p_j+p_{j+1})e^{q_j-q_{j+1}} .

Deliberately drop the bond sum. The symmetric trajectory has q=(s,0,−s)q=(s,0,-s) and p=(v,0,−v)p=(v,0,-v), 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 0.095666670.09566667. The omitted term 0.3e0.5−0.2e−0.40.3e^{0.5}-0.2e^{-0.4} adds 0.360552370.36055237, bringing the matrix trace result to 0.456219040.45621904. 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

  • H. Bethe, “Zur Theorie der Metalle. I. Eigenwerte und Eigenfunktionen der linearen Atomkette,” Zeitschrift für Physik 71 (1931), 205–226, one- and two-spin-deviation sectors. DOI
  • M. Karbach and G. Müller, “Introduction to the Bethe ansatz I,” Computers in Physics 11 (1997), 36–43, Eqs. (4)–(8). DOI