kqcircuits.util.replace_squids

Functions to replace SQUIDs in existing design files.

Typical usage in a macro:

top_cell = KLayoutView(current=True).active_cell
replace_squids(top_cell, "MySQUID", "junction_width", 0.5, 0.1)  # a parameter sweep
replace_squid(top_cell, "QB_2", "MySQUID", mirror=True)          # replace an individual SQUID
kqcircuits.util.replace_squids.replace_squids(cell, junction_type, parameter_name, parameter_start, parameter_step, parameter_end=None)[source]

Replaces squids by code generated squids with the given parameter sweep.

All squids below top_cell in the cell hierarchy are removed. The number of code generated squids may be limited by the value of parameter_end.

Parameters
  • cell (Cell) – The cell where the squids to be replaced are

  • junction_type – class name of the code generated squid that replaces the other squids

  • parameter_name (str) – Name of the parameter to be swept

  • parameter_start – Start value of the parameter

  • parameter_step – Parameter value increment step

  • parameter_end – End value of the parameter. If None, there is no limit for the parameter value, so that all squids are replaced

kqcircuits.util.replace_squids.replace_squid(top_cell, inst_name, junction_type, mirror=False, squid_index=0, **params)[source]

Replaces a SQUID by the requested alternative in the named instance.

Replaces the SQUID(s) in the sub-element(s) named inst_name with other SQUID(s) of junction_type. The necessary SQUID parameters are specified in params. If inst_name is a Test Structure then squid_index specifies which SQUID to change.

Parameters
  • top_cell – The top cell with SQUIDs to be replaced

  • inst_name – Instance name of PCell containing the SQUID to be replaced

  • junction_type – Name of SQUID Class or .gds/.oas file

  • mirror – Mirror the SQUID along its vertical axis

  • squid_index – Index of the SQUID to be replaced within a Test Structure

  • **params – Extra parameters for the new SQUID

kqcircuits.util.replace_squids.convert_cells_to_static(layout)[source]

Converts all cells in the layout to static.

../_images/kqcircuits.util.replace_squids.png