# Discretization of Hamiltonian with first derivative

In a particular 1D system, the Hamiltonian can be writen as

$$H=\mathrm{i}\left(f(r)\frac{\partial}{\partial r}+\frac{1}{2}f'(r)\right)\; ,$$

wher $$\mathrm{i}$$ is the imaginary unit, and $$f(r)$$ is a real function. How could I write this Hamiltonian's matrix using the finite difference method? I thought about replacing the derivative in the first term with

$$\frac{\partial \psi}{\partial r} \rightarrow \frac{\psi_{j+1}-\psi_{j-1}}{2h}\; ,$$

but $$f(r)$$ depends on the position. Replacing

$$\mathrm{i}f(r)\frac{\partial \psi}{\partial r} \rightarrow \mathrm{i}\frac{f(r_{j+1})\psi_{j+1}-f(r_{j-1})\psi_{j-1}}{2h}$$

wouldn't work either, because the Hamiltonian matrix must be Hermitian. In this case $$H_{j,j+1}=\mathrm{i}\frac{f(r_{j+1})}{2h}$$ and $$H_{j+1,j}=-\mathrm{i}\frac{f(r_{j})}{2h}\neq H_{j,j+1}^*$$.

Replacing the first term with $$\mathrm{i}f(r)\frac{\partial \psi}{\partial r} \rightarrow \mathrm{i}\frac{f((r_{j+1}+r_{j})/2)\psi_{j+1}-f((r_{j}+r_{j-1})/2)\psi_{j-1}}{2h}$$ would give a Hermitian matrix, but is this the correct way to discretize this Hamiltonian?

## Edit 1:

I realised that the term

$$\mathrm{i}\frac{1}{2}f'(r)\psi\rightarrow\mathrm{i}\frac{1}{2}f'(r_j)\psi_j$$

would break Hermicity.

## Edit 2:

Replacing the first term in the Hamiltonian with the average of the forward and backward derivatives (instead of the central formula):

$$\mathrm{i}f(r)\frac{\partial \psi}{\partial r} \rightarrow \mathrm{i}\frac{f((r_{j+1}+r_{j})/2)\psi_{j+1}-f((r_{j+1}+r_{j})/2)\psi_{j}}{2h}+\mathrm{i}\frac{f((r_{j}+r_{j-1})/2)\psi_{j}-f((r_{j}+r_{j-1})/2)\psi_{j-1}}{2h}=\mathrm{i}\frac{f((r_{j+1}+r_{j})/2)\psi_{j+1}-f((r_{j}+r_{j-1})/2)\psi_{j-1}}{2h}+\mathrm{i}\frac{-f(r_{j}+h/2)+f(r_{j}-h/2)}{2h}$$

Applying finite differences to the second term in the above equation:

$$\mathrm{i}\frac{-f(r_{j}+h/2)+f(r_{j}-h/2)}{2h}=-\mathrm{i}\frac{1}{2}f'(r_{j})$$

which would cancel the $$\mathrm{i}\frac{1}{2}f'(r)\psi$$ term (see edit 1).

Therefore, the Hamiltonian might be replaced with

$$H\psi=\mathrm{i}\left(f(r)\frac{\partial}{\partial r}+\frac{1}{2}f'(r)\right)\psi \rightarrow \mathrm{i}\frac{f((r_{j+1}+r_{j})/2)\psi_{j+1}-f((r_{j}+r_{j-1})/2)\psi_{j-1}}{2h}$$

Even without the $$f(r)$$ ordering problem there is no really good way to discretise a first derivative while preserving all its hermiticity properties. This is the notorious "fermion doubling problem" in lattice gauge theories.

By your ordering problem I mean that your continuum hamiltonian, as written, is not Hermitian. I suppose that you meant $$H=\frac 12 (i f(r)\partial_r+ i\partial_r f(r)).$$ which is hermitian with respect to the standard $$L^2(\mathbb R)$$ inner product.

The problem is that forward differences $$(D_+\psi)_n\approx (\psi_{n+1}-\psi_n)/a$$ or backward differences $$(D_-\psi)_n\approx (\psi_{n}-\psi_{n-1})/a$$ do not lead to symmetric matrices, while center symmetric differences $$(D_0\psi)_n\approx (\psi_{n+1}-\psi_{n-1})/2a$$ map odd sites to even sites and vice versa and so $$D_0$$ anticommutes with $$(-1)^n$$, a symmetry absent in the continuum and which leads to high-frequency artifacts. The Nielsen-Ninomiya theorem shows that there is no satisfactory escape.

• So isn't there a standard way to discretize the Hamiltonian you proposed? – TheAverageHijano Feb 18 at 6:45
• I forgot to mention that my function has the form $f(r)=g(r)+1/2g'(r)$, so that the Hamiltonian is Hermitian. – TheAverageHijano Feb 18 at 12:57
• I'll edit to add some more material. – mike stone Feb 18 at 13:09
• Thanks you for the edit! After working for some time, I think that I found a discretization that makes sense and conserves Hermicity. Could you check the edits to the post? – TheAverageHijano Feb 18 at 17:41