RouteFramed

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

A non-meandered sample_shapes CPW that is auto-generated between 2 components. Designed to avoid self-collisions and collisions with components it is attached to.

This class extends the QComponent class.

Assumptions:
  1. Components are situated along xy axes in 2 dimensions. No rotation is allowed (yet). Their bounding boxes may not overlap, though they may be situated at arbitrary x and y provided these conditions are met.

  2. Pins point normal to qubits (“directly outward”) and either in the x or y directions. They must not protrude from the exact corner of a component. [This last assumption has implications for 2-segment connections.]

  3. Intersection of CPWs with themselves or the qubits they stem from is prohibited. Intersection with other components/CPWs has not yet been considered.

  4. Components may not share an edge; a nonzero gap must be present between 2 adjacent qubits.

  5. CPWs must be attached to protruding leads via terminations head-on, not from the sides.

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

RouteFramed.TOOLTIP

RouteFramed.class_name

the full module name with the class name.

RouteFramed.component_metadata

Component metadata

RouteFramed.default_options

Default options

RouteFramed.design

Return a reference to the parent design object.

RouteFramed.id

The unique id of component within a design.

RouteFramed.length

Sum of all segments length, including the head.

RouteFramed.logger

The Qiskit Metal Logger.

RouteFramed.name

Name of the component.

RouteFramed.options

A dictionary of the component-designer-defined options.

RouteFramed.pin_names

The names of the pins.

RouteFramed.qgeometry_types

Get a list of the names of the element tables.

RouteFramed.pins

Dictionary of pins.

RouteFramed.metadata

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

RouteFramed.status

Stores the latest status of the component.

Methods

RouteFramed.add_dependency(parent, child)

Add a dependency between one component and another.

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

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

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

Add QGeometry.

RouteFramed.assign_direction_to_anchor(...)

Method to assign a direction to a point.

RouteFramed.connect_components_already_in_design(...)

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

RouteFramed.connect_frame(segments[, ...])

Generate the list of 2D coordinates comprising a CPW between startpin and endpin.

RouteFramed.del_colinear_points(inarray)

Delete colinear points from the given array.

RouteFramed.delete()

Delete the QComponent.

RouteFramed.get_pin(name)

Interface for components to get pin data.

RouteFramed.get_points()

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

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

RouteFramed.get_tip()

Access the last element in the QRouteLead.

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

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

RouteFramed.length_excess_corner_rounding(points)

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

RouteFramed.make()

Use user-specified parameters and geometric orientation of components to determine whether the CPW connecting the pins on either end requires 1, 2, or 3 segments.

RouteFramed.make_elements(pts)

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

RouteFramed.parse_options([options])

Parse the options, converting string into interpreted values.

RouteFramed.parse_value(value)

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

RouteFramed.populate_to_track_table_usage()

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

RouteFramed.qgeometry_bounds()

Fetched the component bound dict_value.

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

RouteFramed.qgeometry_list([element_type])

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

RouteFramed.qgeometry_plot([ax, plot_kw])

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

RouteFramed.qgeometry_table(element_type)

Returns the entire element table for the component.

RouteFramed.rebuild()

Builds the QComponent.

RouteFramed.set_lead(name)

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

RouteFramed.set_lead_extension(name)

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

RouteFramed.set_pin(name)

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

RouteFramed.to_script([thin, is_part_of_chip])

param thin:

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

RouteFramed.totlength(pts)

Get total length of all line segments in a given CPW.