Skip to content

gdsfactory/kfactory

Repository files navigation

KFactory 3.0.0rc2

codecov

KFactory is a Python framework for photonic and electronic chip layout, built on KLayout's C++ geometry engine. It provides parametric cells with caching, optical and electrical routing, enclosures via Minkowski sums, and schematic-driven design with LVS.

Key Features

  • Cell caching — the @kf.cell decorator deduplicates identical components automatically
  • Routing — optical and electrical bundle routing, Manhattan primitives, all-angle routing, and path-length matching
  • Cross-sections & enclosures — define waveguide profiles and automatic boolean cladding layers via Minkowski sums
  • Schematics — place-and-connect workflow with netlist extraction and layout-vs-schematic verification
  • Virtual cells — hierarchical logical containers for schematic-driven design
  • Dual coordinate systemsKCell (integer DBU) and DKCell (float µm) work side by side
  • KLayout integration — full access to kdb.Region, kdb.Polygon, DRC, and GDS/OASIS I/O
  • Jupyter & KLive — live preview in KLayout while editing notebooks
  • PDK system — bundle layers, factories, cross-sections, and technology into reusable packages

Getting Started

Installation

KFactory is available on PyPI and requires Python 3.12+.

uv add kfactory

# or with pip
pip install kfactory

Development

just dev

This installs the development environment and sets up pre-commit hooks.

Ecosystem

Package Description
gdsfactory Full-featured chip design framework — KFactory is its layout backend
kfnetlist Standalone netlist extraction and generation

Documentation

Full documentation is available at gdsfactory.github.io/kfactory.

Upgrading from an earlier version? See the migration guide.

License

MIT

About

gdsfactory with a klayout backend

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors