Symmetry of Hamiltonian in harmonic oscillator In a quantum harmonic oscillator (standard as in the textbook), my professor told me that, to transform $\psi_x$ to momentum space $\phi_p$ we only need to change $x$ to $p$ and $\omega m$ to $1/\omega m$ because of the symmetry of Hamiltonian.
My question was that:


*

*Why was the symmetry in Hamiltonian could implies the symmetry in solution?
(I only touched Hamiltonian in classical mechanics, and Hamiltonian was a "proper energy/motion function" where as the Hamiltonian in quantum mechanics were operators, I checked webpage like https://en.wikipedia.org/wiki/Hamiltonian_(quantum_mechanics) and https://en.wikipedia.org/wiki/Hamiltonian_path_problem  but they didn't exactly explained the relation between Hamiltonian and the solution to wave functions.)

*In which sense was Hamiltonian useful in quantum mechanics? Weren't they just act on a function and obtain the energy eigenvalue?
 A: Your teacher is spot on: the oscillator is charmed.
First, you might clean up your variables so you are not distracted by the mathematically superfluous constants. Absorb $\sqrt{m\omega}$ into x, and into 1/p, and further absorb 1/ω into H.  The Hamiltonian now has units of $\hbar$ while both x and p have units of $\sqrt \hbar$. Absorb their inverses into the respective variables. This change of units is informally summarized by physicists as "Setting $m=1,\omega=1,\hbar=1$", that is the natural units for the problem are used, so they are out of the way, and trivial to reintroduce, if needed, by elementary dimensional analysis.
The hamiltonian 
$$
\hat{H}=\tfrac{1}{2}(\hat{p}^2+\hat{x}^2 )
$$ 
is now visibly symmetric between $\hat x $ and $\hat p$; using the machinery of either representation will yield the same results! The eigenvalue spectrum of this operator knows nothing about the coordinate or momentum basis you choose to utilize. The Fourier transform connects the two. 
$$
\tilde{f}(p)= {\cal F} [f(x)]= \frac{1}{\sqrt{2\pi}} \int dx ~ f(x) e^{ixp},\\
 f (x)= {\cal F}^{-1} [\tilde{f(p)}]= \frac{1}{\sqrt{2\pi}} \int dp ~ \tilde{f}(p) e^{-ixp}, 
$$
so that 
$$
\hat{p}={\cal F}[-i\partial_x]; \qquad \hat{p}^2={\cal F}[-\partial_x^2];\\ 
 \hat{x}={\cal F}^{-1}[i\partial_p]; \qquad \hat{x}^2={\cal F}^{-1}[-\partial_p^2]. 
$$
The Fourier transform then commutes with the Hamiltonian so they are simultaneously diagonalizable, that is they have the same eigenfunctions, the Hermite functions, 
$$
\psi_n(x) = \left (2^n n! \sqrt{\pi} \right )^{-\frac12} e^{-\frac{x^2}{2}} H_n(x) = (-1)^n \left (2^n n! \sqrt{\pi} \right)^{-\frac12} e^{\frac{x^2}{2}}  \partial_x^n  e^{-x^2}.
$$
In practice, whether you solve Schroedinger's
$$
(-\partial_x^2 + x^2)\psi_n(x)= E_n \psi_n(x) 
$$
or else
$$
(-\partial_p^2 + p^2)\phi_n(p)= E_n \phi_n(p), 
$$
you are bound to find these answers above, since it is the same equation.
So, then, what is the propagator, the evolution operator $e^{-it\hat{H}}$, of this hamiltonian? In coordinate space, it's but the integral operator with kernel
$$\left(\frac{ 1}{2\pi i  \sin   t}\right)^{\frac{1}{2}}\exp\left(-\frac{ ((x^2+x'^2)\cos  t-2xx')}{2i  \sin  t}\right) ~,$$the celebrated Mehler kernel, discovered in 1866, long before QM, by summing the above Hermite functions.
This evolution operator time-evolves wavefunctions by essentially rotating them in phase space. Note the rigid rotation of the basis operators, $$e^{\tfrac{it}{2}(\hat{p}^2+ \hat{x}^2)}~\hat{x}~ e^{-\tfrac{it}{2}(\hat{p}^2+ \hat{x}^2)}  =\hat{x}\cos t+ \hat{p}\sin t, \\ e^{\tfrac{it}{2}(\hat{p}^2+ \hat{x}^2)}  ~\hat{p}~ e^{-\tfrac{it}{2}(\hat{p}^2+ \hat{x}^2)} =\hat{p}\cos t- \hat{x}\sin t,$$ very much like classical phase-space uniform rotation. The oscillator hamiltonian is thus the generator of quantum canonical transformations (motion is a canonical transformation, observed Dirac!) and ultimately serves to define the continuous Fourier transformation group, with the ordinary Fourier transform ${\cal F}= e^{-i\pi \hat{H}/2}$ and its 4 powers quadrisecting the phase circle: ${\cal F}^4=\mathbb{1}$. 
You can imagine Condon's delight when he discovered this uniform rotation,  Proc. Natl. Acad. Sci. USA 23 (1937) 158–164. Feynman learned this in graduate school and could never get over it: he kept teaching it to undergraduates to the end of his days.
