kqcircuits.simulations.export.cross_section.cross_section_profile

class kqcircuits.simulations.export.cross_section.cross_section_profile.CrossSectionProfile[source]

Bases: object

Defines vertical level (bottom, top) values for each layer in order to produce cross section geometry.

Also contains following features::
  • Level values can be configured using functions Simulation -> float

    so that the value is calculated from Simulation’s parameters

  • Set priority by regex - if a shape from one layer overlaps with shape from another layer,

    keep regions disjoint by cutting out the overlap region on former layer

  • Layer in original layout may have its cross section placed at another layer in cross section layout.

When developing class methods here, please maintain the assumption that a simulation instance passed here is not modified.

level(regex: str, bottom_function: float | Callable[[Simulation], Any], top_function: float | Callable[[Simulation], Any], change_to_layer: str | Callable[[Simulation], Any] = '') None[source]

Define level values for layers whose name matches regex.

Parameters:
  • regex – this level configuration takes effect for layers whose name matches regex.

  • bottom_function – z value for the bottom of the cross section shape, can be defined as function

  • top_function – z value for the top of the cross section shape, can be defined as function

  • change_to_layer – (Optional) cross section shapes on layers that match regex will be placed to change_to_layer layer in cross section layout.

priority(target_layer_regex: str, dominant_layer_regex: str) None[source]

Configure profile so that in case a region from a layer that matches target_layer_regex overlaps a region that matches dominant_layer_regex, the regions will be made disjoint by removing the overlapping region from layer matching target_layer_regex.

get_layers(layout: Layout) set[LayerInfo][source]

Collect all layers from layout that were configured to this profile using level function

get_level(layer_name: str, simulation: Simulation) tuple[float, float][source]

Given concrete layer name, returns bottom and top level for such layer in cross section profile

Parameters:
  • layer_name – concrete layer name, not regex

  • simulation – simulation object from which cross section is taken

Returns:

tuple - coordinate of bottom and top levels for given layer in the cross section profile

get_dominant_layer_regex(layer_name: str, simulation: Simulation) str[source]

Constructs a regex for all layers that have higher priority than layer_name.

Parameters:
  • layer_name – Name of the layer (not regex) for which we wish to know what layers it is dominated by

  • simulation – simulation object from which cross section is taken

Returns:

Regex, matching any layer that dominates layer with name layer_name

get_invisible_layers(simulation: Simulation) set[LayerInfo][source]

Setting change_to_layer to None causes the level to not be written to any layer. This function returns all layers that are configured in such way.

Parameters:

simulation – simulation object from which cross section is taken

Returns:

Set of layers that will be made invisible in the cross section

change_layer(input_layer: LayerInfo, simulation: Simulation) LayerInfo[source]

Given input_layer on original layout, returns which layer on the cross section layout the shapes should be added to.

Parameters:
  • input_layer – Layer in original layout, for which to look up the layer on the cross section layout

  • simulation – simulation object from which cross section is taken

Returns:

Layer on the cross section layout, where the cross section shape of input_layer will be written to.

add_face(face_id: str) None[source]

Add standard configuration within KQC context for given face

kqcircuits.simulations.export.cross_section.cross_section_profile.get_single_face_cross_section_profile() CrossSectionProfile[source]

Standard KQC single face cross section profile

kqcircuits.simulations.export.cross_section.cross_section_profile.get_flip_chip_cross_section_profile() CrossSectionProfile[source]

Standard KQC flip chip cross section profile

kqcircuits.simulations.export.cross_section.cross_section_profile.get_cross_section_profile(simulation: Simulation) CrossSectionProfile[source]

Given simulation’s face_stack, either returns single face or flip chip cross section profile

../_images/kqcircuits.simulations.export.cross_section.cross_section_profile.png