Ejemplo n.º 1
0
	def init_primitives(self):
		center = DPoint(0, 0)

		## empty rectangle ##
		empty_width = self.rectangle_a + 2 * self.gnd_gap
		empty_height = 2 * self.rectangle_a + 2 * self.gnd_gap + self.rectangles_gap
		# bottom-left point of rectangle
		bl_point = center - DPoint(empty_width / 2, empty_height / 2)
		self.empty_rectangle = Rectangle(
			bl_point,
			empty_width, empty_height, inverse=True
		)
		self.primitives["empty_rectangle"] = self.empty_rectangle

		## top rectangle ##
		# bottom-left point of rectangle
		bl_point = center + DPoint(-self.rectangle_a / 2, self.rectangles_gap / 2)
		self.top_rec = Rectangle(bl_point, self.rectangle_a, self.rectangle_a)
		self.primitives["top_rec"] = self.top_rec

		## bottom rectangle ##
		# bottom-left point of rectangle
		bl_point = center + DPoint(
			-self.rectangle_a / 2,
			- self.rectangles_gap / 2 - self.rectangle_a
		)
		self.bot_rec = Rectangle(bl_point, self.rectangle_a, self.rectangle_a)
		self.primitives["bot_rec"] = self.bot_rec

		self.connections = [center]
Ejemplo n.º 2
0
def draw_inductor_for_fl_line(design, fl_line_idx):
    cpwrl_fl = self.cpw_fl_lines[fl_line_idx]
    cpwrl_fl_inductor_start = cpwrl_fl.end + \
                              DVector(0, -design.current_line_width / 2)
    cpwrl_fl_inductor = CPW(
        cpw_params=CPWParameters(width=design.current_line_width, gap=0),
        start=cpwrl_fl_inductor_start,
        end=cpwrl_fl_inductor_start +
        DVector(2 * abs(design.flux_lines_x_shifts[fl_line_idx]), 0))
    cpwrl_fl_inductor.place(design.region_ph)
    cpwrl_fl_inductor_empty_box = Rectangle(
        origin=cpwrl_fl.end +
        DVector(0, -design.current_line_width - 2 * design.z_md_fl.gap),
        width=cpwrl_fl_inductor.dr.abs(),
        height=2 * design.z_md_fl.gap,
        inverse=True)
    cpwrl_fl_inductor_empty_box.place(design.region_ph)
Ejemplo n.º 3
0
    def init_primitives(self):
        center = DPoint(0, 0)

        self.empty_circle = Circle(center, self.ring1_outer_r + self.ring1_thickness, inverse=True)
        self.primitives["empty_circle"] = self.empty_circle

        # outer ring
        self.ring1 = Ring(center, self.ring1_outer_r, self.ring1_thickness)
        self.primitives["ring1"] = self.ring1

        # inner ring
        self.ring2 = Ring(center, self.ring2_outer_r, self.ring2_thickness)
        self.primitives["ring2"] = self.ring2

        ## four aim lines ##
        center_shift = self.aim_lines_width/3
        line_length = self.ring1_outer_r - self.ring1_thickness/2 - center_shift
        # left horizontal line
        p1 = center + DPoint(-center_shift, 0)
        p2 = p1 + DPoint(-line_length, 0)
        self.left_aim_line = CPW(self.aim_lines_width, 0, p1, p2)
        self.primitives["left_aim_line"] = self.left_aim_line

        # bottom vertical line
        p1 = center + DPoint(0, -center_shift)
        p2 = p1 + DPoint(0, -line_length)
        self.bottom_aim_line = CPW(self.aim_lines_width, 0, p1, p2)
        self.primitives["bottom_aim_line"] = self.bottom_aim_line

        # right horizontal line
        p1 = center + DPoint(center_shift, 0)
        p2 = p1 + DPoint(line_length, 0)
        self.right_aim_line = CPW(self.aim_lines_width, 0, p1, p2)
        self.primitives["right_aim_line"] = self.right_aim_line

        # top vertical line
        p1 = center + DPoint(0, center_shift)
        p2 = p1 + DPoint(0, line_length)
        self.top_aim_line = CPW(self.aim_lines_width, 0, p1, p2)
        self.primitives["top_aim_line"] = self.top_aim_line

        # center romb for better aiming
        self.center_romb = Rectangle(
            center,
            self.aim_lines_width, self.aim_lines_width,
            trans_in=DCplxTrans(1, 45, False, -self.aim_lines_width/2, -self.aim_lines_width/2),
            inverse=True
        )
        self.primitives["center_romb"] = self.center_romb

        self.connections = [center]
