qiskit_metal.qlibrary.QNLMetal.alignmentmarker

AlignmentMarker.

_________________________
|                         |
|                         |
|                         | 
|                         |
|            *            |
|                         |
|                         |  
|                         |
|                         |
 ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
 1# This code was written by Deval Deliwala.
 2# 
 3# This code is to be used by QNL. 
 4# 
 5# Any modifications or derivative works of this code must retain this 
 6# notice, and modified files need to carry a notice indicating 
 7# that they have been altered from the originals. 
 8
 9""" AlignmentMarker. 
10
11.. code-block:: 
12
13    _________________________
14   |                         |
15   |                         |
16   |                         | 
17   |                         |
18   |            *            |
19   |                         |
20   |                         |  
21   |                         |
22   |                         |
23    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
24
25"""
26
27import numpy as np 
28from qiskit_metal import draw, Dict 
29from qiskit_metal.qlibrary.core import QComponent 
30from qiskit_metal.toolbox_python.utility_functions import rotate_point
31
32class AlignmentMarker(QComponent): 
33    """ 
34    Inherits `QComponent` class. 
35
36    Description: 
37        A square alignment marker for the Raith. 
38
39    Options: 
40        * size    : The side length of the alignment marker 
41        * pos_x/_y: position of the bandage on chip
42        * orientation : 0-> is parallel to x-axis, with orientation (in degrees) counterclockwise 
43        * layer   : the layer number for the bandage
44
45    """ 
46
47    # Default drawing options 
48    default_options = Dict(
49        size='200um',
50        pos_x='0um', 
51        pos_y='0um', 
52        orientation='0', 
53        layer='1', 
54    )
55
56    # Component metadata
57    # Name prefix for component, if user doesn't provide name 
58    component_metadata = Dict( 
59        short_name='alignment_marker', 
60        _qgeometry_table_poly='True', 
61    )
62
63    def make(self):
64        """ Converts self.options into QGeometry. """ 
65        p = self.parse_options() 
66
67        marker = draw.rectangle(p.size, p.size) 
68        marker = draw.rotate(marker, p.orientation)
69        marker = draw.translate(marker, p.pos_x, p.pos_y) 
70
71        self.add_qgeometry('poly', {'AlignmentMarker': marker}, layer=p.layer)
72
73        # Node doesn't change under rotation 
74        # so just set the origin node as pos_x/_y location 
75        nodes = Dict() 
76        nodes.origin = np.array((p.pos_x, p.pos_y)) 
77
78        self.nodes = nodes 
79        return 
80
81    def node(self, key): 
82        return self.nodes.get(key, None) 
class AlignmentMarker(qiskit_metal.qlibrary.core.base.QComponent):
33class AlignmentMarker(QComponent): 
34    """ 
35    Inherits `QComponent` class. 
36
37    Description: 
38        A square alignment marker for the Raith. 
39
40    Options: 
41        * size    : The side length of the alignment marker 
42        * pos_x/_y: position of the bandage on chip
43        * orientation : 0-> is parallel to x-axis, with orientation (in degrees) counterclockwise 
44        * layer   : the layer number for the bandage
45
46    """ 
47
48    # Default drawing options 
49    default_options = Dict(
50        size='200um',
51        pos_x='0um', 
52        pos_y='0um', 
53        orientation='0', 
54        layer='1', 
55    )
56
57    # Component metadata
58    # Name prefix for component, if user doesn't provide name 
59    component_metadata = Dict( 
60        short_name='alignment_marker', 
61        _qgeometry_table_poly='True', 
62    )
63
64    def make(self):
65        """ Converts self.options into QGeometry. """ 
66        p = self.parse_options() 
67
68        marker = draw.rectangle(p.size, p.size) 
69        marker = draw.rotate(marker, p.orientation)
70        marker = draw.translate(marker, p.pos_x, p.pos_y) 
71
72        self.add_qgeometry('poly', {'AlignmentMarker': marker}, layer=p.layer)
73
74        # Node doesn't change under rotation 
75        # so just set the origin node as pos_x/_y location 
76        nodes = Dict() 
77        nodes.origin = np.array((p.pos_x, p.pos_y)) 
78
79        self.nodes = nodes 
80        return 
81
82    def node(self, key): 
83        return self.nodes.get(key, None) 

Inherits QComponent class.

Description: A square alignment marker for the Raith.

Options: * size : The side length of the alignment marker * pos_x/_y: position of the bandage on chip * orientation : 0-> is parallel to x-axis, with orientation (in degrees) counterclockwise * layer : the layer number for the bandage

default_options = {'size': '200um', 'pos_x': '0um', 'pos_y': '0um', 'orientation': '0', 'layer': '1'}

Default drawing options

component_metadata = {'short_name': 'alignment_marker', '_qgeometry_table_poly': 'True'}

Component metadata

def make(self):
64    def make(self):
65        """ Converts self.options into QGeometry. """ 
66        p = self.parse_options() 
67
68        marker = draw.rectangle(p.size, p.size) 
69        marker = draw.rotate(marker, p.orientation)
70        marker = draw.translate(marker, p.pos_x, p.pos_y) 
71
72        self.add_qgeometry('poly', {'AlignmentMarker': marker}, layer=p.layer)
73
74        # Node doesn't change under rotation 
75        # so just set the origin node as pos_x/_y location 
76        nodes = Dict() 
77        nodes.origin = np.array((p.pos_x, p.pos_y)) 
78
79        self.nodes = nodes 
80        return 

Converts self.options into QGeometry.

def node(self, key):
82    def node(self, key): 
83        return self.nodes.get(key, None)