def draw_xmons_and_resonators(self):
		for resonator, fork_y_span, xmon_dy_Cg_coupling in \
				list(zip(
					self.resonators,
					self.fork_y_spans,
					self.xmon_dys_Cg_coupling
				)):
			xmon_center = (resonator.fork_x_cpw.start + resonator.fork_x_cpw.end) / 2 + \
						  DVector(0, -xmon_dy_Cg_coupling - resonator.fork_metal_width / 2)
			# changes start #
			xmon_center += DPoint(
				0,
				-(self.cross_len_y + self.cross_width_x / 2 + min(self.cross_gnd_gap_y,
																  self.xmon_fork_gnd_gap)) + FABRICATION.OVERETCHING
			)
			self.xmons.append(
				XmonCross(xmon_center, self.cross_len_x,
						  self.cross_width_x + 2 * FABRICATION.OVERETCHING,
						  self.cross_gnd_gap_x - 2 * FABRICATION.OVERETCHING,
						  sideY_length=self.cross_len_y,
						  sideY_width=self.cross_width_y + 2 * FABRICATION.OVERETCHING,
						  sideY_gnd_gap=self.cross_gnd_gap_y - 2 * FABRICATION.OVERETCHING)
			)
			self.xmons[-1].place(self.region_ph)
			resonator.place(self.region_ph)
			xmonCross_corrected = XmonCross(
				xmon_center,
				sideX_length=self.cross_len_x,
				sideX_width=self.cross_width_x + 2 * FABRICATION.OVERETCHING,
				sideX_gnd_gap=self.cross_gnd_gap_x - 2 * FABRICATION.OVERETCHING,
				sideY_length=self.cross_len_y,
				sideY_width=self.cross_width_y + 2 * FABRICATION.OVERETCHING,
				sideY_gnd_gap=min(self.cross_gnd_gap_y, self.xmon_fork_gnd_gap) - 2 * FABRICATION.OVERETCHING)
			xmonCross_corrected.place(self.region_ph)
Esempio n. 2
0
 def draw_xmons_and_resonators(self):
     for resonator, xmon_fork_penetration, xmon_dy_Cg_coupling in zip(
             self.resonators, self.xmon_fork_penetration_list,
             self.xmon_dys_Cg_coupling):
         xmon_center = (resonator.fork_y_cpw1.end + resonator.fork_y_cpw2.end) / 2 + \
              DVector(0, -xmon_dy_Cg_coupling)
         xmon_center += DPoint(
             0, -(self.cross_len + self.cross_width / 2) +
             xmon_fork_penetration)
         self.xmons.append(
             XmonCross(xmon_center,
                       self.cross_len_x,
                       self.cross_width_x,
                       self.cross_gnd_gap_x,
                       sideY_length=self.cross_len_y,
                       sideY_width=self.cross_width_y,
                       sideY_gnd_gap=self.cross_gnd_gap_y))
         self.xmons[-1].place(self.region_ph)
         resonator.place(self.region_ph)
         xmonCross_corrected = XmonCross(xmon_center,
                                         sideX_length=self.cross_len_x,
                                         sideX_width=self.cross_width_x,
                                         sideX_gnd_gap=self.cross_gnd_gap_x,
                                         sideY_length=self.cross_len_y,
                                         sideY_width=self.cross_width_y,
                                         sideY_gnd_gap=min(
                                             self.cross_gnd_gap_y,
                                             self.xmon_fork_gnd_gap))
         xmonCross_corrected.place(self.region_ph)
 def draw_xmons_and_resonators(self, q_idx):
     for i, (resonator, fork_y_span, xmon_dy_Cg_coupling) in \
             enumerate(
                 list(
                     zip(
                         self.resonators,
                         self.fork_y_spans,
                         self.xmon_dys_Cg_coupling
                     )
                 )
             ):
         xmon_center = \
             (
                 resonator.fork_x_cpw.start + resonator.fork_x_cpw.end
             ) / 2 + \
             DVector(
                 0,
                 -xmon_dy_Cg_coupling - resonator.fork_metal_width / 2
             )
         # changes start #
         xmon_center += DPoint(
             0, -(self.cross_len_y + self.cross_width_x / 2 +
                  self.cross_gnd_gap_y))
         self.xmons.append(
             XmonCross(xmon_center,
                       sideX_length=self.cross_len_x,
                       sideX_width=self.cross_width_x,
                       sideX_gnd_gap=self.cross_gnd_gap_x,
                       sideY_length=self.cross_len_y,
                       sideY_width=self.cross_width_y,
                       sideY_gnd_gap=self.cross_gnd_gap_y,
                       sideX_face_gnd_gap=self.cross_gnd_gap_x,
                       sideY_face_gnd_gap=self.cross_gnd_gap_y))
         if i == q_idx:
             self.xmons[-1].place(self.region_ph)
             resonator.place(self.region_ph)
         xmonCross_corrected = XmonCross(
             xmon_center,
             sideX_length=self.cross_len_x,
             sideX_width=self.cross_width_x,
             sideX_gnd_gap=self.cross_gnd_gap_x,
             sideY_length=self.cross_len_y,
             sideY_width=self.cross_width_y,
             sideY_gnd_gap=max(
                 0, self.fork_x_span - 2 * self.fork_metal_width -
                 self.cross_width_y -
                 max(self.cross_gnd_gap_y, self.fork_gnd_gap)) / 2)
         if i == q_idx:
             xmonCross_corrected.place(self.region_ph)
