Higher-order nonlinear effects in a Josephson parametric amplifier