The Hamiltonian, giving the total energy stored by the capacitors and inductors, is to be an algebraic function \(\mathcal {H}(z)\)  of the chosen state variables \(z_i\)  forming the vector \(z\) , see §REF .
For an electrical circuit, following port-Hamiltonian practice, e.g. [1]}, we take the \(z_i\)  as the charges \(q\)  on capacitors and the flux linkages \(\varphi \)  on inductors.
Thus we split \(z\)  as
\(z &= (z_{\hspace{0.2pt}{\hspace{0.2pt}\texttt {C}}}, z_{\hspace{0.2pt}{\hspace{0.2pt}\texttt {L}}}) = (q,\varphi )\) 
