Here are some generic Parametric cells.

You can customize them your fab or use them as an inspiration to build your own.

Parametric cells#

bend_circular#

kgeneric.cells.bend_circular(width: float, radius: float, layer: int | kfactory.kcell.LayerEnum, enclosure: kfactory.enclosure.LayerEnclosure | None = None, angle: float = 90, angle_step: float = 1) KCell[source]#

Circular radius bend [um].

Parameters:
  • width – Width of the core. [um]

  • radius – Radius of the backbone. [um]

  • layer – Layer index of the target layer.

  • enclosurekfactory.enclosure object to describe the claddings.

  • angle – Angle amount of the bend.

  • angle_step – Angle amount per backbone point of the bend.

bend_euler#

kgeneric.cells.bend_euler(width: float, radius: float, layer: int | kfactory.kcell.LayerEnum, enclosure: kfactory.enclosure.LayerEnclosure | None = None, angle: float = 90, resolution: float = 150) KCell[source]#

Create a euler bend.

Parameters:
  • width – Width of the core. [um]

  • radius – Radius off the backbone. [um]

  • layer – Layer index / LayerEnum of the core.

  • enclosure – Slab/exclude definition. [dbu]

  • angle – Angle of the bend.

  • resolution – Angle resolution for the backbone.

bend_s_euler#

kgeneric.cells.bend_s_euler(offset: float, width: float, radius: float, layer: kfactory.kcell.LayerEnum | int, enclosure: kfactory.enclosure.LayerEnclosure | None = None, resolution: float = 150) KCell[source]#

Create a euler s-bend.

Parameters:
  • offset – Offset between left/right. [um]

  • width – Width of the core. [um]

  • radius – Radius off the backbone. [um]

  • layer – Layer index / LayerEnum of the core.

  • enclosure – Slab/exclude definition. [dbu]

  • resolution – Angle resolution for the backbone.

coupler#

kgeneric.cells.coupler(gap: float = 0.2, length: float = 10.0, dy: float = 5.0, dx: float = 5.0, width: float = 0.5, layer: int | kfactory.kcell.LayerEnum = LAYER.WG, enclosure: LayerEnclosure = LayerEnclosure(layer_sections={}, main_layer=None, yaml_tag='!Enclosure', kcl=None)) KCell[source]#

Symmetric coupler.

Parameters:
  • gap – between straights in um.

  • length – of coupling region in um.

  • dy – port to port vertical spacing in um.

  • dx – length of bend in x direction in um.

  • layer – layer number or name.

  • enclosure – straight enclosure.

grating_coupler_elliptical#

kgeneric.cells.grating_coupler_elliptical(polarization: Union[Literal['te'], Literal['tm']] = 'te', taper_length: float = 16.6, taper_angle: float = 40.0, trenches_extra_angle: float = 10.0, lambda_c: float = 1.554, fiber_angle: float = 15.0, grating_line_width: float = 0.343, wg_width: float = 0.5, neff: float = 2.638, layer_taper: kgeneric.layers.LAYER | None = LAYER.WG, layer_trench: LAYER = LAYER.UNDERCUT, p_start: int = 26, n_periods: int = 30, taper_offset: int = 0, taper_extent_n_periods: Union[float, Literal['first'], Literal['last']] = 'last', period: int | None = None, x_fiber_launch: int | None = None, clad_index: float = 1.443) KCell[source]#

Returns elliptical grating coupler.

Parameters:
  • polarization – te or tm

  • taper_length – int = 16600,

  • taper_angle – in degrees.

  • trenches_extra_angle – in degrees.

  • lambda_c – wavelength.

  • fiber_angle – in degrees.

  • grating_line_width – int = 343,

  • wg_width – int = 500,

  • neff – float = 2.638, # tooth effective index

  • layer_taper – Optional[LAYER] = LAYER.WG,

  • layer_trench – LAYER = LAYER.UNDERCUT,

  • p_start – int = 26,

  • n_periods – int = 30,

  • taper_offset – int = 0,

  • taper_extent_n_periods – float | Literal[“first”] | Literal[“last”] = “last”,

  • period – Optional[int] = None,

  • x_fiber_launch – fiber launching position.

  • clad_index – cladding index.

