### Python: Basic 'Hello World' Script for VS Code Verification Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/NEW_DEVELOPER_SETUP.md A simple Python script demonstrating a 'hello world' message. This snippet is provided as an example to verify the correct setup and execution of Python within Visual Studio Code after initial installation. ```Python msg = "hello world" print(msg) ``` -------------------------------- ### Display Qiskit Metal Version Information Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Executes the `metal.about()` command to display detailed information about the installed Qiskit Metal version, its dependencies, and the environment. ```python metal.about(); ``` -------------------------------- ### Initialize Qiskit Metal Design and GUI (Combined) Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This combined snippet first initializes a new planar design and then immediately launches the Qiskit Metal GUI, associating it with the newly created design. This provides a quick setup for interactive design work. ```python design = designs.DesignPlanar() gui = MetalGUI(design) ``` -------------------------------- ### Test Gmsh Terminal Application Launch Source: https://github.com/qiskit-community/qiskit-metal/blob/main/README_Gmsh_Elmer.md Execute this command in your terminal to verify if the Gmsh graphical user interface opens successfully after installation, indicating a proper system-wide setup. ```bash $ gmsh ``` -------------------------------- ### Clone Qiskit Metal Repository Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/installation.rst This command clones the Qiskit Metal repository from GitHub to your local machine. It's the first step to obtaining the source code for installation or development. Ensure Git is installed and configured on your system before executing. ```bash git clone https://github.com/Qiskit/qiskit-metal.git ``` -------------------------------- ### Configure Pre-commit Hooks for Qiskit Metal Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/installation.rst This command executes a setup script to link available pre-commit hooks within the project's root directory. It's essential for developers planning to commit changes, as it helps enforce code quality standards like `yapf` formatting before commits are made. Users on Windows should run this from a Linux-style shell like git-bash. ```bash ./hook_setup ``` -------------------------------- ### Launch Qiskit Metal GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This code instantiates and launches the Qiskit Metal Graphical User Interface (GUI). The GUI provides an interactive environment to visualize, edit, and simulate the quantum design. ```python gui = MetalGUI(design) ``` -------------------------------- ### Bash: Install Pylint and Yapf Python Packages Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/NEW_DEVELOPER_SETUP.md Command to install `pylint` and `yapf` using pip. These are essential Python tools for static code analysis (linting) and automatic code formatting, respectively, as part of the development environment setup. ```bash pip install pylint yapf ``` -------------------------------- ### Set up Qiskit Metal with Python Virtual Environment Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/installation.rst This snippet details the process of creating and activating a Python virtual environment, ensuring `pip` is up-to-date, and then installing all necessary Qiskit Metal dependencies, including development requirements, in editable mode. It notes a specific activation command for Windows users. ```bash python -m venv source /bin/activate python -m pip install -U pip python -m pip install -r requirements.txt -r requirements-dev.txt -e . ``` -------------------------------- ### GUI Interaction: Highlight, Zoom, and Screenshot Components Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Illustrates how to interact with the Qiskit Metal GUI to highlight specific components, zoom in on them, and capture a screenshot of the current view for documentation or analysis. ```python qcomponents = ['spiral', 'cpw_s1'] gui.highlight_components(qcomponents) gui.zoom_on_components(qcomponents) gui.screenshot() ``` -------------------------------- ### Display Current Qiskit Metal Simulation Setup Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example full chip design.ipynb This code displays the current simulation setup parameters for the `LOManalysis` object `c1`. It allows users to review the default or previously configured settings before making modifications. ```python c1.sim.setup ``` -------------------------------- ### Verify ElmerGrid Installation and PATH Configuration Source: https://github.com/qiskit-community/qiskit-metal/blob/main/README_Gmsh_Elmer.md This snippet demonstrates how to test the ElmerGrid utility by typing `ElmerGrid` in the terminal. A successful installation with a correctly set PATH variable will produce a long output text, ending with a thank you message, confirming the utility's accessibility. ```bash $ ElmerGrid Starting program Elmergrid ****************** Elmergrid ************************ This program can create simple 2D structured meshes consisting of linear, quadratic or cubic rectangles or triangles. The meshes may also be extruded and revolved to create 3D forms. In addition many mesh formats may be imported into Elmer software. Some options have not been properly tested. Contact the author if you face problems. ... ... ... Thank you for using Elmergrid! Send bug reports and feature wishes to elmeradm@csc.fi ``` -------------------------------- ### Bash: Install PEP8 and Autopep8 for Python Style Enforcement Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/NEW_DEVELOPER_SETUP.md Commands to install the `pep8` and `autopep8` Python packages using pip. These tools are crucial for enforcing PEP 8 style guidelines and automatically formatting Python code, complementing the VS Code setup. ```bash pip install pep8 pip install --upgrade autopep8 ``` -------------------------------- ### Explore and Instantiate Additional Qiskit Metal QComponents Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Introduces other Qiskit Metal QComponents beyond basic CPWs, specifically demonstrating the `NSquareSpiral` for creating complex geometric shapes. It shows how to import the component, define its options, and instantiate it within the design, including creating a subtracted version. It also includes an import for `RouteStraight` as another example of available components. ```python from qiskit_metal.qlibrary.sample_shapes.n_square_spiral import NSquareSpiral # print(NSquareSpiral.get_template_options(design)) ops = { 'n': '10', 'width': '10um', 'radius': '100um', 'gap': '22um', 'pos_x': '0.65mm', 'pos_y': '2.2mm', 'orientation': '0', 'subtract': 'False'} NSquareSpiral(design, 'spiral', ops) NSquareSpiral(design, 'spiral_cut', {**ops, **dict(subtract=True, width='22um', gap='10um')}) gui.rebuild() ``` ```python from qiskit_metal.qlibrary.tlines.straight_path import RouteStraight ``` -------------------------------- ### Verify ElmerSolver Installation and PATH Configuration Source: https://github.com/qiskit-community/qiskit-metal/blob/main/README_Gmsh_Elmer.md This snippet shows the expected output when running the `ElmerSolver` command in the terminal. A successful installation with a correctly set PATH variable will display version information and copyright details, even if it reports an initial error due to missing input files, confirming the solver's accessibility. ```bash $ ElmerSolver ELMER SOLVER (v 9.0) STARTED AT: 2023/01/11 09:42:44 ParCommInit: Initialize #PEs: 1 MAIN: OMP_NUM_THREADS not set. Using only 1 thread per task. MAIN: MAIN: ============================================================= MAIN: ElmerSolver finite element software, Welcome! MAIN: This program is free software licensed under (L)GPL MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd. MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi MAIN: Version: 9.0 (Rev: 02f61d697, Compiled: 2022-11-08) MAIN: Running one task without MPI parallelization. MAIN: Running with just one thread per task. MAIN: ============================================================= ERROR:: ElmerSolver: Unable to find ELMERSOLVER_STARTINFO, can not execute. Note: The following floating-point exceptions are signalling: IEEE_OVERFLOW_FLAG STOP 1 ``` -------------------------------- ### Import Qiskit Metal Libraries Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This code imports essential modules from the Qiskit Metal library. It includes the main 'qiskit_metal' package, specific sub-modules for designs and drawing, and utilities for the Metal GUI and documentation. ```python import qiskit_metal as metal from qiskit_metal import designs, draw from qiskit_metal import MetalGUI, Dict, open_docs %metal_heading Welcome to Qiskit Metal! ``` -------------------------------- ### Perform Basic Qiskit Metal GUI Operations and Inspect Design Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Demonstrates fundamental Qiskit Metal GUI commands for refreshing the view, taking screenshots, highlighting components, and inspecting the design's component keys and individual component objects. ```python gui.rebuild() gui.autoscale() ``` ```python gui.toggle_docks(True) gui.screenshot() ``` ```python gui.toggle_docks(True) gui.highlight_components(['Q1','Q2','Q3','Q4','cpw1','cpw2','cpw3','cpw4']) gui.screenshot() ``` ```python design.components.keys() ``` ```python design.components.cpw2 ``` -------------------------------- ### Initialize Qiskit Metal Planar Design and GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/circuit-examples/full-design-flow-examples/Example-used-in-the-launch-video.ipynb This code initializes a new planar design object and instantiates the Qiskit Metal GUI, linking it to the design for interactive visualization and manipulation. It also shows how to get template options for a TransmonPocket qubit. ```python design = designs.DesignPlanar() gui = MetalGUI(design) from qiskit_metal.qlibrary.qubits.transmon_pocket import TransmonPocket TransmonPocket.get_template_options(design) ``` -------------------------------- ### GUI Interaction: Autoscale and Screenshot View Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Demonstrates using the Qiskit Metal GUI's autoscale feature to automatically adjust the view to fit all components within the display, followed by capturing a screenshot. ```python gui.autoscale() gui.screenshot() ``` -------------------------------- ### Open Qiskit Metal Component Source Editor Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Demonstrates how to programmatically open the source code editor for a specified Qiskit Metal component ('Q1') using the GUI utility. This enables on-the-fly modifications to component definitions, which can then be applied by rebuilding the component. ```Python gui.edit_component('Q1') ``` -------------------------------- ### Access EPR Analysis Simulation Setup Object Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example full chip design.ipynb Retrieves the simulation setup object from the EPR analysis instance. This object contains all configurable parameters for the eigenmode simulation. ```python em_p = eig_qb.sim.setup ``` -------------------------------- ### Create Transmon Pocket Qubit Component Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This code imports the 'TransmonPocket' class and instantiates a new transmon qubit component named 'Q1' within the current design. After creation, 'gui.rebuild()' is called to update the GUI and display the newly added component. ```python from qiskit_metal.qlibrary.qubits.transmon_pocket import TransmonPocket q1 = TransmonPocket(design, 'Q1') gui.rebuild() ``` -------------------------------- ### Visualize Qiskit Metal Component in GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Provides a sequence of GUI commands to refresh the display, autoscale, select, zoom, and highlight a specific component ('Q1'), finally taking a screenshot. This is used for visual inspection and debugging of component placement and design in the Qiskit Metal GUI. ```Python gui.rebuild() gui.autoscale() gui.edit_component('Q1') gui.zoom_on_components(['Q1']) gui.highlight_components(['Q1']) gui.screenshot() ``` -------------------------------- ### Import Qiskit Metal Libraries and Initialize Environment Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/circuit-examples/full-design-flow-examples/Example-used-in-the-launch-video.ipynb This snippet loads necessary extensions and imports core Qiskit Metal modules, including design, drawing utilities, and the GUI, preparing the environment for design creation. ```python %load_ext autoreload %autoreload 2 import qiskit_metal as metal from qiskit_metal import designs, draw from qiskit_metal import MetalGUI, Dict, Headings ``` -------------------------------- ### Initialize a Planar Qiskit Metal Design Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This snippet creates a new instance of a 'DesignPlanar' object, which serves as the foundational canvas for building quantum circuits in Qiskit Metal. All components will be added to this design object. ```python design = designs.DesignPlanar() ``` -------------------------------- ### Prepare Qiskit Metal Environment and Initialize Design Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example used in the launch video.ipynb Sets up the Qiskit Metal environment by loading autoreload, importing necessary modules like `qiskit_metal`, `designs`, `draw`, `MetalGUI`, `Dict`, `Headings`, and initializing a `DesignPlanar` object and `MetalGUI`. ```python %load_ext autoreload %autoreload 2 import qiskit_metal as metal from qiskit_metal import designs, draw from qiskit_metal import MetalGUI, Dict, Headings ``` -------------------------------- ### Create New Ansys HFSS Solution Setup Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/4 Analysis/A. Core - EM and quantization/4.03 Impedance.ipynb Illustrates how to programmatically create a new solution setup within the Ansys HFSS renderer. This method allows specifying setup parameters like name and maximum passes, mimicking the 'Add Solution Setup' functionality in Ansys Project Manager. ```python setup = em1.renderer.new_ansys_setup(name = "Setup_demo", max_passes = 6) ``` -------------------------------- ### Build Qiskit-Metal Documentation Locally Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix B Quick topics/Opening documentation.ipynb Provides an IPython magic command to run the `build_docs.py` script, which compiles the Qiskit-Metal documentation locally. This command should be executed directly in IPython (not within a Jupyter Notebook) and requires patience as the build process can take approximately 15 minutes, installing necessary libraries and running `make html`. ```Python %run ../../docs/build_docs.py ``` -------------------------------- ### Parse Value with Addition Arithmetic Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This example shows the 'parse_value' function's capability to process strings containing addition operations with units. The expression is evaluated, and the result is converted to the design's default unit. ```python design.parse_value('2um + 5um') ``` -------------------------------- ### Display Metal Print Message for Unit Handling Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This '%metal_print' command provides an interactive message about working with units in Qiskit Metal. It highlights the functionality for parsing options and values that include unit specifications. ```python %metal_print How do I work with units?

