示例#1
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)
示例#2
0
    ### DRAWING SECTION START ###
    # drawing chip
    cell.shapes(layer_photo2_bridges).insert(CHIP.box)
    cell.shapes(layer_photo).insert(CHIP.box)

    origin = DPoint(CHIP.dx / 2, CHIP.dy / 2)
    bridge = Bridge1(origin)
    bridge.place(cell, layer_photo1_bridges, "bridges_1")
    bridge.place(cell, layer_photo2_bridges, "bridges_2")

    p1 = DPoint(1 / 4 * CHIP.dx, CHIP.dy / 5)
    p2 = DPoint(3 / 4 * CHIP.dx, CHIP.dy / 4)
    width = 20e3
    gap = 10e3
    cpw = CPW(width, gap, p1, p2)
    cpw.place(cell, layer_photo)
    bridges_step = 50e3
    Bridge1.bridgify_CPW(cpw,
                         bridges_step,
                         cell=cell,
                         bridge_layer1=layer_photo1_bridges,
                         bridge_layer2=layer_photo2_bridges)
    z2 = CPWParameters(width, gap)
    cpw2 = CPW_RL_Path(DPoint(400e3, 400e3), "LRLRL", z2, 60e3, 100e3,
                       [pi / 4, pi / 3])
    cpw2.place(cell, layer_photo)
    Bridge1.bridgify_CPW(cpw2,
                         bridges_step,
                         cell=cell,
                         bridge_layer1=layer_photo1_bridges,
                         bridge_layer2=layer_photo2_bridges)
示例#3
0
        xmonCross = XmonCross(xmon_center, cross_width, cross_len, cross_gnd_gap)

        # calculate simulation box dimensions
        chip_box = pya.Box(DPoint(0, 0), DPoint(CHIP.dx, CHIP.dy))

        # placing all objects in proper order and translating them to origin
        cell.shapes(layer_photo).insert(chip_box)

        # translating all objects so that chip.p1 at coordinate origin
        xmonCross.place(cell, layer_photo)
        worm.place(cell, layer_photo)

        xmonCross_corrected = XmonCross(xmon_center, cross_width, cross_len, xmon_fork_gnd_gap)
        xmonCross_corrected.place(cell, layer_photo)

        Z0.place(cell, layer_photo)

        # delete Xmon cross
        shapes = cell.shapes(layer_photo)
        for shape in shapes.each_overlapping(pya.Box(xmon_center, xmon_center)):
            # if shape is polygon and contains xmon_center inside
            # then delete this polygon
            if shape.is_polygon and shape.polygon.inside(xmon_center):
                shape.delete()

        ## DRAWING SECTION END ##
        lv.zoom_fit()

        ### MATLAB COMMANDER SECTION START ###
        ml_terminal = SonnetLab()
        print("starting connection...")
    def draw_el_dc_contacts(self):
        test_samples_el2: List[Region] = []
        test_samples_ph_cut: List[Region] = []
        for squid, xmon, fl_line in zip(self.squids, self.xmons,
                                        self.cpw_fl_lines):
            # dc contact pad has to be completely
            # inside union of both  e-beam and photo deposed
            # metal regions.
            # `self.dc_cont_clearance` represents minimum distance
            # from dc contact pad`s perimeter to the perimeter of the
            # e-beam and photo-deposed metal perimeter.
            top_rect1 = CPW(start=squid.pad_top.center,
                            end=squid.ph_el_conn_pad.end +
                            DPoint(0, self.dc_cont_clearance),
                            width=squid.ph_el_conn_pad.width -
                            2 * self.dc_cont_clearance,
                            gap=0)

            if xmon == self.xmons[0]:
                end = DPoint(squid.origin.x,
                             xmon.center.y - xmon.cpw_l.width / 2)
            elif xmon == self.xmons[-1]:
                end = DPoint(squid.origin.x,
                             xmon.center.y - xmon.cpw_r.width / 2)
            else:
                end = xmon.cpw_b.end
            end += DPoint(0, self.dc_cont_clearance)

            top_rect2 = CPW(start=squid.ph_el_conn_pad.start +
                            DPoint(0, squid.pad_top.r + self.dc_cont_ph_ext),
                            end=end,
                            width=2 * (squid.pad_top.r + self.dc_cont_ph_ext),
                            gap=0)

            left_bottom = list(
                squid.bot_dc_flux_line_left.primitives.values())[0]
            bot_left_shape1 = CPW(
                start=fl_line.end + DPoint(0, -self.dc_cont_clearance),
                end=left_bottom.start,
                width=left_bottom.width - 2 * self.dc_cont_clearance,
                gap=0)

            bot_left_shape2 = CPW(
                start=fl_line.end + DPoint(0, -self.dc_cont_clearance),
                end=left_bottom.start + DPoint(0, -self.dc_cont_ph_ext),
                width=left_bottom.width + 2 * self.dc_cont_ph_ext,
                gap=0)

            right_bottom = list(
                squid.bot_dc_flux_line_right.primitives.values())[0]
            bot_right_shape1 = CPW(
                start=DPoint(right_bottom.start.x, fl_line.end.y) +
                DPoint(0, self.dc_cont_clearance),
                end=right_bottom.start + DPoint(0, -self.dc_cont_ph_ext),
                width=right_bottom.width - 2 * self.dc_cont_clearance,
                gap=0)

            bot_right_shape2 = CPW(
                start=DPoint(right_bottom.start.x, fl_line.end.y) +
                DPoint(0, -self.dc_cont_clearance),
                end=right_bottom.start + DPoint(0, -self.dc_cont_ph_ext),
                width=right_bottom.width + 2 * self.dc_cont_ph_ext,
                gap=0)

            self.el_dc_contacts.append([
                top_rect1, top_rect2, bot_left_shape1, bot_left_shape2,
                bot_right_shape1, bot_right_shape2
            ])

            test_sample_reg_el2 = Region()
            for contact in self.el_dc_contacts[-1]:
                contact.place(self.region_el2)
                contact.place(test_sample_reg_el2)
            test_samples_el2.append(test_sample_reg_el2)

            # DC contacts has to have intersection with empty
            # layer in photo litography. This is needed in order
            # 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.

            test_ph_cut = Region()
            # Rectangle to cut for top DC contact pad
            rec_top = CPW(start=squid.ph_el_conn_pad.start +
                          DPoint(0, -self.dc_cont_cut_clearance),
                          end=squid.ph_el_conn_pad.end,
                          width=0,
                          gap=self.dc_cont_cut_width / 2)
            rec_top.place(self.region_ph)
            test_ph_cut |= rec_top.empty_region

            # Rectangle for bottom left DC contact pad
            left_bot = CPW(
                start=fl_line.end + DPoint(0, self.cross_gnd_gap_x / 6),
                end=left_bottom.start + DPoint(0, self.dc_cont_cut_clearance),
                width=0,
                gap=self.dc_cont_cut_width / 2)
            left_bot.place(self.region_ph)
            test_ph_cut |= left_bot.empty_region

            # Rectangle for bottom right DC contact pad
            right_bot = CPW(start=DPoint(right_bottom.start.x, fl_line.end.y) +
                            DPoint(0, self.cross_gnd_gap_x),
                            end=right_bottom.start +
                            DPoint(0, self.dc_cont_cut_clearance),
                            width=0,
                            gap=self.dc_cont_cut_width / 2)
            right_bot.place(self.region_ph)
            test_ph_cut |= right_bot.empty_region

            test_samples_ph_cut.append(test_ph_cut)

            self.region_el2.merge()

        for squid in self.test_squids:
            trans = DCplxTrans(1, 0, False,
                               -self.squids[0].origin + squid.origin)
            test_reg_el2 = test_samples_el2[0].dup().transformed(trans)
            self.region_el2 |= test_reg_el2

            cut_reg_ph = test_samples_ph_cut[0].dup().transformed(trans)
            self.region_ph -= cut_reg_ph
