  Circuit quantization is an extraordinarily successful theory that describes
the behavior of quantum circuits with high precision. The most widely used
approach of circuit quantization relies on introducing a classical Lagrangian
whose degrees of freedom are either magnetic fluxes or electric charges in the
circuit. By combining nonlinear circuit elements (such as Josephson junctions
or quantum phase slips), it is possible to build circuits where a standard
Lagrangian description (and thus the standard quantization method) does not
exist. Inspired by the mathematics of symplectic geometry and graph theory, we
address this challenge, and present a Hamiltonian formulation of
non-dissipative electrodynamic circuits. The resulting procedure for circuit
quantization is independent of whether circuit elements are linear or
nonlinear, or if the circuit is driven by external biases. We explain how to
re-derive known results from our formalism, and provide an efficient algorithm
for quantizing circuits, including those that cannot be quantized using
existing methods.
