Skip to main content

python library to generate GDS layouts

Project description

GDSFactory 9.45.0

docs PyPI PyPI Python Downloads MIT codecov Binder

GDSFactory is a Python library for designing chips (Photonics, Analog, Quantum, MEMS), PCBs, and 3D-printable objects. We aim to make hardware design accessible, intuitive, and fun—empowering everyone to build the future.

As input you write python code, as an output GDSFactory creates CAD files (GDS, OASIS, STL, GERBER).

cad

Quick Start

Here's a simple example to get you started:

pip install gdsfactory

If you prefer a faster setup, you can use the installer package:

pip install gdsfactory_install
gfi install
import gdsfactory as gf

# Create a new component
c = gf.Component()

# Add a rectangle
r = gf.components.rectangle(size=(10, 10), layer=(1, 0))
rect = c.add_ref(r)

# Add text elements
t1 = gf.components.text("Hello", size=10, layer=(2, 0))
t2 = gf.components.text("world", size=10, layer=(2, 0))

text1 = c.add_ref(t1)
text2 = c.add_ref(t2)

# Position elements
text1.xmin = rect.xmax + 5
text2.xmin = text1.xmax + 2
text2.rotate(30)

# Show the result
c.show()

Highlights:

  • 4M+ downloads
  • 116+ Contributors
  • 42+ PDKs available

workflow

We provide a comprehensive end-to-end design flow that enables you to:

  • Design (Layout, Simulation, Optimization): Define parametric cell functions in Python to generate components. Test component settings, ports, and geometry to avoid unwanted regressions, and capture design intent in a schematic.
  • Verify (DRC, DFM, LVS): Run simulations directly from the layout using our simulation interfaces, removing the need to redraw your components in simulation tools. Conduct component and circuit simulations, study design for manufacturing. Ensure complex layouts match their design intent through Layout Versus Schematic verification (LVS) and are DRC clean.
  • Validate: Define layout and test protocols simultaneously for automated chip analysis post-fabrication. This allows you to extract essential component parameters, and build data pipelines from raw data to structured data to monitor chip performance.

Your input: Python or YAML text. Your output: A GDSII or OASIS file for fabrication, alongside component settings (for measurement and data analysis) and netlists (for circuit simulations) in YAML.

We provide a common syntax for design (Ansys, Lumerical, Tidy3d, MEEP, DEVSIM, SAX, MEOW, Xyce ...), verification, and validation.

tool interfaces

Open-Source PDKs (No NDA Required)

These PDKs are publicly available and do not require an NDA:

Foundry PDKs (NDA Required)

Access to the following PDKs requires a GDSFactory+ subscription. To sign up, visit GDSFactory.com.

Available PDKs under NDA:

  • AIM Photonics
  • AMF Photonics
  • CompoundTek Photonics
  • Fraunhofer HHI Photonics
  • Smart Photonics
  • Tower Semiconductor PH18
  • Tower PH18DA by OpenLight
  • III-V Labs
  • LioniX
  • Ligentec
  • Lightium
  • Quantum Computing Inc. (QCI)

GDSFactory+

GDSFactory+ offers Graphical User Interface for chip design, built on top of GDSFactory and VSCode. It provides you:

  • Foundry PDK access
  • Schematic capture
  • Device and circuit Simulations
  • Design verification (DRC, LVS)
  • Data analytics

Getting Started

Who is using GDSFactory?

Hundreds of organisations are using GDSFactory. Some companies and organizations around the world using GDSFactory include:

logos

"I've used GDSFactory since 2017 for all my chip tapeouts. I love that it is fast, easy to use, and easy to extend. It's the only tool that allows us to have an end-to-end chip design flow (design, verification and validation)."

Joaquin Matres - Google

"I've relied on GDSFactory for several tapeouts over the years. It's the only tool I've found that gives me the flexibility and scalability I need for a variety of projects."

Alec Hammond - Meta Reality Labs Research

"The best photonics layout tool I've used so far and it is leaps and bounds ahead of any commercial alternatives out there. Feels like GDSFactory is freeing photonics."