Ejemplo n.º 4
0
    def init_primitives(self):
        origin = DPoint(0, 0)

        # draw central square
        from classLib.shapes import Rectangle
        lb_corner = DPoint(-self.sideX_width / 2, -self.sideY_width / 2)
        center_square = Rectangle(lb_corner, self.sideX_width, self.sideY_width)
        self.primitives["center_square"] = center_square

        """ left part of Xmon cross """
        p1 = origin + DPoint(-self.sideY_width / 2, 0)
        p2 = p1 + DPoint(-self.sideX_length, 0)
        self.cpw_l = CPW(self.sideX_width, self.sideX_gnd_gap, p1, p2)
        self.primitives["cpw_l"] = self.cpw_l
        p3 = p2 + DPoint(-self.sideX_face_gnd_gap, 0)
        self.cpw_lempt = CPW(0, self.cpw_l.b / 2, p2, p3)
        self.primitives["cpw_lempt"] = self.cpw_lempt

        """ right part of Xmon cross """
        p1 = origin + DPoint(self.sideY_width / 2, 0)
        p2 = p1 + DPoint(self.sideX_length, 0)
        self.cpw_r = CPW(self.sideX_width, self.sideX_gnd_gap, p1, p2)
        self.primitives["cpw_r"] = self.cpw_r
        p3 = p2 + DPoint(self.sideX_face_gnd_gap, 0)
        self.cpw_rempt = CPW(0, self.cpw_r.b / 2, p2, p3)
        self.primitives["cpw_rempt"] = self.cpw_rempt

        """ top part of Xmon cross """
        p1 = origin + DPoint(0, self.sideX_width / 2)
        p2 = p1 + DPoint(0, self.sideY_length)
        self.cpw_t = CPW(self.sideY_width, self.sideY_gnd_gap, p1, p2)
        self.primitives["cpw_t"] = self.cpw_t
        p3 = p2 + DPoint(0, self.sideY_face_gnd_gap)
        self.cpw_tempt = CPW(0, self.cpw_t.b / 2, p2, p3)
        self.primitives["cpw_tempt"] = self.cpw_tempt

        """ bottom part of Xmon cross """
        p1 = origin + DPoint(0, -self.sideX_width / 2)
        p2 = p1 + DPoint(0, -self.sideY_length)
        self.cpw_b = CPW(self.sideY_width, self.sideY_gnd_gap, p1, p2)
        self.primitives["cpw_b"] = self.cpw_b
        p3 = p2 + DPoint(0, -self.sideY_face_gnd_gap)
        self.cpw_bempt = CPW(0, self.cpw_b.b / 2, p2, p3)
        self.primitives["cpw_bempt"] = self.cpw_bempt

        self.connections = [origin]
