# The differentiation of a functional by a ket

I saw something very strange when I was studyng about the variational method. In the text, to minimize the functional $$E[\psi] = \frac{\langle \psi |\hat{H}|\psi \rangle}{\langle \psi |\psi \rangle},$$the author derive it with respect to the ket $$|\psi \rangle$$, and write $$\frac{\partial E}{\partial |\psi \rangle} = 0,$$ and the same for the bra. But does it make sense? I have never seen it before.

Yes, it does make sense. Remember that a ket is just a vector. A derivative with respect to a vector simply stands for a gradient. For example, in ordinary calculus notation, $$\frac{\partial f(\mathbf{r})}{\partial \mathbf{r}} \equiv \nabla_{\mathbf{r}} f(\mathbf{r}).$$ One easy way to carry out the derivative is to work in components. Let $$|\psi \rangle = \sum_i \psi_i |i\rangle$$. Then $$\frac{\partial E(|\psi\rangle)}{\partial |\psi \rangle} = \sum_i \frac{\partial E}{\partial \psi_i} |i \rangle.$$