Modeling epidemics through ladder operators