kqcircuits.simulations.export.xsection.xsection_export.xsection_call(input_oas: pathlib.Path, output_oas: pathlib.Path, cut1: klayout.dbcore.DPoint, cut2: klayout.dbcore.DPoint, process_path: pathlib.Path = PosixPath('/__w/KQCircuits/KQCircuits/xsection/kqc_process.xs'), parameters_path: Optional[pathlib.Path] = None) None[source]

Calls on KLayout to run the XSection plugin

  • input_oas – Input OAS file (top-down geometry)

  • output_oas – Output OAS file (Cross-section of input geometry)

  • cut1 – DPoint of first endpoint of the cross-section cut

  • cut2 – DPoint of second endpoint of the cross-section cut

  • process_path – XSection process file that defines cross-section etching depths etc

  • parameters_path – If process_path points to kqc_process.xs, parameters_path should point to the XSection parameters json file containing sweeped parameters and layer information.

kqcircuits.simulations.export.xsection.xsection_export.create_xsections_from_simulations(simulations: typing.List[kqcircuits.simulations.simulation.Simulation], output_path: pathlib.Path, cuts: typing.Union[typing.Tuple[klayout.dbcore.DPoint, klayout.dbcore.DPoint], typing.List[typing.Tuple[klayout.dbcore.DPoint, klayout.dbcore.DPoint]]], process_path: pathlib.Path = PosixPath('/__w/KQCircuits/KQCircuits/xsection/kqc_process.xs'), post_processing_function: typing.Optional[typing.Callable[[kqcircuits.simulations.cross_section_simulation.CrossSectionSimulation], None]] = None, oxidise_layers_function: typing.Callable[[kqcircuits.simulations.cross_section_simulation.CrossSectionSimulation, float, float, float], None] = <function _oxidise_layers>, ma_permittivity: float = 0, ms_permittivity: float = 0, sa_permittivity: float = 0, ma_thickness: float = 0, ms_thickness: float = 0, sa_thickness: float = 0, vertical_cull: typing.Union[None, typing.Tuple[float, float]] = None, mer_box: typing.Union[None, klayout.dbcore.DBox] = None, london_penetration_depth: float = 0, magnification_order: int = 0) List[kqcircuits.simulations.simulation.Simulation][source]

Create cross-sections of all simulation geometries in the list. Will set ‘box’ and ‘cell’ parameters according to the produced cross-section geometry data.

  • simulations – List of Simulation objects, usually produced by a sweep

  • output_path – Path for the exported simulation files

  • cuts

    1. A tuple (p1, p2), where p1 and p2 are endpoints of a cross-section cut or

    2. a list of such tuples such that each Simulation object gets an individual cut

  • process_path – XSection process file that defines cross-section etching depths etc

  • post_processing_function – Additional function to post-process the cross-section geometry. Defaults to None, in which case no post-processing is performed. The function takes a CrossSectionSimulation object as argument

  • oxidise_layers_function – Set this argument if you have a custom way of introducing oxidization layers to the cross-section metal deposits and substrate. See expected function signature from pyhints

  • ma_permittivity – Permittivity of metal–vacuum (air) interface

  • ms_permittivity – Permittivity of metal–substrate interface

  • sa_permittivity – Permittivity of substrate–vacuum (air) interface

  • ma_thickness – Thickness of metal–vacuum (air) interface

  • ms_thickness – Thickness of metal–substrate interface

  • sa_thickness – Thickness of substrate–vacuum (air) interface

  • vertical_cull – Tuple of two y-coordinates, will cull all geometry not in-between the y-coordinates. None by default, which means all geometry is retained.

  • mer_box – If set as some pya.DBox, will create a specified box as metal edge region, meaning that the geometry inside the region are separated into different layers with ‘_mer’ suffix

  • london_penetration_depth – London penetration depth of the superconducting material

  • magnification_order – Increase magnification of simulation geometry to accomodate more precise spacial units. 0 = no magnification with 1e-3 dbu 1 = 10x magnification with 1e-4 dbu 2 = 100x magnification with 1e-5 dbu etc Consider setting non-zero value when using oxide layers with < 1e-3 layer thickness or taking cross-sections of thin objects


List of CrossSectionSimulation objects for each Simulation object in simulations

kqcircuits.simulations.export.xsection.xsection_export.separate_signal_layer_shapes(simulation: kqcircuits.simulations.simulation.Simulation, sort_key: Optional[Callable[[klayout.dbcore.Shape], float]] = None)[source]

Separate shapes in signal layer to their own dedicated signal layers for each face

  • simulation – A Simulation object where the layer will be separated

  • sort_key – A function that, given a Shape object, returns a number. Shapes are sorted according to the number in increasing order. If None, picks a point in shape polygon, sorts points top to bottom then tie-breaks left to right

kqcircuits.simulations.export.xsection.xsection_export.find_layer_by_name(layer_name, layout)[source]

Returns layerinfo if there already is a layer by layer_name in layout. None if no such layer exists


A generator of available layer slots