I am struggling to apply kirchoff laws to certain quantum circuits. I will illustrate my problem with this toy example:

I want to find the charge Q1 and Q2 of C1 and C2 to quantise the problem. My guess for the Kirchoff voltage loops and current equations would be
Voltage loops: {VC1+VL1=1C1Q1+L1˙I1=0VC2+VL2=1C2Q2−L2˙I4=0Current junctions: {I1=I2+I3I2=I4+I5.
And by using the current junction conditions we can write
I1 and
I4 in terms of the capacitors charge:
{1C1Q1+L1(˙I2+˙I3)=1C1Q1+L1(¨Qg+¨Q1)=01C2Q2+L2(˙I2−˙I5)=1C2Q2−L2(¨Qg−¨Q2)=0.
Now, I want to eliminate Qg since I'm only interested in Q1 and Q2. For this I can read off one more loop equation for the center loop
L2˙I4+QgCg−Q1C1=0,
and substitute in the above to obtain
{Q1C1+L1(Cg(¨Q1C1−L2⃛I4)+¨Q1)=0Q2C2+L2(Cg(¨Q2C2−L2⃛I4)+¨Q2)=0.
which has the coupling terms wrong since they should be
{L1¨Q1+2Cg(¨Q1−¨Q2)+1C1Q1=0L2¨Q2+2Cg(¨Q2−¨Q1)+1C2Q2=0
----
Any ideas??