Creating a Circuit object#

Circuit input#

[8]:
import scqubits as scq
import numpy as np

zp_yaml = """# zero-pi
branches:
- ["JJ", 1,2, EJ = 10, 20]
- ["JJ", 3,4, EJ, 20]
- ["L", 2,3, 0.008]
- ["L", 4,1, 0.008]
- ["C", 1,3, 0.02]
- ["C", 2,4, 0.02]
"""

Create the Circuit object#

Using the yaml input, create a Circuit object:

[ ]:
zero_pi = scq.Circuit(zp_yaml, from_file=False)

The creation of a Circuit object automatically runs methods for circuit analysis, quantization, and construction of the circuit Hamiltonian matrix.

Example: circuit Lagrangian#

One of the many Circuit methods returns the symbolic expression of the circuit Lagrangian:

[9]:
zero_pi.sym_lagrangian()
$ \left(0.5 \dot{φ_1} \cdot \left(6.25625 \dot{φ_1} - 6.25 \dot{φ_3} - 0.00625 \dot{φ_2}\right) + 0.5 \dot{φ_2} \left(6.25625 \dot{φ_2} - 6.25 \dot{φ_4} - 0.00625 \dot{φ_1}\right) + 0.5 \dot{φ_3} \left(6.25625 \dot{φ_3} - 6.25 \dot{φ_1} - 0.00625 \dot{φ_4}\right) + 0.5 \dot{φ_4} \left(6.25625 \dot{φ_4} - 6.25 \dot{φ_2} - 0.00625 \dot{φ_3}\right)\right) + \left(- 0.004 \left(φ_{1} - φ_{4}\right)^{2} - 0.004 \left(φ_{3} - φ_{2}\right)^{2} + EJ \cos{\left(φ_{1} - φ_{2} \right)} + EJ \cos{\left((2πΦ_{1}) + φ_{4} - φ_{3} \right)}\right) $

Here, each \(\varphi_j\) denotes the dimensionless phase variable associated with node \(j\).