class LaunchpadWirebondCoupled(design: QDesign, name: str = None, options: Dict = None, make=True, component_template: Dict = None)[source]#

Launch pad to feed/read signals to/from the chip.

Inherits ‘QComponent’ class.

Creates a 50 ohm launch pad with a ground pocket cutout. Limited but expandable parameters to control the launchpad polygons. The (0,0) point is the center of the necking of the launch tip. The pin attaches directly to the built in lead length at its midpoint This launch has an inductive coupler section.

Pocket and pad:

Pocket and launch pad geometries are currently fixed. (0,0) point is the midpoint of the necking of the launch tip. Pocket is a negative shape that is cut out of the ground plane

Values (unless noted) are strings with units included, (e.g., ‘30um’)


Below is a sketch of the launch

|                      |      ------------\   |--
|      |    O   --------|    (0,0) pin at midpoint of necking, before the coupling section
|      ------------//   |--
|          /

|------> x
Default Options:
  • trace_width: ‘cpw_width’ – center trace width of the terminating transmission line

  • trace_gap: ‘cpw_gap’ – gap of the transmission line

  • coupler_length: ‘62.5um’ – distance between the necking and the end of the coupler external finger

  • lead_length: ‘25um’ – length of the cpw line attached to the end of the launch pad

Create a new Metal component and adds it’s default_options to the design.

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

  • make (bool) – True if the make function should be called at the end of the init. Options be used in the make function to create the geometry. Defaults to True.

  • component_template (dict) – User can overwrite the template options for the component that will be stored in the design, in design.template, and used every time a new component is instantiated. Defaults to None.


ValueError – User supplied design isn’t a QDesign

Note: Information copied from QDesign class.

self._design.overwrite_enabled (bool): When True - If the string name, used for component, already exists in the design, the existing component will be deleted from design, and new component will be generated with the same name and newly generated component_id, and then added to design.

When False - If the string name, used for component, already exists in the design, the existing component will be kept in the design, and current component will not be generated, nor will be added to the design. The variable design.self.status will still be NotBuilt, as opposed to Initialization Successful.

Either True or False - If string name, used for component, is NOT being used in the design, a component will be generated and added to design using the name.


TOOLTIP = 'Launch pad to feed/read signals to/from the chip.'#

the full module name with the class name. e.g., qiskit_metal.qlibrary.qubits.TransmonPocket.


Class name

Return type:



Return the full name of the class

component_metadata = {}#

Component metadata

default_options = {'coupler_length': '62.5um', 'lead_length': '25um', 'trace_gap': 'cpw_gap', 'trace_width': 'cpw_width'}#

Default options


Return a reference to the parent design object.



Return type:



The unique id of component within a design.


Component id

Return type:



The Qiskit Metal Logger.



Return type:



Name of the component.

options = {}#

A dictionary of the component-designer-defined options. These options are used in the make function to create the QGeometry and QPins. All options should have string keys and preferrable string values.


The names of the pins.


Set of pin names

Return type:



Get a list of the names of the element tables.


Name of element table or type; e.g., ‘poly’ and ‘path’

Return type:



Dictionary of pins. Populated by component designer in make function using add_pin.


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


Stores the latest status of the component. Values include: Initialization Successful, Build Failed, etc.


add_dependency(parent: str, child: str)#

Add a dependency between one component and another. Calls parent design.

  • parent (str) – The component on which the child depends

  • child (str) – The child cannot live without the parent.

add_pin(name: str, points: ndarray, width: float, input_as_norm: bool = False, chip: str | None = None, gap: float | None = None)#

Adds a pin from two points which are normal/tangent to the intended plane of the pin. The normal should ‘point’ in the direction of intended connection. Adds the new pin as a subdictionary to parent component’s pins dictionary.

  • name (*) – name of the pin

  • points (*) – [[x1,y1],[x2,y2]] for the normal/tangent line

  • width (*) – the width of the intended connection (eg. qubit bus pad arm)

  • input_as_norm (*) – Indicates if the points are tangent or normal to the pin plane. Defaults to False.. Make True for normal.

  • parent (*) – The id of the parent component.

  • chip (*) – the name of the chip the pin is located on. Defaults to None, which is

  • self.options.chip. (converted to) –

  • gap (*) – the dielectric gap of the pin for the purpose of representing as a port for simulations. Defaults to None which is converted to 0.6 * width.

Dictionary containing pins information:
  • points (numpy.ndarray) - two (x,y) points which represent the edge of the pin for another component to attach to (eg. the edge of a CPW TL)

  • middle (numpy.ndarray) - an (x,y) which represents the middle of the points above, where the pin is represented.

  • normal (numpy.ndarray) - the normal vector of the pin, pointing in direction of intended connection

  • tangent (numpy.ndarray) - 90 degree rotation of normal vector

  • width (float) - the width of the pin

  • chip (str) - the chip the pin is on

  • parent_name - the id of the parent component

  • net_id - net_id of the pin if connected to another pin. Defaults to 0, indicates not connected))

* = pin
. = outline of component

—> = the list being passed in as ‘points’ [[x1,y1],[x2,y2]]

normal vector


tangent vector

add_qgeometry(kind: str, geometry: dict, subtract: bool = False, helper: bool = False, layer: int | str | None = None, chip: str | None = None, **kwargs)#

Add QGeometry.

