kqcircuits.util.load_save_layout

kqcircuits.util.load_save_layout.load_layout(filename, layout: Layout, **opts) None[source]

Loads Layout from file.

The default LoadLayoutOptions of KLayout are employed with following exceptions: * This function sets cell_conflict_resolution = RenameCell by default (conflicting cells will be renamed). * The LoadLayoutOptions can be modified via keyword arguments.

Parameters:
  • filename – The name of the file to load.

  • layout – The layout object into which the file is loaded.

  • opts – Custom LoadLayoutOptions as keyword arguments.

kqcircuits.util.load_save_layout.save_layout(filename, layout: Layout, cells: list[Cell] | None = None, layers: list[LayerInfo] | None = None, **opts) None[source]

Saves Layout to file.

The default SaveLayoutOptions of KLayout are employed with following exceptions: * This function calls set_format_from_filename to select file format according to the file’s extension. * By default write_context_info = False to enable saving cells as static cells. * If cells or layers are specified, only given instances will be saved. * The SaveLayoutOptions can be modified via keyword arguments.

Parameters:
  • filename – The name of the file to save.

  • layout – The layout object whose geometry will be saved.

  • cells – List of pya.Cell objects to indicate which cells are saved. Save all cells if not specified.

  • layers – List of pya.LayerInfo objects to indicate which layers are saved. Save all layers if not specified.

  • opts – Custom SaveLayoutOptions as keyword arguments.

../_images/kqcircuits.util.load_save_layout.png