- Home
- Library
- Lattice and Hamiltonian Field Theory
- Generating and Testing Lattice Ensembles
- Dirac Solvers and Preconditioning
Dirac Solvers and Preconditioning
A quark propagator is a solution of a linear system on each gauge field. A pseudofermion force requires another such solution, often many times during one trajectory. The residual printed by a solver is therefore only an intermediate result: the useful question is how accurately it determines a correlator, a force, or an acceptance probability.
This article solves the Wilson operator on the previous chapter's smooth two-dimensional flux field. Direct factorization supplies a reference for ordinary GMRES, conjugate gradients on the normal equations, even-odd reduction and a small exact-mode deflation experiment. The examples use dense matrices only to establish references; a production Dirac application uses the local stencil without storing a dense inverse.
The matrix and the right-hand side
Set , use a periodic lattice, and take , . There are complex spinor components, ordered by site and then spin. The Wilson matrix has a diagonal and nearest-neighbor hopping terms. A forward link transports from to ; hence the row at multiplies the forward neighbor by . This is the same convention and implementation used in the fermion chapter.
The free control has all links equal to one. The nontrivial field has
with except on the temporal seam, where . Every positively oriented plaquette is and the principal plaquette-angle sum divided by is one. The program checks those statements using the actual links. This is a fixed background, not a sampled gauge ensemble.
For a source spin , solve
The two columns form . The positive connected contraction
is the nonsinglet pseudoscalar contraction obtained using -Hermiticity, where . The operators are and for degenerate valence flavors: their two factors of cancel the closed-fermion minus sign, as in quark contractions. No disconnected term or ensemble average is included here. We examine so that an error at a separated time slice, rather than just at the source, is tested.
Choose a solver for the operator it actually sees
The Wilson matrix obeys but is generally not Hermitian positive definite. Ordinary conjugate gradients should not be applied directly to . Multiplication by makes it Hermitian, but not necessarily positive; that still does not justify ordinary CG.
GMRES searches a Krylov space generated by and chooses the iterate with smallest residual norm in that space. Arnoldi orthogonalization stores the basis. Our GMRES(40) restarts after at most forty basis vectors, bounding storage but discarding information that could help later convergence. Restarting may cause stagnation for other matrices.
Normal-equation CG instead solves
For invertible , is Hermitian positive definite. With and , its elementary iteration is
Apply as . Forming explicitly would enlarge the stencil and can hide its cost. In the two-norm,
The worst-case CG energy-norm bound is
It explains a possible difficulty from small singular values, not a prediction of each iteration count. Spectral clustering and the source's projection onto modes also matter. The relevant algorithms and qualifications are in Barrett et al., Templates, §§2.3.1, 2.3.3–2.3.4, printed pp.12–18.
For example, in the free periodic control, the zero-momentum mode has singular value and the corner of the Brillouin zone has . Reducing from to changes from to . On the unit-flux background the measured values are and . These are finite-cutoff matrices at positive bare mass, not a tuning of the interacting theory to its critical mass.
Even-odd reduction removes half the unknowns
Nearest-neighbor hopping on an even periodic lattice changes the parity of . Reorder sites into even and odd sets. For this unimproved Wilson action,
The second block equation gives . Substitute it into the first:
One application of uses two hopping operations on half-sized vectors. After solving the reduced system, reconstruct and check the residual of the full equation. We use GMRES on , since this Schur complement is not generally Hermitian positive definite either. The determinant identity
provides an independent finite-matrix check, where counts odd-site spin components. The retained logarithmic determinant discrepancies are below .
The scalar diagonal is a property of this action. Clover improvement replaces it by local spin-color blocks, which must be inverted locally in the Schur complement. An odd periodic extent has a wraparound bond connecting equal parities; the displayed two-block hopping decomposition then fails. A change of boundary conditions is not a harmless solver optimization.
Deflate the modes that are difficult to invert
Suppose with orthonormal eigenvectors and positive eigenvalues. For a right-hand side ,
Treating the first term exactly removes the selected small eigenvalues from the remaining problem. In the example we compute sixteen exact low modes using dense diagonalization, use their contribution as the initial iterate, and run CG on the remaining residual. In exact arithmetic the complement is invariant. We still check the full residual, since roundoff need not respect that separation perfectly.
For the unit-flux field at , the full condition number is about ; after removing sixteen modes, the remaining spectral ratio is . This demonstrates the mechanism. Computing a complete dense eigensystem would overwhelm any benefit in a large calculation, so its setup cost cannot be omitted from a speed claim.
Practical deflation need not know exact eigenvectors. To see the algebra, take a full-rank trial basis and an invertible coarse matrix . Define
They satisfy . Solve , project with , and add . The result solves the original equation. The coarse solve and the remaining iteration must both be accurate enough; merely subtracting approximate low modes is not the same construction.
Local low-mode coherence makes block-supported trial spaces useful and connects deflation with multigrid: relax error components poorly represented on a coarse space, then correct the components it represents. Its effectiveness and setup cost are measured properties of a chosen action and ensemble. Lüscher, PDF §3, pp.5–7 gives the projector construction, while §§4–6 develop block subspaces and a QCD solver. Our exact-mode toy does not reproduce that large-volume performance result.
Translate a true residual into an observable error
Let be an approximate solution, recompute , and define . Then
A recursively updated residual can drift from in finite precision. A preconditioned residual can also use a different norm. Neither should silently replace this final check. In particular, the normal-equation residual can suppress a component associated with a small singular value. Templates, §4.2, printed pp.51–56 treats residual stopping criteria and finite-precision qualifications.
For the two-source matrix, use the Frobenius norm and let . If , then . Restricting to time slice cannot increase this norm. Expanding the squared contraction gives the useful absolute bound
Relative errors can be much larger when the desired correlator is small. This is why the stopping tolerance should be tightened until changes in the measured observable are negligible compared with its intended statistical error, not chosen solely from a familiar number of decimal places.
Direct and iterative results on the same field
dirac_solvers.py requests for each unit source. Normal CG explicitly tests this original-system condition at every iteration, rather than equating its recursive normal residual with it. All methods then recompute the final residual. For unit flux and , direct factorization gives :
| Method | Iterations for source spins 1, 2 | Largest true Dirac residual | Relative error in |
|---|---|---|---|
| GMRES(40) | 168, 156 | ||
| Normal CG | 80, 79 | ||
| Even-odd GMRES(40) | 39, 39 | ||
| Sixteen-mode normal CG | 52, 54 |
All measured correlator errors satisfy the bound above. A CG iteration contains both and ; a Schur iteration contains two half-volume hopping operations. GMRES also pays for orthogonalization and restarts, and deflation pays for its basis. Thus these iteration counts do not rank wall-clock costs. The selected output separates CG iteration products from its in-solver diagnostic products; that diagnostic counter excludes the later common per-source and combined final residual checks. It includes all four combinations of free/unit-flux fields and .
On the same low-mass flux field, loosening the GMRES stopping threshold to gives a error in . Thresholds and reduce that error to and . The residual-to-correlator relationship is measured here, not assumed to be equality. These are deterministic solver errors; they do not shrink by averaging more gauge configurations.
Force accuracy and reversibility test different things
For the pseudofermion action, solve and form . For an approximation , recompute . If , then
and expanding the quadratic force gives
This controls the force in a particular gauge direction. A many-link trajectory requires the corresponding collection of derivatives and a check of accumulated integration error.
The retained test returns to the open one-plaquette model, at , with a fixed seeded pseudofermion, initial momentum , and ten steps of size . Every force solve starts from zero; the target action used for comparison is solved directly.
| Relative stopping threshold | CG iterations at the test point | Absolute force error | Trajectory endpoint error against direct solves |
|---|---|---|---|
| 3 | |||
| 5 | |||
| 7 | |||
| 8 |
The force bounds hold in every row. Nevertheless, every momentum-flipped trajectory returns on a second application within . This is not a contradiction: a kick using any deterministic function of the current position is invertible by the opposite kick and preserves volume. A symmetric composition remains reversible even if that function is an inaccurate force. A successful reversal test alone therefore cannot certify force accuracy.
In larger systems, finite-precision amplification and solver history can spoil reversibility. A chronological initial guess can depend on data that are not retraced by the reversed trajectory; variable iteration counts near a threshold can amplify roundoff differences. Kennedy, PDF §2.16, pp.21–22 discusses those issues. Test returned gauge fields, momenta and target energy, as well as true residuals and force derivatives. Tightening only the molecular-dynamics solver cannot correct an inaccurately evaluated acceptance action, and high acceptance alone does not validate a propagator measurement.
Summary
Choose the Krylov method for the actual matrix: is generally non-Hermitian, is positive when is invertible, and a Wilson Schur complement need not be positive. Even-odd reduction and deflation reorganize the solve. Recomputed residuals, observable error bounds and tolerance refinement establish what the resulting propagator or force means; reversibility is an additional test with a different purpose.
Exercises
A small residual can hide the important component
Take , , with , and approximate the solution by . Compute the relative original and normal residuals, the relative solution error, and the error in the observable .
Solution
The exact solution is . The original residual is , so its relative norm is . The normal right-hand side is , and its residual is , with relative norm . Both can look small, especially the second.
Yet , and the observable is predicted as zero instead of one. The absolute residual bound is saturated: . Small residuals certify small solution errors only when the inverse operator is also controlled.
Verify an approximate coarse space without eigenvectors
Let be invertible and use the projectors defined above. Show that , , and . If , verify that solves .
Solution
Put . Then follows from . Therefore and , proving the two projector identities. Direct multiplication gives .
For the reconstructed solution,
No eigenvector assumption appeared. An inaccurate coarse solve or an insufficiently converged projected system leaves a residual, which must be checked in the full equation. The algebra establishes equivalence, not that an arbitrary trial space accelerates convergence.
References
- R. Barrett et al., Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods, second edition, Netlib electronic text, §§2.3.1, 2.3.3–2.3.4 and 4.2 for CG, normal equations, GMRES and stopping criteria.
- M. Lüscher, “Local coherence and deflation of the low quark modes in lattice QCD,” Journal of High Energy Physics 07 (2007) 081, arXiv:0706.2298, §3 for inexact deflation and §§4–6 for local subspaces and their application.
- A. D. Kennedy, “Algorithms for Dynamical Fermions,” arXiv:hep-lat/0607038, §§2.15–2.16 for pseudofermion solves, force evaluation and reversibility.
Reproducible calculation: examples/lattice-hamiltonian/lattice-monte-carlo/dirac_solvers.py and solver-results.json. The program imports the unchanged shared Wilson kernel and the companion pseudofermion force functions. It retains source-by-source residuals, direct-reference errors, correlator bounds, Schur determinant checks, fixed seeds and numerical-library versions.
Scrollable formula. Use Left and Right arrow keys to reveal hidden content.
Scrollable table. Use Left and Right arrow keys to reveal hidden columns.
Scrollable figure. Use Left and Right arrow keys to reveal hidden content.