Ejemplo n.º 5
0
    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 = ContactPad(origin + DPoint(0, self.chip_y / 2),
                                           chip_cpw_params=self.Z_params[0])
        self.primitives["cp_left"] = self.contact_pad_left

        self.contact_pad_right = ContactPad(origin + DPoint(self.chip_x, self.chip_y / 2),
                                            chip_cpw_params=self.Z_params[1],
                                            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 = [ContactPad(origin + DPoint(self.chip_x / (N_pads + 1) * (i + 1), self.chip_y),
                                            chip_cpw_params=self.Z_params[i+2],
                                            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 = [ContactPad(origin + DPoint(self.chip_x / (N_pads + 1) * (i + 1), 0),
                                               chip_cpw_params=self.Z_params[5+i],
                                               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)
Ejemplo n.º 6
0
    def init_primitives(self):
        origin = DPoint(0, 0)

        # square box that clears out the area of the mark
        self.primitives["empty_box"] = Rectangle(DPoint(-self.leaf_outer, -self.leaf_outer), 2 * self.leaf_outer,
                                                 2 * self.leaf_outer, inverse=True)

        self.primitives["cross"] = Cross(DPoint(-self.cross_out_a / 2, -self.cross_out_a / 2), self.cross_in_a,
                                         self.cross_out_a)

        Z = CPWParameters(self.leaf_outer - self.leaf_inner, 0)

        for i in range(self.leafs_N):
            start_angle = i * (self.leaf_angle + self.empty_leaf_angle) - self.leaf_angle / 2
            trans = DCplxTrans(1, start_angle + 90, False, 0, -self.avg_r)
            self.primitives["leaf_" + str(i)] = CPW_arc(Z, origin, self.avg_r, self.leaf_angle * pi / 180,
                                                        trans_in=trans)

        Z_empty = CPWParameters(0, self.empty_rings_width / 2)
        for i in range(1, self.empty_rings_N + 1):
            r = self.leaf_inner + (self.leaf_outer - self.leaf_inner) / (self.empty_rings_N + 1) * i
            self.primitives["empty_ring_" + str(i)] = CPW_arc(Z_empty, DVector(0, -r), r, 2 * pi)
Ejemplo n.º 7
0
	def draw_el_dc_contacts(self, squids: AsymSquid = None):
		# if argument is omitted, use all squids stored in `self.squids`
		if squids is None:
			squids = self.squids + self.test_squids

		for squid in squids:
			r_pad = squid.params.pad_r
			center_up = squid.pad_up.center + DPoint(0, r_pad)
			center_down = squid.pad_down.center + DPoint(0, -r_pad)
			big_circle_r = 1.5 * r_pad
			self.el_dc_contacts.append(
				[Circle(center_up, big_circle_r), Circle(center_down, big_circle_r)]
			)
			for contact in self.el_dc_contacts[-1]:
				contact.place(self.region_el2)

			# DC contacts has to have intersection with empty layer in photo litography
			# to ensure that first e-beam layer does not broke at the step between
			# substrate and photolytography polygons.
			# Following rectangle pads are cutted from photo region to ensure
			# DC contacts are covering aforementioned level step.
			squid_pad_r = squid.params.pad_r
			squid_pads_d = squid.params.pads_distance - 2 * squid_pad_r
			rec_width = 1.6 * squid_pad_r - 2 * FABRICATION.OVERETCHING
			rec_height = 1.6 * squid_pad_r - FABRICATION.OVERETCHING
			# Rectangle for top DC contact pad
			p1 = squid.origin + DVector(-rec_width / 2, squid_pads_d / 2) + \
				 DVector(0, -FABRICATION.OVERETCHING)
			rec_top = Rectangle(p1, rec_width, rec_height, inverse=True)
			rec_top.place(self.region_ph)

			# Rectangle for bottom DC contact pad
			p2 = squid.origin + DVector(-rec_width / 2, -squid_pads_d / 2) + \
				 DVector(0, FABRICATION.OVERETCHING)
			rec_bot = Rectangle(p2, rec_width, -rec_height, inverse=True)
			rec_bot.place(self.region_ph)
Ejemplo n.º 8
0
	def draw_test_structures(self):
		new_pars_squid = AsymSquidParams(
			pad_r=5e3, pads_distance=30e3,
			p_ext_width=10e3, p_ext_r=200,
			sq_len=15e3, sq_area=200e6,
			j_width_1=94, j_width_2=347,
			intermediate_width=500, b_ext=1e3, j_length=94, n=20,
			bridge=180, j_length_2=250
		)

		struct_centers = [DPoint(1e6, 4e6), DPoint(8.7e6, 5.7e6), DPoint(6.5e6, 2.7e6)]
		for struct_center in struct_centers:
			## JJ test structures ##
			# test structure with big critical current
			test_struct1 = TestStructurePads(struct_center)
			test_struct1.place(self.region_ph)
			text_reg = pya.TextGenerator.default_generator().text("48.32 nA", 0.001, 50, False, 0, 0)
			text_bl = test_struct1.empty_rectangle.origin + DPoint(
				test_struct1.gnd_gap, -4 * test_struct1.gnd_gap
			)
			text_reg.transform(ICplxTrans(1.0, 0, False, text_bl.x, text_bl.y))
			self.region_ph -= text_reg
			test_jj = AsymSquid(test_struct1.center, new_pars_squid, side=1)
			self.test_squids.append(test_jj)
			test_jj.place(self.region_el)

			# test structure with low critical current
			test_struct2 = TestStructurePads(struct_center + DPoint(0.3e6, 0))
			test_struct2.place(self.region_ph)
			text_reg = pya.TextGenerator.default_generator().text("9.66 nA", 0.001, 50, False, 0, 0)
			text_bl = test_struct2.empty_rectangle.origin + DPoint(
				test_struct2.gnd_gap, -4 * test_struct2.gnd_gap
			)
			text_reg.transform(ICplxTrans(1.0, 0, False, text_bl.x, text_bl.y))
			self.region_ph -= text_reg
			test_jj = AsymSquid(test_struct2.center, new_pars_squid, side=-1)
			self.test_squids.append(test_jj)
			test_jj.place(self.region_el)

			# test structure for bridge DC contact
			test_struct3 = TestStructurePads(struct_center + DPoint(0.6e6, 0))
			test_struct3.place(self.region_ph)
			text_reg = pya.TextGenerator.default_generator().text("DC", 0.001, 50, False, 0, 0)
			text_bl = test_struct3.empty_rectangle.origin + DPoint(
				test_struct3.gnd_gap, -4 * test_struct3.gnd_gap
			)
			text_reg.transform(ICplxTrans(1.0, 0, False, test_struct3.center.x, text_bl.y))
			self.region_ph -= text_reg

			test_bridges = []
			for i in range(3):
				bridge = Bridge1(test_struct3.center + DPoint(50e3 * (i - 1), 0),
								 gnd_touch_dx=20e3)
				test_bridges.append(bridge)
				bridge.place(self.region_bridges1, region_name="bridges_1")
				bridge.place(self.region_bridges2, region_name="bridges_2")

		# bandages test structures
		test_dc_el2_centers = [
			DPoint(2.5e6, 2.4e6),
			DPoint(4.2e6, 1.6e6),
			DPoint(9.0e6, 3.8e6)
		]
		for struct_center in test_dc_el2_centers:
			test_struct1 = TestStructurePads(struct_center)
			test_struct1.place(self.region_ph)
			text_reg = pya.TextGenerator.default_generator().text("Bandage", 0.001, 40, False, 0, 0)
			text_bl = test_struct1.empty_rectangle.origin + DPoint(
				test_struct1.gnd_gap, -4 * test_struct1.gnd_gap
			)
			text_reg.transform(ICplxTrans(1.0, 0, False, text_bl.x, text_bl.y))
			self.region_ph -= text_reg

			rec_width = 10e3
			rec_height = test_struct1.rectangles_gap + 2 * FABRICATION.OVERETCHING + 2 * rec_width
			p1 = struct_center - DVector(rec_width / 2, rec_height / 2)
			dc_rec = Rectangle(p1, rec_width, rec_height)
			dc_rec.place(self.region_el2)
Ejemplo n.º 9
0
    def draw_test_structures(self):
        struct_centers = [
            DPoint(1e6, 4e6),
            DPoint(8.7e6, 5.7e6),
            DPoint(6.5e6, 2.7e6)
        ]
        for struct_center in struct_centers:
            ## JJ test structures ##
            # test structure with big critical current
            test_struct1 = TestStructurePads(struct_center)
            test_struct1.place(self.region_ph)
            text_reg = pya.TextGenerator.default_generator().text(
                "48.32 nA", 0.001, 50, False, 0, 0)
            text_bl = test_struct1.empty_rectangle.origin + DPoint(
                test_struct1.gnd_gap, -4 * test_struct1.gnd_gap)
            text_reg.transform(ICplxTrans(1.0, 0, False, text_bl.x, text_bl.y))
            self.region_ph -= text_reg
            test_jj = AsymSquidDCFlux(test_struct1.center,
                                      SQUID_PARAMETERS,
                                      side=1)
            self.test_squids.append(test_jj)
            test_jj.place(self.region_el)

            # test structure with low critical current
            test_struct2 = TestStructurePads(struct_center + DPoint(0.3e6, 0))
            test_struct2.place(self.region_ph)
            text_reg = pya.TextGenerator.default_generator().text(
                "9.66 nA", 0.001, 50, False, 0, 0)
            text_bl = test_struct2.empty_rectangle.origin + DPoint(
                test_struct2.gnd_gap, -4 * test_struct2.gnd_gap)
            text_reg.transform(ICplxTrans(1.0, 0, False, text_bl.x, text_bl.y))
            self.region_ph -= text_reg
            test_jj = AsymSquidDCFlux(test_struct2.center,
                                      SQUID_PARAMETERS,
                                      side=-1)
            self.test_squids.append(test_jj)
            test_jj.place(self.region_el)

            # test structure for bridge DC contact
            test_struct3 = TestStructurePads(struct_center + DPoint(0.6e6, 0))
            test_struct3.place(self.region_ph)
            text_reg = pya.TextGenerator.default_generator().text(
                "DC", 0.001, 50, False, 0, 0)
            text_bl = test_struct3.empty_rectangle.origin + DPoint(
                test_struct3.gnd_gap, -4 * test_struct3.gnd_gap)
            text_reg.transform(
                ICplxTrans(1.0, 0, False, test_struct3.center.x, text_bl.y))
            self.region_ph -= text_reg

            test_bridges = []
            for i in range(3):
                bridge = Bridge1(test_struct3.center +
                                 DPoint(50e3 * (i - 1), 0),
                                 gnd_touch_dx=20e3)
                test_bridges.append(bridge)
                bridge.place(self.region_bridges1, region_name="bridges_1")
                bridge.place(self.region_bridges2, region_name="bridges_2")

        # bandages test structures
        test_dc_el2_centers = [
            DPoint(2.5e6, 2.4e6),
            DPoint(4.2e6, 1.6e6),
            DPoint(9.0e6, 3.8e6)
        ]
        for struct_center in test_dc_el2_centers:
            test_struct1 = TestStructurePads(struct_center)
            test_struct1.place(self.region_ph)
            text_reg = pya.TextGenerator.default_generator().text(
                "Bandage", 0.001, 40, False, 0, 0)
            text_bl = test_struct1.empty_rectangle.origin + DPoint(
                test_struct1.gnd_gap, -4 * test_struct1.gnd_gap)
            text_reg.transform(ICplxTrans(1.0, 0, False, text_bl.x, text_bl.y))
            self.region_ph -= text_reg

            rec_width = 10e3
            rec_height = test_struct1.rectangles_gap + 2 * rec_width
            p1 = struct_center - DVector(rec_width / 2, rec_height / 2)
            dc_rec = Rectangle(p1, rec_width, rec_height)
            dc_rec.place(self.region_el2)
Ejemplo n.º 10
0
if __name__ == "__main__":
    resolution_dx = 4e3
    resolution_dy = 4e3

    for k in list(range(5))[1:2]:
        ### DRAWING SECTION START ###
        design = Design5Q("testScript")
        design.draw(q_idx=k)

        worm = design.resonators[k]
        xmonCross = design.xmons[k]
        worm_start = list(worm.primitives.values())[0].start

        # draw open end at the resonators start
        p1 = worm_start - DVector(design.Z_res.b / 2, 0)
        rec = Rectangle(p1, design.Z_res.b, design.Z_res.b / 2, inverse=True)
        rec.place(design.region_ph)

        if worm_start.x < xmonCross.center.x:
            dr = (worm_start - xmonCross.cpw_r.end)
        else:
            dr = (worm_start - xmonCross.cpw_l.end)
        dr.x = abs(dr.x)
        dr.y = abs(dr.y)

        center = (worm_start + xmonCross.center) / 2
        box_side_x = 8 * xmonCross.sideX_length
        box_side_y = 8 * xmonCross.sideY_length
        dv = DVector(box_side_x / 2, box_side_y / 2)

        crop_box = pya.Box().from_dbox(
Ejemplo n.º 11
0
    def init_regions(self):
        origin = DPoint(0, 0)
        w = self.out_a / 2 - self.in_a / 2

        rec1 = Rectangle(origin, w, w)
        p2 = origin + DPoint(self.in_a + w, 0)
        rec2 = Rectangle(p2, w, w)
        p3 = origin + DPoint(self.in_a + w, self.in_a + w)
        rec3 = Rectangle(p3, w, w)
        p4 = origin + DPoint(0, self.in_a + w)
        rec4 = Rectangle(p4, w, w)

        tmp_reg = Region()

        rec1.place(tmp_reg)
        rec2.place(tmp_reg)
        rec3.place(tmp_reg)
        rec4.place(tmp_reg)

        rec = Rectangle(origin, self.out_a, self.out_a)
        rec.place(self.metal_region)

        self.empty_region = tmp_reg
        self.connections = [self.center]