{
"cells": [
{
"cell_type": "markdown",
"id": "moved-score",
"metadata": {},
"source": [
"# General imports"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "moderate-export",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import scipy.optimize\n",
"import sympy\n",
"from scipy.interpolate import RegularGridInterpolator\n",
"from tqdm.notebook import tqdm\n",
"from sympy.utilities.lambdify import lambdify\n",
"from pathlib import Path"
]
},
{
"cell_type": "markdown",
"id": "endangered-commodity",
"metadata": {},
"source": [
"# Plotting imports"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "intelligent-edgar",
"metadata": {},
"outputs": [],
"source": [
"import matplotlib as mpl\n",
"import matplotlib.pyplot as plt\n",
"\n",
"mpl.use(\"agg\")\n",
"\n",
"%matplotlib inline\n",
"%config InlineBackend.figure_format = 'svg'\n",
"\n",
"# Color blind-friendly color cycle from https://github.com/matplotlib/matplotlib/issues/9460#issuecomment-875185352\n",
"color_cyle = mpl.cycler(color=[\"#5790fc\", \"#f89c20\", \"#e42536\", \"#964a8b\", \"#9c9ca1\", \"#7a21dd\"])\n",
"params = {\n",
" \"backend\": \"ps\",\n",
" \"axes.labelsize\": 22,\n",
" \"axes.prop_cycle\": color_cyle,\n",
" \"font.size\": 13,\n",
" \"legend.fontsize\": 10,\n",
" \"xtick.labelsize\": 22,\n",
" \"ytick.labelsize\": 22,\n",
" \"text.usetex\": True,\n",
" \"font.family\": \"serif\",\n",
" \"font.serif\": \"Computer Modern Roman\",\n",
" \"legend.frameon\": True,\n",
" \"savefig.dpi\": 300,\n",
"}\n",
"\n",
"plt.rcParams.update(params)\n",
"plt.rc(\"text.latex\", preamble=r\"\\usepackage{xfrac}\\usepackage{siunitx}\")"
]
},
{
"cell_type": "markdown",
"id": "hundred-gathering",
"metadata": {},
"source": [
"# Create data folders"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "oriental-emission",
"metadata": {},
"outputs": [],
"source": [
"Path('data').mkdir(exist_ok=True)\n",
"Path('publication/figures').mkdir(parents=True, exist_ok=True)"
]
},
{
"cell_type": "markdown",
"id": "awful-remedy",
"metadata": {},
"source": [
"# Classical circuit"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "understood-contest",
"metadata": {},
"outputs": [],
"source": [
"n = 201\n",
"EJ0 = 1\n",
"EJ1 = 0.5\n",
"EJ2 = 0.25\n",
"ϕs = np.linspace(-np.pi, np.pi, n)\n",
"\n",
"\n",
"def classical_current(ϕ1, ϕ2):\n",
" tan_φ = (EJ1 * np.sin(ϕ1) + EJ2 * np.sin(ϕ2)) / (EJ0 + EJ1 * np.cos(ϕ1) + EJ2 * np.cos(ϕ2)) \n",
" return EJ0 * np.sin(np.arctan(tan_φ))\n",
"\n",
"Is = np.array([classical_current(ϕ1, ϕ2) for ϕ2 in ϕs for ϕ1 in ϕs]).reshape(n, n)\n",
"Is_cut = np.array(\n",
" [[classical_current(ϕ1, -ϕ1 + offset) for ϕ1 in ϕs] for offset in ϕs]\n",
")\n",
"\n",
"ϕ1s, ϕ2s = np.meshgrid(ϕs, ϕs)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "finnish-bathroom",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
"