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()
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")
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()
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.