  The dynamical Lamb effect is predicted to arise in superconducting circuits
when the coupling of a superconducting qubit with a resonator is periodically
switched "on" and "off" nonadiabatically. We show that by using a
superconducting circuit which allows to switch between longitudinal and
transverse coupling of a qubit to a resonator, it is possible of to observe the
dynamical Lamb effect. {The switching between longitudinal and transverse
coupling can be achieved by modulating the magnetic flux through the circuit
loops.} By solving the Schr\"{o}dinger equation for a qubit coupled to a
resonator, we calculate the time evolution of the probability of excitation of
the qubit and the creation of $n$ photons in the resonator due to the dynamical
Lamb effect. The probability is maximum when the coupling is periodically
switched between longitudinal and transverse using a square-wave or sinusoidal
modulation of the magnetic flux with frequency equal to the sum of the average
qubit and photon transition frequencies.
