def pyaPoint__truediv__(self, dividend): """ This implements P / dividend """ return self.__class__(self.x / dividend, self.y / dividend) def pyaPoint_norm(self): """ This implements the L2 norm """ return sqrt(self.x ** 2 + self.y ** 2) def angle_vector(self): """ Find the angle of a vector """ from math import atan2, pi return (atan2(self.y, self.x)) / pi * 180 Point.angle_vector = angle_vector DPoint.angle_vector = angle_vector for klass in PointLike: klass.__rmul__ = pyaPoint__rmul__ klass.__mul__ = pyaPoint__mul__ klass.__truediv__ = pyaPoint__truediv__ klass.norm = pyaPoint_norm import sys if sys.version_info[0] > 2: # python 2 vs python 3 compatibility fixes assert DPoint(1, 2) / 1.0 == DPoint(1, 2) assert 0.5 * DPoint(1, 2) == DPoint(0.5, 1)
#Transmon parameters xmon_cpw_params = CPWParameters(20e3, 10e3) arms_vert_len = 144.3e3 arms_hor_len = 200e3 JJ_site_span = 8e3 h_JJ = 228 w_JJ = 200 asymmetry = 0.5 #DRAW startpoints = [ DPoint(-(CHIP.dx + 100e3) / 2, -3 * (CHIP.dy + 100e3) / 2), DPoint((CHIP.dx + 100e3) / 2, -3 * (CHIP.dy + 100e3) / 2), DPoint(-(CHIP.dx + 100e3) / 2, -(CHIP.dy + 100e3) / 2), DPoint((CHIP.dx + 100e3) / 2, -(CHIP.dy + 100e3) / 2), DPoint(-(CHIP.dx + 100e3) / 2, (CHIP.dy + 100e3) / 2), DPoint((CHIP.dx + 100e3) / 2, (CHIP.dy + 100e3) / 2), DPoint(-(CHIP.dx + 100e3) / 2, 3 * (CHIP.dy + 100e3) / 2), DPoint((CHIP.dx + 100e3) / 2, 3 * (CHIP.dy + 100e3) / 2) ] i = 0 for start in startpoints: i += 1
def init_primitives(self): origin = DPoint(0, 0) # drawing chip self.chip = Rectangle(origin, self.chip_x, self.chip_y) self.primitives["chip"] = self.chip # contact pads self.contact_pad_left = Contact_Pad( origin + DPoint(0, self.chip_y / 2), { "w": self.Z_params[0].width, "g": self.Z_params[0].gap }) self.primitives["cp_left"] = self.contact_pad_left self.contact_pad_right = Contact_Pad( origin + DPoint(self.chip_x, self.chip_y / 2), { "w": self.Z_params[1].width, "g": self.Z_params[1].gap }, trans_in=Trans.R180) self.primitives["cp_right"] = self.contact_pad_right # top and bottom pads N_pads = 3 self.connections = [ self.contact_pad_left.end, self.contact_pad_right.end ] self.angle_connections = [ self.contact_pad_left.angle_connections[1], self.contact_pad_right.angle_connections[1] ] self.contact_pads_top = [ Contact_Pad(origin + DPoint(self.chip_x / (N_pads + 1) * (i + 1), self.chip_y), { "w": self.Z_params[2 + i].width, "g": self.Z_params[2 + i].gap }, trans_in=Trans.R270) for i in range(0, N_pads) ] for i in range(0, N_pads): self.primitives["cp_top_" + str(i)] = self.contact_pads_top[i] self.connections.append(self.contact_pads_top[i].end) self.angle_connections.append( self.contact_pads_top[i].angle_connections[1]) self.contact_pads_bottom = [ Contact_Pad(origin + DPoint(self.chip_x / (N_pads + 1) * (i + 1), 0), { "w": self.Z_params[5 + i].width, "g": self.Z_params[5 + i].gap }, trans_in=Trans.R90) for i in range(0, N_pads) ] for i in range(0, N_pads): self.primitives["cp_bot_" + str(i)] = self.contact_pads_bottom[i] self.connections.append(self.contact_pads_bottom[i].end) self.angle_connections.append( self.contact_pads_bottom[i].angle_connections[1]) self.connections.append(DPoint(self.chip_x / 2, self.chip_y / 2)) self.angle_connections.append(0)
if (layout.has_cell("testScript")): pass else: cell = layout.create_cell("testScript") layer_info_photo = pya.LayerInfo(10, 0) layer_info_el = pya.LayerInfo(1, 0) layer_photo = layout.layer(layer_info_photo) layer_el = layout.layer(layer_info_el) # setting layout view lv.select_cell(cell.cell_index(), 0) lv.add_missing_layers() ## DRAWING SECTION START ## origin = DPoint(0, 0) cross_widths = [1e3 * x for x in range(60, 61, 20)] cross_lens = [1e3 * x for x in range(125, 126, 10)] cross_gnd_gaps = [1e3 * x for x in range(20, 21, 1)] # clear this cell and layer cell.clear() from itertools import product pars = product(cross_widths, cross_lens, cross_gnd_gaps) for cross_width, cross_len, cross_gnd_gap in pars: xmon_dX = 2 * cross_len + cross_width + 2 * cross_gnd_gap CHIP.dx = 5 * xmon_dX CHIP.dy = 5 * xmon_dX
cell = layout.create_cell("testScript") info = pya.LayerInfo(1, 0) info2 = pya.LayerInfo(2, 0) layer_ph = layout.layer(info) layer_el = layout.layer(info2) # clear this cell and layer cell.clear() # setting layout view lv.select_cell(cell.cell_index(), 0) lv.add_missing_layers() ### DRAW SECTION START ### origin = DPoint(0, 0) # Chip drwaing START # chip = pya.DBox(origin, DPoint(CHIP.dx, CHIP.dy)) cell.shapes(layer_ph).insert(pya.Box().from_dbox(chip)) # Chip drawing END # # CWave capacitor drawing START # r_out = 200e3 r_gap = 25e3 r_curve = 2e4 s = 5e3 alpha = pi / 2 circle_center = DPoint(CHIP.dx / 2, CHIP.dy / 2) crc = CWave(circle_center, r_out, r_gap, 8, s, alpha, r_curve, L0=r_curve)
def init_primitives(self): origin = DPoint(0, 0) #erased line params Z = CPWParameters(0, self.s / 2) # placing circle r_out with dr clearance from ground polygon self.empt_circle = Circle(origin, self.r_out + self.dr, n_pts=self.n_pts, inverse=True) self.in_circle = Circle(origin, self.r_out, n_pts=self.n_pts, inverse=False) self.empt_circle.empty_region -= self.in_circle.metal_region self.primitives["empt_circle"] = self.empt_circle self.primitives["in_circle"] = self.in_circle # pads on left and right sides left = DPoint(-self.r_out, 0) self.pad_left = CPW(Z.width, Z.gap, left, left + DPoint(self.delta, 0)) self.primitives["pad_left"] = self.pad_left right = DPoint(self.r_out, 0) self.pad_right = CPW(Z.width, Z.gap, right, right + DPoint(-self.delta, 0)) self.primitives["pad_right"] = self.pad_right # starting RLR self.RL_start = origin + DPoint(-self.in_circle.r + self.delta, 0) rl_path_start = CPWRLPath(self.RL_start, "RLR", Z, self.r_curve, [self.L0], [self.alpha, -self.alpha]) self.primitives["rl_start"] = rl_path_start # ending RLR if (self.n_semiwaves % 2 == 0): m_x = False else: m_x = True self.RL_end = origin + DPoint(self.in_circle.r - self.delta, 0) rl_path_end = CPWRLPath(self.RL_end, "RLR", Z, self.r_curve, [self.L0], [self.alpha, -self.alpha], trans_in=DCplxTrans(1, 180, m_x, 0, 0)) # intermidiate RLRs for i in range(self.n_semiwaves - 1): if (i % 2 == 0): m_x = False else: m_x = True prev_path = list(self.primitives.values())[-1] rl_path_p = CPWRLPath(prev_path.end, "RLR", [Z], [self.r_curve], [self.L1], [-self.alpha, self.alpha], trans_in=DCplxTrans(1, 0, m_x, 0, 0)) self.primitives["rl_path_" + str(i)] = rl_path_p self.primitives["rl_path_end"] = rl_path_end
class ResonatorSimulator(ChipDesign): origin = DPoint(0, 0) Z = CPWParameters(20e3, 10e3) # normal CPW Z_res = Z Z_narrow = CPWParameters(10e3,7e3) # narrow CPW cpw_curve = 200e3 # Curvature of CPW angles chip_x = 1.5e6 chip_y = 1.5e6 ncells_x = 400 ncells_y = 400 cpw = None # Call other methods drawing parts of the design from here def draw(self): self.draw_chip() self.cpw = self.draw_line(vert=True) self.draw_bottom_left_resonator(330e3) def draw_chip(self): origin = DPoint(0, 0) chip = Rectangle(origin, self.chip_x, self.chip_y) chip.place(self.cell, self.layer_ph) def draw_line(self, vert=False): if vert: start = DPoint(self.chip_x * 0.2, 0) end = DPoint(self.chip_x * 0.2, self.chip_y) else: start = DPoint(0, self.chip_y * 0.8) end = DPoint(self.chip_y, self.chip_y * 0.8) cpw = CPW(self.Z.width, self.Z.gap, start, end) cpw.place(self.cell, self.layer_ph) return cpw def draw_top_left_resonator(self, coupling_length=350e3): # frequency from Sonnet = 6.8166 GHz # Qc = 5190 coupling_length = 350e3 pars = self.get_sps_params() pars_squid = self.get_dc_squid_params() res_to_line = 5e3 # distance between a resonator and a line worm_pos = DPoint(self.chip_x / 2, self.cpw.start.y - res_to_line - 2 * (self.Z.width/2 + self.Z.gap)) worm1 = self.draw_one_resonator(worm_pos, 6.8, coupling_length, extra_neck_length=pars['r_out'], trans_in=Trans.R180) q_pos = worm1.end + DPoint(0, pars['r_out'] - worm1.Z.b) # qubit position mq1 = SFS_Csh_emb(q_pos, pars, pars_squid) mq1.place(self.cell, self.layer_ph, self.layer_el) def draw_top_right_resonator(self, coupling_length=350e3): # frequency from Sonnet = 7.0251 GHz # Qc = 4860 coupling_length = 350e3 pars = self.get_sps_params() pars_squid = self.get_dc_squid_params() res_to_line = 5e3 # distance between a resonator and a line worm_pos = DPoint(self.chip_x / 2, self.cpw.start.y - res_to_line - 2 * (self.Z.width/2 + self.Z.gap)) worm2 = self.draw_one_resonator(worm_pos, 7, coupling_length, extra_neck_length=pars['r_out'], trans_in=Trans.R180) q_pos = worm2.end + DPoint(0, pars['r_out'] - worm2.Z.b) # qubit position mq2 = SFS_Csh_emb(q_pos, pars, pars_squid) mq2.place(self.cell, self.layer_ph, self.layer_el) def draw_bottom_left_resonator(self, coupling_length=330e3): # frequency from Sonnet = 7.2103 GHz # Qc = 5160 coupling_length = 330e3 pars = self.get_sps_params() pars_squid = self.get_dc_squid_params() res_to_line = 5e3 # distance between a resonator and a line # Moving a capacitive coupling to the top of a qubit pars['Z1'], pars['Z2'] = pars['Z2'], pars['Z1'] pars['d_alpha1'], pars['d_alpha2'] = pars['d_alpha2'], pars['d_alpha1'] pars['width1'], pars['width2'] = pars['width2'], pars['width1'] pars['gap1'], pars['gap2'] = pars['gap2'], pars['gap1'] worm_pos = DPoint(self.cpw.start.x + res_to_line + 2 * (self.Z.width/2 + self.Z.gap), self.chip_y / 2) worm3 = self.draw_one_resonator(worm_pos, 7.4, coupling_length, no_neck=True, vert=False, trans_in=Trans.R270) q_pos = worm3.end - DPoint(0, pars['r_out'] - worm3.Z.b) mq3 = SFS_Csh_emb(q_pos, pars, pars_squid) mq3.place(self.cell, self.layer_ph, self.layer_el) def simulate(self): SL = SonnetLab() SL.clear() SL.set_boxProps(self.chip_x, self.chip_y, self.ncells_x, self.ncells_y) SL.set_ABS_sweep(7.2, 7.22) SL.set_ports(self.cpw.connections, [0, 0]) SL.send_polygons(self.cell, self.layer_ph) SL.start_simulation(wait=True) SL.visualize_sever() SL.release() def draw_one_resonator(self, pos, freq, coupling_length, no_neck=False, extra_neck_length=0, vert=True, trans_in=None): turn_radius = 50e3 eps = 11.45 wavelength_fraction = 1/4 meander_periods = 3 neck_length = 200e3 if vert: pos = pos + DPoint((coupling_length + extra_neck_length)/2 + 2 * turn_radius, 0) else: pos = pos + DPoint(0, (coupling_length + extra_neck_length)/2 + 2 * turn_radius) worm = CPWResonator2(pos, self.Z, turn_radius, freq, eps, wavelength_fraction, coupling_length, meander_periods, neck_length, no_neck=no_neck, extra_neck_length=extra_neck_length, trans_in=trans_in) worm.place(self.cell, self.layer_ph) print(worm._calculate_total_length()) return worm def get_sps_params(self): pars = {'r_out' : 175e3, # Radius of an outer ring including the empty region 'dr' : 25e3, # Gap in the outer ring 'n_semiwaves' : 2, 's' : 10e3, # Gap between two pads of a central capacitor 'alpha' : pi/4, # period of a gap zigzag 'r_curve' : 30e3, # curvature of the roundings at the edges of a zigzag 'n_pts_cwave' : 200, # number of points for drawing a wave gap between to conductors 'Z1' : self.Z_narrow, # Parameters of a top CPW 'd_alpha1' : 0, # width of a tip of a central conductor of the top CPW 'width1' : 0, # width of a conductor in the top semiring 'gap1' : 25e3 - 1.33e3, # gap between the top semiring and the central capacitor 'Z2' : self.Z, # Parameters of a bottom CPW 'd_alpha2' : 2 / 9 * pi, # length of a circumference covered by the bottom semiring 'width2' : 25e3/3, # width of a conductor in the bottom semiring 'gap2' : 25e3/3, # gap between the bottom semiring and the central capacitor 'n_pts_arcs' : 50, # number of points for drawing a circle } return pars def get_dc_squid_params(self): pad_side = 5e3 # A length of the side of triangle pad pad_r = 1e3 # The outer_r of round angle of the contact pad pads_distance = 30e3 # The distance between triangle contact pads p_ext_width = 3e3 # The width of curved rectangle leads which connect triangle contact pads and junctions p_ext_r = 0.5e3 # The angle outer_r of the pad extension sq_len = 7e3 # The length of the squid, along leads sq_area = 15e6 # The total area of the squid j_width = 0.2e3 # The width of the upper small leads (straight) and also a width of the junction intermediate_width = 0.5e3 # The width g the lower small bended leads before bending b_ext = 0.9e3 # The extension of bended leads after bending j_length = 0.1e3 # The length of the jj and the width of bended parts of the lower leads n = 7 # The number of angle in regular polygon which serves as a large contact pad bridge = 0.2e3 # The value of the gap between two parts of junction in the design return [pad_side, pad_r, pads_distance, p_ext_width, p_ext_r, sq_len, sq_area, j_width, intermediate_width, b_ext, j_length, n,bridge]
pass else: cell = layout.create_cell("testScript") info = pya.LayerInfo(1, 0) info2 = pya.LayerInfo(2, 0) layer_ph = layout.layer(info) layer_el = layout.layer(info2) # clear this cell and layer cell.clear() # setting layout view lv.select_cell(cell.cell_index(), 0) lv.add_missing_layers() box = pya.Box(0, 0, CHIP.dx, CHIP.dy) cell.shapes(layer_ph).insert(box) cpw_params = [10e3, 20e3] c1 = Capacitor_small(DPoint(0, CHIP.dy / 2), cpw_params, 200e3, 20e3, 5e3) #116.144e3) c1.place(cell, layer_ph) ports = [ SonnetPort(c1.start, PORT_TYPES.BOX_WALL), SonnetPort(feedline1.end, PORT_TYPES.BOX_WALL) ] lv.zoom_fit()
layer_info_photo = pya.LayerInfo(10, 0) layer_info_el = pya.LayerInfo(1, 0) layer_photo = layout.layer(layer_info_photo) layer_el = layout.layer(layer_info_el) # clear this cell and layer cell.clear() # setting layout view lv.select_cell(cell.cell_index(), 0) lv.add_missing_layers() ## DRAWING SECTION START ## cell.shapes(layer_photo).insert( pya.Box(Point(0, 0), Point(CHIP.dx, CHIP.dy))) origin = DPoint(0, 0) contact_L = 1e6 # main drive line coplanar width = 24.1e3 gap = 12.95e3 x = 0.25 * CHIP.dx y = 0.9 * CHIP.dy p1 = DPoint(0, y) p2 = DPoint(CHIP.dx, y) Z0 = CPW(width, gap, p1, p2) Z0.place(cell, layer_photo) # resonator L_coupling = 300e3
else: cv = lv.active_cellview() # find or create the desired by programmer cell and layer layout = cv.layout() layout.dbu = 0.001 if (layout.has_cell("testScript")): pass else: cell = layout.create_cell("testScript") info = pya.LayerInfo(1, 0) info2 = pya.LayerInfo(2, 0) layer_ph = layout.layer(info) layer_el = layout.layer(info2) # clear this cell and layer cell.clear() # setting layout view lv.select_cell(cell.cell_index(), 0) lv.add_missing_layers() ### DRAW SECTION START ### origin = DPoint(0, 0) cros = Mark1(origin) cros.place(cell, layer_ph) ### DRAW SECTION END ### lv.zoom_fit()
def init_primitives(self): bottom_left_w_JJ = self._bottom_left_w_JJ + self._correction bottom_right_w_JJ = self._bottom_right_w_JJ + self._correction top_left_h_JJ = self._top_left_h_JJ + self._correction top_right_h_JJ = self._top_right_h_JJ + self._correction # Top cursor = DPoint(0, self._structure_length / 2) self.primitives["top_pad"] =\ CPW(self._pad_width, 0, cursor, cursor+DPoint(0, -self._structure_length/4)) cursor = self.primitives["top_pad"].end cursor_l = cursor + DPoint( -self._squid_width_top / 2 - self._small_lead_width / 2, 0) self.primitives["top_left_small_lead"] =\ CPW(self._small_lead_width, 0, cursor_l, cursor_l+DPoint(0, -self._structure_length/4+top_left_h_JJ/2)) cursor_l = self.primitives["top_left_small_lead"].end cursor_l += DPoint(-self._small_lead_width / 2, -top_left_h_JJ / 2) self.primitives["top_left_tiny_lead"] =\ CPW(top_left_h_JJ, 0, cursor_l, cursor_l+DPoint(self._top_tiny_lead_length+self._tiny_lead_outshoot, 0)) cursor_r = cursor + DPoint( self._squid_width_top / 2 + self._small_lead_width / 2, 0) self.primitives["top_right_small_lead"] =\ CPW(self._small_lead_width, 0, cursor_r, cursor_r+DPoint(0, -self._structure_length/4+top_right_h_JJ/2)) cursor_r = self.primitives["top_right_small_lead"].end cursor_r += DPoint(self._small_lead_width / 2, -top_right_h_JJ / 2) self.primitives["top_right_tiny_lead"] =\ CPW(top_right_h_JJ, 0, cursor_r, cursor_r+DPoint(-self._top_tiny_lead_length-self._tiny_lead_outshoot, 0)) # Bottom cursor = DPoint(0, -self._structure_length / 2) self.primitives["bottom_pad"] =\ CPW(self._pad_width, 0, cursor, cursor+DPoint(0, self._structure_length/4)) cursor = self.primitives["bottom_pad"].end cursor_l = cursor +\ DPoint(-self._squid_width_bottom/2 \ - self._small_lead_width/2 \ , 0) self.primitives["bottom_left_small_lead"] =\ CPW(self._small_lead_width, 0, cursor_l, cursor_l+DPoint(0, self._structure_length/4\ -self._bottom_tiny_lead_length)) cursor_l = self.primitives["bottom_left_small_lead"].end cursor_l += DPoint(0, 0) self.primitives["bottom_left_tiny_lead"] =\ CPW(bottom_left_w_JJ, 0, cursor_l, cursor_l+DPoint(0, self._bottom_tiny_lead_length\ - top_left_h_JJ/2 - self._bridge_width)) cursor_r = cursor +\ DPoint(self._squid_width_bottom/2 \ + self._small_lead_width/2, 0) self.primitives["bottom_right_small_lead"] =\ CPW(self._small_lead_width, 0, cursor_r, cursor_r+DPoint(0, self._structure_length/4\ -self._bottom_tiny_lead_length)) cursor_r = self.primitives["bottom_right_small_lead"].end cursor_r += DPoint(0, 0) self.primitives["bottom_right_tiny_lead"] =\ CPW(bottom_right_w_JJ, 0, cursor_r, cursor_r+DPoint(0, self._bottom_tiny_lead_length\ - top_right_h_JJ/2 - self._bridge_width))
layer_info_el = pya.LayerInfo(1, 0) layer_photo = layout.layer(layer_info_photo) layer_el = layout.layer(layer_info_el) # clear this cell and layer cell.clear() # setting layout view if lv: lv.select_cell(cell.cell_index(), 0) lv.add_missing_layers() ## DRAWING SECTION START ## cell.shapes(layer_photo).insert( pya.Box(Point(0, 0), Point(CHIP.dx, CHIP.dy))) origin = DPoint(0, 0) contact_L = 1e6 # main drive line coplanar width = 24.1e3 gap = 12.95e3 x = 0.25 * CHIP.dx y = 0.9 * CHIP.dy p1 = DPoint(0, y) p2 = DPoint(CHIP.dx, y) Z0 = CPW(width, gap, p1, p2) Z0.place(cell, layer_photo) # resonator L_coupling = 300e3
width2 = 74e3 gap2 = 13e3 gndWidth = 20 #not used L1 = 1e6 L2 = 0.46538e6 L3 = 1e6 L4 = 0.108427e6 L5 = 1e6 R1 = 0.3e6 R2 = 0.3e6 R3 = 0.3e6 R4 = 0.3e6 gamma1 = pi / 4 gamma2 = 2.35619 origin = DPoint(1e6, 0) #cell.shapes( layer_i ).insert( pya.Box( Point(0,0), Point( CHIP_10x10_12pads.dx, CHIP_10x10_12pads.dy ) ) ) Z0 = CPW(width1, gap1, origin, origin) Z1 = CPW(width2, gap2, origin, origin) '''Z1 = CPW( width1, gap1, origin, origin + DPoint( 1e6,0 ), trans_in=DCplxTrans( 1,90,False,1e6,0 ) ) Z1.place( cell, layer_i ) for val in Z1.connections: print( val ) print( Z0.origin )''' '''Z1 = CPW_arc( Z0, origin + DPoint(1e6,0), R1, gamma1, trans_in=DCplxTrans( 1,90,False,1e6,0 ) ) Z1.place( cell, layer_i ) for val in Z1.connections: print( val ) print( Z0.origin )''' '''Z1 = CPW( width2,gap2, DPoint(0,0), DPoint(0,0) ) tj = TJunction_112( Z0,Z1, origin + DPoint(1e6,1e6), DCplxTrans( 1,30,False,1e6,1e6 ) )
pass else: cell = layout.create_cell("testScript") info = pya.LayerInfo(10, 0) layer_i = layout.layer(info) # clear this cell and layer cell.clear() # setting layout view lv.select_cell(cell.cell_index(), 0) lv.add_missing_layers() ### DRAW SECTION START ### origin = DPoint(1e6, 0) a = 4.6e3 b = 4.6e3 jos1_b = 0.32e3 jos1_a = 0.1e3 f1 = 0.13e3 d1 = 0.05e3 jos2_b = 0.8e3 jos2_a = 0.09e3 f2 = 0.25e3 d2 = d1 w = 0.2e3 B1_width = 2.405e3 B1_height = 7.325e3 B2_height = 0.6e3 B5_height = 0.4e3
def draw_chip(self): origin = DPoint(0, 0) chip = Rectangle(origin, self.chip_x, self.chip_y) chip.place(self.cell, self.layer_ph)
def __init__(self, origin, inner_square_a, outer_square_a, trans_in=None): self.in_a = inner_square_a self.out_a = outer_square_a self.center = origin + DPoint(self.out_a / 2, self.out_a / 2) super(Cross, self).__init__(origin, trans_in) self.center = self.connections[0]
layer_info_photo = pya.LayerInfo(10,0) layer_info_el = pya.LayerInfo(1,0) layer_photo = layout.layer( layer_info_photo ) layer_el = layout.layer( layer_info_el ) # clear this cell and layer cell.clear() # setting layout view if lv: lv.select_cell(cell.cell_index(), 0) lv.add_missing_layers() ## DRAWING SECTION START ## cell.shapes( layer_photo ).insert( pya.Box( Point(0,0), Point( CHIP.dx, CHIP.dy ) ) ) origin = DPoint( 0,0 ) contact_L = 1e6 # main drive line coplanar width = 24.1e3 gap = 12.95e3 p1 = DPoint( 0 + contact_L, CHIP.dy/2 ) p2 = DPoint( CHIP.dx - contact_L, CHIP.dy/2 ) Z0 = CPW( width, gap, p1, p2 ) Z0.place( cell, layer_photo ) # left contact pad width1 = CHIP.width*2 gap1 = CHIP.gap*2 p3 = DPoint( 0, CHIP.dy/2 )