Hasitha Jayatilleka - LightIC Technologies

"As an academic working on large scale silicon photonics at CMOS foundries I've used GDSFactory to go from nothing to full-reticle layouts rapidly (in a few days). I particularly appreciate the full-system approach to photonics, with my layout being connected to circuit simulators which are then connected to device simulators. Moving from legacy tools such as gdspy and phidl to GDSFactory has sped up my workflow at least an order of magnitude."

Alex Sludds - MIT

"I use GDSFactory for all of my photonic tape-outs. The Python interface makes it easy to version control individual photonic components as well as entire layouts, while integrating seamlessly with KLayout and most standard photonic simulation tools, both open-source and commercial.

Thomas Dorch - Freedom Photonics

Why Use GDSFactory?

  • Fast, extensible, and easy to use – designed for efficiency and flexibility.
  • Free and open-source – no licensing fees, giving you the freedom to modify and extend it.
  • A thriving ecosystem – the most popular EDA tool with a growing community of users, developers, and integrations with other tools.
  • Built on the open-source advantage – just like the best machine learning libraries, GDSFactory benefits from continuous contributions, transparency, and innovation.

GDSFactory is really fast thanks to KLayout C++ library for manipulating GDS objects. You will notice this when reading/writing big GDS files or doing large boolean operations.

Benchmark gdspy GDSFactory Gain
10k_rectangles 80.2 ms 4.87 ms 16.5
boolean-offset 187 μs 44.7 μs 4.19
bounding_box 36.7 ms 170 μs 216
flatten 465 μs 8.17 μs 56.9
read_gds 2.68 ms 94 μs 28.5

Contributors

A huge thanks to all the contributors who make this project possible!

We welcome all contributions—whether you're adding new features, improving documentation, or even fixing a small typo. Every contribution helps make GDSFactory better!

Join us and be part of the community. 🚀

contributors

Stargazers

Stargazers over time

Key Features

  • Design: Create parametric components with Python
  • Simulation: Direct integration with major simulation tools
  • Verification: Built-in DRC, DFM, and LVS capabilities
  • Validation: Automated chip analysis and data pipelines
  • Multi-format Output: Generate GDSII, OASIS, STL, and GERBER files
  • Extensible: Easy to add new components and functionality

LLM-Friendly Documentation

GDSFactory provides machine-readable documentation optimized for LLM agents and AI-assisted development:

  • llms.txt — concise overview with links to all documentation sections
  • llms-full.txt — complete API reference and usage guide in a single document

These follow the llms.txt standard for making documentation easily ingestable by large language models.

Community

Join our growing community:

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdsfactory-9.45.0.tar.gz (558.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gdsfactory-9.45.0-py3-none-any.whl (810.0 kB view details)

Uploaded Python 3

File details

Details for the file gdsfactory-9.45.0.tar.gz.

File metadata

  • Download URL: gdsfactory-9.45.0.tar.gz
  • Upload date:
  • Size: 558.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for gdsfactory-9.45.0.tar.gz
Algorithm Hash digest
SHA256 618781460dbaa4e50a2039b14a3ba88ef53f6b46bd90c98f12f3aa4f5bd45896
MD5 cf681bbbf9e04df8c0602e5fb94135cb
BLAKE2b-256 1b2c46796cd9e022fc2f5a54b82bcfd7c5a45f5edfe6889461e5320d9ce2837e

See more details on using hashes here.

File details

Details for the file gdsfactory-9.45.0-py3-none-any.whl.

File metadata

  • Download URL: gdsfactory-9.45.0-py3-none-any.whl
  • Upload date:
  • Size: 810.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for gdsfactory-9.45.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98a3c13b23b8740083e71c3ea8fbf75fe6f729416943efa5eb76b18ebd7d5100
MD5 4caea4c47c98a0a873076b10ee9839db
BLAKE2b-256 d4a6c7a7cb059f57df14f13dbad7dcd069a5eafdcfa970288d4b4cafb6c6871e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page