# How to differentiate an operator in QM?

I recently started learning QFT and the lecturer wrote down some equations for a quantum harmonic oscillator: $$\hat H= \frac{\hat p^2}{2m}+\frac{1}{2}mw^2\hat x^2$$ $$\partial^2_t \hat x=-w^2\hat x$$

For the second equation, how to get from the Left Hand Side to the Right Hand Side? Does it just mean to replace operator $$\hat x$$ with $$x$$ and differentiate the scalar variable $$x$$?

• Do you understand the difference between the shrodinger and Heisenberg pictures in quantum mechanics? – By Symmetry Oct 16 at 9:37
• I know that in Heisenberg picture, $\hat x ^H = e^{i \hat H t / \hbar} \hat x^S e^{-i \hat H t / \hbar}$ But how do you differentiate an operator? For example $d \over dt$ $\hat x$? Is it to just treat $\hat x$ as variable $x$? – TaeNyFan Oct 16 at 9:46
• @TaeNyFan Do you know how to derive the second equation from the first one in classical mechanics? – AccidentalFourierTransform Oct 22 at 1:08

## Operators and derivatives

Let $$X$$ and $$P$$ be individual operators satisfying $$[X,P]=i. \tag{1}$$ The operator $$X$$ is just one operator, so there is nothing to differentiate here.

Now consider a one-parameter family of operators, with one operator $$X(t)$$ for each time $$t$$. This is often called an operator-valued function. That's just a fancy name for having a separate operator $$X(t)$$ for each value of $$t$$, just like an ordinary function $$f$$ consists of a separate number $$f(t)$$ for each value of $$t$$. Operators can be added and subtracted, so the difference $$X(t+\epsilon)-X(t)$$ is a perfectly well-defined operator. The difference is generally non-zero for $$\epsilon\neq 0$$, so we can consider the derivative $$\frac{d}{dt} X(t) := \lim_{\epsilon\to 0}\frac{X(t+\epsilon)-X(t)}{\epsilon} \tag{2}$$ as usual. Just like for an ordinary function, the derivative may or may not be well-defined (the limit may or may not exist or be unique), but let's only consider cases where it is well-defined.

Sometimes we write $$X$$ as an abbreviation for $$X(t)$$, which is apparently what your lecturer did. It's a very common abbreviation. However, for the rest of this post, I'll always write the $$t$$-dependence explicitly, whenever there is any $$t$$-dependence at all.

## The Heisenberg picture

For any observable $$A$$ defined at time $$t=0$$, the Heisenberg picture defines a whole family of observables $$A(t)$$, one for each time $$t$$, like this: $$A(t) := U(-t)A U(t) \tag{4}$$ with $$U(t)=e^{-iHt} \tag{5}$$ where $$H$$ is the Hamiltonian. Equation (5) implies $$\frac{d}{dt} U(t) = -iH\,U(t). \tag{6}$$ This works for an operator $$H$$ just like it would if $$H$$ were a number, because everything in equations (5) and (6) commutes with $$H$$. I actually prefer to reverse the logic, using equation (6) together with the condition $$U(0)=1 \tag{7}$$ to define the family of operators $$U(t)$$, and I think of (5) as a mere abbreviation for the conditions (6) and (7). Equations (4) and (6) imply the key equation $$\frac{d}{dt} A(t) = i\big[H,A(t)\big]. \tag{8}$$ By the way, this is not specific to QFT. Equations (4)-(8) are how the Heisenberg picture works in any quantum theory, and none of this requires referring to the Schrödinger picture at all.

## Application to the harmonic oscillator

