```python
%matplotlib inline
%config InlineBackend.figure_format = 'svg'

import scqubits as scq

import numpy as np
```

# All-in-one


```python
# parameters for the flux qubit
RATIO = 60.0
ALPHA = 0.8

flux_qubit = scq.CircuitFluxQubit(
    EJ1 = 1.0, 
    EJ2 = 1.0, 
    EJ3 = ALPHA*1.0, 
    ECJ1 = 1.0/RATIO, 
    ECJ2 = 1.0/RATIO, 
    ECJ3 = 1.0/ALPHA/RATIO, 
    ECg1 = 50.0/RATIO, 
    ECg2 = 50.0/RATIO, 
    ng1 = 0.0, 
    ng2 = 0.0, 
    flux = 0.4, 
    ncut = 10,
)
```

# Eigenvalues and eigensystem using scqubit tools


```python
flux_qubit.plot_potential()
```




    (<Figure size 750x750 with 2 Axes>,
     <matplotlib.axes._subplots.AxesSubplot at 0x21599e24490>)




    

    



```python
vals, vecs= flux_qubit.eigensys()
```


```python
vals
#vecs_phase = np.conj(unitary).T@vecs
vals - vals[0]
```




    array([0.        , 0.26299666, 0.29339598, 0.50146767, 0.55310417,
           0.57154646])



# Eigenvalues using circuit tools


```python
flux_qubit.calculate_potentials()
vals, vecs = flux_qubit.diagonalize_phase(num_states=6)
```


```python
np.real(vals-vals[0])
```




    array([0.        , 0.26299666, 0.29339598, 0.50146767, 0.55310417,
           0.57154646])




```python
vecs.shape
```




    (21, 21, 1, 1, 1, 6)




```python
import matplotlib.pyplot as plt
vecs = np.reshape(vecs, (2*flux_qubit.ncut+1,2*flux_qubit.ncut+1,6))
plt.pcolormesh(flux_qubit.phi1.get_phase_grid(), flux_qubit.phi2.get_phase_grid(), np.abs(vecs[:,:,0])**2)
plt.colorbar()
np.sum(np.abs(vecs[:,:,0])**2)
```




    1.000000000000013




    

    


# Defining circuit topology


```python
flux_qubit = scq.Circuit()
flux_qubit.add_element(scq.Capacitance('Cg1'), ['g1', '1'])
flux_qubit.add_element(scq.Capacitance('Cg2'), ['g2', '2'])
flux_qubit.add_element(scq.Capacitance('CJ1'), ['GND', '1'])
flux_qubit.add_element(scq.Capacitance('CJ2'), ['GND', '2'])
flux_qubit.add_element(scq.Capacitance('CJ3'), ['1', '3'])
flux_qubit.add_element(scq.JosephsonJunction('J1', use_offset=False), ['GND', '1'])
flux_qubit.add_element(scq.JosephsonJunction('J2', use_offset=False), ['GND', '2'])
flux_qubit.add_element(scq.JosephsonJunction('J3', use_offset=False), ['1', '3'])
```

# Parametrizing Hamiltonian


```python
ϕ1 = scq.Variable('ϕ_1')
ϕ2 = scq.Variable('ϕ_2')
f =  scq.Variable('f')
g1 = scq.Variable('g_1')
g2 = scq.Variable('g_2')

flux_qubit.add_variable(ϕ1)
flux_qubit.add_variable(ϕ2)
flux_qubit.add_variable(f)
flux_qubit.add_variable(g1)
flux_qubit.add_variable(g2)
```

# Mapping nodal phases to variables


```python
flux_qubit.map_nodes_linear(['GND', '1', '2', '3', 'g1', 'g2'],
                            ['ϕ_1', 'ϕ_2', 'f', 'g_1', 'g_2'],
                            np.asarray([[0,   0,   0,   0,   0],
                                        [1,   0,   0,   0,   0],
                                        [0,   1,   0,   0,   0],
                                        [0,   1,  -1,   0,   0],
                                        [0,   0,   0,   1,   0],
                                        [0,   0,   0,   0,   1]]))
```

# Separating variables into external controls and degrees of freedom


