Skip to content

Commit

Permalink
Added ability to change length of pin/CPW leading out of transmon cro…
Browse files Browse the repository at this point in the history
…ss (#949)

* claw cpw fix

* claw cpw fix 2

* typo

* forgot pin mod

* forgot to account for 0 cpw length

* lint fix

* fixed unit test

* more linting

---------

Co-authored-by: LFL-Lab <109769051+LFL-Lab@users.noreply.github.com>
Co-authored-by: Zlatko Minev <zminev@gmail.com>
  • Loading branch information
3 people authored Jun 14, 2023
1 parent 60a9af0 commit e2c17a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ To do so, first navigate to the folder created by the clone. For example:

cd qiskit-metal

Once you are in the folder that contains the `environemnt.yml` file, execute the following installation commands:
Once you are in the folder that contains the `environment.yml` file, execute the following installation commands:

::

Expand Down
13 changes: 9 additions & 4 deletions qiskit_metal/qlibrary/qubits/transmon_cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class TransmonCross(BaseQubit): # pylint: disable=invalid-name
ground_spacing='5um',
claw_width='10um',
claw_gap='6um',
claw_cpw_length='40um',
claw_cpw_width='10um',
connector_location=
'0' # 0 => 'west' arm, 90 => 'north' arm, 180 => 'east' arm
))
Expand Down Expand Up @@ -175,10 +177,12 @@ def make_connection_pad(self, name: str):
c_g = pc.claw_gap
c_l = pc.claw_length
c_w = pc.claw_width
c_c_w = pc.claw_cpw_width
c_c_l = pc.claw_cpw_length
g_s = pc.ground_spacing
con_loc = pc.connector_location

claw_cpw = draw.box(0, -c_w / 2, -4 * c_w, c_w / 2)
claw_cpw = draw.box(-c_w, -c_c_w / 2, -c_c_l - c_w, c_c_w / 2)

if pc.connector_type == 0: # Claw connector
t_claw_height = 2*c_g + 2 * c_w + 2*g_s + \
Expand All @@ -193,14 +197,15 @@ 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:
connector_arm = claw_cpw
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([(-4 * c_w, -c_w / 2), (-4 * c_w, c_w / 2)])
port_line = draw.LineString([(-c_c_l - c_w, -c_c_w / 2),
(-c_c_l - c_w, c_w / 2)])

claw_rotate = 0
if con_loc > 135:
Expand All @@ -225,4 +230,4 @@ def make_connection_pad(self, name: str):
subtract=True,
chip=chip)

self.add_pin(name, port_line.coords, c_w)
self.add_pin(name, port_line.coords, c_c_w)
6 changes: 5 additions & 1 deletion qiskit_metal/tests/test_qlibrary_2_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ 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']), 6)
self.assertEqual(len(_options['_default_connection_pads']), 8)
self.assertEqual(_options['_default_connection_pads']['connector_type'],
'0')
self.assertEqual(_options['_default_connection_pads']['claw_length'],
Expand All @@ -498,6 +498,10 @@ def test_qlibrary_transmon_cross_options(self):
'10um')
self.assertEqual(_options['_default_connection_pads']['claw_gap'],
'6um')
self.assertEqual(
_options['_default_connection_pads']['claw_cpw_length'], '40um')
self.assertEqual(_options['_default_connection_pads']['claw_cpw_width'],
'10um')
self.assertEqual(
_options['_default_connection_pads']['connector_location'], '0')

Expand Down

0 comments on commit e2c17a7

Please sign in to comment.