Now suppose that $$X$$ and $$P$$ are individual operators satisfying equation (1), namely the position and momentum observables at time $$t=0$$. Use equation (4) to define a family of operators $$X(t)$$. Then use equation (8) to get \begin{align} \frac{d^2}{dt^2}X(t) &= \frac{d}{dt}i\big[H,X(t)\big] \\ &= i\left[H,\frac{d}{dt}X(t)\right] \\ &= -\Big[H,\big[H,X(t)\big]\Big]. \\ &= -\Big[H,\big[H,U(-t)XU(t)\big]\Big] \\ &= -U(-t)\Big[H,\big[H,X\big]\Big]U(t). \tag{9} \end{align} To get the last line, I used the fact that $$H$$ commutes with $$U(\pm t)$$, which is clear from equation (5). With $$H$$ defined as in the OP, straightforward application of (1) gives $$\Big[H,\big[H,X\big]\Big] = w^2 X. \tag{10}$$ Substitute this back into the last line of (9) to get $$\frac{d^2}{dt^2}X(t) = -w^2 U(-t)XU(t) = -w^2 X(t), \tag{11}$$ which is the desired result.

To define an operator it is sufficient to define its action on an arbitrary state $$\Psi$$. The definition of $$d \hat{x} / d t$$ is as follows:

$$\left( \frac{d \hat{x}}{dt} \right) \left| \Psi \right> = \frac{d}{dt} \left( \hat{x} \left| \Psi \right> \right).$$

Equivalently, the matrix elements of the derivative of an operator are derivatives of the matrix elements of that operator.

• Is the arbitrary state a time dependent $\left| \Psi (\vec x,t) \right>$ or a state at a certain point in time $\left| \Psi (\vec x)\right>$? – TaeNyFan Oct 16 at 14:21

In linear algebra an operator is something which acts on a vector and returns another vector. A linear operator can be represented by a matrix. So in this sense you should think of differentiating an operator like differentiating a matrix. Take for example this time dependent rotation matrix: $$\partial_tR=\partial_t\begin{pmatrix} \cos\omega t & \sin\omega t\\ -\sin\omega t & \cos\omega t \end{pmatrix}= \omega\begin{pmatrix} -\sin\omega t & \cos\omega t\\ -\cos\omega t & -\sin\omega t \end{pmatrix}.$$ In quantum mechanics these operators are more generalized to act on elements that live in Hilbert spaces, which means these operators can also act on functions in addition to vectors.

You should also note that how an operator acts looks different in a different basis. Let's consider the Schrodinger position operator first. Here $$\hat x$$ just multiplies by $$x$$ in the position basis, while it is a differential operator in the momentum basis: $$\hat x\psi(x)=x\psi(x)\quad\leftrightarrow\quad\hat x\phi(p)=i\hbar\frac{d}{dp}\phi(p)$$

In both cases this is time independent, so $$\partial_t\hat x=0$$. This is because the Schrodinger operators are defined to be that way. In the Heisenberg picture you can calculate the time derivative as follows: $$\frac{d}{dt}\hat x(t)=\frac{i}{\hbar}[H,\hat x]=\frac{p(t)}m$$ You can calculate the same for the momentum operator using the commutation relations between $$\hat x$$ and $$\hat p$$ to calculate the second derivative. I will leave this as an exercise. Usually Heisenberg operators have a subscript $$x_H$$ when first introduced but I assume your teacher uses them so much he leaves them off. For more info see https://en.wikipedia.org/wiki/Heisenberg_picture

• So differentiating an operator is equivalent to differentiating a matrix that represents the operator. So if we want to different $\hat x$, shouldnt we first find the matrix equivalent to $\hat x$ and then differentiate that matrix? – TaeNyFan Oct 16 at 14:28
• It also seems that you are saying $\frac{d}{dt} (i\hbar\frac{d}{dp}) =0$ is that an expression that is mathematically valid? – TaeNyFan Oct 16 at 14:29
• @TaeNyFan Well for operators that act on functions you can't really think about matrices anymore, I was just trying to make clear that operators are objects that either can or can't depend on time. For your second comment: trying to evaluate $\frac d{dt}(\frac d{dp})$ without having $\frac d{dp}$ apply on a function is a bit dangerous and mathematically not valid, but it is right in the sense that the expression $i\hbar \frac d{dp}$ won't change over time. $p$ is just a coordinate and not a function p(t). – user3502079 Oct 16 at 14:47
• How can then one determine ${d \over dt } \hat x$ when thinking in terms of functions? I'm still a bit confused. Because $\frac{dx}{dt}=0$ so ${d \over dt } \hat x = 0$? – TaeNyFan Oct 16 at 14:51