Can Maxima do Operators Like the Hamiltonian



I came up with this for the one dimensional case 

H(f):=-diff(f,x,2)*hbar^2/(2*m)+v(x)*f;

Is there a better way, this is just a function really and you use it like this

f(x):=x^2;

 H(f(x))  = Hamiltonian

Rich