(parse options and values) ``` -------------------------------- ### List and Remove Conda Environments Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/installation.rst These commands provide a way to manage existing Conda environments. The first command lists all available Conda environments, while the second command allows for the complete removal of a specified environment, which can be useful for re-creating a clean setup. ```bash conda env list conda env remove -n ``` -------------------------------- ### Import Qiskit Metal Core Libraries and Initialize GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example full chip design.ipynb Imports essential Qiskit Metal modules, including the main `metal` package, `designs` for chip design, `draw` for rendering, `MetalGUI` for the graphical interface, `Dict` for configuration, and `open_docs` for documentation access. It also displays a welcome heading using a Metal-specific magic command. ```python import qiskit_metal as metal from qiskit_metal import designs, draw from qiskit_metal import MetalGUI, Dict, open_docs %metal_heading Welcome to Qiskit Metal! ``` -------------------------------- ### Create N-sided Polygon (NGon) Component Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Shows how to import and instantiate the `NGon` component from `qiskit_metal.qlibrary.sample_shapes`. It demonstrates defining its properties like number of sides, radius, position, and orientation, including an example of creating a subtracted version. ```python from qiskit_metal.qlibrary.sample_shapes.n_gon import NGon # display(NGon.get_template_options(design)) ops = { 'n': '5', 'radius': '250um', 'pos_x': '-0.85mm', 'pos_y': '2.0mm', 'orientation': '15', 'subtract': 'False', 'helper': 'False', 'chip': 'main', 'layer': '1'} NGon(design, 'ngon', ops) NGon(design, 'ngon_negative', {**ops, **dict(subtract=True, radius='350um')}) gui.rebuild() ``` -------------------------------- ### Clear All Qiskit Metal Components Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Illustrates how to remove all existing components from the Qiskit Metal design and refresh the GUI. This is a common setup step before creating a new design or re-running a design script to ensure a clean slate. ```Python design.delete_all_components() gui.rebuild() # refresh ``` -------------------------------- ### Parse List with Mixed Types and Units Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This advanced example demonstrates the 'parse_value' function's ability to interpret complex Python list strings. It shows how numerical values and unit-suffixed strings within a list are correctly parsed and converted to their appropriate types and values. ```python print('* '*10+' LIST '+'* '*10,'\n') str_in = "[1,2,3,'10um']" out = design.parse_value(str_in) print(f'Parsed output:\n {str_in} -> {out} \n Out type: {type(out)}\n') str_in = "['2*2um', '2um + 5um']" out = design.parse_value(str_in) print(f'Parsed output:\n {str_in} -> {out} \n Out type: {type(out)}\n') ``` -------------------------------- ### Initialize Qiskit Metal Environment and Import Libraries Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example used in the launch video.ipynb This snippet loads the IPython autoreload extension and imports essential modules from the `qiskit_metal` library. It sets up the development environment by bringing in core components for design creation, drawing utilities, and the graphical user interface (GUI). ```python %load_ext autoreload %autoreload 2 import qiskit_metal as metal from qiskit_metal import designs, draw from qiskit_metal import MetalGUI, Dict, Headings ``` -------------------------------- ### Parse Unit Strings to Design Values Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This code demonstrates Qiskit Metal's ability to parse strings containing unit specifications into numerical values based on the design's default units. It shows examples for single strings, dictionaries, and lists, converting them to the appropriate internal representation. ```python print('Design default units for length: ', design.get_units()) print('\nExample 250 micron parsed to design units:', design.parse_value('250 um'), design.get_units()) dictionary = {'key_in_cm': '1.2 cm', 'key_in_microns': '50 um'} print('\nExample parse dict:', design.parse_value(dictionary)) a_list = ['1m', '1mm', '1um', '1 nm'] print('\nExample parse list:', design.parse_value(a_list)) ``` -------------------------------- ### Run Specific Ansys HFSS Solution Setup Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/4 Analysis/A. Core - EM and quantization/4.03 Impedance.ipynb Shows how to initiate the analysis for a previously defined Ansys HFSS solution setup by its name. This allows running individual setups configured through `new_ansys_setup`. ```python em1.renderer.analyze_setup(setup.name) ``` -------------------------------- ### Connect Qiskit Metal Components with Exchange Coupler Lines Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example used in the launch video.ipynb Illustrates how to connect various Qiskit Metal components (Q1, Q2, Q3, Q4) to their respective pads (P1_Q, P2_Q, P3_Q, P4_Q) using a `connect` function. It defines lead-in options, trace gap, and trace width for the connections, and includes `gui.rebuild()` and `gui.autoscale()` for visualization updates. ```python options = Dict( lead=Dict( start_straight='0.35mm', end_straight='0.15mm'), trace_gap='9um', trace_width='15um') ol1 = connect('ol1', 'Q1', 'a', 'P1_Q', 'tie', '5.5 mm', f'+{asym}um', flip=True) ol2 = connect('ol2', 'Q2', 'a', 'P2_Q', 'tie', '13.0 mm', f'+{asym}um', flip=True) ol3 = connect('ol3', 'Q3', 'a', 'P3_Q', 'tie', '5.5 mm', f'+{asym}um', flip=True) ol4 = connect('ol4', 'Q4', 'a', 'P4_Q', 'tie', '13.0 mm', f'+{asym}um', flip=True) gui.rebuild() gui.autoscale() ``` -------------------------------- ### Install Gmsh Binary on Apple Silicon Macs via Homebrew Source: https://github.com/qiskit-community/qiskit-metal/blob/main/README_Gmsh_Elmer.md For Apple Silicon Macs (M1/M2 chips), `pip install gmsh` might not correctly link the Python package. Use Homebrew to install the Gmsh binary, which often resolves import issues in Python environments. ```bash $ brew install gmsh ``` -------------------------------- ### Instantiate Transmon Pocket with Custom Pins Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Demonstrates how to create a `TransmonPocket` component in Qiskit Metal, configuring it with custom dimensions for the pad and pocket, and defining four connection pads (pins) at specific locations relative to the component. It also clears existing components before creating the new one to ensure a clean design state. ```Python from qiskit_metal.qlibrary.qubits.transmon_pocket import TransmonPocket design.delete_all_components() options = dict( pad_width = '425 um', pocket_height = '650um', connection_pads = dict( # pin connectors a = dict(loc_W=+1,loc_H=+1), b = dict(loc_W=-1,loc_H=+1, pad_height='30um'), c = dict(loc_W=+1,loc_H=-1, pad_width='200um'), d = dict(loc_W=-1,loc_H=-1, pad_height='50um') ) ) q1 = TransmonPocket(design, 'Q1', options = dict(pos_x='+0.5mm', pos_y='+0.5mm', **options)) ``` -------------------------------- ### Build Qiskit Metal Documentation Locally Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/tut/quick-topics/Opening-documentation.ipynb Illustrates the command to build the Qiskit Metal documentation locally from source. This command should be executed directly in an IPython shell, not within a Jupyter Notebook, and the build process can take approximately 15 minutes. It involves installing required Python libraries and running `make html`. ```ipython %run ../../docs/build_docs.py ``` -------------------------------- ### Import Qiskit Metal Libraries and Initialize Heading Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/tut/2-From-components-to-chip/2.01-How-to-use-a-QComponent.ipynb This code imports essential modules from the Qiskit Metal library, including core components for design, drawing, and the graphical user interface. It also uses a Qiskit Metal-specific magic command to display a welcome message, indicating the successful initialization of the environment. ```python import qiskit_metal as metal from qiskit_metal import designs, draw from qiskit_metal import MetalGUI, Dict, open_docs %metal_heading Welcome to Qiskit Metal! ``` -------------------------------- ### Add Solution Setup to Ansys HFSS Driven Modal Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/4 Analysis/B. Advanced - Direct use of the renderers/4.19 Multiplanar with pyaedt for Ansys/DrivenModal_pyaedt_multiplanar.ipynb Demonstrates how to add a solution setup to the Ansys HFSS driven modal project using `add_hfss_dm_setup`. It shows adding a default setup, a custom setup with reduced passes, and commented-out examples for 'MultiFrequency' and 'Broadband' solve types. ```python # Ansys should add project and design for hfss_dm. hfss_dm.add_hfss_dm_setup() # Reduce MaxPass when running notebook as an example. hfss_dm.add_hfss_dm_setup(name='fun_dm_1', MaximumPasses=3) #### We have access to other solution frequency types as well #### Normally it defaults to `SolveType=Single` (single frequency). ## 1. Multiple Frequencies # multiple_freqs = OrderedDict([('4GHz', [0.01]), # ('6GHz', [0.001]), # ('11GHz', [0.0001])]) # hfss_dm.add_hfss_dm_setup( # name=None, # SolveType='MultiFrequency' # MultipleAdaptiveFreqsSetup=multiple_freqs) ## 2. Broadband # hfss_dm.add_hfss_dm_setup( # name=None, # SolveType='Broadband', # BroadbandLowFreq="4", # GHz # BroadbandHighFreq="11" # GHz # ) ``` -------------------------------- ### Initialize Qiskit Metal Design and GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example used in the launch video.ipynb Initializes a `DesignPlanar` object and a `MetalGUI` instance, which are fundamental steps for creating and interacting with a Qiskit Metal design. It also imports `TransmonPocket` for later use. ```python design = designs.DesignPlanar() gui = MetalGUI(design) from qiskit_metal.qlibrary.qubits.transmon_pocket import TransmonPocket ``` -------------------------------- ### Manage Design-Wide Variables and Component Options Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Explains how to define and utilize global variables within the Qiskit Metal design, which can then be referenced by individual component options. This allows for centralized control over design parameters like CPW width or pad dimensions, simplifying modifications across multiple components. The example shows setting variables and assigning them to qubit pad widths. ```python design.variables.cpw_width = '10um' design.variables.cpw_gap = '6um' gui.rebuild() ``` ```python cpw1.options.lead.end_straight = '100um' cpw2.options.lead.end_straight = '100um' cpw3.options.lead.end_straight = '100um' cpw4.options.lead.end_straight = '100um' ``` ```python # Set variables in the design design.variables.pad_width = '450 um' design.variables.cpw_width = '25 um' design.variables.cpw_gap = '12 um' # Assign variables to component options q1.options.pad_width = 'pad_width' q2.options.pad_width = 'pad_width' q3.options.pad_width = 'pad_width' q4.options.pad_width = 'pad_width' # Rebuild all components and refresh the gui gui.rebuild() gui.autoscale() ``` ```python gui.screenshot() ``` -------------------------------- ### Create and Install Qiskit Metal in New Conda Environment Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/installation.rst These commands set up a new, isolated Conda environment for Qiskit Metal. First, navigate into the cloned 'qiskit-metal' directory. Then, create the environment using the provided 'environment.yml' file, activate it, and finally install Qiskit Metal in editable mode, allowing for immediate observation of code modifications. ```bash cd qiskit-metal conda env create -n -f environment.yml conda activate python -m pip install --no-deps -e . ``` -------------------------------- ### Update Qiskit Metal Package in Development Mode Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/installation.rst This command updates the Qiskit Metal package in an active environment by reinstalling it in editable mode using `pip`. This is the recommended method for updating local installations, especially when package dependencies evolve. ```bash python -m pip install -ve . ``` -------------------------------- ### Test Gmsh Python Module Import Source: https://github.com/qiskit-community/qiskit-metal/blob/main/README_Gmsh_Elmer.md Open a Python REPL and attempt to import the `gmsh` module. A successful import without errors confirms that Gmsh is correctly installed and accessible within your Python environment. ```python $ python ... ... >>> import gmsh # No Error >>> ``` -------------------------------- ### Instantiate Component and Update Metal GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/tut/2-From-components-to-chip/2.31-Create-a-QComponent-Basic.ipynb Instantiates the `MySimpleGapCapacitor` component within the design, then rebuilds, autoscales, and takes a screenshot of the GUI to visualize the newly added component. ```python my_cap = MySimpleGapCapacitor(design,'my_cap') gui.rebuild() gui.autoscale() gui.screenshot() ``` -------------------------------- ### Launch Qiskit Metal Graphical User Interface Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/circuit-examples/E.Input-output-coupling/43-TransmonPocketCL.ipynb Initializes and launches the Qiskit Metal GUI, providing an interactive environment to visualize, edit, and simulate the quantum circuit design created with the `DesignPlanar` object. ```python #Launch Qiskit Metal GUI to interactively view, edit, and simulate QDesign: Metal GUI gui = MetalGUI(design) ``` -------------------------------- ### Launch Qiskit Metal Graphical User Interface Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/circuit-examples/A.Qubits/06-Transmon_floating_6.ipynb Initializes and launches the Qiskit Metal GUI, linking it to the current design object. This enables interactive visualization, editing, and simulation of the quantum circuit design. ```python gui = MetalGUI(design) ``` -------------------------------- ### Display Metal Print Message for Changing Default Options Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This '%metal_print' command serves as a prompt, guiding the user on how to modify the default options for Qiskit Metal components. It's part of the interactive tutorial flow. ```python %metal_print How do I change the default options? ``` -------------------------------- ### Set Up Git Pre-commit Hooks Source: https://github.com/qiskit-community/qiskit-metal/blob/main/README_developers.md Executes the `hook_setup` script located in the project's root directory to link available pre-commit hooks. This ensures that code quality checks are performed automatically before each commit. On Windows, this script must be run from a Linux-style shell like Git Bash. ```shell ./hook_setup ``` -------------------------------- ### Display Metal Print Message for Default Options Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb This '%metal_print' command is used to prompt the user about how to find the default options for Qiskit Metal components. It's a common way to guide users in interactive sessions. ```python %metal_print Where are the default options? ``` -------------------------------- ### Import Qiskit Metal Libraries and Initialize GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/circuit-examples/full-design-flow-examples/Exercise-for-the-South-Korea-Hackathon'20.ipynb Imports the necessary Qiskit Metal modules for design, drawing, and GUI interaction. It then initializes the MetalGUI, which provides a graphical interface for interacting with the Qiskit Metal design environment, and displays a welcome message. ```python import qiskit_metal as metal from qiskit_metal import designs, draw from qiskit_metal import MetalGUI, Dict, open_docs %metal_heading Welcome to Qiskit Metal! ``` -------------------------------- ### Update and Install Qiskit Metal in Existing Conda Environment Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/installation.rst This set of commands allows you to integrate Qiskit Metal into an already existing Conda environment. It updates the specified environment using the 'environment.yml' file, activates it, and then installs Qiskit Metal in editable mode. Be aware that this method might lead to version conflicts if the existing environment's packages are incompatible. ```bash conda env update -n environment.yml conda activate python -m pip install --no-deps -e . ``` -------------------------------- ### Install Qiskit Metal in New Conda Environment Source: https://github.com/qiskit-community/qiskit-metal/blob/main/README_developers.md These commands create a new conda environment, activate it, and install Qiskit Metal in editable mode. The 'environment.yml' file handles dependencies, and '--no-deps' prevents pip from conflicting with conda-managed packages. This is the most reliable setup method. ```sh conda env create -n environment.yml conda activate python -m pip install --no-deps -e . ``` -------------------------------- ### Initialize Qiskit Metal Planar Design and GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/circuit-examples/full-design-flow-examples/Example-used-in-the-launch-video.ipynb This code initializes a new `DesignPlanar` object, which serves as the canvas for the Qiskit Metal design. It then creates a `MetalGUI` instance linked to this design, enabling graphical interaction. It also imports `TransmonPocket` for later use. ```python design = designs.DesignPlanar() gui = MetalGUI(design) from qiskit_metal.qlibrary.qubits.transmon_pocket import TransmonPocket ``` -------------------------------- ### Initialize Qiskit Metal Design and GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/tut/2-From-components-to-chip/2.31-Create-a-QComponent-Basic.ipynb Initializes a `DesignPlanar` object for Qiskit Metal and creates a `MetalGUI` instance, preparing the environment for component design and visualization. ```python design = metal.designs.DesignPlanar() gui = metal.MetalGUI(design) ``` -------------------------------- ### Modify LOManalysis Simulation Setup Parameter in Qiskit Metal Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/4 Analysis/A. Core - EM and quantization/4.01 Capacitance and LOM.ipynb Demonstrates how to update a specific simulation parameter within the `LOManalysis` setup. In this example, the `max_passes` setting is changed to 6, which controls the maximum number of adaptive passes for the simulation. ```python # example: update single setting c1.sim.setup.max_passes = 6 ``` -------------------------------- ### Register Qiskit Metal Conda Environment with Jupyter Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/installation.rst This snippet outlines the steps to activate a specified Conda environment, install the `ipykernel` package, and then register the environment as a new kernel within Jupyter. This allows users to select and utilize the Qiskit Metal Conda environment directly from Jupyter notebooks or JupyterLab. ```bash conda activate conda install ipykernel ipython kernel install --user --name= ``` -------------------------------- ### Launch Qiskit Metal GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix C Circuit examples/A. Qubits/02-Transmon_floating.ipynb Launches the Qiskit Metal graphical user interface, providing an interactive environment to visualize, edit, and simulate the quantum circuit design. The GUI is initialized with the previously created `design` object. ```python gui = MetalGUI(design) ``` -------------------------------- ### Create V1 Wirebond Launchpads Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example used in the launch video.ipynb This snippet initializes four LaunchpadWirebond components, which are used as input/output ports for the design, specifying their positions, orientations, and CPW dimensions. These are standard wirebond pads for connecting to external circuitry. ```python from qiskit_metal.qlibrary.terminations.launchpad_wb import LaunchpadWirebond p1_c = LaunchpadWirebond(design, 'P1_C', options = dict(pos_x='4000um', pos_y='2812um', orientation='270', lead_length='0um', cpw_gap='9um', cpw_width='15um')) p2_c = LaunchpadWirebond(design, 'P2_C', options = dict(pos_x='4000um', pos_y='-2812um', orientation='90', lead_length='0um', cpw_gap='9um', cpw_width='15um')) p3_c = LaunchpadWirebond(design, 'P3_C', options = dict(pos_x='-4000um', pos_y='-2812um', orientation='90', lead_length='0um', cpw_gap='9um', cpw_width='15um')) p4_c = LaunchpadWirebond(design, 'P4_C', options = dict(pos_x='-4000um', pos_y='2812um', orientation='270', lead_length='0um', cpw_gap='9um', cpw_width='15um')) ``` -------------------------------- ### Define Advanced Routing Options and Create a Mixed Line in Qiskit Metal Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/tut/2-From-components-to-chip/2.14-Get-them-all-with-MixedRoute.ipynb This comprehensive Python example illustrates the setup of intricate routing parameters for a `RouteMixed` component in Qiskit Metal. It defines anchor points, segment types (`between_anchors`), and detailed jog extensions for both start and end points of the route. The `optionsR` dictionary consolidates various settings like total length, chip, layer, trace width, and advanced collision avoidance, culminating in the instantiation of the `RouteMixed` object and subsequent GUI updates. ```python anchors = OrderedDict() anchors[0] = np.array([0.,-1.5]) between_anchors = OrderedDict() # S, M, PF between_anchors[0] = "S" between_anchors[1] = "PF" jogsS = OrderedDict() jogsS[0] = ["R", '200um'] jogsS[1] = ["R", '200um'] jogsS[2] = ["L", '200um'] jogsS[3] = ["L", '500um'] jogsE = OrderedDict() jogsE[0] = ["L", '200um'] jogsE[1] = ["L", '200um'] jogsE[2] = ["R", '200um'] jogsE[3] = ["R", '500um'] optionsR = {'pin_inputs': { 'start_pin': {'component': 'Q0', 'pin': 'c'}, 'end_pin': {'component': 'Q1', 'pin': 'd'} }, 'total_length': '12mm', 'chip': 'main', 'layer': '1', 'trace_width': 'cpw_width', 'step_size': '0.25mm', 'anchors': anchors, 'between_anchors': between_anchors, 'advanced': {'avoid_collision': 'true'}, 'meander': { 'spacing': '200um', 'asymmetry': '0um' }, 'snap': 'true', 'lead': { 'start_straight': '0.3mm', 'end_straight': '0.3mm', 'start_jogged_extension': jogsS, 'end_jogged_extension': jogsE }, **ops } qc = RouteMixed(design, 'line3', optionsR) gui.rebuild() gui.autoscale() ``` -------------------------------- ### Initialize Open-Ended Terminations and Straight Route Setup Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix B Quick topics/Managing pins.ipynb Initializes multiple `OpenToGround` components at specified positions and orientations to serve as termination points for CPW lines. It then begins defining a `RouteStraight` component, connecting two of these termination points, illustrating the setup for a straight CPW routing example. ```python open_start_straight = OpenToGround(design,'Open_straight_start',options=Dict(pos_x='0um',pos_y='0um',orientation = '-90')) open_end_straight = OpenToGround(design,'Open_straight_end',options=Dict(pos_x='0um',pos_y='1500um',orientation = '90')) open_start_auto = OpenToGround(design,'Open_auto_start',options=Dict(pos_x='250um',pos_y='0um',orientation = '-90')) open_end_auto = OpenToGround(design,'Open_auto_end',options=Dict(pos_x='250um',pos_y='1500um',orientation = '0')) open_start_meander = OpenToGround(design,'Open_meander_start',options=Dict(pos_x='1000um',pos_y='0um',orientation = '-90')) open_end_meander = OpenToGround(design,'Open_meander_end',options=Dict(pos_x='1000um',pos_y='1500um',orientation = '90')) testStraight = RouteStraight(design,'straightTest',options=Dict(pin_inputs=Dict( start_pin=Dict( component = 'Open_straight_start', pin = 'open'), end_pin=Dict( component = 'Open_straight_end', ``` -------------------------------- ### Inspect Options of an Instantiated Launch Pad Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix C Circuit examples/E. Input-output-coupling/41-LaunchPad.ipynb This snippet accesses and displays the current configuration options of the `LaunchpadWirebondCoupled` instance named `lp`. This allows verification of the parameters applied during its creation or any subsequent modifications. ```python lp.options ``` -------------------------------- ### Initialize Qiskit Metal Environment and GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/4 Analysis/D. Hamiltonian models - after quantization/Design and Simulation of a Cross-Resonance Gate.ipynb This snippet imports necessary modules from the `qiskit_metal` library to begin a physical design project. It includes the core `metal` module, design components (`designs`, `draw`), and the graphical user interface (`MetalGUI`) along with utility classes like `Dict` for configuration. ```python import qiskit_metal as metal from qiskit_metal import designs, draw from qiskit_metal import MetalGUI, Dict, open_docs ``` -------------------------------- ### Define Frequency Sweep for Simulation Analysis Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/4 Analysis/B. Advanced - Direct use of the renderers/4.14 Analyze a double hanger resonator (S Param).ipynb Adds a frequency sweep configuration to the simulation setup. It defines the sweep's name, the associated setup, the start and stop frequencies (in GHz), the number of points, and the sweep type ('Interpolating'). ```python hfss.add_sweep(setup_name="Setup", name="Sweep", start_ghz=4.0, stop_ghz=8.0, count=2001, type="Interpolating") ``` -------------------------------- ### Launch Qiskit Metal GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix C Circuit examples/A. Qubits/10-Transmon_floating_teeth.ipynb Initializes and launches the Qiskit Metal graphical user interface, providing an interactive environment to view, edit, and simulate the quantum circuit design. ```python gui = MetalGUI(design) ``` -------------------------------- ### Define and Route Mixed Line with Advanced Options in Qiskit Metal Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/2 From components to chip/B. Routing between QComponents/2.14 Get them all with MixedRoute.ipynb This example illustrates how to define a complex routing path using the `RouteMixed` class in Qiskit Metal. It involves setting up ordered dictionaries for anchors, intermediate points ('between_anchors'), and jog extensions for both start and end points. The 'optionsR' dictionary consolidates all routing parameters, including pin connections, total length, layer, trace width, and advanced meander/snap settings. Finally, the route is instantiated and the GUI is updated. ```python anchors = OrderedDict() anchors[0] = np.array([0.,-1.5]) between_anchors = OrderedDict() # S, M, PF between_anchors[0] = "S" between_anchors[1] = "PF" jogsS = OrderedDict() jogsS[0] = ["R", '200um'] jogsS[1] = ["R", '200um'] jogsS[2] = ["L", '200um'] jogsS[3] = ["L", '500um'] jogsE = OrderedDict() jogsE[0] = ["L", '200um'] jogsE[1] = ["L", '200um'] jogsE[2] = ["R", '200um'] jogsE[3] = ["R", '500um'] optionsR = {'pin_inputs': { 'start_pin': {'component': 'Q0', 'pin': 'c'}, 'end_pin': {'component': 'Q1', 'pin': 'd'} }, 'total_length': '12mm', 'chip': 'main', 'layer': '1', 'trace_width': 'cpw_width', 'step_size': '0.25mm', 'anchors': anchors, 'between_anchors': between_anchors, 'advanced': {'avoid_collision': 'true'}, 'meander': { 'spacing': '200um', 'asymmetry': '0um' }, 'snap': 'true', 'lead': { 'start_straight': '0.3mm', 'end_straight': '0.3mm', 'start_jogged_extension': jogsS, 'end_jogged_extension': jogsE }, **ops } qc = RouteMixed(design, 'line3', optionsR) gui.rebuild() gui.autoscale() ``` -------------------------------- ### Checking Qiskit Metal Version Information Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/tut/3-Renderers/3.4-How-do-I-make-my-custom-QRenderer.ipynb Shows how to retrieve and display the current version information of the Qiskit Metal installation using the `metal.about()` command. This is useful for verifying the environment setup. ```python metal.about(); ``` -------------------------------- ### Explore Options for LaunchpadWirebondCoupled Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix C Circuit examples/E. Input-output-coupling/41-LaunchPad.ipynb This code demonstrates how to retrieve and inspect the default configurable options for the `LaunchpadWirebondCoupled` component. This is useful for understanding what parameters can be customized when instantiating the component. ```python LaunchpadWirebondCoupled.get_template_options(design) ``` -------------------------------- ### Access QComponent Path Geometry Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Demonstrates how to retrieve the path (line) geometry data for a specific QComponent using the `qgeometry_table('path')` method. These paths can have a defined width. ```python q1.qgeometry_table('path') ``` -------------------------------- ### Configure Qiskit Metal LOM Simulation Setup Parameters Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example full chip design.ipynb This snippet configures various simulation parameters for the `LOManalysis` object `c1`. It sets the simulation name, maximum adaptive passes, minimum converged passes, and the percentage error tolerance, then displays the updated setup. These settings control the accuracy and duration of the simulation. ```python c1.sim.setup.name = 'Tune_Q_Main' c1.sim.setup.max_passes = 16 c1.sim.setup.min_converged_passes = 2 c1.sim.setup.percent_error = 0.05 c1.sim.setup ``` -------------------------------- ### Display Qiskit Metal Version Information Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/tut/3-Renderers/3.2-Export-your-design-to-GDS.ipynb Executes the `metal.about()` command to print comprehensive details about the installed Qiskit Metal version, environment, and dependencies. This is useful for debugging, verifying the setup, and reporting issues. ```python metal.about(); ``` -------------------------------- ### Initialize Qiskit Metal Design and GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix B Quick topics/JJ Demo Notebook.ipynb Sets up the Qiskit Metal environment by creating a new planar design instance and initializing the `MetalGUI`. This prepares the workspace for adding and visualizing QComponents. ```python design = designs.DesignPlanar() gui = MetalGUI(design) ``` -------------------------------- ### Access QComponent Junction Geometry Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Demonstrates how to retrieve the junction geometry data for a specific QComponent using the `qgeometry_table('junction')` method. Junction placement is defined by a LineString and width. ```python q1.qgeometry_table('junction') ``` -------------------------------- ### Initialize Qiskit Metal Planar Design and GUI Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/Appendix A Full design flow examples/Example full chip design.ipynb Creates an instance of `DesignPlanar` to represent the chip layout, which is the foundation for adding components. It then initializes the `MetalGUI` with this design, launching the graphical user interface for interactive design and visualization. ```python design = metal.designs.DesignPlanar() gui = metal.MetalGUI(design) ``` -------------------------------- ### Create Hollow Rectangle Component Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Shows how to import and instantiate the `RectangleHollow` component, defining its outer and inner dimensions, position, and orientation. This allows for creating rectangular shapes with a cutout. ```python from qiskit_metal.qlibrary.sample_shapes.rectangle_hollow import RectangleHollow display(RectangleHollow.get_template_options(design)) ops = { 'width': '500um', 'height': '300um', 'pos_x': '-2.3mm', 'pos_y': '2mm', 'orientation': '0', 'subtract': 'False', 'helper': 'False', 'chip': 'main', 'layer': '1', 'inner': { 'width': '250um', 'height': '100um', 'offset_x': '40um', 'offset_y': '-20um', 'orientation': '15'}} RectangleHollow(design, 'RectangleHollow', ops) gui.rebuild() ``` -------------------------------- ### Configure RouteMeander and Global CPW Options Source: https://github.com/qiskit-community/qiskit-metal/blob/main/docs/circuit-examples/full-design-flow-examples/Example-used-in-the-launch-video.ipynb This snippet imports the `RouteMeander` class and retrieves its default template options, which can be used as a reference. It then defines a global `options` dictionary for CPW (Coplanar Waveguide) routing, specifying lead lengths, trace gap, and trace width for consistent connections. ```python from qiskit_metal.qlibrary.tlines.meandered import RouteMeander RouteMeander.get_template_options(design) options = Dict( lead=Dict( start_straight='0.2mm', end_straight='0.2mm'), trace_gap='9um', trace_width='15um') ``` -------------------------------- ### GUI Interaction: Zoom and Screenshot CircleRaster Component Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Demonstrates zooming the Qiskit Metal GUI to focus specifically on the 'CircleRaster' component and subsequently taking a screenshot of the zoomed view. ```python gui.zoom_on_components(['CircleRaster']) gui.screenshot() ``` -------------------------------- ### GUI Interaction: Zoom and Screenshot NGon Component Source: https://github.com/qiskit-community/qiskit-metal/blob/main/tutorials/1 Overview/1.2 Quick start.ipynb Demonstrates zooming the Qiskit Metal GUI to focus specifically on the 'ngon_negative' component and subsequently taking a screenshot of the zoomed view. ```python gui.zoom_on_components(['ngon_negative']) gui.screenshot() ```