Lead Modes and Self-Energies
On this page
- The Bloch equation of a lead
- Why the outgoing modes give the retarded self-energy
- Compression and the stabilised pencil
- The Schur decomposition and its reordering
- Propagating modes
- The self-energies
- Real problems: the real pencil
- Hermitian definite couplings: the fast path
- Subband edges and surface bound states
- The mode solver
- Surface Green's function
- Decimation
- Cost
- Accuracy and tests
- Parameters
- In the code
- References
A lead enters the device only through its self-energy on the orbitals it touches (Green's Functions and the Caroli Formula). caroli computes it by mode matching: it finds the Bloch modes of the lead at the energy \(E\), keeps those that leave the device or decay away from it, and builds the self-energy from the subspace they span. The result is exact at a real energy, with no broadening \(\eta\). The modes themselves give the number of channels, their velocities, and the basis of the scattering matrix. Every transport solver of caroli-green uses this algorithm, which follows Wimmer's formulation, as in Kwant, with a stabilisation that keeps it regular when the cell Hamiltonian is singular at \(E\).
The Bloch equation of a lead
A lead is a periodic wire of identical cells \(j\), with the cell Hamiltonian \(H_0 = h_{00}\) (\(n \times n\)) and the coupling \(H_1 = h_{01} = \langle j \rvert H \lvert j + 1 \rangle\) to the next cell (Leads). A state \(\psi\) of the infinite wire at the energy \(E\) obeys, cell by cell,
$$ H_1^{\dagger}\, \psi_{j-1} + (H_0 - E)\, \psi_j + H_1\, \psi_{j+1} = 0. $$
Its Bloch solutions \(\psi_j = \varphi\, \lambda^j\) solve the quadratic eigenvalue problem
$$ \big( \lambda^{-1} H_1^{\dagger} + H_0 - E + \lambda\, H_1 \big)\, \varphi = 0, $$
which has \(2n\) eigenvalues \(\lambda\), some of them zero or infinite when \(H_1\) is singular. A propagating mode has \(\lvert \lambda \rvert = 1\), \(\lambda = e^{ik}\), and \(E\) is then an eigenvalue of the Bloch Hamiltonian \(H(k) = H_0 + H_1 e^{ik} + H_1^{\dagger} e^{-ik}\), whose eigenvalues Lead::bands(k) returns. For a Hermitian \(H_0\) and a real \(E\), the eigenvalues come in pairs \((\lambda, 1/\bar\lambda)\): taking the adjoint of the equation maps one onto the other.
The modes fall into three classes:
| Class | Bloch factor | Behaviour |
|---|---|---|
| Right-evanescent | \(\lvert \lambda \rvert < 1\) | Decays towards \(+\infty\) |
| Left-evanescent | \(\lvert \lambda \rvert > 1\), or \(\lambda = \infty\) | Decays towards \(-\infty\) |
| Propagating | \(\lvert \lambda \rvert = 1\) | Goes right or left according to the sign of its velocity |
Two solutions \(a\), \(b\) at the same energy carry the current
$$ J(a, b) = i\, \big( a_j^{\dagger} H_1\, b_{j+1} - a_{j+1}^{\dagger} H_1^{\dagger}\, b_j \big), $$
the particle current from cell \(j\) to cell \(j + 1\), which does not depend on \(j\). For two Bloch modes it carries the factor \((\bar\lambda_a \lambda_b)^j\), which must then equal 1: two modes of different propagating \(\lambda\), or a propagating and an evanescent mode, carry no cross current. For one propagating mode, \(J(\varphi, \varphi) = i\,(\lambda\, \varphi^{\dagger} H_1 \varphi - \bar\lambda\, \varphi^{\dagger} H_1^{\dagger} \varphi) = v\, \varphi^{\dagger} \varphi\), where \(v = dE/dk\) is the group velocity (Hellmann and Feynman's theorem applied to \(H(k)\)), in cells per unit time.
Why the outgoing modes give the retarded self-energy
Take a lead that continues a device towards \(+\infty\): the last device slice is \(N - 1\), and the lead cells are \(N, N + 1, \dots\) In the retarded problem nothing comes in from \(+\infty\), so the wave in the lead is a combination of right-going modes only: the right-evanescent ones and the propagating ones with \(v > 0\). The reason is the limit \(\eta \to 0^{+}\): at \(E + i\eta\) a propagating mode shifts to \(k + i\eta / v\), so \(\lvert \lambda \rvert = e^{-\eta / v}\), below 1 exactly when \(v > 0\). The outgoing propagating modes join the decaying ones.
These right-going solutions define a Bloch matrix \(F\) with \(\psi_{j+1} = F \psi_j\). In the equation of the last device slice, the coupling to the lead, \(H_1 \psi_N = H_1 F \psi_{N-1}\), becomes a term on the slice itself: the self-energy is \(\Sigma_R = H_1 F\). With the right-going modes as the columns of an \(n \times n\) matrix \(\Phi\) and their factors in \(\Lambda\), the classical mode-matching formula is \(F = \Phi \Lambda \Phi^{-1}\) (Ando, 1991). It breaks down in three ways, all common:
- a singular \(H_1\) gives infinite and zero eigenvalues, and \(\Phi\) is not square (graphene ribbons, multi-orbital leads);
- strongly decaying evanescent eigenvectors are nearly dependent: their matrix has an inverse condition number near \(10^{-15}\) in a ribbon 100 sites wide;
- the usual reductions of the quadratic problem need \((H_0 - E)^{-1}\), which does not exist at the eigenvalues of the cell.
caroli avoids all three: the coupling is compressed, the reduced problem is stabilised, and the self-energy is built from orthonormal bases of invariant subspaces; the evanescent eigenvectors are never formed.
Compression and the stabilised pencil
The coupling is factored by its singular value decomposition \(H_1 = U S V^{\dagger}\). Singular values below \(10^{-12}\) of the largest are dropped, which leaves the rank \(r\), and
$$ H_1 = u\, v^{\dagger}, \qquad u = U \sqrt{S}, \quad v = V \sqrt{S} \qquad (n \times r). $$
Only the parts of the wave that the coupling sees matter, the \(2r\) numbers
$$ x_j = (\alpha_j, \gamma_j) = (u^{\dagger} \psi_{j-1},\; v^{\dagger} \psi_j). $$
With \(H_1 \psi_{j+1} = u\, \gamma_{j+1}\) and \(H_1^{\dagger} \psi_{j-1} = v\, \alpha_j\), the equation of cell \(j\) is \((H_0 - E)\, \psi_j + u\, \gamma_{j+1} + v\, \alpha_j = 0\). Adding \(s\,(u u^{\dagger} + v v^{\dagger})\, \psi_j = s\, u\, \alpha_{j+1} + s\, v\, \gamma_j\) to both sides gives the cell wave from the reduced coordinates:
$$ \psi_j = \tilde G\, \big[\, u\, (s\, \alpha_{j+1} - \gamma_{j+1}) + v\, (s\, \gamma_j - \alpha_j) \,\big], \qquad \tilde G = \big( H_0 - E + s\,(u u^{\dagger} + v v^{\dagger}) \big)^{-1}. $$
Projecting it with \(u^{\dagger}\) (which gives \(\alpha_{j+1}\)) and with \(v^{\dagger}\) (which gives \(\gamma_j\)) closes the system, \(L\, x_{j+1} = R\, x_j\), with
$$ L = \begin{pmatrix} 1 - s\, u^{\dagger} \tilde G u & u^{\dagger} \tilde G u \\ -s\, v^{\dagger} \tilde G u & v^{\dagger} \tilde G u \end{pmatrix}, \qquad R = \begin{pmatrix} -u^{\dagger} \tilde G v & s\, u^{\dagger} \tilde G v \\ -v^{\dagger} \tilde G v & s\, v^{\dagger} \tilde G v - 1 \end{pmatrix}. $$
A Bloch mode, \(x_{j+1} = \lambda\, x_j\), is an eigenvector of the \(2r \times 2r\) pencil \(R\, x = \lambda\, L\, x\), and its cell wave is
$$ \varphi = \tilde G\, \big[\, v\, (s\, \gamma - \alpha) + \lambda\, u\, (s\, \alpha - \gamma) \,\big], \qquad (\alpha, \gamma) = x. $$
The stabilisation is \(s = i\) in general. \(\tilde G\) then exists whatever \(H_0 - E\): if \((H_0 - E + i\,(u u^{\dagger} + v v^{\dagger}))\, \psi = 0\), the real and imaginary parts of \(\psi^{\dagger}(\dots)\psi\) give \(\psi^{\dagger}(H_0 - E)\psi = 0\) and \(\lvert u^{\dagger}\psi \rvert^2 + \lvert v^{\dagger}\psi \rvert^2 = 0\), so \(\psi\) is an eigenstate of the cell at \(E\) that the coupling does not reach: a dispersionless band of the lead lying exactly at \(E\). Short of that, \(\tilde G\) exists at every energy, including the eigenvalues of the cell.
The size is \(2r\) instead of \(2n\). A graphene ribbon cut along a slanted direction, 100 cells wide (200 orbitals per cell), has a coupling of rank 99: its pencil is \(198 \times 198\) instead of \(400 \times 400\). The stabilised resolvent costs one LU of an \(n \times n\) matrix, solved for the \(2r\) columns of \([u\; v]\); one product gives the four blocks of \([u\; v]^{\dagger} \tilde G\, [u\; v]\).
The Schur decomposition and its reordering
The pencil becomes a standard eigenproblem with the same invariant subspaces:
| Matrix | Its eigenvalues | When |
|---|---|---|
| \(C = L^{-1} R\) | \(\lambda\) | The LU of \(L\) has a pivot ratio above \(10^{-10}\), and not below that of \(R\) |
| \(C = R^{-1} L\) | \(1/\lambda\) | Otherwise, if the LU of \(R\) has a pivot ratio above \(10^{-10}\) |
| \(C = (R - \sigma L)^{-1} L\) | \(\mu = 1/(\lambda - \sigma)\) | Otherwise, with the best of eight shifts \(\sigma\) off the unit circle (moduli 0.5 and 2); the solve fails below a pivot ratio of \(10^{-14}\) |
The pivot ratio is the smallest pivot over the largest. A vanishing eigenvalue of \(C\) in the last two forms (below \(10^{-13}\) of the largest) is \(\lambda = \infty\), counted as left-evanescent.
The complex Schur decomposition \(C = Q\, T\, Q^{\dagger}\), with \(Q\) unitary and \(T\) upper triangular, gives the eigenvalues on the diagonal of \(T\). It comes from Accelerate's LAPACK on macOS and from faer's Hessenberg reduction followed by an in-house QR algorithm elsewhere (Dense Kernels). Each eigenvalue is classed: right-evanescent if \(\lvert \lambda \rvert < 1 - 10^{-6}\), propagating if \(\lvert \lambda \rvert \leq 1 + 10^{-6}\), left-evanescent otherwise.
A unitary reordering of the Schur form moves chosen eigenvalues to the top left, and then the first \(k\) columns of \(Q\) are an orthonormal basis of their invariant subspace, exact to rounding. That is how the evanescent subspaces are obtained, without eigenvectors. Two orderings are made: one with the right-evanescent eigenvalues first, then the propagating ones in contiguous groups; one with the left-evanescent eigenvalues first. The reordering moves eigenvalues by adjacent swaps (as LAPACK's ztrexc), in windows whose rotations reach the rest of the matrix as matrix products (Kressner's block algorithm).
Propagating modes
Propagating eigenvalues closer than \(10^{-7}\) form a degenerate group, by single linkage. Each propagating eigenvector is obtained by back-substitution in the Schur form. When the diagonal block of a group is numerically scalar (off-diagonal entries below \(10^{-8}\) of the largest entry of \(T\)), the degeneracy is genuine and the Schur basis of the group serves as eigenvectors. Otherwise each vector is back-substituted within the group too: a Jordan block then shows up as nearly parallel vectors, and the Cholesky factor of their Gram matrix has an inverse condition below \(10^{-7}\). That is a subband edge (below). The vectors \(x = Q y\) are normalised, and the cell waves \(\varphi\) of all the propagating modes follow from the formula above as two matrix products.
Within a group, any combination of the modes is again a Bloch mode with the same \(\lambda\), and the directions are not yet sorted. The current matrix of the group,
$$ J_{ab} = i\, \big( \lambda_b\, \varphi_a^{\dagger} H_1\, \varphi_b - \bar\lambda_a\, \varphi_a^{\dagger} H_1^{\dagger}\, \varphi_b \big), $$
is taken in the metric of the \(x\) vectors (with the Gram matrix \(\mathcal L \mathcal L^{\dagger}\), the matrix \(\mathcal L^{-1} J \mathcal L^{-\dagger}\)), and its Hermitian part is diagonalised. Its eigenvectors are modes that carry no cross current, and its eigenvalues their currents \(J_k\), whose signs give the directions. Different groups carry no cross current, as shown above. The velocity of a mode is \(v_k = J_k / \varphi_k^{\dagger} \varphi_k\). If \(\lvert v_k \rvert\) is below \(10^{-8}\) of the bandwidth scale \(\lVert H_0 \rVert_\infty + 2 \lVert H_1 \rVert_\infty\), the mode sits at a subband edge.
Each propagating mode is stored normalised to unit current, \(\varphi_k / \sqrt{\lvert J_k \rvert}\), so that \(J(\varphi_a, \varphi_b) = \pm \delta_{ab}\), with its Bloch factor: the mean of its group, brought back to \(\lvert \lambda \rvert = 1\). These are the right_modes and left_modes of LeadModes, the basis of the scattering matrix.
The right-going modes are then the right-evanescent Schur vectors and the propagating modes of positive velocity; the left-going ones, the propagating modes of negative velocity and the left-evanescent Schur vectors. By the pairing \((\lambda, 1/\bar\lambda)\) there must be \(r\) of each. Another count is reported as ModeCount: a threshold has misclassified an eigenvalue, at an energy on a band edge.
The self-energies
The right-going vectors are scaled to unit norm and orthonormalised by a QR factorisation, which gives a \(2r \times r\) basis \(X\) of the right-going subspace; the left-going ones give \(Y\). Each splits into its first \(r\) rows (the \(\alpha\) part) and its last \(r\) rows (the \(\gamma\) part). The self-energies are
$$ \Sigma_R = u\, X_\gamma\, X_\alpha^{-1}\, u^{\dagger}, \qquad \Sigma_L = v\, Y_\alpha\, Y_\gamma^{-1}\, v^{\dagger}. $$
\(\Sigma_R\) is the self-energy of a lead towards \(+\infty\) on the slice it touches, \(\Sigma_L\) that of a lead towards \(-\infty\). Here is what they mean. A solution made of right-going modes only has \(x_j = X c\) for some coefficients \(c\), so \(\alpha_j = X_\alpha c\), \(\gamma_j = X_\gamma c\), and
$$ H_1\, \psi_j = u\, \gamma_j = u\, X_\gamma X_\alpha^{-1} \alpha_j = \Sigma_R\, \psi_{j-1}. $$
In the equation of the last device slice, the coupling to the first lead cell, \(H_1 \psi_N\), is therefore \(\Sigma_R\, \psi_{N-1}\): \(\Sigma_R = H_1 F\), the lead eliminated exactly. In the same way a solution made of left-going modes has \(H_1^{\dagger} \psi_{j-1} = v\, \alpha_j = v\, Y_\alpha Y_\gamma^{-1} \gamma_j = \Sigma_L\, \psi_j\), the coupling of the first device slice to the lead on its left. Only \(u^{\dagger}\psi_{N-1}\) enters \(\Sigma_R\): the rank \(r\) of the coupling is all the lead needs. A change of basis \(X \to X C\) leaves \(X_\gamma X_\alpha^{-1}\) unchanged, so the orthonormalisation does not change the result. These are the self-energies \(h_{01}\, g_R\, h_{01}^{\dagger}\) and \(h_{01}^{\dagger}\, g_L\, h_{01}\) of the two-terminal solvers.
\(X_\alpha\) and \(Y_\gamma\) must be invertible. Their inverse condition number is estimated in the 1-norm from an LU (as LAPACK's zgecon), and below \(10^{-11}\) the lead has a bound state at its surface (Subband edges and surface bound states).
Real problems: the real pencil
When \(H_0\), \(H_1\) and the energy are all real (graphene, square lattices whose coupling is not definite), the pencil is kept real. The stabilisation becomes \(s\,(u u^{\dagger} + v v^{\dagger})\) with \(s = 0.618\ldots\): any real \(s\) works unless it makes \(\tilde G\) singular at the energy, and an irrational value makes that unlikely. The SVD of \(H_1\) is real, the shift candidates are real (\(\pm 0.5\), \(\pm 2\), \(\pm 0.37\), \(\pm 2.7\)), and the Schur decomposition goes through the real Schur form, about a quarter of the arithmetic. Its \(2 \times 2\) blocks of complex pairs are then split by complex rotations (as MATLAB's rsf2csf, \(O(n)\) per block), and everything after is the complex algorithm. If the real solve fails, for instance because the LU of the real stabilised matrix has a pivot ratio below \(10^{-10}\), the complex stabilisation takes over.
Measured on an M5, the real form costs a third of the complex one for pencils of 512 to 1024, and graphene ribbons, whose time goes to their leads, run 1.5 to 1.6 times faster at \(W = 128\) and \(256\) (ARCHITECTURE.md). The unit test real_pencil_matches_complex checks that both give the same self-energies to \(10^{-10}\), and the same channels, on a graphene lead and on a square lattice with diagonal hoppings (a Hermitian coupling that is not definite), at no fewer than six of seven energies (the others may be subband edges).
Hermitian definite couplings: the fast path
Square and cubic lattices, and multi-orbital leads without spin–orbit coupling or magnetic field along the axis, have a Hermitian definite coupling, \(H_1 = s P\) with \(s = \pm 1\) and \(P = \mathcal L \mathcal L^{\dagger}\) positive definite. At a real energy, \(\mu = \lambda + 1/\lambda\) turns the Bloch equation into a Hermitian problem:
$$ (H_0 - E)\, \psi = -s\, \mu\, P\, \psi, \qquad \psi = \mathcal L^{-\dagger} y: \qquad \mathcal L^{-1} (H_0 - E)\, \mathcal L^{-\dagger}\, y = \nu\, y, \quad \mu = -s\, \nu. $$
One Hermitian eigenproblem of size \(n\) replaces a Schur decomposition of size \(2n\). Each transverse mode \(y\) gives the two roots of \(\lambda^2 - \mu \lambda + 1 = 0\):
- \(\lvert \mu \rvert < 2\): \(\lambda = (\mu \pm i \sqrt{4 - \mu^2})/2\), on the unit circle. The current is \(J = -2 s\, \mathrm{Im}\,\lambda\; \psi^{\dagger} P \psi\), so the root with \(s\, \mathrm{Im}\,\lambda < 0\) goes right.
- \(\lvert \mu \rvert \geq 2\): two real roots \(\lambda\) and \(1/\lambda\), the one inside the unit circle going right.
With the factors \(u = s \mathcal L\) and \(v = \mathcal L\) of the coupling, a mode has \((\alpha, \gamma) \propto (s\, y,\, \lambda\, y)\). The eigenvectors \(y\) are orthonormal, so the bases of right- and left-going modes are orthonormal as they stand, and \(X_\alpha\), \(Y_\gamma\) are never singular. The velocities are \(J / \psi^{\dagger}\psi\) with \(\psi\) normalised by \(\psi^{\dagger} P \psi = 1\), and \(\psi / \sqrt{2 \lvert \mathrm{Im}\,\lambda \rvert}\) carries unit current. When \(P = c\, \mathbb 1\) (square and cubic lattices), \(\mathcal L^{-1} (H_0 - E) \mathcal L^{-\dagger} = (H_0 - E)/c\) has the eigenvectors of \(H_0\) at every energy, and they are computed once per lead.
The path is taken when \(H_0\) and \(H_1\) are Hermitian to \(10^{-14}\) of their largest entry and the Cholesky factorisation of \(\pm (H_1 + H_1^{\dagger})/2\) succeeds with diagonal entries within a ratio of \(10^{-4}\) (a condition number of \(P\) below about \(10^{8}\)). BHZ leads do not qualify (their coupling is not Hermitian), nor zigzag graphene ribbons (a singular coupling), nor a field along the lead (complex phases on \(H_1\)). Subband edges are detected as in the general algorithm: a real \(\lambda\) within \(10^{-6}\) of \(\pm 1\), two roots closer than \(10^{-7}\), or a velocity below \(10^{-8}\) of the bandwidth scale. At \(W = 256\) the lead modes of a square lattice take 16 ms instead of 0.47 s (M5, one thread, ARCHITECTURE.md).
LeadModes::at_general keeps the general algorithm for any coupling. The test definite_couplings_fast_path compares both on a strip of width 7 (including the bottom of its second subband), on the same strip with spin (degenerate channels), and on random Hermitian cells with \(H_1 = \pm P\): self-energies within \(10^{-10}\), velocities within \(10^{-9}\), the same channel counts, and a check that the fast path was taken. On the strip, the self-energies agree to \(1.6 \cdot 10^{-15}\) (measured on 28 November 2026, on Linux with faer's kernels).
Subband edges and surface bound states
Two energies have no self-energy as such.
- Subband edges. At the bottom or the top of a subband, two propagating modes merge into a Jordan block of zero velocity, and the right- and left-going modes cannot be told apart. The edge is detected by nearly parallel vectors in a group, a velocity below \(10^{-8}\) of the bandwidth scale, or, on the fast path, the tests above.
- Bound states of the lead surface. A singular \(X_\alpha\) means a right-going solution with \(\alpha = u^{\dagger}\psi_{j-1} = 0\): a state of the semi-infinite lead at \(E\) that does not feel the cell before it, an eigenstate of the lead with a hard wall. The surface Green's function has a pole there, and \(\Sigma_R\) is infinite. Graphene leads whose slices end in zigzag edges have such states at \(E = 0\). A singular \(Y_\gamma\) is the same for a left lead.
When the solve fails, in either case, the modes are computed at \(E + \delta\), for \(\delta = 10^{-9}, 10^{-8}, 10^{-7}, 10^{-6}\) times the bandwidth scale \(\lVert H_0 \rVert_\infty + 2 \lVert H_1 \rVert_\infty\) in turn, until one succeeds. The shift is real: the result is the limit of the self-energy from above, so a channel that opens at the edge counts, one that closes does not. LeadModes::energy records the energy used. The device stays at \(E\): in a square ribbon of width 5 at its subband edges, the shift is \(4 \cdot 10^{-9}\) and \(T\) equals the channel count just above the edge to \(2 \cdot 10^{-8}\) (measured on 28 November 2026, on Linux with faer's kernels). If no shift succeeds, the solver returns Singular(E).
| Test | Case | Asserted |
|---|---|---|
subband_edges | Square ribbon of width 5 at \(E = \pm 1, \pm 2, \pm 3\), all subband edges | \(T\) equals the channels just above, counted on the bands, to \(10^{-6}\) |
| A chain at \(E = 2 - 10^{-13}\), just below the top of its band | \(T = 1\) to \(10^{-6}\) | |
bhz_subband_edges | BHZ ribbon of width 6 at two eigenvalues of \(H(k = 0)\) | \(T\) equals the channels just above to \(10^{-5}\) |
graphene_at_zero_energy | Armchair ribbons on a rectangular four-site cell at \(E = 0\), where the zigzag ends of the lead slices carry bound states | \(T(0) = 1\) for the metallic width 4, \(0\) for the gapped width 5, to \(10^{-6}\); disordered: \(\lvert T(0) - T(10^{-7}) \rvert < 10^{-5}\) |
The mode solver
ModeSolver holds the part of a lead's problem that does not depend on the energy: whether the coupling is Hermitian definite and, when \(P = c\, \mathbb 1\), the eigen-decomposition of the cell. The nested solvers keep one per lead and reuse it at every energy, and identical leads share one; LeadModes::at builds one for a single call. Its modes_at(z) takes the fast path at a real energy, the general algorithm otherwise, with the shifts above. At a complex energy \(z\) with \(\mathrm{Im}\, z > 0\), no mode propagates, which is how SelfEnergyMethod::ModesBroadened solves the leads at \(E + i\eta\).
LeadModes holds the factors \(u\), \(v\), the bases \(X\) and \(Y\), the velocities of the right- and left-going propagating modes, the modes at unit current with their Bloch factors, and the energy used. channels() is the number of right-going propagating modes. Lead::modes(E) gives them for a lead, and Lead::bands(k) its band structure, with which the tests count the channels independently.
Identical leads (equal \(h_{00}\) and \(h_{01}\)) share one set of modes: the left lead's serve the right lead. In the two-terminal solvers, \(\Sigma_L\) and \(\Sigma_R\) then come from the same LeadModes, one from \(Y\) and one from \(X\).
Surface Green's function
The surface Green's function of a lead that starts at cell 1 and goes towards \(+\infty\) is
$$ g = (E - H_0 - \Sigma_R)^{-1}, $$
with \(\Sigma_R\) the self-energy of cells \(2, 3, \dots\) on cell 1 (surface_green_right). The multi-terminal solvers and the scattering matrix use it, with \(\Sigma_p = V_p\, g\, V_p^{\dagger}\) for an arbitrary coupling \(V_p\). For a chain with hopping \(-1\), the exact \(g = (E - i\sqrt{4 - E^2})/2\) inside the band is reproduced to \(10^{-12}\) from the modes, and to \(10^{-8}\) by decimation with \(\eta = 10^{-12}\) (chain_surface_green).
Decimation
Decimation (Lopez Sancho, Lopez Sancho and Rubio, 1985) computes the surface Green's function at a complex energy \(z = E + i\eta\). With \(\alpha_0 = H_1\) (from a cell to the next one away from the surface), \(\beta_0 = H_1^{\dagger}\) and \(\varepsilon_0 = \varepsilon^s_0 = H_0\), each step eliminates every other cell of the chain:
$$ g_k = (z - \varepsilon_k)^{-1}, \quad \varepsilon^s_{k+1} = \varepsilon^s_k + \alpha_k g_k \beta_k, \quad \varepsilon_{k+1} = \varepsilon_k + \alpha_k g_k \beta_k + \beta_k g_k \alpha_k, \quad \alpha_{k+1} = \alpha_k g_k \alpha_k, \quad \beta_{k+1} = \beta_k g_k \beta_k. $$
After \(k\) steps the renormalised cells are \(2^k\) cells apart. The couplings \(\alpha_k\), \(\beta_k\) decay once \(2^k\) exceeds the length over which \(\eta\) damps the propagating waves, about \(v/\eta\), so the iteration takes about \(\log_2 (1/\eta)\) steps, some forty at \(\eta = 10^{-12}\). It stops when the largest entries of \(\alpha_k\) and \(\beta_k\) fall below \(10^{-14} (1 + \max \lvert \varepsilon_k \rvert)\), and returns \(g = (z - \varepsilon^s)^{-1}\); after 200 steps it fails with NoConvergence.
It is kept only as an independent cross-check of mode matching, for two reasons:
- It needs \(\eta > 0\). At \(\eta = 0\) inside a band the couplings do not decay. With
SelfEnergyMethod::Decimationthe device is at \(E + i\eta\) too, and absorbs: a clean chain of five sites transmits about \(T = 1 - 5 \cdot 10^{-6}\) at \(\eta = 10^{-6}\) and \(1 - 5 \cdot 10^{-9}\) at \(\eta = 10^{-9}\). - It loses its digits near an eigenvalue of the cell. The first steps invert the nearly singular \(z - H_0\), and the renormalised energies and couplings grow to the order of \(1/\lvert E - \epsilon \rvert\) (\(\epsilon\) an eigenvalue of \(H_0\)) before they cancel. For the clean chain (\(H_0 = 0\)) at \(E = 10^{-9}\), decimation gives \(T = 0.51\) with \(\eta = 10^{-12}\) and \(0.48\) with \(\eta = 10^{-9}\), where mode matching gives 1 to \(10^{-15}\).
The numbers of these two items were measured with TwoTerminal::transmission_with on 28 November 2026, on Linux with faer's kernels. Away from cell eigenvalues the two methods agree: the chain transmits 1 to \(10^{-9}\) by decimation at \(\eta = 10^{-12}\) (chain_transmission_decimation), the clean BHZ ribbon of the thesis gives the same transmission by modes and by decimation at \(\eta = 10^{-10}\) to \(10^{-6}\) (modes_agree_with_decimation), and so do the BHZ ribbons with magnetic impurities at \(\eta = 10^{-9}\).
Cost
The general algorithm costs a few dense operations of size \(n\) (the SVD of \(H_1\), the LU of the stabilised matrix) and the Schur decomposition of size \(2r\), which dominates: on an M5, one thread, for a square-lattice lead of width 256 (a pencil of 512), 0.35 s of the 0.47 s that the lead modes took before the fast path (ARCHITECTURE.md). The propagating modes, their currents and the bases are matrix products over all the modes at once. The leads of BHZ, which keep the complex algorithm, take most of the time of a BHZ transmission: 85 % at \(W = 128\), which is why reusing the self-energies pays.
Accuracy and tests
Test (caroli-green) | Checks | Asserted |
|---|---|---|
propagating_modes_carry_unit_current | Square strip (fast path), BHZ (degenerate channels), graphene and a square lattice in a field (general algorithm), three energies each | Bloch residual below \(10^{-8}\); \(J(\varphi_a, \varphi_b) = \pm \delta_{ab}\) to \(10^{-7}\) |
wide_graphene_ribbon | Graphene ribbon 100 cells wide cut along a slanted direction (coupling of rank 99 for 200 orbitals) | \(T\) equals the channels counted on the bands to \(10^{-6}\); measured: to all ten printed decimals |
nearly_degenerate_channels | Two decoupled chains whose channels differ in \(k\) by \(5 \cdot 10^{-8}\) (grouped) or \(9 \cdot 10^{-7}\) (not grouped), with a non-Hermitian coupling | \(T\) equals the sum over the two chains to \(10^{-11}\) |
definite_couplings_fast_path | Fast path against the general algorithm | \(\Sigma\) to \(10^{-10}\), velocities to \(10^{-9}\) |
real_pencil_matches_complex | Real against complex pencil | \(\Sigma\) to \(10^{-10}\) |
subband_edges, bhz_subband_edges, graphene_at_zero_energy | Shifted energies (table above) | \(10^{-6}\) to \(10^{-5}\) |
chain_transmission_modes, chain_impurity | Chain: \(T = 1\) in the band (including \(E = 0\) and \(10^{-9}\)), \(0\) outside; one impurity \(u\): \(T = 1/(1 + (u / 2\sin k)^2)\) | \(10^{-12}\) |
The transport tests then check the self-energies through the transmissions they give: exact integers for clean wires, quantum Hall plateaus to \(10^{-6}\), and agreement with Kwant to \(10^{-10}\) on the benchmark problems, \(2 \cdot 10^{-7}\) at worst (BHZ at \(W = 256\), report of 12 October 2026).
Parameters
| Constant | Value | Role |
|---|---|---|
| Rank threshold | \(10^{-12}\) | Singular values of \(H_1\) below this fraction of the largest are dropped |
| Unit circle | \(10^{-6}\) | \(\lvert \lambda \rvert\) within this of 1: propagating |
| Degeneracy | \(10^{-7}\) | Propagating \(\lambda\) closer than this form a group; on the fast path, roots this close are a Jordan block |
| Jordan block | \(10^{-7}\) | Inverse condition of the Gram factor of a group below this: a subband edge |
| Velocity | \(10^{-8}\) | Velocities below this times the bandwidth scale: a subband edge |
| Surface state | \(10^{-11}\) | Inverse condition (1-norm estimate) of \(X_\alpha\) or \(Y_\gamma\) below this: a bound state of the lead surface |
| Real stabilisation | \(0.618\ldots\) | \(s\) of a real pencil; abandoned below a pivot ratio of \(10^{-10}\) |
| Energy shifts | \(0, 10^{-9}, 10^{-8}, 10^{-7}, 10^{-6}\) | Tried in turn, times the bandwidth scale \(\lVert H_0 \rVert_\infty + 2 \lVert H_1 \rVert_\infty\) |
| Fast path | \(10^{-14}\), \(10^{-4}\) | Hermiticity of \(H_0\), \(H_1\); smallest ratio of the diagonal of the Cholesky factor of \(P\) |
| Decimation | \(10^{-14}\), 200 | Convergence of \(\alpha_k\), \(\beta_k\); largest number of steps |
In the code
Crate caroli-green, module modes:
| Item | What |
|---|---|
LeadModes | The modes at one energy; new, at, at_general, channels |
ModeSolver | The energy-independent part of a lead, reused at every energy; modes_at |
sigma_right, sigma_left | \(\Sigma_R = u X_\gamma X_\alpha^{-1} u^{\dagger}\), \(\Sigma_L = v Y_\alpha Y_\gamma^{-1} v^{\dagger}\) |
surface_green_right | \(g = (E - H_0 - \Sigma_R)^{-1}\) |
Lead | modes, modes_at, bands |
decimation::surface_green | Lopez Sancho–Rubio decimation at a complex energy |
GreenError | Singular, ModeCount, Eigen, NoConvergence |
The Schur decomposition, its reordering (schur, schur_of_real, partition, reorder), the LU with its condition estimate (Lu) and the SVD (svd) are in caroli-dense.
References
- T. Ando, Quantum point contacts in magnetic fields, Phys. Rev. B 44, 8017 (1991).
- M. Wimmer, Quantum transport in nanostructures: From computational concepts to spintronics in graphene and magnetic tunnel junctions, PhD thesis, Universität Regensburg (2009).
- C. W. Groth, M. Wimmer, A. R. Akhmerov, X. Waintal, Kwant: a software package for quantum transport, New J. Phys. 16, 063065 (2014).
- M. P. Lopez Sancho, J. M. Lopez Sancho, J. Rubio, Highly convergent schemes for the calculation of bulk and surface Green functions, J. Phys. F: Met. Phys. 15, 851 (1985).
- D. Kressner, Block algorithms for reordering standard and generalized Schur forms, ACM Trans. Math. Softw. 32, 521 (2006).
- G. H. Golub, C. F. Van Loan, Matrix Computations, 4th ed., Johns Hopkins University Press (2013): the Schur decomposition and its reordering, the condition estimate.