Skip to content

Commit

Permalink
working on timing comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
Phionx committed May 20, 2024
1 parent ce67f8c commit f6e1e9b
Show file tree
Hide file tree
Showing 4 changed files with 537 additions and 9 deletions.
6 changes: 6 additions & 0 deletions qcsys/devices/resonator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@ def common_ops(self):
ops["a"] = jqt.destroy(N)
ops["a_dag"] = jqt.create(N)
ops["phi"] = self.phi_zpf()*(ops["a"] + ops["a_dag"])
ops["n"] = 1j * self.n_zpf() * (ops["a_dag"] - ops["a"])

return ops

def phi_zpf(self):
"""Return Phase ZPF."""
return (2*self.params["Ec"]/self.params["El"])**(.25)

def n_zpf(self):
n_zpf = (self.params["El"] / (32.0 * self.params["Ec"])) ** (0.25)
return n_zpf

def get_linear_ω(self):
"""Get frequency of linear terms."""
return jnp.sqrt(8*self.params["El"]*self.params["Ec"])
Expand Down
21 changes: 15 additions & 6 deletions tutorials/1-demo.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tutorials/3-fluxonium.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"axs = qubit.plot_wavefunctions(phi_vals, max_n=6, mode=\"real\")\n",
"axs.set_ylim(-6,11)\n",
"axs.set_xlim(-2,2)\n",
"axs.set_xlabel(\"$\\\\theta/\\Phi_0$\")\n",
"axs.set_title(\"$\\\\theta_{\\\\rm ext} = 0.5\\Phi_0$\")"
"axs.set_xlabel(\"$\\\\theta/\\\\Phi_0$\")\n",
"axs.set_title(\"$\\\\theta_{\\\\rm ext} = 0.5\\\\Phi_0$\")"
]
},
{
Expand Down Expand Up @@ -394,7 +394,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
513 changes: 513 additions & 0 deletions tutorials/5-time-comparisons.ipynb

Large diffs are not rendered by default.

0 comments on commit f6e1e9b

Please sign in to comment.