function of the frequency variable $\omega$ [@Newcomb]

$$\begin{aligned}
\mathbf{Z}_{I}\left(\omega\right) & = & \mathrm{Im}\left[\mathbf{Z}\left(\omega\right)\right]\nonumber \\
 & = & -\frac{\mathbf{A}_{0}}{\omega}+\stackrel[k=1]{M}{\sum}\frac{\mathbf{A}_{k}\omega}{\omega_{R_{k}}^{2}-\omega^{2}}+\mathbf{A}_{\infty}\omega\label{eq:Partial-Fraction-Expansion}\end{aligned}$$

where $\omega_{R_{k}}$’s are the frequencies of the internal modes corresponding to readout and bus resonators and $\mathbf{A}_{k}$’s are rank-1 real symmetric $N\times N$ matrices for $1\leq k\leq M$. Although we have truncated the part corresponding to internal modes to $M$ terms as we will see below the formula in Eq. stays valid in the limit of an infinite number of modes $M\rightarrow\infty$ (more generally one can think of the multiport impedance expansion in Eq. as being corresponding to any distributed electromagnetic structure seen by the junctions).

Starting with the expansion in Eq. we can synthesize a lossless multiport lumped element circuit [@Newcomb]

$$\mathcal{H}=\frac{1}{2}\mathbf{Q}^{T}\mathbf{C}^{-1}\mathbf{Q}+\frac{1}{2}\mathbf{\Phi}^{T}\mathbf{M}_{0}\mathbf{\Phi}-\stackrel[i=1]{N}{\sum}E_{J_{i}}\cos\left(\varphi_{J_{i}}\right)\label{eq:initial-Hamiltonian}$$

where $\mathbf{\Phi}=\left(\Phi_{J_{1}},\ldots,\Phi_{J_{N}},\Phi_{R_{1}},\ldots,\Phi_{R_{M}}\right)^{T}$ being the flux coordinate vector. $\varphi_{J_{i}}$ is the phase of the junction $i$ related to the flux across it by the Josephson relation $\Phi_{J_{i}}=\frac{\mathrm{\Phi}_{0}}{2\pi}\varphi_{J_{i}}$, for $1\leq i\leq N$. $\Phi_{R_{k}}$ is the flux across the inductor of the internal mode $k,$ $1\leq k\leq M$. $E_{J_{i}}$ is the Josephson energy of junction $i$ related to its inductance $L_{J_{i}}$ by $E_{J_{i}}=\left(\frac{\mathrm{\Phi}_{0}}{2\pi}\right)^{2}\frac{1}{L_{J_{i}}}$. The capacitance matrix $\mathbf{C}$ is given by

$$\mathbf{C}=\left(\begin{array}{cc}
\mathbf{C}_{0} & -\mathbf{C}_{0}\mathbf{R}^{T}\\
-\mathbf{R}\mathbf{C}_{0} & \mathbf{1}_{M\times M}+\mathbf{R}\mathbf{C}_{0}\mathbf{R}^{T}
\end{array}\right)\label{eq:Capacitance-matrix}$$

where $\mathbf{C}_{0}$ is 