kqcircuits.util.refpoints

class kqcircuits.util.refpoints.Refpoints(layer, cell, trans, rec_levels)[source]

Bases: object

Helper class for extracting reference points from given layer and cell.

Once Refpoints is initialized, it can be used similar way as dictionary, where reference point text (string) field is the key and reference point position (pya.DPoint) is the value.

Refpoints is implemented such that the dictionary is extracted from given layer and cell only when it’s used for the first time. Extracting the dictionary can be relatively time-demanding process, so this way we can speed up the element creation process in KQC.

Note: If the parent cell and child cell have reference points of equal names, the reference point of the child cell is excluded from the dictionary.

layer

layer specification for source of reference points

cell

cell containing the reference points

trans

transform for converting reference points into target coordinate system

rec_levels

recursion level when looking for reference points from subcells. Set to 0 to disable recursion.

dict()[source]

Extracts and returns reference points as dictionary, where text is the key and position is the value.

items()[source]

Returns a list of text-position pairs.

keys()[source]

Returns a list of texts.

values()[source]

Returns a list of positions.

class kqcircuits.util.refpoints.RefpointToSimPort(refpoint, face=0)[source]

Bases: object

Class that takes a refpoint of an Element class with given string and places appropriate Simulation port(s) at the refpoint’s location if the simulation object was instantiated using the get_single_element_sim_class class builder.

refpoint

Refpoint name string

face

index of the face where the refpoint is located

class kqcircuits.util.refpoints.RefpointToInternalPort(refpoint, ground_refpoint=None, resistance=50, reactance=0, inductance=0, capacitance=0, face=0, junction=False, signal_layer='signal')[source]

Bases: RefpointToSimPort

Creates an InternalPort at refpoint with given string

class kqcircuits.util.refpoints.RefpointToEdgePort(refpoint, resistance=50, reactance=0, inductance=0, capacitance=0, face=0, deembed_len=None, junction=False, size=None, deembed_cross_section=None)[source]

Bases: RefpointToSimPort

Creates an EdgePort at refpoint with given string

class kqcircuits.util.refpoints.WaveguideToSimPort(refpoint, face=0, towards=None, side=None, use_internal_ports=None, waveguide_length=None, term1=0, turn_radius=None, a=None, b=None, over_etching=None, airbridge=False, deembed_cross_section=None)[source]

Bases: RefpointToSimPort

A waveguide is created leading to the port at the refpoint with given string in the Simulation object

refpoint

Refpoint name string

face

index of the face where the refpoint is located

towards

Another refpoint name string towards which direction the waveguide will extend. If set to None, will default to “{refpoint}_corner”

side

Indicate on which edge the port should be located. Ignored for internal ports. Must be one of left, right, top or bottom

use_internal_ports

if True, ports will be inside the simulation. If False, ports will be brought out to an edge of the box, determined by side. Defaults to the value of the use_internal_ports parameter

waveguide_length

length of the waveguide (μm), used only for internal ports Defaults to the value of the waveguide_length parameter

term1

Termination gap (μm) at the location of refpoint

turn_radius

Turn radius of the waveguide. Not relevant for internal ports. Defaults to the value of the r parameter

a

Center conductor width. Defaults to the value of the a parameter

b

Conductor gap width. Defaults to the value of the b parameter

over_etching

Expansion of gaps. Defaults to the value of the over_etching parameter

airbridge

if True, an airbridge will be inserted at location of the refpoint. Default False

deembed_cross_section

cross section to be used in deembedding

class kqcircuits.util.refpoints.JunctionSimPort(refpoint='port_squid_a', other_refpoint='port_squid_b', face=0, floating=False)[source]

Bases: RefpointToSimPort

Creates internal ports for a junction in the Simulation object.

Depending on the value of the separate_island_internal_ports parameter, will either create two internal ports at both ends of the junction, or one port that covers both junctions.

refpoint

Refpoint name string. Defaults to “port_squid_a” as most commonly used junction port name

other_refpoint

Refpoint name string of the other end of the junction Defaults to “port_squid_b” as most commonly used junction port name

face

index of the face where the refpoint is located

floating

Set True to assign metal at ‘other_refpoint’ as signal

../_images/kqcircuits.util.refpoints.png