Takes any additional options in options.

  • kind (str) – The kind of QGeometry, such as ‘path’, ‘poly’, etc. All geometry in the dictionary should have the same kind, such as Polygon or LineString.

  • geometry (Dict[BaseGeometry]) – Key-value pairs of name of the geometry you want to add and the value should be a shapely geometry object, such as a Polygon or a LineString.

  • subtract (bool) – Subtract from the layer. Defaults to False.

  • helper (bool) – Is this a helper object. If true, subtract must be false Defaults to False.

  • layer (int, str) – The layer to which the set of QGeometry will belong Defaults to None, which is converted to self.options.chip.

  • chip (str) – Chip name. Defaults to None, which is converted to

  • self.options.chip.

  • kwargs (dict) – Parameters dictionary

  • Assumes all geometry in the geometry argument are homogeneous in kind; i.e., all lines or polys etc.

connect_components_already_in_design(pin_name_self: str, comp2_id: int, pin2_name: str) int#
WARNING: Do NOT use this method during generation of component instance.

This method is expecting self to be added to design._components dict. More importantly, the unique id of self component needs to be in design._components dict.

  • pin_name_self (str) – Name of pin within the component.

  • comp2_id (int) – Component within design, but not self.

  • pin2_name (str) – The pin of comp2_id that pin_name_self will connect to.


A unique net_id for the connection.

Return type:



Delete the QComponent.

Removes QGeometry, QPins, etc. from the design.

get_pin(name: str) Dict#

Interface for components to get pin data.


name (str) – Name of the desired pin.


Returns the data of the pin, see make_pin() for what those values are.

Return type:


classmethod get_template_options(design: QDesign, component_template: Dict = None, logger_: Logger = None, template_key: str = None) Dict#

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. Provides the blank option structure required.

The options can be extended by plugins, such as renderers.

  • design (QDesign) – Design class. Should be the class, not the instance.

  • component_template (Dict) – Template options to overwrite the class ones (default: None)

  • logger (logging.Logger) – A logger for errors. Defaults to None.

  • template_key (str) – The template key identifier. If None, then uses cls._get_unique_class_name(). Defaults to None.


dictionary of default options based on design template.

Return type:



This is executed by the user to generate the qgeometry for the component.

parse_options(options: Dict | None = None) Dict#

Parse the options, converting string into interpreted values. Parses units, variables, strings, lists, and dictionaries. Explained by example below.


options (dict) – If left None, then self.options is used. Defaults to None.


Parsed value

Return type:



See self.parse_value for more information.

parse_value(value: Any | List | Dict | Iterable) Any | List | Dict | Iterable#

Parse a string, mappable (dict, Dict), iterable (list, tuple) to account for units conversion, some basic arithmetic, and design variables. This is the main parsing function of Qiskit Metal.

  • value (str) – String to parse or

  • variable_dict (dict) – dict pointer of variables


Parse value

Return type:

str, float, list, tuple, or ast eval

Handled Inputs:
Strings of numbers, numbers with units; e.g., ‘1’, ‘1nm’, ‘1 um’

Converts to int or float. Some basic arithmetic is possible, see below.

Strings of variables ‘variable1’.

Variable interpretation will use string method isidentifier ‘variable1’.isidentifier()`


Returns ordered Dict with same key-value mappings, where the values have been subjected to parse_value.

Itterables(list, tuple, …):

Returns same kind and calls itself parse_value on each element.


Returns the number as is. Int to int, etc.


Some basic arithmetic can be handled as well, such as ‘-2 * 1e5 nm’ will yield float(-0.2) when the default units are set to mm.

Default units:

User units can be set in the design. The design will set config.DEFAULT.units


See the docstring for this module.

>> ?qiskit_metal.toolbox_metal.parsing

populate_to_track_table_usage() None#

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

The dict qgeometry_able_usage should get updated by add_qgeometry(). This dict is used to get a summary tables used for this component.

qgeometry_bounds() Tuple#

Fetched the component bound dict_value.


containing (minx, miny, maxx, maxy) bound values for the bounds of the component as a whole.

Return type:




qgeometry_dict(element_type: str) Dict[str, BaseGeometry]#

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.


element_type (str) – Name of element table or type; e.g., ‘poly’ and ‘path’


Geometry diction or None if an error in the name of the element type (ie. table)

Return type:


qgeometry_list(element_type: str = 'all') List[BaseGeometry]#

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


element_type (str) – Name of element table or type; e.g., ‘poly’ and ‘path’. Can also specify all


Geometry list or None if an error in the name of the element type (ie. table)

Return type:


qgeometry_plot(ax: matplotlib.axes.Axes = None, plot_kw: dict = None) List#

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

  • ax (matplotlib.axes.Axes) – Matplotlib axis to draw on. Defaults to None. When None, it gets the current axis.

  • plot_kw (dict) – Parameters dictionary.


The list of qgeometry draw

Return type:


Example use:

Suppose you had a component called q1:

fig, ax = draw.mpl.figure_spawn() q1.qgeometry_plot(ax)

qgeometry_table(element_type: str) DataFrame#

Returns the entire element table for the component.


element_type (str) – Name of element table or type; e.g., ‘poly’ and ‘path’


Element table for the component or None if an error in the name of the element type (ie. table)

Return type:



Builds the QComponent.

This is the main action function of a QComponent, call it qc. It converts the qc.options into QGeometry with all of the required options, such as the geometry points, layer number, materials, etc. needed to render.

The build clears the existing QGeometry and QPins and then calls the qc.make function, which is written by the component developer to implement the logic (using the metal. draw module) to convert the qc.options into the QGeometry.

Build status: The function also sets the build status of the component. It sets to failed when the component is created, and then it sets to good when it is done with no errors. The user can also set other statuses, which can appear if the code fails to reach the final line of the build, where the build status is set to good.


Exception – Component build failure

to_script(thin: bool = False, is_part_of_chip: bool = False) Tuple#
  • thin – If true then any key in the QComponent’s options whose value is the same value as the default will not be included in the body

  • is_part_of_chip – If true, body will not include header code

Returns: Code that if copy-pasted into a .py file would generate an instance of this class with the same properties as the instance calling this function