More on defining custom circuits#
[1]:
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]
"""
The example above illustrates most of the syntax rules to be followed. Each branch is represented by
<branch-type>, <node_1>, <node_2>, <param-1> [, <param-2>]
Branch types and parameters:#
C: branch parameter is the charging energy \(E_C = \frac{e^2}{2C}\)L: branch parameter is the inductive energy \(E_L = \frac{\Phi_0^2}{(2\pi)^2 L}\)JJ: branch parameters are the Josephson energy \(E_J\) and junction charging energy \(E_{CJ}\)
Example: "C", 1, 3, 0.02 is a capacitance connecting nodes 1 and node 3, with charging energy 0.02 GHz.
Symbolic vs. numerical branch parameters:#
Branch parameters can be provided as float values, using the energy units set globally (default: GHz)
A symbol name can be specified, but must be introduced along with a value (e.g.,
EJ = 10). Note that the same symbol can afterwards be used to set any other compatible branch parameter. For instance, in the YAML descriptionzp_yaml, the same parameter \(EJ\) is used for the Josephson energies of the junctions connecting nodes \((1, 2)\) and \((3, 4).\)Symbolic output will generally maintain symbolic parameter names. However, for charging energies of systems with more than three nodes, numerical values are the default, since symbolic inversion of larger capacitance matrices is generally very slow and yields unwieldy expressions.
Accessing circuit parameters
Only circuit parameters with an associated name (as in
EJ = 10) are made accessible as attributes of the class instance:<Circuit instance>.EJ.Parameter sweeps (e.g., via
plot_evals_vs_paramvals()) can only be performed for those circuit parameters that have been provided with a symbol name.
Ground node:#
The user can choose to include an explicit ground node by giving this node the label
0. Such ground node serves as a reference node with generalized flux always \(\phi_0 = 0\).