What do $\nabla$ and $\frac{d }{d t}$ mean when they are by themselves? In QM and QFT, I have seen some equations where they have just the derivative and/or the gradient without specifying what it is acting on.

Taken from wiki.
This does not make sense to me since I learned that gradients and derivatives can only act on functions and not exist by themselves (unless they are vector components). This seems to be going against the grain of what I learned.
Can someone please help me understand how can we just put a derivative without specifying what it is acting on?
 A: People call it an operator. It is a thing which would map a function to another function. It's a lot like how a matrix maps a vector to another vector. You can invent lots of operators, like
$$2$$
or
$$2 + 2x$$
or
$$2 + 2x +\frac{d}{dx}$$
which, when acting on a function $f(x)$, would give
$$2 f(x) + 2x f(x) + \frac{df}{dx}$$
by definition.
There are some things to get used to, like how does multiplying operators work? For example $(\frac{d}{dx})(\frac{d}{dx}) = \frac{d^2}{dx^2}$. How did I figure that out? Just put a function at the end and then simplify, then remove the function from the end; remember that the operator closest to the function acts first. Also, some valid operations like "squaring the function" can't be written in this notation, but it rarely comes up anyway as most operators of interest only depend linearly on the function.
A: I am ignoring $\frac{\partial}{\partial t}$, since it does not  involve the issue that confuses you.
You are right to be puzzled by the abuse of notation, $\hat p \sim -i\hbar \frac{d}{dx}$, but your teacher should have made this very clear right from the start. What it means is that this is a representation in the coordinate picture, which is to say
$$
\hat p  = -i\hbar\int dx ~~ |x\rangle  \frac{d}{dx}\langle x|.
$$
Acting on any state in Hilbert space, it yields, e.g.,
$$
\hat p |\psi\rangle=  -i\hbar\int dx~~ |x\rangle  \frac{d}{dx} \psi(x).
$$
(Sometimes, informally, people summarize the above in code, abusively, as $ \hat p_x \psi(x)=   -i\hbar  \frac{d}{dx} \psi(x)$, which apparently confused you.)
From the definition above, you may also easily derive
$$
\hat p  = \int d p ~~ |p\rangle  p \langle  p|.
$$
This is a reminder of the logical power of the Dirac notation, and underscores the conceptual service he's offered the theory.
A: If you are familiar with linear algebra then you can think of matrices as operators acting on vectors to produce some other vector (or in the following example the same vector but with a scalar) $$A\vec v=a\vec v$$
Here $A$ is a matrix (or an operator) and $a$ is a constant and $\vec v$ is a vector. How is this related to your question? In quantum physics it is very common to have operators acting on wave functions. These operators usually contain derivative(s) which by themselves does nothing but when you apply them to a wave function (in the previous case a vector) they can produce something new. For example the momentum operator $\vec p=-i\hbar\nabla$ which in the above example would be "$A$" acts on some wave function $\vec v$ then the momentum would be the eigenvalue $a$. $\textbf{One can talk about $\vec p$ without it needing to act on a wave function.}$
After rephrased question:

Can someone please help me understand how can we just put a derivative without specifying what it is acting on?

Let me define $y$ as following:
$$y=\frac{d}{dx}$$
How does one interpret this? One can say that this is an operator that does nothing at the moment. But we could talk about what happens if you put $y$ infront of $x^2$ then you would say it would be equal to $2x$. There is nothing special about having an equation with an operator not acting on something but it could be very interesting to talk about what happens when we apply it.
$\textbf{If you see operators as machines then obviously one can talk about different drilling}$ $\textbf{machines without needing to drill holes as we are talking about them.}$
A: They (and $\hat{H}$ in the equation shown) are differential operators: something that when applied to a function produces another function.
Differential operators are in some sense another "data type" than functions and scalars, although one can of course see them as higher-order functions that map functions to other functions.
The notation is often a bit of abuse of notation (just consider how the del symbol is used in several ways to mean different but related operators: $\nabla f$, $\nabla\cdot \mathbf{v}$, $\nabla \times \mathbf{v}$), but the meaning should usually be clear enough from context.
