diff --git a/qiskit_metal/qlibrary/qubits/transmon_cross.py b/qiskit_metal/qlibrary/qubits/transmon_cross.py index b0a765229..ad3bb1722 100644 --- a/qiskit_metal/qlibrary/qubits/transmon_cross.py +++ b/qiskit_metal/qlibrary/qubits/transmon_cross.py @@ -62,9 +62,13 @@ class TransmonCross(BaseQubit): # pylint: disable=invalid-name * _default_connection_pads: Dict * connector_type: '0' -- 0 = Claw type, 1 = gap type * claw_length: '30um' -- Length of the claw 'arms', measured from the connector center trace - * ground_spacing: '5um' -- Amount of ground plane between the connector and Crossmon arm (minimum should be based on fabrication capabilities) - * claw_width: '10um' -- The width of the CPW center trace making up the claw/gap connector - * claw_gap: '6um' -- The gap of the CPW center trace making up the claw/gap connector + * ground_spacing '5um' -- Amount of ground plane between the side of the connector and Crossmon arm (minimum should be based on fabrication capabilities) + * ground_spacing_back: 'None' -- Amount of ground plane between the cpw-side (back) of the connector and Crossmon arm (minimum should be based on fabrication capabilities). Defaults to ground_spacing. + * claw_width: '10um' -- The width of sides of the claw/gap connector + * claw_width_back: None -- The width of the back (area towards the incoming CPW path) of the claw/gap connector. Defaults to claw_width. + * claw_gap: 'cpw_gap' -- The gap of the CPW center trace making up the claw/gap connector + * claw_cpw_lenght: '40um' -- Length of rectangular cpw trace + * claw_cpw_width: 'cpw_width' -- Width of rectangular cpw trace * connector_location: '0' -- 0 => 'west' arm, 90 => 'north' arm, 180 => 'east' arm """ @@ -77,10 +81,12 @@ class TransmonCross(BaseQubit): # pylint: disable=invalid-name connector_type='0', # 0 = Claw type, 1 = gap type claw_length='30um', ground_spacing='5um', + ground_spacing_back=None, # Defaults to value in `ground_spacing` claw_width='10um', - claw_gap='6um', + claw_width_back=None, # Defaults to value in `claw_width` + claw_gap='cpw_gap', claw_cpw_length='40um', - claw_cpw_width='10um', + claw_cpw_width='cpw_width', connector_location= '0' # 0 => 'west' arm, 90 => 'north' arm, 180 => 'east' arm )) @@ -177,18 +183,33 @@ def make_connection_pad(self, name: str): c_g = pc.claw_gap c_l = pc.claw_length c_w = pc.claw_width + c_w_b = pc.claw_width_back c_c_w = pc.claw_cpw_width c_c_l = pc.claw_cpw_length g_s = pc.ground_spacing + g_s_b = pc.ground_spacing_back con_loc = pc.connector_location - claw_cpw = draw.box(-c_w, -c_c_w / 2, -c_c_l - c_w, c_c_w / 2) + # Default option if `claw_width_back` is unspecified + # Ensures backwards compatability (pre June 2023) + if (pc.claw_width_back == None): + c_w_b = c_w - if pc.connector_type == 0: # Claw connector + # Default option if `ground_spacing_back` is unspecified + # Ensures backwards compatability (pre June 2023) + if (pc.claw_spacing_back == None): + g_s_b = g_s + + # `connector_type` logic + if pc.connector_type == 0: # Claw-style connector + # CPW box geometry + claw_cpw = draw.box(-c_w_b, -c_c_w / 2, -c_c_l - c_w_b, c_c_w / 2) + + # Claw geometry t_claw_height = 2*c_g + 2 * c_w + 2*g_s + \ 2*cross_gap + cross_width # temp value - claw_base = draw.box(-c_w, -(t_claw_height) / 2, c_l, + claw_base = draw.box(-c_w_b, -(t_claw_height) / 2, c_l, t_claw_height / 2) claw_subtract = draw.box(0, -t_claw_height / 2 + c_w, c_l, t_claw_height / 2 - c_w) @@ -196,16 +217,18 @@ def make_connection_pad(self, name: str): connector_arm = draw.shapely.ops.unary_union([claw_base, claw_cpw]) connector_etcher = draw.buffer(connector_arm, c_g) - else: + + # Port line for claw-style + port_line = draw.LineString([(-c_c_l - c_w_b, -c_c_w / 2), + (-c_c_l - c_w_b, c_c_w / 2)]) + else: # Rectangle style connector + # Rectangle geometry connector_arm = draw.box(0, -c_w / 2, -4 * c_w, c_w / 2) connector_etcher = draw.buffer(connector_arm, c_g) - # Making the pin for tracking (for easy connect functions). - # Done here so as to have the same translations and rotations as the connector. Could - # extract from the connector later, but since allowing different connector types, - # this seems more straightforward. - port_line = draw.LineString([(-c_c_l - c_w, -c_c_w / 2), - (-c_c_l - c_w, c_w / 2)]) + # Port line for rectangle-style + port_line = draw.LineString([(-4 * c_w, -c_w / 2), + (-4 * c_w, c_w / 2)]) claw_rotate = 0 if con_loc > 135: @@ -215,7 +238,7 @@ def make_connection_pad(self, name: str): # Rotates and translates the connector polygons (and temporary port_line) polys = [connector_arm, connector_etcher, port_line] - polys = draw.translate(polys, -(cross_length + cross_gap + g_s + c_g), + polys = draw.translate(polys, -(cross_length + cross_gap + g_s_b + c_g), 0) polys = draw.rotate(polys, claw_rotate, origin=(0, 0)) polys = draw.rotate(polys, p.orientation, origin=(0, 0)) diff --git a/qiskit_metal/tests/test_qlibrary_2_options.py b/qiskit_metal/tests/test_qlibrary_2_options.py index e99a51987..c0a407024 100644 --- a/qiskit_metal/tests/test_qlibrary_2_options.py +++ b/qiskit_metal/tests/test_qlibrary_2_options.py @@ -487,21 +487,25 @@ def test_qlibrary_transmon_cross_options(self): self.assertEqual(_options['cross_length'], '200um') self.assertEqual(_options['cross_gap'], '20um') - self.assertEqual(len(_options['_default_connection_pads']), 8) + self.assertEqual(len(_options['_default_connection_pads']), 10) self.assertEqual(_options['_default_connection_pads']['connector_type'], '0') self.assertEqual(_options['_default_connection_pads']['claw_length'], '30um') self.assertEqual(_options['_default_connection_pads']['ground_spacing'], '5um') + self.assertEqual( + _options['_default_connection_pads']['ground_spacing_back'], None) self.assertEqual(_options['_default_connection_pads']['claw_width'], '10um') + self.assertEqual( + _options['_default_connection_pads']['claw_width_back'], None) self.assertEqual(_options['_default_connection_pads']['claw_gap'], - '6um') + 'cpw_gap') self.assertEqual( _options['_default_connection_pads']['claw_cpw_length'], '40um') self.assertEqual(_options['_default_connection_pads']['claw_cpw_width'], - '10um') + 'cpw_width') self.assertEqual( _options['_default_connection_pads']['connector_location'], '0')