# Derivation of gradient of the expectation of local energy

Background: In Variational Monte Carlo, given a Hamiltonian $$H$$ and a wave function $$\psi_\alpha$$ dependent on some parameter(s) $$\alpha$$, we have defined a quantity known as the local energy,

$$E_L = \frac{1}{\psi_\alpha}H\psi_\alpha$$

such that the expectation value for the energy can be written ($$\int\text{d}\mathbf{X}$$ denotes the (many dimensional) integral over all possible degrees of freedom, and $$\langle\cdot\rangle$$ denotes expectation values)

$$\langle H\rangle = \frac{\int \text{d}\mathbf{X}\ \psi_\alpha^* H\psi_\alpha}{\int\text{d}\mathbf{X}\ |\psi_\alpha|^2} = \int\text{d}\mathbf{X}P(\mathbf{X})E_L(\mathbf{X}) = \langle E_L\rangle$$ with the probability density $$P(\mathbf{X})=\frac{|\psi_\alpha(\mathbf{X})|^2}{\int\text{d}\mathbf{X}|\psi_\alpha(\mathbf{X})|^2}.$$

Question: Often the gradient the expected energy wrt. the parameter(s) $$\alpha$$ is needed and is commonly stated as

$$\nabla_\alpha \langle H\rangle = 2\left[\langle\frac{E_L}{\Psi_T}\frac{\partial\Psi_T}{\partial\alpha}\rangle - \langle E_L\rangle\langle\frac{1}{\Psi_T}\frac{\partial\Psi_T}{\partial\alpha}\rangle\right].$$

I would like to derive this formula. For instance, this source (on slide 7) states the result, saying they used the chain rule and the hermiticity of the Hamiltonian. But for the life of me, I cannot seem to figure out how to get this result. Neither seems anyone else, as I've found multiple sources simply stating this result without showing it (page 18 here, or page 64 here) It might be they thought it was just so easy they wouldn't bother, but nevertheless I don't think so, and would like to include a proper derivation in my thesis.

If anyone can work it out, or simply point me in the right direction to do it myself it would be most appreciated!

• Minor comment to the post (v2): Please consider to mention explicitly author, title, etc. of links, so it is possible to reconstruct link in case of link rot. Apr 20 '19 at 10:54

## 1 Answer

I see that nobody has replied yet, so I'll offer this answer, but I know that there are more qualified experts around than me. So possibly a better answer will appear in due course.

There's a bit more detail in D Bressanini and PJ Reynolds Adv Chem Phys, 105, 37 (1999) eqns (4.10) and (4.11), and in Bryan Clark's Boulder Summer School notes, p5. I don't think that it is possible to derive this formula without assuming that the trial wavefunction is real, making the local energy $$E_L(X)\equiv \Psi(X)^{-1} H\Psi(X)$$ also real. But maybe I missed something.

Let's follow this through, to highlight the key step. I'll use $$\Psi_\alpha$$ to denote $$\partial\Psi/\partial\alpha$$. Differentiating, using the chain rule, $$\frac{\partial}{\partial\alpha} \langle H\rangle = \frac{\int \text{d}X\, \Psi_\alpha^* H \Psi + \Psi^* H\Psi_\alpha}{\int \text{d}X\, \Psi^* \Psi } - \frac{\left(\int \text{d}X\, \Psi^* H \Psi\right)\left(\int \text{d}X\, \Psi_\alpha^* \Psi + \Psi^*\Psi_\alpha\right)}{\left(\int \text{d}X\, \Psi^* \Psi \right)^2} .$$ The second term can be tidied up. We can recognize $$\frac{\partial}{\partial\alpha}|\Psi|^2$$ inside the last integral of the numerator; multiplying and dividing inside both the integrals of the numerator of the second term by $$\Psi^* \Psi$$ gives us $$\frac{\partial}{\partial\alpha} \langle H\rangle = \frac{\int \text{d}X\, \Psi_\alpha^* H \Psi + \Psi^* H\Psi_\alpha}{\int \text{d}X\, \Psi^* \Psi } - \left\langle E_L\right\rangle \left\langle \frac{\partial}{\partial\alpha} \ln |\Psi|^2\right\rangle .$$ For the first term we use the Hermitian property of $$H$$ to rewrite $$\int \text{d}X\, \Psi^* H\Psi_\alpha=\int \text{d}X\, \Psi_\alpha (H\Psi)^*$$, so $$\frac{\partial}{\partial\alpha} \langle H\rangle = \frac{\int \text{d}X\, \Psi_\alpha^* H \Psi + \Psi_\alpha (H\Psi)^*}{\int \text{d}X\, \Psi^* \Psi } - \left\langle E_L\right\rangle \left\langle \frac{\partial}{\partial\alpha} \ln |\Psi|^2\right\rangle .$$ Again, multiply and divide both terms within the integral in the numerator of the first term by $$\Psi^* \Psi$$ to give \begin{align*} \frac{\partial}{\partial\alpha} \langle H\rangle &= \left\langle \frac{\Psi_\alpha^*}{\Psi^*} \frac{H \Psi}{\Psi}+ \frac{\Psi_\alpha}{\Psi} \left(\frac{H\Psi}{\Psi}\right)^*\right\rangle - \left\langle E_L\right\rangle \left\langle \frac{\partial}{\partial\alpha} \ln |\Psi|^2\right\rangle \\ &= \left\langle \frac{\Psi_\alpha^*}{\Psi^*} E_L+ \frac{\Psi_\alpha}{\Psi} E_L^*\right\rangle - \left\langle E_L\right\rangle \left\langle \frac{\partial}{\partial\alpha} \ln |\Psi|^2\right\rangle . \end{align*} At this point, I think we have to take $$\Psi$$ to be real, so both the terms in the first bracket are the same, and we can replace $$|\Psi|^2$$ by $$\Psi^2$$ in the last term, giving the result you wanted to prove. Obviously, we expect all the final expectation values here to be real, and they manifestly are, so if we don't assume $$\Psi$$ is real, I think this last equation is the result.

• Thanks a lot for this. The beginning of the derivation looks like one of my (many) attempts, where I think I tripped up with the real/complex considerations. I don't have a need for a result for complex wave functions, but it's very handy to be aware that this is a constraint built into the formula I use. Thanks again! Apr 20 '19 at 15:24