# Hamiltonian and Transformation of Coordinates

In the SQcircuit original paper, we show that the Hamiltonian of any circuit (without any transformation of coordinates) can be written as the following form

$${{H}} = \frac{1}{2} \hat{{\mathbf{Q}}}^T {\mathbf{C}}^{-1}\hat{{\mathbf{Q}}} + \frac{1}{2} \hat{{\mathbf\Phi}}^T {\mathbf{L}}^{*} \hat{{\mathbf\Phi}} +\sum_{k\in \mathcal{S}_L}\left(\frac{\Phi_0}{2\pi}\frac{\mathbf{b}_k^T\mathbf{\varphi}_{\text{ext}}}{l_k}\right){\mathbf{w}}^T_k{\hat{\mathbf{\Phi}}}-\sum_{k\in \mathcal{S}_J} E_{J_k} \cos \left(\frac{2\pi}{\Phi_0}{\mathbf{w}}^T_k{\hat{\mathbf{\Phi}}}+\mathbf{b}_k^T\mathbf{\varphi}_{\text{ext}}\right)$$

where $$\mathbf{C}$$ and $$\mathbf{L}^*$$ are respectively capacitance and susceptance matrices, and $$k$$th row of $$\mathbf{W}$$ matrix is $${\mathbf{w}}^T_k$$. Consider cr as an object of Circuit class, all three matrices of $$\mathbf{C}$$, $$\mathbf{L}^*$$, and $$\mathbf{W}$$ are the attributes of cr.

The $$\mathbf{C}$$ in farad unit, $$\mathbf{L}^*$$ in henry unit, and $$\mathbf{W}$$ are accessible via

[1]:

# capacitance matrix
cr.C
# susceptance matrix
cr.L
# vector assigning fluxes to junctions
cr.W


SQcircuit transforms the charge and flux operators via following transformation

\begin{align*} \hat{\tilde{\mathbf{Q}}} = \mathbf{R}^{-1}\hat{\mathbf{Q}},\\ \hat{\tilde{\mathbf{\Phi}}} = \mathbf{S}^{-1}\hat{\mathbf{\Phi}}, \end{align*}

where $$\mathbf{R}^{-1}$$ and $$\mathbf{S}^{-1}$$ can be obtained via coord_transform() method such as

[2]:

# transformation of cooridante for charge operators
R_inv = cr.coord_transform(var_type="charge")
# transformation of cooridante for flux operators
S_inv = cr.coord_transform(var_type="flux")


The transformed Hamiltonian is

$$\hat{\tilde{H}} = \frac{1}{2} \hat{\tilde{\mathbf{Q}}}^T \tilde{\mathbf{C}}^{-1}\hat{\tilde{\mathbf{Q}}} + \frac{1}{2} \hat{\tilde{\mathbf\Phi}}^T \tilde{\mathbf{L}}^{*} \hat{\tilde{\mathbf\Phi}}+\sum_{k\in \mathcal{S}_L}\left(\frac{\Phi_0}{2\pi}\frac{\mathbf{b}_k^T\mathbf{\varphi}_{\text{ext}}}{l_k}\right)\tilde{\mathbf{w}}^T_k\hat{\tilde{\mathbf{\Phi}}}-\sum_{k\in \mathcal{S}_J} E_{J_k} \cos \left(\frac{2\pi}{\Phi_0}\tilde{\mathbf{w}}^T_k\hat{\tilde{\mathbf{\Phi}}}+\mathbf{b}_k^T\mathbf{\varphi}_{\text{ext}}\right),$$

where the transformed inverse capacitance and susceptance matrices are:

\begin{align*} \tilde{\mathbf{C}}^{-1} = \mathbf{R}^T\mathbf{C}^{-1}\mathbf{R},\\ \tilde{\mathbf{L}}^{*} = \mathbf{S}^T\mathbf{L}^{*}\mathbf{S}, \end{align*}

and the vector assigning fluxes to junctions is given by

\begin{equation*} \tilde{\mathbf{W}} = \mathbf{W}\mathbf{S}. \end{equation*}

The $$\tilde{\mathbf{C}}^{-1}$$, $$\tilde{\mathbf{L}}^{*}$$, and $$\tilde{\mathbf{W}}$$ are accessible via

[3]:

# transformed inverted capacitance matrix
cr.cInvTrans
# transformed susceptance matrix
cr.lTrans
# transformed vector assigning fluxes to junctions
cr.wTrans