Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to change length of pin/CPW leading out of transmon cross #949

Merged
merged 12 commits into from
Jun 14, 2023
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',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these values backwards compatible? Thank you

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