```python
ϕ1.set_variable(21, 1) # 21 charge states, 2pi wavefunction periodicity
ϕ2.set_variable(21, 1) # 21 charge states, 2pi wavefunction periodicity
f.set_parameter(0.4*2*np.pi, 0) # external flux: 0.4 quantum, external voltage: 0
g1.set_parameter(0, 0) # external flux: 0 quanta, external voltage: 0
g2.set_parameter(0, 0) # external flux: 0 quanta, external voltage: 0
```

# Printing symbolic Hamiltonian (using sympy)
This part is a bit ugly, but in principle we could improve it so it uses better notation


```python
import sympy
C_g1, C_g2, C_J1, C_J2, C_J3, E_J1, E_J2, E_J3 = \
    sympy.symbols('C_g1, C_g2, C_J1, C_J2, C_J3, E_J1, E_J2, E_J3')
flux_qubit.find_element('Cg1').set_capacitance(C_g1)
flux_qubit.find_element('Cg2').set_capacitance(C_g2)
flux_qubit.find_element('CJ1').set_capacitance(C_J1)
flux_qubit.find_element('CJ2').set_capacitance(C_J2)
flux_qubit.find_element('CJ3').set_capacitance(C_J3)
flux_qubit.find_element('J1').set_critical_current(E_J1)
flux_qubit.find_element('J2').set_critical_current(E_J2)
flux_qubit.find_element('J3').set_critical_current(E_J3)
```

## capacitance matrix in terms of the nodal parameterization


```python
flux_qubit.capacitance_matrix(symbolic=True)
```




$\displaystyle \left[\begin{matrix}C_{J1} + C_{J2} & 0.0 & - C_{J1} & 0.0 & - C_{J2} & 0.0\\0.0 & C_{g1} & - C_{g1} & 0.0 & 0.0 & 0.0\\- C_{J1} & - C_{g1} & C_{J1} + C_{J3} + C_{g1} & 0.0 & 0.0 & - C_{J3}\\0.0 & 0.0 & 0.0 & C_{g2} & - C_{g2} & 0.0\\- C_{J2} & 0.0 & 0.0 & - C_{g2} & C_{J2} + C_{g2} & 0.0\\0.0 & 0.0 & - C_{J3} & 0.0 & 0.0 & C_{J3}\end{matrix}\right]$



## Legendre transform of the capacitance matrix (inverse wrt to degrees of freedom)


```python
flux_qubit.capacitance_matrix_legendre_transform(symbolic=True)
```




