Bose-Hubbard dynamics of polaritons in a chain of circuit quantum electrodynamic cavities