- class QDesign(metadata: Optional[dict] = None, overwrite_enabled: bool = False, enable_renderers: bool = True)¶
QDesign is the base class for Qiskit Metal Designs.
A design is the most top-level object in all of Qiskit Metal.
Create a new Metal QDesign.
metadata (Dict) – Dictionary of metadata. Defaults to None.
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 ‘NameInUse’ will be returned during component generation.
- 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.
enable_renderers – Enable the renderers during the init() of design. The list in config.renderers_to_load() to determine which renderers to enable.
Return a Dict of information regarding chip.
Return the metadata Dict object that keeps track of all metadata in the design.
Provides a copy of net_info table which holds all the connections,
Return unique number for each instance.
Returns the QGeometryTables (Use for advanced users only)
Return a Dict of all the renderers registered within QDesign.
Return default_options dictionary, which contain default options used in creating Metal component, and in calling other drawing and key functions.
Return default_renderer_options dictionary, which contain default options used in creating Metal renderer.
Return the Dict object that keeps track of all variables in the design.
Populate the dict (self.renderer_defaults_by_table) which will hold the data until a component's get_template_options(design) is executed.
Add a dependency between one component and another.
Get the text names and corresponding unique ID of each component within this design.
QDesign.connect_pins(comp1_id, pin1_name, ...)
Will generate an unique net_id and placed in a net_info table.
The lists in the arguments are all used in parallel.
Copy a qcomponent in QDesign and add it to QDesign._components using options_overwrite.
Clear all components in the design dictionary.
Clear all pins in the net_Info and update the pins in components.
Deletes component and pins attached to said component.
Return the chip layer number for the ground plane.
Utility function to get a dictionary containing chip dimensions (size and center).
Utility function to return the z value of a chip.
Get the name of the design from the metadata.
Look at the metadata dict to get list of tables the component uses.
Gets the units of the design.
Load a Metal design from a saved Metal file.
Extra utility function that can call parse_value on individual options.
Main parsing function.
Remakes all components with their current parameters.
Remove a dependency between one component and another.
Renames a variable in the variables dictionary.
Save the metal design to a Metal file.
Set the name of the design in the metadata.
Generates a python script from current chip :param printout: Whether to print the script :type printout: bool
Update the component and any dependencies it may have.
Update the metadata dictionary of the design with a new metadata dictionary.