I want to create a function which normally orders a string of field operators. Consider the following:
$$\langle0\vert\hat{a}(k_n) \cdots \hat{a}(k_2)\hat{a}(k_1)\hat{a}^\dagger(k_1)\hat{a}^\dagger(k_2) \cdots \hat{a}^\dagger(k_n)\vert 0\rangle.$$
I would like to write the expression in the brackets with all daggered operators on the left, with the field operators satisfying
$$\left[\hat{a}(k_i), \hat{a}^\dagger(k_j)\right] = \delta(k_i - k_j),$$ $$\left[\hat{a}(k_i), \hat{a}(k_j)\right] = \left[\hat{a}^\dagger(k_i), \hat{a}^\dagger(k_j)\right] = 0.$$
This will generate many terms and I would like Mathematica to generate the terms for any specified $n$.
The required non-commutativity of the operators has been addressed in this post; Boson commutation relations, but I am stuck in using it to achieve a normally ordered expression.