Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion SQDMetal/Utilities/QubitDesigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,15 @@ def _chi_hertz(self, C_g, C_J, QubiFreqHertz, f_res, C_r, L_r):
return -(Ec/(4*h) * g_hertz**2) / (delta * (delta - Ec/(4*h)))

def EJonEC(self, CJeff, fQubitHertz):
"""Return EJ/EC in the leading-order transmon approximation.

Invert h*f01 = sqrt(8*EJ*EC) - EC with EC = e**2/(2*CJeff).
This is not an exact charge-basis Hamiltonian solution.
"""
elem = 1.60217663e-19
h = 6.62607015e-34
Ec = (elem)**2 / (2*CJeff)
return fQubitHertz / (Ec/h)
return (h*fQubitHertz/Ec + 1)**2 / 8

def _anharmonicity_hertz(self, C_g, C_J, C_r):
elem = 1.60217663e-19
Expand Down
24 changes: 24 additions & 0 deletions UnitTests/test_transmon_energy_ratio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import unittest

import numpy as np
from scipy.constants import e, h

from SQDMetal.Utilities.QubitDesigner import TransmonBase


class TestTransmonEnergyRatio(unittest.TestCase):
def test_recovers_josephson_to_charging_energy_ratio(self):
transmon = TransmonBase()
for capacitance in (30e-15, 60e-15, 120e-15):
charging_energy = e**2 / (2 * capacitance)
for ratio in (20, 50, 100):
with self.subTest(capacitance=capacitance, ratio=ratio):
frequency = (np.sqrt(8 * ratio) - 1) * charging_energy / h
# Allow for the rounded electron charge used by the designer.
np.testing.assert_allclose(
transmon.EJonEC(capacitance, frequency), ratio, rtol=1e-7
)


if __name__ == "__main__":
unittest.main()
7 changes: 7 additions & 0 deletions doc-sphinx/source/general/qbd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ This represents a simple parallel LC circuit. The class can be instantiated by p
Qubit types
-----------

The ``Ej/Ec`` constraint and reported ratio refer to Josephson energy divided by
charging energy, with :math:`E_C=e^2/(2C_\mathrm{eff})`. They use the leading-order
transmon relation :math:`hf_{01}=\sqrt{8E_JE_C}-E_C`, inverted as
:math:`E_J/E_C=(hf_{01}/E_C+1)^2/8`. This approximation is intended for the
transmon regime :math:`E_J/E_C\gg1`, not an exact charge-basis Hamiltonian solution.
See `Koch et al. (2007) <https://arxiv.org/abs/cond-mat/0703002>`_.

The qubit designer classes all implement an ``optimise`` function:

- The function takes up a dictionary of parameters pertaining to that qubit type
Expand Down