  Quantum circuit theory has become a powerful and indispensable tool to
predict the dynamics of superconducting circuits. Surprisingly however, the
question of how to properly account for a time-dependent driving via external
magnetic fields has hardly been addressed so far. Here, we derive a general
recipe to construct a low-energy Hamiltonian, taking as input only the circuit
geometry and the solution of the external magnetic fields. A gauge fixing
procedure for the scalar and vector potentials is given which assures that
time-varying magnetic fluxes make contributions only to the potential function
in the Schr\"odinger equation. Our proposed procedure is valid for continuum
geometries and thus significantly generalizes previous efforts, which were
based on discrete circuits. We study some implications of our results for the
concrete example of a parallel-plate SQUID circuit. We show that if we insist
on representing the response of this SQUID with individual, discrete
capacitances associated with each individual Josephson junction, this is only
possible if we permit the individual capacitance values to be negative,
time-dependent or even momentarily singular. Finally, we provide some
experimentally testable predictions, such as a strong enhancement of the qubit
relaxation rates arising from the effective negative capacitances, and the
emergence of a Berry phase due to time dependence of these capacitances.
