# M55. The lowest states of an operator **Package:** F1, its first part: the lowest eigenvalues and eigenfunctions of a Schrödinger operator with a potential, on a domain that is periodic in every direction. A new kind of problem, with an eigenvalue as an unknown, and a new kind of result. ## What was built - **An eigenvalue in the problem description**: its name, and how many of the lowest eigenvalues are wanted. The equation holds the name as a symbol. A solution holds the eigenvalues, and the eigenfunctions one after another as the values of the unknown. - **`methods::subspace`**: the lowest eigenpairs of a symmetric operator from its action alone, by the locally optimal block preconditioned conjugate gradient method. The directions of a step are made orthonormal by their coefficients in the small space. - **`eigen`**: reads $H\psi = E\,\psi$ with $H = -\sum_i a_i\partial_i^2 + V(\mathbf{x})$ however the equation is arranged, applies $H$ on a Fourier grid, and preconditions with the inverse of the second derivatives. The planner solves on one grid after another, each from the eigenfunctions of the grid before. - **The method `fourier_subspace`** in a plan, with a tolerance and the most iterations. - **In Python**: `pm.Problem(…, eigenvalue=(E, 4))`, `solution.eigenvalues`, and the eigenfunctions along the first axis of `solution[psi]`. `plot` and `animate` take a `state`, and a solution of an eigenproblem is called at points, integrated, saved, loaded and handed to xarray and to VTK files state by state. ## What it reaches | Problem | Grid | Iterations | Error of the eigenvalues | Time | |---|---|---|---|---| | Harmonic oscillator, 6 states, on a ring of the length 20 | 96 | 63 | $10^{-13}$ | 0.02 s | | The well $-1/\cosh^2 x$, its bound state $E = -\tfrac12$ | 512 | 6 | $4\cdot10^{-16}$ | 0.01 s | | Oscillator in the plane, 6 states | $64^2$ | 115 | $10^{-13}$ | 1.2 s | | Oscillator in space, 4 states | $64^3$ | 102 | $3\cdot10^{-13}$ | 45 s | | A lattice of wells in the plane, 4 states | $32^2$ | 20 | | 0.03 s | The eigenfunction of the lowest state of the oscillator is right to $10^{-8}$ at every point, and that of the well as well. A free particle on a ring has $0, \tfrac12, \tfrac12, 2, 2$ to $10^{-10}$, with orthonormal eigenfunctions in the two pairs. Mathieu's equation in its own arrangement, $u'' + (a - 2q\cos 2x)u = 0$, has its five lowest characteristic values to $10^{-9}$ against the matrix in the basis of waves. An oscillator whose two directions have different masses has $1.5, 2.5, 3.5, 3.5$. ## Decisions ### D55.1. The eigenvalue is named, and the equation is written as it stands *Developer, 2026-11-20.* An eigenproblem is `pm.Problem(equation, domain=…, eigenvalue=(E, 4))`: the equation holds a symbol for the eigenvalue, and the problem says which symbol that is and how many eigenvalues are wanted, as it says which symbol is the time and how long it runs. The alternatives were a function of its own, `pm.eigen(operator, domain)`, which would take an operator and not an equation and so break with how everything else is stated, and a class of symbols `pm.Eigenvalue("E")`, which hides in the equation what the problem should say. The core reads the equation as `A u + w·E·u = 0` and divides: how the user arranged it does not matter. ### D55.2. The result is a solution with one more axis *Developer, 2026-11-20.* The eigenfunctions are the values of the unknown, along a first axis, as the recorded times of a problem in time are, and the eigenvalues stand where the times stand. Everything that a solution can do, it then does for states with little new code: values anywhere, integrals, files, pictures. A class of its own would have meant all of that twice. ### D55.3. Normalized, with a positive largest value *Developer, 2026-11-20.* An eigenfunction is fixed up to a factor. The integral of its square over the domain is one, which is what physics wants of a state, and its largest value is positive, so that the same problem gives the same function on every grid and every machine. Eigenfunctions of one eigenvalue are an orthonormal choice, which is not fixed further. ### D55.4. A block iteration written here, with the dense eigenproblem from faer *Developer, 2026-11-20.* The matrix of the operator on a grid is dense in one direction and too large in three, so the eigenvalues come from the action of the operator. The iteration is that of Knyazev, which the plane-wave codes of electronic structure use: it needs one action of the operator for each function and step, and takes a preconditioner. It is written in the core, since no library of the project's kind offers it: faer gives the dense symmetric eigenproblem of the small space, which is the general kernel in it. No dependency is added. The plain method fails in its last digits: the directions of a step become combinations of the other functions, and making them orthogonal on the grid amplifies rounding until the iteration diverges, which it did at a residual of $10^{-10}$ in the first version. The directions are therefore made orthonormal in the small space, by their coefficients (Duersch, Shao, Yang and Gu, 2018). ### D55.5. Resolved means the eigenfunctions, and the potential times them *Developer, 2026-11-20.* The planner takes the first grid on which the Fourier coefficients of every eigenfunction, and of the potential times it, have fallen to $10^{-10}$. The potential alone is not measured: $x^2$ on a ring has a kink where the ring closes, and its coefficients never fall, which sent the first version of the planner to the largest grid for every well. Where the eigenfunctions have faded the kink does no harm, and the product shows whether they have. ### D55.6. Periodic first *Developer, 2026-11-20.* The first part is a domain that is periodic in every direction: the operator is exact there with two transforms, and a bound state is found on a period that is long enough. Free space, where the planner must find that period by itself, is the next part. ## What is left - Free space, with the box chosen by the planner. - Hydrogen: a potential with a singularity. - First derivatives, a medium, a weight beside the eigenvalue. - A preconditioner that knows the potential, the solve starting from what the planner found, and converged functions left out. - Eigenvalues near a given value.