QRoute

class QRoute(design, name: str | None = None, options: Dict | None = None, type: str = 'CPW', **kwargs)[source]

Super-class implementing routing methods that are valid irrespective of the number of pins (>=1). The route is stored in a n array of planar points (x,y coordinates) and one direction, which is that of the last point in the array. Values are stored as np.ndarray of parsed floats or np.array float pair.

Inherits QComponent class

Default Options:
  • pin_inputs: Dict
    • start_pin: Dict – Component and pin string pair. Define which pin to start from
      • component: ‘’ – Name of component to start from, which has a pin

      • pin: ‘’ – Name of pin used for pin_start

    • end_pin=Dict – Component and pin string pair. Define which pin to start from
      • component: ‘’ – Name of component to end on, which has a pin

      • pin: ‘’ – Name of pin used for pin_end

  • lead: Dict
    • start_straight: ‘0mm’ – Lead-in, defined as the straight segment extension from start_pin. Defaults to 0.1um.

    • end_straight: ‘0mm’ – Lead-out, defined as the straight segment extension from end_pin. Defaults to 0.1um.

    • start_jogged_extension: ‘’ – Lead-in, jogged extension of lead-in. Described as list of tuples

    • end_jogged_extension: ‘’ – Lead-out, jogged extension of lead-out. Described as list of tuples

  • fillet: ‘0’

  • total_length: ‘7mm’

  • trace_width: ‘cpw_width’ – Defines the width of the line. Defaults to ‘cpw_width’.

How to specify *_jogged_extensions for the QRouteLeads:

*_jogged_extensions have to be specified in an OrderedDict with incremental keys. the value of each key specifies the direction of the jog and the extension past the jog. For example:

 1jogs = OrderedDict()
 2jogs[0] = ["R", '200um']
 3jogs[1] = ["R", '200um']
 4jogs[2] = ["L", '200um']
 5jogs[3] = ["L", '500um']
 6jogs[4] = ["R", '200um']
 7jogs_other = ....
 8
 9options = {'lead': {
10    'start_straight': '0.3mm',
11    'end_straight': '0.3mm',
12    'start_jogged_extension': jogs,
13    'end_jogged_extension': jogs_other
14}}

The jog direction can be specified in several ways. Feel free to pick the one more convenient for your coding style:

>> “L”, “L#”, “R”, “R#”, #, “#”, “A,#”, “left”, “left#”, “right”, “right#”

where # is any signed or unsigned integer or floating point value. For example the following will all lead to the same turn:

>> “L”, “L90”, “R-90”, 90, “90”, “A,90”, “left”, “left90”, “right-90”

Initializes all Routes.

Calls the QComponent __init__() to create a new Metal component. Before that, it adds the variables that are needed to support routing.

Parameters:
  • design (QDesign) – The parent design.

  • name (str) – Name of the component. Auto-named if possible.

  • options (dict) – User options that will override the defaults. Defaults to None.

  • type (string) – Supports Route (single layer trace) and CPW (adds the gap around it). Defaults to “CPW”.

Attributes

QRoute.TOOLTIP

QRoute.class_name

the full module name with the class name.

QRoute.component_metadata

Component metadata

QRoute.default_options

Default options

QRoute.design

Return a reference to the parent design object.

QRoute.id

The unique id of component within a design.

QRoute.length

Sum of all segments length, including the head.

QRoute.logger

The Qiskit Metal Logger.

QRoute.name

Name of the component.

QRoute.options

A dictionary of the component-designer-defined options.

QRoute.pin_names

The names of the pins.

QRoute.qgeometry_types

Get a list of the names of the element tables.

QRoute.pins

Dictionary of pins.

QRoute.metadata

Metadata allows a designer to store extra information or analysis results.

QRoute.status

Stores the latest status of the component.

Methods

QRoute.add_dependency(parent, child)

Add a dependency between one component and another.

QRoute.add_pin(name, points, width[, ...])

Adds a pin from two points which are normal/tangent to the intended plane of the pin.

QRoute.add_qgeometry(kind, geometry[, ...])

Add QGeometry.

QRoute.assign_direction_to_anchor(ref_pt, ...)

Method to assign a direction to a point.

QRoute.connect_components_already_in_design(...)

WARNING: Do NOT use this method during generation of component instance.

QRoute.del_colinear_points(inarray)

Delete colinear points from the given array.

QRoute.delete()

Delete the QComponent.

QRoute.get_pin(name)

Interface for components to get pin data.

QRoute.get_points()

Assembles the list of points for the route by concatenating: head_pts + intermediate_pts, tail_pts.

QRoute.get_template_options(design[, ...])

Creates template options for the Metal Component class required for the class to function, based on the design template; i.e., be created, made, and rendered.

QRoute.get_tip()

Access the last element in the QRouteLead.

QRoute.get_unit_vectors(start, end[, snap])

Return the unit and target vector in which the CPW should process as its coordinate sys.

QRoute.length_excess_corner_rounding(points)

Computes how much length to deduce for compensating the fillet settings.

QRoute.make()

The make function implements the logic that creates the geometry (poly, path, etc.) from the qcomponent.options dictionary of parameters, and the adds them to the design, using qcomponent.add_qgeometry(...), adding in extra needed information, such as layer, subtract, etc.

QRoute.make_elements(pts)

Turns the CPW points into design elements, and add them to the design object.

QRoute.parse_options([options])

Parse the options, converting string into interpreted values.

QRoute.parse_value(value)

Parse a string, mappable (dict, Dict), iterable (list, tuple) to account for units conversion, some basic arithmetic, and design variables.

QRoute.populate_to_track_table_usage()

Use the element_handler to get a list of all the table names used in QGeometry.

QRoute.qgeometry_bounds()

Fetched the component bound dict_value.

QRoute.qgeometry_dict(element_type)

Returns a dict of element qgeometry (shapely geometry) of the component as a python dict, where the dict keys are the names of the qgeometry and the corresponding values are the shapely geometries.

QRoute.qgeometry_list([element_type])

Returns a list of element qgeometry (shapely geometry) of the component as a python list of shapely geometries.

QRoute.qgeometry_plot([ax, plot_kw])

Draw all the qgeometry of the component (polys and path etc.)

QRoute.qgeometry_table(element_type)

Returns the entire element table for the component.

QRoute.rebuild()

Builds the QComponent.

QRoute.set_lead(name)

Defines the lead_extension by adding a point to the self.head/tail.

QRoute.set_lead_extension(name)

Defines the jogged lead_extension by adding a series of turns to the self.head/tail.

QRoute.set_pin(name)

Defines the CPW pins and returns the pin coordinates and normal direction vector.

QRoute.to_script([thin, is_part_of_chip])

param thin:

If true then any key in the QComponent's options whose value