  A quantum model for Josephson-based metamaterials working in the Three-Wave
Mixing (3WM) and Four-Wave Mixing (4WM) regimes at the single-photon level is
presented. The transmission line taken into account, namely Traveling Wave
Josephson Parametric Amplifier (TWJPA), is a bipole composed by a chain of
rf-SQUIDs which can be biased by a DC current or a magnetic field in order to
activate the 3WM or 4WM nonlinearities. The model exploits a Hamiltonian
approach to analytically determine the time evolution of the system both in the
Heisenberg and interaction pictures. The former returns the analytic form of
the gain of the amplifier, while the latter allows recovering the probability
distributions vs. time of the photonic populations, for multimodal Fock and
coherent input states. The dependence of the metamaterial's nonlinearities is
presented in terms of circuit parameters in a lumped model framework while
evaluating the effects of the experimental conditions on the model validity.
