def init_primitives(self): origin = DPoint(0, 0) self.primitives['empty_rect'] = Rectangle( origin - DPoint(self.width / 2 + self.outergap, self.height + self.innergap / 2 + self.outergap), self.width + 2 * self.outergap, 2 * self.height + 2 * self.outergap + self.innergap, inverse=True) self.primitives['top_rect'] = Rectangle( origin + DPoint(-self.width / 2, self.innergap / 2), self.width, self.height) self.primitives['bottom_rect'] = Rectangle( origin - DPoint(self.width / 2, self.height + self.innergap / 2), self.width, self.height) self.squid = AsymSquid(origin, self.squid_params) self.primitives['qubit'] = self.squid
def draw_chip(self): origin = DPoint(0, 0) chip = Rectangle(origin, self.chip_x, self.chip_y) chip.place(self.cell, self.layer_ph)