@hamiltonian_reg_deco
def resonator(a):
    """
    Harmonic oscillator hamiltonian given the annihilation operator.