Skip to content

Commit

Permalink
corrected bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
audrey01mit committed May 22, 2024
1 parent ea55452 commit 8cc8831
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 145 deletions.
6 changes: 2 additions & 4 deletions src/qnngds/cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/qnngds/devices/nanowire.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/qnngds/devices/ntron.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import phidl.geometry as pg
from typing import Tuple, Optional
import qnngds._default_param as dflt


def smooth(
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
7 changes: 3 additions & 4 deletions src/qnngds/devices/resistor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import phidl.geometry as pg
from typing import Tuple, Optional
import qnngds._default_param as dflt


def meander(
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
10 changes: 3 additions & 7 deletions src/qnngds/devices/snspd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import phidl.geometry as pg
from typing import Tuple, Optional, Union
import qnngds._default_param as dflt


def basic(
Expand All @@ -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.
Expand Down Expand Up @@ -60,17 +59,14 @@ def basic(
return SNSPD


import qnngds._default_param as dflt


def basic(
wire_width: float = 0.2,
wire_pitch: float = 0.6,
size: Tuple[Union[int, float], Union[int, float]] = (6, 10),
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.
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 1 addition & 4 deletions src/qnngds/geometries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions src/qnngds/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
118 changes: 0 additions & 118 deletions tests/getting_started.py

This file was deleted.

0 comments on commit 8cc8831

Please sign in to comment.