We konw that in quantum harmonic oscillator $H=a^\dagger a$, $a^\dagger$, $a$, $1$ will span a Lie algebra, where $a, a^\dagger$ is annihilation and creation operator, $H$ is the Hamiltonian operator. The algebraic relation is following


$$[H,a^\dagger\ ]= a^\dagger$$
$$[H,a]=-a$$
$$[a,a^\dagger]=1$$
$$[H,1]=[a,1]=[a^\dagger,1]=[a,a]=[a^\dagger,a^\dagger]=[1,1]=[H,H]=0$$
So these four operators, $H=a^\dagger a$, $a^\dagger$, $a$, $1$, can span a lie algebra, because the commutator satisfies closure and Jacobi's identity.


We konw that for any lie algebra $\mathscr{G}$ there exist only one lie group $G$ up to the difference of the topology, whose lie algebra is $\mathscr{G}$.


So what is this Lie group whose lie algebra spaned by $\{H=a^\dagger a , a^\dagger ,a ,1\}$ ?



Lie group about the quantum harmonic oscillator
Note that this a $4$-dimensonal solvable Lie algebra and $a$, $a^\dagger$, $1$ span an ideal isomorphic to the $3$-dimensional Heisenberg algebra. So one realization is obtained by taking
$$ a=\left(\begin{array}{ccc}0&1&0\\0&0&0\\0&0&0\end{array}\right),\quad
a^\dagger=\left(\begin{array}{ccc}0&0&0\\0&0&1\\0&0&0\end{array}\right),\quad
1=\left(\begin{array}{ccc}0&0&1\\0&0&0\\0&0&0\end{array}\right). $$
Now the adjoint action of $H$ on this ideal has this matrices as eigenvectors
with respective eigenvalues $1$, $-1$, $0$, so we finish by taking
$$ H=\frac12\left(\begin{array}{ccc}1&0&0\\0&-1&0\\0&0&1\end{array}\right). $$


We can also realize the elements of this Lie algebra as vector fields on $\mathbb R^4$. Namely, we modify the standard realization of the Heisenberg
algebra as vector fields on $\mathbb R^3$ (with coordinates $(x,y,z)$) by 
adding a fourth coordinate $w$:
$$ a = e^w\left(\frac{\partial}{\partial x}-\frac y2\frac{\partial}{\partial z}\right),\quad
 a^\dagger = e^{-w}\left(\frac{\partial}{\partial y}+\frac x2\frac{\partial}{\partial z}\right),\quad 1=\frac{\partial}{\partial z},\quad H=\frac{\partial}{\partial w}.$$