Esempio n. 4
0
    # 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
        CHIP.center = DPoint(CHIP.dx / 2, CHIP.dy / 2)

        chip_box = pya.Box(Point(0, 0), Point(CHIP.dx, CHIP.dy))
        cell.shapes(layer_photo).insert(chip_box)

        xmon_cross1 = XmonCross(CHIP.center, cross_width, cross_len,
                                cross_gnd_gap)
        xmon_cross1.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)
        ml_terminal.clear()
        simBox = SimulationBox(CHIP.dx, CHIP.dy, 600, 600)
        ml_terminal.set_boxProps(simBox)
        print("sending cell and layer")
Esempio n. 5
0
    pars = product(cross_lens_x, cross_widths_x, cross_gnd_gaps_x,
                   cross_lens_y, cross_widths_y, cross_gnd_gaps_y)
    for cross_len_x, cross_width_x, cross_gnd_gap_x, cross_len_y, cross_width_y, cross_gnd_gap_y in pars:
        xmon_dX = 2 * cross_len_x + cross_width_y + 2 * cross_gnd_gap_x
        xmon_dY = 2 * cross_len_y + cross_width_x + 2 * cross_gnd_gap_y
        CHIP.dx = 5 * xmon_dX
        CHIP.dy = 5 * xmon_dY
        CHIP.center = DPoint(CHIP.dx / 2, CHIP.dy / 2)

        chip_box = pya.Box(Point(0, 0), Point(CHIP.dx, CHIP.dy))
        cell.shapes(layer_photo).insert(chip_box)

        xmon_cross1 = XmonCross(CHIP.center,
                                sideX_length=cross_len_x,
                                sideX_width=cross_width_x,
                                sideX_gnd_gap=cross_gnd_gap_x,
                                sideY_length=cross_len_y,
                                sideY_width=cross_width_y,
                                sideY_gnd_gap=cross_gnd_gap_y)
        xmon_cross1.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)
        ml_terminal.clear()
Esempio n. 6
0
        # clear this cell and layer
        cell.clear()
        fork_y_span = xmon_fork_penetration + xmon_fork_gnd_gap
        worm_x = CHIP.dx / 2 - L_coupling / 2
        stab_end_gnd_gap = to_line - Z_res.width/2 - Z0.b/2  # exactly to create empty coridor to the waveguide
        # for stability (in case float will be rounded badly and this will result in 1 nm ground between resonator stab and waveguide
        stab_end_gnd_gap += Z0.gap/2
        worm = EMResonator_TL2Qbit_worm4_XmonFork(
            Z_res, DPoint(worm_x, y - to_line), L_coupling, L0, L1, r, L2, N,
            stab_width, stab_gnd_gap, stab_len, stab_end_gnd_gap,
            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)

        # 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)