$\displaystyle \left[\begin{matrix}\frac{C_{J2} + C_{J3} + C_{g2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{J3}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{g1} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{J3} C_{g2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\\\frac{C_{J3}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{J1} + C_{J3} + C_{g1}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & - \frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{J3} C_{g1}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{g2} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\\\frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & - \frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & C_{J3} \left(- \frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) - C_{J3} \left(\frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) & - C_{g1} \left(- \frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) & - C_{g2} \left(\frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right)\\\frac{C_{g1} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{J3} C_{g1}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{J3}^{2} C_{g1}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} C_{g1} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{g1}^{2} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{J3} C_{g1} C_{g2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\\\frac{C_{J3} C_{g2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{g2} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & - \frac{C_{J3}^{2} C_{g2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} C_{g2} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{J3} C_{g1} C_{g2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} & \frac{C_{g2}^{2} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\end{matrix}\right]$



## Symbolic lagrangian


```python
sympy.nsimplify(flux_qubit.symbolic_lagrangian())
```




$\displaystyle E_{J1} \cos{\left(ϕ_{1} \right)} + E_{J2} \cos{\left(ϕ_{2} \right)} + E_{J3} \cos{\left(f + ϕ_{1} - ϕ_{2} \right)} + \partial_tg_1 \left(\frac{C_{g1} \partial_tg_1}{2} - \frac{C_{g1} \partial_tϕ_1}{2}\right) + \partial_tg_2 \left(\frac{C_{g2} \partial_tg_2}{2} - \frac{C_{g2} \partial_tϕ_2}{2}\right) + \partial_tϕ_1 \left(- C_{J3} \left(- \frac{\partial_tf}{2} + \frac{\partial_tϕ_2}{2}\right) - \frac{C_{g1} \partial_tg_1}{2} + \frac{\partial_tϕ_1 \left(C_{J1} + C_{J3} + C_{g1}\right)}{2}\right) + \partial_tϕ_2 \left(- \frac{C_{g2} \partial_tg_2}{2} + \frac{\partial_tϕ_2 \left(C_{J2} + C_{g2}\right)}{2}\right) + \left(- \partial_tf + \partial_tϕ_2\right) \left(- \frac{C_{J3} \partial_tϕ_1}{2} + C_{J3} \left(- \frac{\partial_tf}{2} + \frac{\partial_tϕ_2}{2}\right)\right)$



## Symbolic hamiltonian


```python
sympy.nsimplify(flux_qubit.symbolic_hamiltonian())
```




$\displaystyle - E_{J1} \cos{\left(ϕ_{1} \right)} - E_{J2} \cos{\left(ϕ_{2} \right)} - E_{J3} \cos{\left(f + ϕ_{1} - ϕ_{2} \right)} + \frac{\partial_tf \left(\partial_tf \left(C_{J3} \left(- \frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) - C_{J3} \left(\frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right)\right) + \partial_tg_1 \left(\frac{C_{J3}^{2} C_{g1}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} C_{g1} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) + \partial_tg_2 \left(- \frac{C_{J3}^{2} C_{g2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} C_{g2} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) - i \partial_{ϕ_1} \left(\frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) - i \partial_{ϕ_2} \left(- \frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right)\right)}{2} + \frac{\partial_tg_1 \left(\frac{C_{J3} C_{g1} C_{g2} \partial_tg_2}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{i C_{J3} C_{g1} \partial_{ϕ_2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{g1}^{2} \partial_tg_1 \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - C_{g1} \partial_tf \left(- \frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) - \frac{i C_{g1} \partial_{ϕ_1} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right)}{2} + \frac{\partial_tg_2 \left(\frac{C_{J3} C_{g1} C_{g2} \partial_tg_1}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{i C_{J3} C_{g2} \partial_{ϕ_1}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{g2}^{2} \partial_tg_2 \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - C_{g2} \partial_tf \left(\frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) - \frac{i C_{g2} \partial_{ϕ_2} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right)}{2} - \frac{i \partial_{ϕ_1} \left(\frac{C_{J3} C_{g2} \partial_tg_2}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{i C_{J3} \partial_{ϕ_2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{g1} \partial_tg_1 \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \partial_tf \left(\frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{C_{J3} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) - \frac{i \partial_{ϕ_1} \left(C_{J2} + C_{J3} + C_{g2}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right)}{2} - \frac{i \partial_{ϕ_2} \left(\frac{C_{J3} C_{g1} \partial_tg_1}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} - \frac{i C_{J3} \partial_{ϕ_1}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{g2} \partial_tg_2 \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \partial_tf \left(- \frac{C_{J3}^{2}}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}} + \frac{C_{J3} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right) - \frac{i \partial_{ϕ_2} \left(C_{J1} + C_{J3} + C_{g1}\right)}{C_{J1} C_{J2} + C_{J1} C_{J3} + C_{J1} C_{g2} + C_{J2} C_{J3} + C_{J2} C_{g1} + C_{J3} C_{g1} + C_{J3} C_{g2} + C_{g1} C_{g2}}\right)}{2}$




```python

```

14b511dcbdf6f094d9d91b888bc0557ec03f63aa
ipynb
Jupyter Notebook
examples/flux_qubit_circuit.ipynb
IlyaLSMmisis/scqubits-1
c4915c998c2d1ef3348db0e4c423e74c7181da40
BSD-3-Clause
examples/flux_qubit_circuit.ipynb
IlyaLSMmisis/scqubits-1
c4915c998c2d1ef3348db0e4c423e74c7181da40
BSD-3-Clause
2020-07-14T09:49:53.000Z
2020-08-13T09:34:38.000Z
examples/flux_qubit_circuit.ipynb
IlyaLSMmisis/scqubits-1
c4915c998c2d1ef3348db0e4c423e74c7181da40
BSD-3-Clause
2020-07-06T08:21:57.000Z
2020-07-08T13:37:12.000Z
Qwen/Qwen-72B
1. YES
2. YES