# 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()
        # 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
        photo_reg.insert(chip_box)

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

        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()

        ## DRAWING SECTION END ##
        lv.zoom_fit()
Пример #3
0
        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)

        # translating all objects so that chip.p1 at coordinate origin
        translation_trans = DCplxTrans(-DVector(chip_p1))

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

        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_corrected = XmonCross(xmon_center, cross_width, cross_len,
                                        xmon_fork_gnd_gap)
        xmonCross_corrected.make_trans(translation_trans)
        xmonCross_corrected.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
Пример #4
0
    # setting layout view
    lv.select_cell(cell.cell_index(), 0)
    lv.add_missing_layers()

    ### 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)
    print(cpw.dr)
    bridges_step = 50e3
    Bridge1.bridgify_CPW(cpw,
                         bridges_step,
                         cell=cell,
                         bridge_layer1=layer_photo1_bridges,
                         bridge_layer2=layer_photo2_bridges)

    lv.zoom_fit()
    ### DRAWING SECTION END ###
Пример #5
0
                     (L_coupling_list[res_idx] - L_coupling_list[0]) + \
                     (L1_list[res_idx] - L1_list[0])/2

        worm = EMResonator_TL2Qbit_worm3_XmonFork(Z_res,
                                                  DPoint(worm_x, y - to_line),
                                                  L_coupling, L0, L1, r, L2, N,
                                                  fork_x_span, fork_y_span,
                                                  fork_metal_width,
                                                  fork_gnd_gap)

        xmon_center = (worm.fork_y_cpw1.end + worm.fork_y_cpw2.end) / 2
        xmon_center += DPoint(
            0, -(cross_len + cross_width / 2) + xmon_fork_penetration)
        xmonCross = XmonCross(xmon_center, cross_width, cross_len,
                              cross_gnd_gap)

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

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

    # place readout waveguide
    Z0.place(tmp_reg)

    # convert region to cell and display it
    cell.shapes(layer_photo).insert(tmp_reg)
    lv.zoom_fit()
    ## DRAWING SECTION END ##