Esempio n. 7
0
        lambda x: list(x[0]) + [x[1]],
        itertools.product(zip(L1_list, L2_list, estimated_res_freqs), to_line_list)
    )
    for L1, L2, estimated_freq, to_line in pars:
        # clear this cell and layer
        cell.clear()
        fork_y_span = xmon_fork_penetration + xmon_fork_gnd_gap
        worm_x = CHIP.dx / 2 - L_coupling / 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)

        # 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)
    cross_lens_y = 60e3
    cross_widths_y = 60e3
    cross_gnd_gaps_y = 20e3

    xmon_resEnd_distances = [1e3 * x for x in range(1, 2)]

    for xmon_resEnd_distance in xmon_resEnd_distances:
        # clear this cell and layer
        cell.clear()

        worm = EMResonator_TL2Qbit_worm2(Z_res, origin, L_coupling, L1, r, L2,
                                         N)
        xmon_center = worm.cop_tail.end
        xmon_center += DPoint(
            0, -(cross_len + cross_width / 2 + xmon_resEnd_distance))
        xmonCross = XmonCross(xmon_center, cross_width, cross_len,
                              cross_gnd_gap)
        # cutting everything out except for the tail that will be capcitavely coupled
        # to Xmon
        for key in list(worm.primitives.keys()):
            if key != "cop_tail":
                del worm.primitives[key]

        tmp_reg = Region()
        worm.place(tmp_reg)
        xmonCross.place(tmp_reg)
        bbox = tmp_reg.bbox()

        # calculate simulation box placement
        CHIP.dx = 3 * bbox.width()
        CHIP.dy = 3 * bbox.height()
        chip_p1 = DPoint(bbox.center()) + DPoint(-0.5 * CHIP.dx,
Esempio n. 9
0
    photo_reg = Region()  # optimal to place everything in one region

    for L1, L2, estimated_freq, to_line in list(pars)[:1]:
        # clear this cell and layer
        cell.clear()
        fork_y_span = xmon_fork_penetration + xmon_fork_gnd_gap
        worm_x = CHIP.dx / 2 - (L_coupling + 2*r)/2 + (cross_len + cross_gnd_gap)/2
        worm = EMResonator_TL2Qbit_worm3_1_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)

        # 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)
Esempio n. 10
0
                tail_segment_lengths=tail_segment_lengths,
                tail_turn_angles=tail_turn_angles,
                tail_trans_in=tail_trans_in,
                fork_x_span=fork_x_span,
                fork_y_span=fork_y_span,
                fork_metal_width=fork_metal_width,
                fork_gnd_gap=fork_gnd_gap)
            xmon_center_test = (worm_test.fork_y_cpw1.end +
                                worm_test.fork_y_cpw2.end) / 2 + DVector(
                                    0, -xmon_dy_Cg_coupling)
            xmon_center_test += DPoint(
                0, -(cross_len_y + cross_width_x / 2) + xmon_fork_penetration)
            xmonCross_test = XmonCross(xmon_center_test,
                                       sideX_length=cross_len_x,
                                       sideX_width=cross_width_x,
                                       sideX_gnd_gap=cross_gnd_gap_x,
                                       sideY_length=cross_len_y,
                                       sideY_width=cross_width_y,
                                       sideY_gnd_gap=cross_gnd_gap_y)
            tmp_reg = Region()
            worm_test.place(tmp_reg)
            xmonCross_test.place(tmp_reg)
            bbox = tmp_reg.bbox()
            import math

            # main drive line coplanar
            width = 20e3
            gap = 10e3
            z0_cpw_params = CPWParameters(width, gap)
            CHIP.dx = 1.2 * bbox.width() + 8 * Z_res.b
            CHIP.nX = int(CHIP.dx / 2.5e3)