RouteMixed

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

Implements fully featured Routing, allowing different type of connections between anchors. The comprehensive Routing class. Inherits RoutePathfinder, RouteMeander class, thus also QRoute and RouteAnchors.

Default Options:
  • between_anchors: Empty OrderedDict – Intermediate anchors only; doesn’t include endpoints

QRoute 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

RouteAnchors Default Options:
  • anchors: OrderedDict – Intermediate anchors only; doesn’t include endpoints

RoutePathfinder Default Options:
  • step_size: ‘0.25mm’ – Length of the step for the A* pathfinding algorithm

  • advanced: Dict
    • avoid_collision: ‘true’ – true/false, defines if the route needs to avoid collisions. Defaults to ‘true’.

RouteMeander Default Options:
  • meander: Dict
    • spacing: ‘200um’ – Minimum spacing between adjacent meander curves

    • asymmetry=’0um’ – Offset between the center-line of the meander and the center-line that stretches from the tip of lead-in to the x (or y) coordinate of the tip of the lead-out. Defaults to ‘0um’.

  • snap: ‘true’

  • prevent_short_edges: ‘true’

How to specify between_anchors for the RouteMixed

between_anchors have to be specified in an OrderedDict with incremental keys. the value of each key specifies the type of routing algorythm to run between each anchors and between the pins and the first and last anchors.

For example, for a RouteMixed with 4 anchors:

1between_anchors = OrderedDict()
2between_anchors[0] = "S"
3between_anchors[1] = "M"
4between_anchors[2] = "S"
5between_anchors[3] = "M"
6between_anchors[4] = "PF"
  • “S” = Utilizes the RouteStraight methods

  • “M” = Utilizes the RouteMeander methods

  • “PF” = Utilizes the RoutePathfinder methods

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

RouteMixed.TOOLTIP

RouteMixed.class_name

the full module name with the class name.

RouteMixed.component_metadata

Component metadata

RouteMixed.default_options

Default options

RouteMixed.design

Return a reference to the parent design object.

RouteMixed.id

The unique id of component within a design.

RouteMixed.length

Sum of all segments length, including the head.

RouteMixed.logger

The Qiskit Metal Logger.

RouteMixed.name

Name of the component.

RouteMixed.options

A dictionary of the component-designer-defined options.

RouteMixed.pin_names

The names of the pins.

RouteMixed.qgeometry_types

Get a list of the names of the element tables.

RouteMixed.pins

Dictionary of pins.

RouteMixed.metadata

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

RouteMixed.status

Stores the latest status of the component.

Methods

RouteMixed.add_dependency(parent, child)

Add a dependency between one component and another.

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

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

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

Add QGeometry.

RouteMixed.adjust_length(delta_length, pts, ...)

Edits meander points to redistribute the length slacks accrued with the various local adjustments It should be run after self.pts_intermediate is completely defined Inputs are however specific to the one meander segment Assumption is that pts is always a sequence of paired points, each corresponds to one meander 180deg curve The pts is typically an odd count since the last point is typically used to anchor the left-over length, therefore this code supports both odd and even cases, separately.

RouteMixed.assign_direction_to_anchor(...)

Method to assign a direction to a point.

RouteMixed.connect_astar_or_simple(start_pt, ...)

Connect start and end via A* algo if connect_simple doesn't work.

RouteMixed.connect_components_already_in_design(...)

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

RouteMixed.connect_meandered(start_pt, end_pt)

Meanders using a fixed length and fixed spacing.

RouteMixed.connect_simple(start_pt, end_pt)

Try connecting start and end with single or 2-segment/S-shaped CPWs if possible.

RouteMixed.del_colinear_points(inarray)

Delete colinear points from the given array.

RouteMixed.delete()

Delete the QComponent.

RouteMixed.free_manhattan_length_anchors()

Computes the free-flight manhattan distance between start_pt and end_pt passing through all of the given anchor points.

RouteMixed.get_index_for_side1_meander(...)

Get the indices.

RouteMixed.get_pin(name)

Interface for components to get pin data.

RouteMixed.get_points()

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

RouteMixed.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.

RouteMixed.get_tip()

Access the last element in the QRouteLead.

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

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

RouteMixed.issideways(point, seg_point_a, ...)

RouteMixed.length_excess_corner_rounding(points)

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

RouteMixed.make()

Generates path from start pin to end pin.

RouteMixed.make_elements(pts)

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

RouteMixed.parse_options([options])

Parse the options, converting string into interpreted values.

RouteMixed.parse_value(value)

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

RouteMixed.populate_to_track_table_usage()

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

RouteMixed.qgeometry_bounds()

Fetched the component bound dict_value.

RouteMixed.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.

RouteMixed.qgeometry_list([element_type])

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

RouteMixed.qgeometry_plot([ax, plot_kw])

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

RouteMixed.qgeometry_table(element_type)

Returns the entire element table for the component.

RouteMixed.rebuild()

Builds the QComponent.

RouteMixed.select_connect_method(segment_num)

Translates the user-selected connection method into the right method to execute.

RouteMixed.set_lead(name)

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

RouteMixed.set_lead_extension(name)

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

RouteMixed.set_pin(name)

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

RouteMixed.to_script([thin, is_part_of_chip])

param thin:

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

RouteMixed.trim_pts()

Crops the sequence of points to concatenate.

RouteMixed.unary_union(geoms)

Returns the union of a sequence of geometries

RouteMixed.unobstructed(segment)

Check that no component's bounding box in self.design intersects or overlaps a given segment.

RouteMixed.unobstructed_close_up(segment, ...)

Checks whether the given component's perimeter intersects or overlaps a given segment.