示例#5
0
        # placing all objects in proper order and translating them to origin
        photo_reg.insert(chip_box)

        # translating all objects so that chip.p1 at coordinate origin
        xmonCross.place(photo_reg)
        worm.place(photo_reg)
        for block in blocks_list:
            block.place(photo_reg)

        # correction needed for the Xmon to have proper gaps with resonator and ground
        xmonCross_corrected = XmonCross(xmon_center, cross_width, cross_len,
                                        xmon_fork_gnd_gap)
        xmonCross_corrected.place(photo_reg)

        Z0.place(photo_reg)

        cell.shapes(layer_photo).insert(photo_reg)

        # delete Xmon cross
        shapes = cell.shapes(layer_photo)
        for shape in shapes.each_overlapping(pya.Box(xmon_center,
                                                     xmon_center)):
            # if shape is polygon and contains xmon_center inside
            # then delete this polygon
            if shape.is_polygon and shape.polygon.inside(xmon_center):
                shape.delete()

        lv.zoom_fit()
        ## DRAWING SECTION END ##
        chip_p2 = DPoint(bbox.center()) + DPoint(0.5 * CHIP.dx, 0.5 * CHIP.dy)
        chip_box = pya.Box(DPoint(0, 0), DPoint(CHIP.dx, CHIP.dy))

        # forming resonator's tail upper side open-circuited for simulation
        p1 = worm.cop_tail.start
        p2 = p1 + DPoint(0, 20e3)
        empty_cpw_tail_start = CPW(0, Z_res.b / 2, p1, p2)

        # placing all objects in proper order and translating them to origin
        cell.shapes(layer_photo).insert(chip_box)

        translation_trans = DCplxTrans(-DVector(chip_p1))
        worm.make_trans(translation_trans)
        worm.place(cell, layer_photo)

        empty_cpw_tail_start.place(cell, layer_photo)
        empty_cpw_tail_start.make_trans(translation_trans)
        empty_cpw_tail_start.place(cell, layer_photo)

        xmonCross.make_trans(translation_trans)
        xmonCross.place(cell, layer_photo)

        ## DRAWING SECTION END ##
        lv.zoom_fit()

        ### MATLAB COMMANDER SECTION START ###
        ml_terminal = SonnetLab()
        print("starting connection...")
        from sonnetSim.cMD import CMD

        ml_terminal._send(CMD.SAY_HELLO)