diff --git a/src/qnngds/cells.py b/src/qnngds/cells.py index cb19203..5cc722c 100644 --- a/src/qnngds/cells.py +++ b/src/qnngds/cells.py @@ -209,12 +209,10 @@ def etch_test( ## Create the die n = math.ceil( - (TEST.xsize + 2 * die_parameters.die_cell_border) - / die_parameters.unit_die_size[0] + (TEST.xsize + 2 * die_parameters.die_border_w) / die_parameters.unit_die_size[0] ) m = math.ceil( - (TEST.ysize + 2 * die_parameters.die_cell_border) - / die_parameters.unit_die_size[1] + (TEST.ysize + 2 * die_parameters.die_border_w) / die_parameters.unit_die_size[1] ) BORDER = utility.die_cell( die_parameters=die_parameters, diff --git a/src/qnngds/devices/nanowire.py b/src/qnngds/devices/nanowire.py index bd88eee..cb2d4c9 100644 --- a/src/qnngds/devices/nanowire.py +++ b/src/qnngds/devices/nanowire.py @@ -4,13 +4,12 @@ import phidl.geometry as pg from typing import Tuple, Optional -import qnngds._default_param as dflt def spot( channel_w: float = 0.1, source_w: float = 0.3, - layer: int = dflt.layers["device"], + layer: int = 1, num_pts: int = 100, ) -> Device: """Creates a single wire, made of two optimal steps from channel_w to diff --git a/src/qnngds/devices/ntron.py b/src/qnngds/devices/ntron.py index 1904bcd..6b3da09 100644 --- a/src/qnngds/devices/ntron.py +++ b/src/qnngds/devices/ntron.py @@ -4,7 +4,6 @@ import phidl.geometry as pg from typing import Tuple, Optional -import qnngds._default_param as dflt def smooth( @@ -14,7 +13,7 @@ def smooth( source_w: float = 0.3, drain_w: float = 0.3, choke_shift: float = -0.3, - layer: int = dflt.layers["device"], + layer: int = 1, ) -> Device: """Creates a ntron device. @@ -68,7 +67,7 @@ def sharp( channel_w: float = 0.1, source_w: float = 0.3, drain_w: float = 0.3, - layer: int = dflt.layers["device"], + layer: int = 1, ) -> Device: """Creates a sharp ntron device. diff --git a/src/qnngds/devices/resistor.py b/src/qnngds/devices/resistor.py index 59d5cd2..599d606 100644 --- a/src/qnngds/devices/resistor.py +++ b/src/qnngds/devices/resistor.py @@ -4,7 +4,6 @@ import phidl.geometry as pg from typing import Tuple, Optional -import qnngds._default_param as dflt def meander( @@ -13,7 +12,7 @@ def meander( squares: float = 100, max_length: float = 20, aspect_ratio: float = 1, - layer: int = dflt.layers["device"], + layer: int = 1, ) -> Device: """Create resistor meander with specified number of squares. @@ -120,8 +119,8 @@ def meander_sc_contacts( contact_height: float = 2, outline_sc: float = 1, width_routing: float = 1, - layer_res: int = dflt.layers["pad"], - layer_sc: int = dflt.layers["device"], + layer_res: int = 3, + layer_sc: int = 1, ) -> Device: """Create resistor meander with superconducting contacts. diff --git a/src/qnngds/devices/snspd.py b/src/qnngds/devices/snspd.py index 2a10bce..8398c82 100644 --- a/src/qnngds/devices/snspd.py +++ b/src/qnngds/devices/snspd.py @@ -4,7 +4,6 @@ import phidl.geometry as pg from typing import Tuple, Optional, Union -import qnngds._default_param as dflt def basic( @@ -14,7 +13,7 @@ def basic( num_squares: Optional[int] = None, turn_ratio: Union[int, float] = 4, terminals_same_side: bool = False, - layer: int = dflt.layers["device"], + layer: int = 1, ) -> Device: """Creates an optimally-rounded SNSPD. @@ -60,9 +59,6 @@ def basic( return SNSPD -import qnngds._default_param as dflt - - def basic( wire_width: float = 0.2, wire_pitch: float = 0.6, @@ -70,7 +66,7 @@ def basic( num_squares: Optional[int] = None, turn_ratio: Union[int, float] = 4, terminals_same_side: bool = False, - layer: int = dflt.layers["device"], + layer: int = 1, ) -> Device: """Creates an optimally-rounded SNSPD. @@ -122,7 +118,7 @@ def vertical( size: Tuple[Union[int, float], Union[int, float]] = (6, 10), num_squares: Optional[int] = None, extend: Optional[float] = None, - layer: int = dflt.layers["device"], + layer: int = 1, ) -> Device: """Creates an optimally-rounded SNSPD, with terminals in its center instead of the side. diff --git a/src/qnngds/geometries.py b/src/qnngds/geometries.py index fc46002..b198b2d 100644 --- a/src/qnngds/geometries.py +++ b/src/qnngds/geometries.py @@ -3,12 +3,9 @@ from phidl import Device import numpy as np -import qnngds._default_param as dflt -def hyper_taper( - length=10, wide_section=50, narrow_section=5, layer=dflt.layers["device"] -): +def hyper_taper(length=10, wide_section=50, narrow_section=5, layer=1): """Hyperbolic taper (solid). Designed by colang. Args: diff --git a/src/qnngds/tests.py b/src/qnngds/tests.py index cd9c66d..859aaeb 100644 --- a/src/qnngds/tests.py +++ b/src/qnngds/tests.py @@ -4,7 +4,6 @@ from phidl import Device import phidl.geometry as pg from typing import List, Union -import qnngds._default_param as dflt def alignment_mark(layers: List[int] = [1, 2, 3, 4]) -> Device: @@ -124,7 +123,7 @@ def create_comb(pitch1=500, pitch2=100, layer1=1, layer2=2): def resolution_test( resolutions: List[float] = [0.8, 1, 1.2, 1.4, 1.6, 1.8, 2.0], inverted: Union[bool, float] = False, - layer: int = dflt.layers["device"], + layer: int = 1, ) -> Device: """Creates test structures for determining a process resolution. @@ -238,7 +237,7 @@ def create_waffle(res=1): return RES_TEST -def vdp(l: float = 400, w: float = 40, layer: int = dflt.layers["device"]) -> Device: +def vdp(l: float = 400, w: float = 40, layer: int = 1) -> Device: """Creates a Van der Pauw (VDP) device with specified dimensions. Args: diff --git a/tests/getting_started.py b/tests/getting_started.py deleted file mode 100644 index b1d9809..0000000 --- a/tests/getting_started.py +++ /dev/null @@ -1,118 +0,0 @@ -from phidl import quickplot as qp -from phidl import set_quickplot_options -import qnngds.design as qd - -set_quickplot_options(blocking=True) - - -chip_w = 5000 -chip_margin = 50 -N_dies = 5 - -pad_size = (150, 250) -outline_coarse = 10 -outline_fine = 0.5 -ebeam_overlap = 10 - -layers = {"annotation": 0, "mgb2_fine": 1, "mgb2_coarse": 2, "pad": 3} - -design = qd.Design( - name="demo_design", - chip_w=chip_w, - chip_margin=chip_margin, - N_dies=N_dies, - pad_size=pad_size, - device_outline=outline_fine, - die_outline=outline_coarse, - ebeam_overlap=ebeam_overlap, - annotation_layer=layers["annotation"], - device_layer=layers["mgb2_fine"], - die_layer=layers["mgb2_coarse"], - pad_layer=layers["pad"], -) - -CHIP = design.create_chip(create_devices_map_txt=False) - -## test devices - -ALIGN_CELL_LEFT = design.alignment_cell( - layers_to_align=[layers["mgb2_coarse"], layers["pad"]], text="LEFT" -) -design.place_on_chip(ALIGN_CELL_LEFT, (0, 2)) - -ALIGN_CELL_RIGHT = design.alignment_cell( - layers_to_align=[layers["mgb2_coarse"], layers["pad"]], text="RIGHT" -) -design.place_on_chip(ALIGN_CELL_RIGHT, (4, 2)) - -VDP_TEST_MGB2 = design.vdp_cell( - layers_to_probe=[layers["mgb2_coarse"]], - layers_to_outline=[layers["mgb2_coarse"]], - text="MGB2", -) -design.place_on_chip(VDP_TEST_MGB2, (0, 0)) - -VDP_TEST_PAD = design.vdp_cell( - layers_to_probe=[layers["mgb2_coarse"], layers["pad"]], - layers_to_outline=[layers["mgb2_coarse"]], - text="PAD & MGB2", -) -design.place_on_chip(VDP_TEST_PAD, (0, 1)) - -RES_TEST_MGB2_FINE = design.resolution_test_cell( - layer_to_resolve=layers["mgb2_fine"], text="MGB2 FINE" -) -design.place_on_chip(RES_TEST_MGB2_FINE, (2, 2)) - -RES_TEST_MGB2_COARSE = design.resolution_test_cell( - layer_to_resolve=layers["mgb2_coarse"], text="MGB2 COARSE" -) -design.place_on_chip(RES_TEST_MGB2_COARSE, (1, 2)) - -RES_TEST_PAD = design.resolution_test_cell( - layer_to_resolve=layers["pad"], - resolutions_to_test=[0.5, 0.75, 1, 1.25, 1.5, 1.75, 2.0], - text="PAD", -) -design.place_on_chip(RES_TEST_PAD, (3, 2)) - -ETCH_TEST = design.etch_test_cell(layers_to_etch=[[layers["pad"]]], text="PAD") -design.place_on_chip(ETCH_TEST, (3, 0)) - -## nanowire electronics - -# SNSPD-NTRON - -SNSPD_NTRON_01 = design.snspd_ntron_cell(w_choke=0.1) -design.place_on_chip(SNSPD_NTRON_01, (1, 0)) - -# NANOWIRES - -channels_w = [0.025, 0.1, 0.5, 1, 2] -channels_sources_w = [(x, 10 * x) for x in channels_w] -NANOWIRES = design.nanowires_cell( - channels_sources_w=channels_sources_w, text="src=10chn" -) -design.place_on_chip(NANOWIRES, (1, 1)) - -channels_sources_w = [(x, 4 * x) for x in channels_w] -NANOWIRES = design.nanowires_cell( - channels_sources_w=channels_sources_w, text="src=4chn" -) -design.place_on_chip(NANOWIRES, (3, 1)) - -# NTRONS - -remaining_cells = [] -chokes_w = [0.025, 0.05, 0.1, 0.25, 0.5] -channel_to_choke_ratios = [5, 10] -for ratio in channel_to_choke_ratios: - for choke_w in chokes_w: - channel_w = choke_w * ratio - NTRON = design.ntron_cell(choke_w, channel_w) - remaining_cells.append(NTRON) -design.place_remaining_devices(remaining_cells, write_remaining_devices_map_txt=False) - - -qp(CHIP) -# design.write_gds()