kqcircuits.simulations.abstract_simulation

kqcircuits.simulations.abstract_simulation.get_simulation_layer_by_name(layer_name: str) → LayerInfo[source]

Returns layer info of given name. If layer doesn’t exist, a new layer is created. New layers are created with data type = 0 and layer numbering starts from 1000.

class kqcircuits.simulations.abstract_simulation.AbstractSimulation(layout, cell=None, **kwargs)[source]

Bases: ABC

Abstract base class for all simulation classes, including cross-section and 3D simulations.

Common constructor for simulation classes.

Any parameter can be passed as a keyword argument.

Parameters:
  • layout – the layout on which to create the simulation

  • cell – top cell for the simulation. If not given, a new cell will be created.

LIBRARY_NAME = None
classmethod get_schema(noparents=False, abstract_class=None)

Returns the combined parameters of the class “cls” and all its ancestor classes.

Parameters:
  • noparents – If True then only return the parameters of “cls”, not including ancestors.

  • abstract_class – Return parameters up to this abstract class if specified.

geometry_equals_to(other) → bool[source]

Returns whether the geometries of self and other are identical.

get_material_dict() → dict[str, dict][source]

Return material_dict as dictionary.

check_material_dict() → dict[str, dict][source]

Check that used materials are defined in material_dict and return material_dict as dictionary.

is_metal(material: str) → bool[source]

Return True if material is metal and False otherwise

get_parameters()[source]

Return dictionary with all parameters and their values.

get_simulation_data() → dict[str, Any][source]

Return the simulation data in dictionary form.

get_layers() → list[LayerInfo][source]

Returns simulation layer numbers in list. Only return layers that are in use.

PCell parameters:

  • name (String) - Name of the simulation, default=Simulation

  • units (String) - Unit of length, default=um

  • material_dict (String) - Contains the material names as keys and material properties as values. If the material property has positive value for keyword ‘conductivity’ or contains keyword ‘london_penetration_depth’, the material is considered as metal. Otherwise, the material is considered as dielectric. The material names ‘vacuum’ and ‘pec’ (perfect electric conductor) are excluded and they can be used without defining them explicitly. The property keyword ‘permittivity’ is fully supported and keywords ‘conductivity’, ‘dielectric_loss_tangent’, ‘permeability’, ‘magnetic_loss_tangent’, and ‘london_penetration_depth’ are partly supported depending on the solver., default={'silicon': {'permittivity': 11.45}}

  • extra_json_data (None) - This field may be used to store ‘virtual’ parameters useful for your simulations, default=None

../_images/kqcircuits.simulations.abstract_simulation.png