mzi#

kgeneric.cells.mzi(delta_length: float = 10.0, length_y: float = 2.0, length_x: float | None = 0.1, bend: ~collections.abc.Callable[[...], ~kfactory.kcell.KCell] = <function bend_euler>, straight: ~collections.abc.Callable[[...], ~kfactory.kcell.KCell] = <function straight>, straight_y: collections.abc.Callable[[...], kfactory.kcell.KCell] | None = None, straight_x_top: collections.abc.Callable[[...], kfactory.kcell.KCell] | None = None, straight_x_bot: collections.abc.Callable[[...], kfactory.kcell.KCell] | None = None, splitter: ~collections.abc.Callable[[...], ~kfactory.kcell.KCell] = <function coupler>, combiner: collections.abc.Callable[[...], kfactory.kcell.KCell] | None = None, with_splitter: bool = True, port_e1_splitter: str = 'o3', port_e0_splitter: str = 'o4', port_e0_combiner: str = 'o1', width: float = 1.0, layer: int | kfactory.kcell.LayerEnum = 0, radius: float = 5.0, enclosure: kfactory.enclosure.LayerEnclosure | None = None, **kwargs: ~typing.Any) KCell[source]#

Mzi.

Parameters:
  • delta_length – bottom arm vertical extra length.

  • length_y – vertical length for both and top arms.

  • length_x – horizontal length. None uses to the straight_x_bot/top defaults.

  • bend – 90 degrees bend library.

  • straight – straight function.

  • straight_y – straight for length_y and delta_length.

  • straight_x_top – top straight for length_x.

  • straight_x_bot – bottom straight for length_x.

  • splitter – splitter function.

  • combiner – combiner function.

  • with_splitter – if False removes splitter.

  • port_e1_splitter – east top splitter port.

  • port_e0_splitter – east bot splitter port.

  • port_e0_combiner – east bot combiner port.

  • width – straight width.

  • layer – waveguide layer.

  • radius – bend radius.

  • enclosure – waveguide enclosure.

  • kwargs – combiner/splitter kwargs.

straight#

kgeneric.cells.straight(width: float, length: float, layer: int | kfactory.kcell.LayerEnum, enclosure: Optional[LayerEnclosure] = None) KCell[source]#

Straight straight in um.

Visualization:

┌─────────────────────────────┐
│        Slab/Exclude         │
├─────────────────────────────┤
│                             │
│            Core             │
│                             │
├─────────────────────────────┤
│        Slab/Exclude         │
└─────────────────────────────┘
Parameters:
  • width – Width of the straight. [um]

  • length – Length of the straight. [um]

  • layer – Layer index / :py:class:~`LayerEnum`

  • enclosure – Definition of slabs/excludes. [um]

straight_coupler#

kgeneric.cells.straight_coupler(gap: float = 0.2, length: float = 10.0, width: float = 0.5, layer: int | kfactory.kcell.LayerEnum = LAYER.WG, enclosure: LayerEnclosure = LayerEnclosure(layer_sections={}, main_layer=None, yaml_tag='!Enclosure', kcl=None)) KCell[source]#

Straight coupler.

Parameters:
  • gap – between straights in um.

  • length – of coupling region in um.

  • layer – layer number or name.

  • enclosure – straight enclosure.

taper#

kgeneric.cells.taper(width1: float, width2: float, length: float, layer: int | kfactory.kcell.LayerEnum, enclosure: Optional[LayerEnclosure] = None) KCell[source]#

Linear Taper [um].

       __
     _/  │ Slab/Exclude
   _/  __│
 _/  _/  │
│  _/    │
│_/      │
│_       │ Core
│ \_     │
│_  \_   │
  \_  \__│
    \_   │
      \__│ Slab/Exclude
Parameters:
  • width1 – Width of the core on the left side. [um]

  • width2 – Width of the core on the right side. [um]

  • length – Length of the taper. [um]

  • layer – Layer index / :py:class:~`LayerEnum` of the core.

  • enclosure – Definition of the slab/exclude.