Lagrangian, variable transforms#

We continue with the example of the zero-pi qubit:

[2]:
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]
"""

zero_pi = scq.Circuit(zp_yaml, from_file=False)

Lagrangian in terms of node variables#

[3]:
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) $

This is the circuit Lagrangian in terms of node variables \(\varphi_j\) (dimensionless phase variable associated with node \(j\)).

Transformed variables#

scqubits performs a linear variable transformation from the original node variables \(\varphi_j\) to new coordinates \(\theta_j\).

New variables are chosen such that periodic, extended, free and frozen degrees of freedom are identified and separated. Variable elimination is implemented for any free and frozen degrees of freedom.

Lagrangian in terms of the new variables#

[5]:
zero_pi.sym_lagrangian(vars_type="new")
$ \left(25.0 \dot{θ_2}^{2} + 0.00625 \dot{θ_3}^{2} + 6.25625 \dot{θ_1}^{2}\right) + \left(- 0.008 θ_{3}^{2} - 0.032 θ_{2}^{2} + EJ \cos{\left(θ_{1} - 1.0 θ_{3} \right)} + EJ \cos{\left(θ_{1} + θ_{3} - (2πΦ_{1}) \right)}\right) $

Transformation matrix#

The transformation matrix which maps the new variables (\(\theta_i\)) to the node variables (\(\varphi_i\)) can be inspected through transformation_matrix.

[7]:
zero_pi.transformation_matrix
[7]:
array([[ 0., -1.,  1.,  1.],
       [ 1., -1.,  0.,  1.],
       [ 1.,  1.,  1.,  1.],
       [ 0.,  1.,  0.,  1.]])

This is the transformation matrix \(\mathcal{M}\) which maps the new variables (\(\theta_i\)) to the node variables (\(\varphi_i\)):

\(\vec{\varphi} = \mathcal{M}\vec{\theta}\).

Alternatively, these mappings can be represented as equations via

[7]:
zero_pi.variable_transformation()
$ φ_{1} = 1.0 θ_{3} + 1.0 θ_{4} - 1.0 θ_{2} \\ φ_{2} = 1.0 θ_{1} + 1.0 θ_{4} - 1.0 θ_{2} \\ φ_{3} = 1.0 θ_{1} + 1.0 θ_{2} + 1.0 θ_{3} + 1.0 θ_{4} \\ φ_{4} = 1.0 θ_{2} + 1.0 θ_{4} $

Variable classification#

[6]:
zero_pi.var_categories
[6]:
{'periodic': [1], 'extended': [2, 3], 'free': [], 'frozen': []}

The classification of the different variables is recorded in var_categories.

This above example output states: - \(\theta_1\) is a periodic degree of freedom (boundary conditions in this coordinate are periodic) - \(\theta_2,\,\theta_3\) are extended degrees of freedom (confining boundary conditions)

Note that one degree of freedom (the \(\Sigma\) mode) has been eliminated, and does not get listed.