From c1ed7c83e69258ad2b873e2356a9da1cd5d95231 Mon Sep 17 00:00:00 2001 From: PositroniumJS <150566116+PositroniumJS@users.noreply.github.com> Date: Tue, 31 Dec 2024 14:21:32 +0100 Subject: [PATCH] Add missing gui styles when installing (#1007) * Correct setup.py to import the default styles of the gui * Fix typos --- docs/tut/1-Overview/1.2-Quick-start.ipynb | 40 +++++++++---------- .../1.3-Saving-Your-Chip-Design.ipynb | 8 ---- .../2.01-How-to-use-a-QComponent.ipynb | 27 +++++-------- .../2.02-How-to-copy-a-QComponent.ipynb | 11 +---- .../2.11-Routing-101.ipynb | 2 +- .../2.21-Design-a-4-qubit-full-chip.ipynb | 2 +- .../4-Analysis/4.02-Eigenmode-and-EPR.ipynb | 2 +- qiskit_metal/_gui/component_widget_ui.py | 4 +- qiskit_metal/_gui/component_widget_ui.ui | 4 +- qiskit_metal/_gui/styles/metal_dark/TODO.txt | 2 +- setup.py | 13 +++++- tutorials/1 Overview/1.2 Quick start.ipynb | 38 +++++++++--------- .../1.3 Saving Your Chip Design.ipynb | 8 ---- .../2.01 How to use a QComponent.ipynb | 25 +++++------- .../2.02 How to copy a QComponent.ipynb | 11 +---- .../2.11 Routing 101.ipynb | 2 +- .../2.21 Design a 4 qubit full chip.ipynb | 2 +- .../4.02 Eigenmode and EPR.ipynb | 4 +- 18 files changed, 85 insertions(+), 120 deletions(-) diff --git a/docs/tut/1-Overview/1.2-Quick-start.ipynb b/docs/tut/1-Overview/1.2-Quick-start.ipynb index 686d2fed7..94d0c940e 100644 --- a/docs/tut/1-Overview/1.2-Quick-start.ipynb +++ b/docs/tut/1-Overview/1.2-Quick-start.ipynb @@ -85,7 +85,7 @@ "\n", "##### Interactivly view, edit, and simulate QDesign: Metal GUI\n", "\n", - "To launch the qiskit metal GUI,use the method `MetalGUI`.\n", + "To launch the qiskit metal GUI, use the method `MetalGUI`.\n", "```python \n", "gui = MetalGUI(design)\n", "```\n" @@ -165,7 +165,7 @@ "source": [ "## My First Quantum Component (QComponent)\n", "### A transmon qubit\n", - "We can create a ready-made and optimized transmon qubit form the QLibrary of components.\n", + "We can create a ready-made and optimized transmon qubit from the QLibrary of components.\n", "Qubit qcomponents are stored in the library `qiskit_metal.qlibrary.qubits`. The file that contains the transmon pocket is called `transmon_pocket`,\n", "and the `QComponent` class inside it is `TransmonPocket`.\n", "\n", @@ -279,9 +279,9 @@ "metadata": {}, "source": [ "#### What are the default options?\n", - "The QComponent comes with some default options. The options are used in the `make` function of the qcomponent to create the QGeometry you see in the plot above. \n", + "The QComponent comes with some default options. The options are used in the `make` function of the QComponent to create the QGeometry you see in the plot above. \n", "* Options are parsed by Qiskit Metal. \n", - "* You can change them from the gui or the script api. " + "* You can change them from the GUI or the script API. " ] }, { @@ -324,8 +324,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You can use the gui to create, edit, plot, modify, quantum components.\n", - "Equivalently, you can also do everything form the python API. \n", + "You can use the GUI to create, edit, plot, modify, quantum components.\n", + "Equivalently, you can also do everything from the python API. \n", "The GUI is just calling the API for you." ] }, @@ -376,7 +376,7 @@ "metadata": {}, "source": [ "### Where are the QComponents stored?\n", - "They are stored in `design.components`. It can be accessd as a dictionary (`design.components['Q1']`) or object (`design.components.Q1`)." + "They are stored in `design.components`. It can be accessed as a dictionary (`design.components['Q1']`) or object (`design.components.Q1`)." ] }, { @@ -429,7 +429,7 @@ "metadata": {}, "source": [ "A QComponent is created with default options.\n", - "To find out what these are use `QComponentClass.get_template_options(design)`" + "To find out what these are, use `QComponentClass.get_template_options(design)`" ] }, { @@ -525,7 +525,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now lets change the default options we will use to create the transmon" + "Now let us change the default options we will use to create the transmon" ] }, { @@ -603,7 +603,7 @@ "text": [ "Design default units for length: mm\n", "\n", - "Example 250 micron parsed to design units: 0.00025 mm\n", + "Example 250 micron parsed to design units: 0.25 mm\n", "\n", "Example parse dict: {'key_in_cm': 12.0, 'key_in_microns': 0.05}\n", "\n", @@ -613,7 +613,7 @@ ], "source": [ "print('Design default units for length: ', design.get_units())\n", - "print('\\nExample 250 micron parsed to design units:', design.parse_value('0.250 um'), design.get_units())\n", + "print('\\nExample 250 micron parsed to design units:', design.parse_value('250 um'), design.get_units())\n", "\n", "dictionary = {'key_in_cm': '1.2 cm', 'key_in_microns': '50 um'}\n", "print('\\nExample parse dict:', design.parse_value(dictionary))\n", @@ -880,11 +880,11 @@ "source": [ "### QPins: The dynamic way to connect qcomponents \n", "\n", - "The component designer can define pins. Pins can be used to link components together. For examaple, two transmon can each have a pin. The two pins can be connectoed by CPWs, as we will show below. \n", + "The component designer can define pins. Pins can be used to link components together. For example, two transmons can each have a pin. The two pins can be connected by CPWs, as we will show below. \n", "\n", "First, let us add pins to the transmon. \n", "We will add 4 pins called `a`, `b`, `c`, and `d`. \n", - "Each pin will be at a differnet location (corner of the transmon), defined by the options `loc_W` and `loc_H`." + "Each pin will be at a different location (corner of the transmon), defined by the options `loc_W` and `loc_H`." ] }, { @@ -900,7 +900,7 @@ "options = dict(\n", " pad_width = '425 um', \n", " pocket_height = '650um',\n", - " connection_pads=dict( # pin connecotrs\n", + " connection_pads = dict( # pin connectors\n", " a = dict(loc_W=+1,loc_H=+1), \n", " b = dict(loc_W=-1,loc_H=+1, pad_height='30um'),\n", " c = dict(loc_W=+1,loc_H=-1, pad_width='200um'),\n", @@ -983,7 +983,7 @@ "metadata": {}, "source": [ "### How do I edit the component source code and see changes immidietly? \n", - "If you have selected a QComponent, you can call the button that says edit source in the gui. \n", + "If you have selected a QComponent, you can call the button that says edit source in the GUI. \n", "Once selected, you could also call the same function from the code." ] }, @@ -1049,8 +1049,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Let's now create a a whole chip. In the following, you will pass options to create 4 transmons qubits in a ring.\n", - "First let us clear all qcomponents in the design. " + "Let's now create a a whole chip. In the following, you will pass options to create 4 transmon qubits in a ring.\n", + "First let us clear all QComponents in the design. " ] }, { @@ -1076,7 +1076,7 @@ "\n", "## Custom options for all the transmons\n", "options = dict(\n", - " # Some options we want to modify from the deafults\n", + " # Some options we want to modify from the defaults\n", " # (see below for defaults)\n", " pad_width = '425 um', \n", " pocket_height = '650um',\n", @@ -1212,7 +1212,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can now modify the options and connect all four qubits. Since this is repetative, you can define a function to wrap up the repetatvie steps. Here we will call this `connect`. This function creates a `RouteMeander` QComponent class." + "We can now modify the options and connect all four qubits. Since this is repetitive, you can define a function to wrap up the repetitive steps. Here we will call this `connect`. This function creates a `RouteMeander` QComponent class." ] }, { @@ -1475,7 +1475,7 @@ "q3.options.pad_width = 'pad_width'\n", "q4.options.pad_width = 'pad_width'\n", "\n", - "# Rebuild all compoinent and refresh the gui \n", + "# Rebuild all components and refresh the gui \n", "gui.rebuild()\n", "gui.autoscale()" ] diff --git a/docs/tut/1-Overview/1.3-Saving-Your-Chip-Design.ipynb b/docs/tut/1-Overview/1.3-Saving-Your-Chip-Design.ipynb index 378a760b8..c83c2c5d0 100644 --- a/docs/tut/1-Overview/1.3-Saving-Your-Chip-Design.ipynb +++ b/docs/tut/1-Overview/1.3-Saving-Your-Chip-Design.ipynb @@ -197,14 +197,6 @@ "source": [ "## Copy the script printed above here. Comment out all other code and run." ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d002af93", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/docs/tut/2-From-components-to-chip/2.01-How-to-use-a-QComponent.ipynb b/docs/tut/2-From-components-to-chip/2.01-How-to-use-a-QComponent.ipynb index cfb9a648a..65a680d98 100644 --- a/docs/tut/2-From-components-to-chip/2.01-How-to-use-a-QComponent.ipynb +++ b/docs/tut/2-From-components-to-chip/2.01-How-to-use-a-QComponent.ipynb @@ -113,14 +113,14 @@ "source": [ "We see that this QComponent consists of two large metallic pads with a thin strip of metal connecting them, corresponding to a Josephson Junction. The transmon qubit is centered at the origin by default. In the GUI, we can see that the ID assigned to our QComponent is \"1\" and that the QComponent class is \"Transmon Pocket.\" \n", "\n", - "Note that since we didn't give the Qcomponent an explicit name, one was assigned automatically (\"Pocket_1\") which we can also see in the GUI. Taking a look at the actual qcomponent python script, we see that there is a \"short name\" defined in the qcomponent metadata (short_name = \"Pocket\" in the dictionary), which is where this name comes from. " + "Note that since we didn't give the QComponent an explicit name, one was assigned automatically (\"Pocket_1\") which we can also see in the GUI. Taking a look at the actual QComponent python script, we see that there is a \"short name\" defined in the QComponent metadata (short_name = \"Pocket\" in the dictionary), which is where this name comes from. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "It is easy to give a specific name to a Qcomponent object. We can delete the QComponent \"Pocket_1\" by just clicking the \"Delete all\" button in the Qiskit Metal GUI. Alternatively, this can done by executing the following command, which deletes all components in the design (more on deleting later in this tutorial): " + "It is easy to give a specific name to a QComponent object. We can delete the QComponent \"Pocket_1\" by just clicking the \"Delete all\" button in the Qiskit Metal GUI. Alternatively, this can done by executing the following command, which deletes all components in the design (more on deleting later in this tutorial): " ] }, { @@ -156,7 +156,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The QComponent we've just created as a name \"Q1\" and a Qcomponent ID of 2, since an ID of 1 was already used for the now-deleted \"Pocket_1\" object. It is worth noting that the QComponent we've just created is not functional yet; it's just two rectangular metal pads with a thin strip of metal connecting them. In order for a QComponent to be functional in an actual design, we will need to add a few additional things, such as qpins defining where the transmon pocket connects to coplanar waveguides (CPWs). We will discuss this in more detail later in the tutorial. " + "The QComponent we've just created as a name \"Q1\" and a Qcomponent ID of 2, since an ID of 1 was already used for the now-deleted \"Pocket_1\" object. It is worth noting that the QComponent we've just created is not functional yet; it's just two rectangular metal pads with a thin strip of metal connecting them. In order for a QComponent to be functional in an actual design, we will need to add a few additional things, such as QPins defining where the transmon pocket connects to coplanar waveguides (CPWs). We will discuss this in more detail later in the tutorial. " ] }, { @@ -170,14 +170,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "QComponents come with some default options, which are used in the make function of the qcomponent to create the qgeometry that you see in the GUI. These options are parsed by Qiskit Metal, and can be changed using either the GUI or the script API. " + "QComponents come with some default options, which are used in the make function of the QComponent to create the qgeometry that you see in the GUI. These options are parsed by Qiskit Metal, and can be changed using either the GUI or the script API. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "We can see what the options and other parameters are for our Qcomponent by typing the following command:" + "We can see what the options and other parameters are for our QComponent by typing the following command:" ] }, { @@ -409,9 +409,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We saw in an earlier example how to delete all QComponents in a design using the either the \"design.delete_all_components\" command or by using the \"Delete all\" button in the GUI. But what if we only want to delete specific QComponents without deleting everything in a design? \n", + "We saw in an earlier example how to delete all QComponents in a design using either the \"design.delete_all_components\" command or by using the \"Delete all\" button in the GUI. But what if we only want to delete specific QComponents without deleting everything in a design? \n", "\n", - "We can delete a specific qcomponent using either the GUI or the python API. If you wish to remove a specific QComponent, you can do so using the \"delete_component\" or \"_delete component\" commands. The first takes the string reference to a Qcomponent, while the second takes an integer reference to a QComponent. Suppose we want to remove qubit 'Q1'. Presently, we do not need to pass a Boolean corresponding to whether we want to force the delete (true=1) even if the component has dependencies, or whether the deletion should not be executed in the event the QComponent does have dependencies (false=0). The bool option is for future potential possibilities of having Qcomponents with dependencies. " + "We can delete a specific QComponent using either the GUI or the python API. If you wish to remove a specific QComponent, you can do so using the \"delete_component\" or \"_delete_component\" commands. The first takes the string reference to a Qcomponent, while the second takes an integer reference to a QComponent. Suppose we want to remove qubit 'Q1'. Presently, we do not need to pass a Boolean corresponding to whether we want to force the delete (true=1) even if the component has dependencies, or whether the deletion should not be executed in the event the QComponent does have dependencies (false=0). The bool option is for future potential possibilities of having QComponents with dependencies. " ] }, { @@ -454,7 +454,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In the first example in this notebook, we created a QComponent named \"Pocket_1\" then deleted it and created one with the name \"Q1.\" One can also simply rename a QComponent without deleting it and creating a new one. We can rename a QComponent by using the \"design_rename.component\" command. For example, let's rename \"Q3\" and \"Q4\" to \"Q_three\" and \"Q_four\", respectively. Note that \"Q3\" has a QComponent ID of 4, while \"Q4\" has a Qcomponent ID of 5. " + "In the first example in this notebook, we created a QComponent named \"Pocket_1\" then deleted it and created one with the name \"Q1\". One can also simply rename a QComponent without deleting it and creating a new one. We can rename a QComponent by using the \"design_rename.component\" command. For example, let's rename \"Q3\" and \"Q4\" to \"Q_three\" and \"Q_four\", respectively. Note that \"Q3\" has a QComponent ID of 4, while \"Q4\" has a QComponent ID of 5. " ] }, { @@ -489,7 +489,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In order to enable component overwrite of qcomponents with the same name, we can use the following command:" + "In order to enable component overwrite of QComponents with the same name, we can use the following command:" ] }, { @@ -505,7 +505,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This allows for the qcomponent to be modified and re-built without having to delete it. Without this line, a qcomponent would have to be deleted before recreating it with different options. " + "This allows for the QComponent to be modified and re-built without having to delete it. Without this line, a QComponent would have to be deleted before recreating it with different options. " ] }, { @@ -534,13 +534,6 @@ "source": [ "gui.main_window.close()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/docs/tut/2-From-components-to-chip/2.02-How-to-copy-a-QComponent.ipynb b/docs/tut/2-From-components-to-chip/2.02-How-to-copy-a-QComponent.ipynb index 69f2a3768..66c106029 100644 --- a/docs/tut/2-From-components-to-chip/2.02-How-to-copy-a-QComponent.ipynb +++ b/docs/tut/2-From-components-to-chip/2.02-How-to-copy-a-QComponent.ipynb @@ -125,7 +125,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Note that we can also copy multiple qcomponents without passing dictionaries. In this case, the copied qcomponents will sit on top of of the original qcomponents in the layout:" + "Note that we can also copy multiple QComponents without passing dictionaries. In this case, the copied QComponents will sit on top of of the original QComponents in the layout:" ] }, { @@ -144,7 +144,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Note also that we can copy multiple qcomponents but only give a dictionary to one of them. The other two dictionaries still need to exist but can be empty: " + "Note also that we can copy multiple QComponents but only give a dictionary to one of them. The other two dictionaries still need to exist but can be empty: " ] }, { @@ -186,13 +186,6 @@ "source": [ "gui.screenshot()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/docs/tut/2-From-components-to-chip/2.11-Routing-101.ipynb b/docs/tut/2-From-components-to-chip/2.11-Routing-101.ipynb index c4c66deed..0e5cccdb6 100644 --- a/docs/tut/2-From-components-to-chip/2.11-Routing-101.ipynb +++ b/docs/tut/2-From-components-to-chip/2.11-Routing-101.ipynb @@ -19,7 +19,7 @@ "\n", "The core class `QRoute` is designed to support different route types, currently only single or double (CPW) wiring. We will use the CPW transmission line in the remainder of this notebook, and in the majority of the other tutorial notebooks.\n", "\n", - "`QRoute` inherits the generic `QComponent`. QRoute also has two attributes of type `QRouteLead`, which enable close control of the start and end points in a route. We will describe in this notebook how to utilize the `QRouteLead`.`QRoutePoint` is a convenient exchange format for directed points.\n", + "`QRoute` inherits the generic `QComponent`. QRoute also has two attributes of type `QRouteLead`, which enable close control of the start and end points in a route. We will describe in this notebook how to utilize the `QRouteLead`. `QRoutePoint` is a convenient exchange format for directed points.\n", "\n", "`QRoute` is an abstract class, without a `make()` method, thus cannot be instantiated as a design component. `QRoute` is inherited by classes that can be instantiated (have a `make()` method - blue highlights in the image below). By subclassing further, you can implement comprehensive routing algorithms, such as the `RouteMixed`.\n", "\n", diff --git a/docs/tut/2-From-components-to-chip/2.21-Design-a-4-qubit-full-chip.ipynb b/docs/tut/2-From-components-to-chip/2.21-Design-a-4-qubit-full-chip.ipynb index 224386fda..d9f525ce1 100644 --- a/docs/tut/2-From-components-to-chip/2.21-Design-a-4-qubit-full-chip.ipynb +++ b/docs/tut/2-From-components-to-chip/2.21-Design-a-4-qubit-full-chip.ipynb @@ -548,7 +548,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "QDesign enables GDS renderer during init. Let's see what the avilable option defaults are." + "QDesign enables GDS renderer during init. Let's see what the available option defaults are." ] }, { diff --git a/docs/tut/4-Analysis/4.02-Eigenmode-and-EPR.ipynb b/docs/tut/4-Analysis/4.02-Eigenmode-and-EPR.ipynb index 3ae44ad19..d23c00b4e 100644 --- a/docs/tut/4-Analysis/4.02-Eigenmode-and-EPR.ipynb +++ b/docs/tut/4-Analysis/4.02-Eigenmode-and-EPR.ipynb @@ -984,7 +984,7 @@ "For the resonator analysis we will use the default setup. Youn can feel free to edit it the same way we did in section 1.\n", "\n", "#### Execute simulation and verify convergence and EM field\n", - "Analyze the readout in isolation. Select the readout and terminate it with an open on both ends. Note that we are selecting for this analysis both the `readout` component and the `open_to_ground` component. The `open_to_ground` compoent might feel redundant because we are specifying in that open in the `open_terminations`, and the end converging reult is indeed the same. however the `open_to_ground` appears to help the system to ceonverge faster, so we keep it in there." + "Analyze the readout in isolation. Select the readout and terminate it with an open on both ends. Note that we are selecting for this analysis both the `readout` component and the `open_to_ground` component. The `open_to_ground` component might feel redundant because we are specifying in that open in the `open_terminations`, and the end converging result is indeed the same. However the `open_to_ground` appears to help the system to converge faster, so we keep it in there." ] }, { diff --git a/qiskit_metal/_gui/component_widget_ui.py b/qiskit_metal/_gui/component_widget_ui.py index 5674e67a5..c48ea94c7 100644 --- a/qiskit_metal/_gui/component_widget_ui.py +++ b/qiskit_metal/_gui/component_widget_ui.py @@ -97,7 +97,7 @@ def retranslateUi(self, ComponentWidget): "\n" - "

Help about a component will be displayed here when you select a compoent in the design components dialog.

", + "

Help about a component will be displayed here when you select a component in the design components dialog.

", None, -1)) ComponentWidget.setTabText( ComponentWidget.indexOf(self.tabHelp), @@ -110,7 +110,7 @@ def retranslateUi(self, ComponentWidget): "\n" - "

The source code of a QComponent class will be displayed here when you select a compoent in the design components dialog.

", + "

The source code of a QComponent class will be displayed here when you select a component in the design components dialog.

", None, -1)) self.lineSourcePath.setToolTip( QtWidgets.QApplication.translate("ComponentWidget", diff --git a/qiskit_metal/_gui/component_widget_ui.ui b/qiskit_metal/_gui/component_widget_ui.ui index cbfa94170..2e3f00313 100644 --- a/qiskit_metal/_gui/component_widget_ui.ui +++ b/qiskit_metal/_gui/component_widget_ui.ui @@ -110,7 +110,7 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:14pt;">Help about a component will be displayed here when you select a compoent in the design components dialog. </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:14pt;">Help about a component will be displayed here when you select a component in the design components dialog. </span></p></body></html> @@ -154,7 +154,7 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:14pt;">The source code of a QComponent class will be displayed here when you select a compoent in the design components dialog. </span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:14pt;">The source code of a QComponent class will be displayed here when you select a component in the design components dialog. </span></p></body></html> diff --git a/qiskit_metal/_gui/styles/metal_dark/TODO.txt b/qiskit_metal/_gui/styles/metal_dark/TODO.txt index 24d6c2350..e93f18f71 100644 --- a/qiskit_metal/_gui/styles/metal_dark/TODO.txt +++ b/qiskit_metal/_gui/styles/metal_dark/TODO.txt @@ -1,4 +1,4 @@ -Remmebr to modify the highlight color to red fot the QToolbar hover +Remember to modify the highlight color to red for the QToolbar hover QToolBar QToolButton:hover { border: 1px solid #e74d10; diff --git a/setup.py b/setup.py index 77880a6a0..c5410fe34 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ # pylint: disable=invalid-name from pathlib import Path -from setuptools import setup, find_packages +from setuptools import find_packages, setup here = Path(__file__).parent.absolute() # pylint: disable=no-member @@ -49,7 +49,16 @@ ], keywords="qiskit sdk quantum eda", packages=find_packages(), - package_data={"": ["*.ui", "*.qrc", "_imgs/*.png", "_imgs/*.txt"]}, + package_data={ + "": [ + "*.ui", + "*.qrc", + "_imgs/*.png", + "_imgs/*.txt", + "styles/*/style.qss", + "styles/*/rc/*.png", + ] + }, python_requires=">=3.9", install_requires=requirements, project_urls={ diff --git a/tutorials/1 Overview/1.2 Quick start.ipynb b/tutorials/1 Overview/1.2 Quick start.ipynb index 011ee0de4..03dc4bb08 100644 --- a/tutorials/1 Overview/1.2 Quick start.ipynb +++ b/tutorials/1 Overview/1.2 Quick start.ipynb @@ -60,7 +60,7 @@ "\n", "##### Interactivly view, edit, and simulate QDesign: Metal GUI\n", "\n", - "To launch the qiskit metal GUI,use the method `MetalGUI`.\n", + "To launch the qiskit metal GUI, use the method `MetalGUI`.\n", "```python \n", "gui = MetalGUI(design)\n", "```\n" @@ -100,7 +100,7 @@ "source": [ "## My First Quantum Component (QComponent)\n", "### A transmon qubit\n", - "We can create a ready-made and optimized transmon qubit form the QLibrary of components.\n", + "We can create a ready-made and optimized transmon qubit from the QLibrary of components.\n", "Qubit qcomponents are stored in the library `qiskit_metal.qlibrary.qubits`. The file that contains the transmon pocket is called `transmon_pocket`,\n", "and the `QComponent` class inside it is `TransmonPocket`.\n", "\n", @@ -161,9 +161,9 @@ "metadata": {}, "source": [ "#### What are the default options?\n", - "The QComponent comes with some default options. The options are used in the `make` function of the qcomponent to create the QGeometry you see in the plot above. \n", + "The QComponent comes with some default options. The options are used in the `make` function of the QComponent to create the QGeometry you see in the plot above. \n", "* Options are parsed by Qiskit Metal. \n", - "* You can change them from the gui or the script api. " + "* You can change them from the GUI or the script API. " ] }, { @@ -179,8 +179,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You can use the gui to create, edit, plot, modify, quantum components.\n", - "Equivalently, you can also do everything form the python API. \n", + "You can use the GUI to create, edit, plot, modify, quantum components.\n", + "Equivalently, you can also do everything from the python API. \n", "The GUI is just calling the API for you." ] }, @@ -216,7 +216,7 @@ "metadata": {}, "source": [ "### Where are the QComponents stored?\n", - "They are stored in `design.components`. It can be accessd as a dictionary (`design.components['Q1']`) or object (`design.components.Q1`)." + "They are stored in `design.components`. It can be accessed as a dictionary (`design.components['Q1']`) or object (`design.components.Q1`)." ] }, { @@ -242,7 +242,7 @@ "metadata": {}, "source": [ "A QComponent is created with default options.\n", - "To find out what these are use `QComponentClass.get_template_options(design)`" + "To find out what these are, use `QComponentClass.get_template_options(design)`" ] }, { @@ -267,7 +267,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now lets change the default options we will use to create the transmon" + "Now let us change the default options we will use to create the transmon" ] }, { @@ -314,7 +314,7 @@ "outputs": [], "source": [ "print('Design default units for length: ', design.get_units())\n", - "print('\\nExample 250 micron parsed to design units:', design.parse_value('0.250 um'), design.get_units())\n", + "print('\\nExample 250 micron parsed to design units:', design.parse_value('250 um'), design.get_units())\n", "\n", "dictionary = {'key_in_cm': '1.2 cm', 'key_in_microns': '50 um'}\n", "print('\\nExample parse dict:', design.parse_value(dictionary))\n", @@ -427,11 +427,11 @@ "source": [ "### QPins: The dynamic way to connect qcomponents \n", "\n", - "The component designer can define pins. Pins can be used to link components together. For examaple, two transmon can each have a pin. The two pins can be connectoed by CPWs, as we will show below. \n", + "The component designer can define pins. Pins can be used to link components together. For example, two transmons can each have a pin. The two pins can be connected by CPWs, as we will show below. \n", "\n", "First, let us add pins to the transmon. \n", "We will add 4 pins called `a`, `b`, `c`, and `d`. \n", - "Each pin will be at a differnet location (corner of the transmon), defined by the options `loc_W` and `loc_H`." + "Each pin will be at a different location (corner of the transmon), defined by the options `loc_W` and `loc_H`." ] }, { @@ -447,7 +447,7 @@ "options = dict(\n", " pad_width = '425 um', \n", " pocket_height = '650um',\n", - " connection_pads=dict( # pin connecotrs\n", + " connection_pads = dict( # pin connectors\n", " a = dict(loc_W=+1,loc_H=+1), \n", " b = dict(loc_W=-1,loc_H=+1, pad_height='30um'),\n", " c = dict(loc_W=+1,loc_H=-1, pad_width='200um'),\n", @@ -495,7 +495,7 @@ "metadata": {}, "source": [ "### How do I edit the component source code and see changes immidietly? \n", - "If you have selected a QComponent, you can call the button that says edit source in the gui. \n", + "If you have selected a QComponent, you can call the button that says edit source in the GUI. \n", "Once selected, you could also call the same function from the code." ] }, @@ -536,8 +536,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Let's now create a a whole chip. In the following, you will pass options to create 4 transmons qubits in a ring.\n", - "First let us clear all qcomponents in the design. " + "Let's now create a a whole chip. In the following, you will pass options to create 4 transmon qubits in a ring.\n", + "First let us clear all QComponents in the design. " ] }, { @@ -563,7 +563,7 @@ "\n", "## Custom options for all the transmons\n", "options = dict(\n", - " # Some options we want to modify from the deafults\n", + " # Some options we want to modify from the defaults\n", " # (see below for defaults)\n", " pad_width = '425 um', \n", " pocket_height = '650um',\n", @@ -633,7 +633,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can now modify the options and connect all four qubits. Since this is repetative, you can define a function to wrap up the repetatvie steps. Here we will call this `connect`. This function creates a `RouteMeander` QComponent class." + "We can now modify the options and connect all four qubits. Since this is repetitive, you can define a function to wrap up the repetitive steps. Here we will call this `connect`. This function creates a `RouteMeander` QComponent class." ] }, { @@ -796,7 +796,7 @@ "q3.options.pad_width = 'pad_width'\n", "q4.options.pad_width = 'pad_width'\n", "\n", - "# Rebuild all compoinent and refresh the gui \n", + "# Rebuild all components and refresh the gui \n", "gui.rebuild()\n", "gui.autoscale()" ] diff --git a/tutorials/1 Overview/1.3 Saving Your Chip Design.ipynb b/tutorials/1 Overview/1.3 Saving Your Chip Design.ipynb index 0788179e7..d57a3c49e 100644 --- a/tutorials/1 Overview/1.3 Saving Your Chip Design.ipynb +++ b/tutorials/1 Overview/1.3 Saving Your Chip Design.ipynb @@ -185,14 +185,6 @@ "source": [ "## Copy the script printed above here. Comment out all other code and run." ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d002af93", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/tutorials/2 From components to chip/A. Using QComponents/2.01 How to use a QComponent.ipynb b/tutorials/2 From components to chip/A. Using QComponents/2.01 How to use a QComponent.ipynb index 586726b96..571eda1af 100644 --- a/tutorials/2 From components to chip/A. Using QComponents/2.01 How to use a QComponent.ipynb +++ b/tutorials/2 From components to chip/A. Using QComponents/2.01 How to use a QComponent.ipynb @@ -88,14 +88,14 @@ "source": [ "We see that this QComponent consists of two large metallic pads with a thin strip of metal connecting them, corresponding to a Josephson Junction. The transmon qubit is centered at the origin by default. In the GUI, we can see that the ID assigned to our QComponent is \"1\" and that the QComponent class is \"Transmon Pocket.\" \n", "\n", - "Note that since we didn't give the Qcomponent an explicit name, one was assigned automatically (\"Pocket_1\") which we can also see in the GUI. Taking a look at the actual qcomponent python script, we see that there is a \"short name\" defined in the qcomponent metadata (short_name = \"Pocket\" in the dictionary), which is where this name comes from. " + "Note that since we didn't give the QComponent an explicit name, one was assigned automatically (\"Pocket_1\") which we can also see in the GUI. Taking a look at the actual QComponent python script, we see that there is a \"short name\" defined in the QComponent metadata (short_name = \"Pocket\" in the dictionary), which is where this name comes from. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "It is easy to give a specific name to a Qcomponent object. We can delete the QComponent \"Pocket_1\" by just clicking the \"Delete all\" button in the Qiskit Metal GUI. Alternatively, this can done by executing the following command, which deletes all components in the design (more on deleting later in this tutorial): " + "It is easy to give a specific name to a QComponent object. We can delete the QComponent \"Pocket_1\" by just clicking the \"Delete all\" button in the Qiskit Metal GUI. Alternatively, this can done by executing the following command, which deletes all components in the design (more on deleting later in this tutorial): " ] }, { @@ -131,7 +131,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The QComponent we've just created as a name \"Q1\" and a Qcomponent ID of 2, since an ID of 1 was already used for the now-deleted \"Pocket_1\" object. It is worth noting that the QComponent we've just created is not functional yet; it's just two rectangular metal pads with a thin strip of metal connecting them. In order for a QComponent to be functional in an actual design, we will need to add a few additional things, such as qpins defining where the transmon pocket connects to coplanar waveguides (CPWs). We will discuss this in more detail later in the tutorial. " + "The QComponent we've just created as a name \"Q1\" and a QComponent ID of 2, since an ID of 1 was already used for the now-deleted \"Pocket_1\" object. It is worth noting that the QComponent we've just created is not functional yet; it's just two rectangular metal pads with a thin strip of metal connecting them. In order for a QComponent to be functional in an actual design, we will need to add a few additional things, such as QPins defining where the transmon pocket connects to coplanar waveguides (CPWs). We will discuss this in more detail later in the tutorial. " ] }, { @@ -152,7 +152,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can see what the options and other parameters are for our Qcomponent by typing the following command:" + "We can see what the options and other parameters are for our QComponent by typing the following command:" ] }, { @@ -274,9 +274,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We saw in an earlier example how to delete all QComponents in a design using the either the \"design.delete_all_components\" command or by using the \"Delete all\" button in the GUI. But what if we only want to delete specific QComponents without deleting everything in a design? \n", + "We saw in an earlier example how to delete all QComponents in a design using either the \"design.delete_all_components\" command or by using the \"Delete all\" button in the GUI. But what if we only want to delete specific QComponents without deleting everything in a design? \n", "\n", - "We can delete a specific qcomponent using either the GUI or the python API. If you wish to remove a specific QComponent, you can do so using the \"delete_component\" or \"_delete component\" commands. The first takes the string reference to a Qcomponent, while the second takes an integer reference to a QComponent. Suppose we want to remove qubit 'Q1'. Presently, we do not need to pass a Boolean corresponding to whether we want to force the delete (true=1) even if the component has dependencies, or whether the deletion should not be executed in the event the QComponent does have dependencies (false=0). The bool option is for future potential possibilities of having Qcomponents with dependencies. " + "We can delete a specific QComponent using either the GUI or the python API. If you wish to remove a specific QComponent, you can do so using the \"delete_component\" or \"_delete_component\" commands. The first takes the string reference to a Qcomponent, while the second takes an integer reference to a QComponent. Suppose we want to remove qubit 'Q1'. Presently, we do not need to pass a Boolean corresponding to whether we want to force the delete (true=1) even if the component has dependencies, or whether the deletion should not be executed in the event the QComponent does have dependencies (false=0). The bool option is for future potential possibilities of having QComponents with dependencies. " ] }, { @@ -319,7 +319,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In the first example in this notebook, we created a QComponent named \"Pocket_1\" then deleted it and created one with the name \"Q1.\" One can also simply rename a QComponent without deleting it and creating a new one. We can rename a QComponent by using the \"design_rename.component\" command. For example, let's rename \"Q3\" and \"Q4\" to \"Q_three\" and \"Q_four\", respectively. Note that \"Q3\" has a QComponent ID of 4, while \"Q4\" has a Qcomponent ID of 5. " + "In the first example in this notebook, we created a QComponent named \"Pocket_1\" then deleted it and created one with the name \"Q1\". One can also simply rename a QComponent without deleting it and creating a new one. We can rename a QComponent by using the \"design_rename.component\" command. For example, let's rename \"Q3\" and \"Q4\" to \"Q_three\" and \"Q_four\", respectively. Note that \"Q3\" has a QComponent ID of 4, while \"Q4\" has a QComponent ID of 5. " ] }, { @@ -343,7 +343,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In order to enable component overwrite of qcomponents with the same name, we can use the following command:" + "In order to enable component overwrite of QComponents with the same name, we can use the following command:" ] }, { @@ -359,7 +359,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This allows for the qcomponent to be modified and re-built without having to delete it. Without this line, a qcomponent would have to be deleted before recreating it with different options. " + "This allows for the QComponent to be modified and re-built without having to delete it. Without this line, a QComponent would have to be deleted before recreating it with different options. " ] }, { @@ -377,13 +377,6 @@ "source": [ "gui.main_window.close()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/tutorials/2 From components to chip/A. Using QComponents/2.02 How to copy a QComponent.ipynb b/tutorials/2 From components to chip/A. Using QComponents/2.02 How to copy a QComponent.ipynb index fbcb6f94f..ded86ab53 100644 --- a/tutorials/2 From components to chip/A. Using QComponents/2.02 How to copy a QComponent.ipynb +++ b/tutorials/2 From components to chip/A. Using QComponents/2.02 How to copy a QComponent.ipynb @@ -125,7 +125,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Note that we can also copy multiple qcomponents without passing dictionaries. In this case, the copied qcomponents will sit on top of of the original qcomponents in the layout:" + "Note that we can also copy multiple QComponents without passing dictionaries. In this case, the copied QComponents will sit on top of of the original QComponents in the layout:" ] }, { @@ -144,7 +144,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Note also that we can copy multiple qcomponents but only give a dictionary to one of them. The other two dictionaries still need to exist but can be empty: " + "Note also that we can copy multiple QComponents but only give a dictionary to one of them. The other two dictionaries still need to exist but can be empty: " ] }, { @@ -158,13 +158,6 @@ "gui.rebuild()\n", "gui.autoscale()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/tutorials/2 From components to chip/B. Routing between QComponents/2.11 Routing 101.ipynb b/tutorials/2 From components to chip/B. Routing between QComponents/2.11 Routing 101.ipynb index 3bb79442e..445b9989e 100644 --- a/tutorials/2 From components to chip/B. Routing between QComponents/2.11 Routing 101.ipynb +++ b/tutorials/2 From components to chip/B. Routing between QComponents/2.11 Routing 101.ipynb @@ -19,7 +19,7 @@ "\n", "The core class `QRoute` is designed to support different route types, currently only single or double (CPW) wiring. We will use the CPW transmission line in the remainder of this notebook, and in the majority of the other tutorial notebooks.\n", "\n", - "`QRoute` inherits the generic `QComponent`. QRoute also has two attributes of type `QRouteLead`, which enable close control of the start and end points in a route. We will describe in this notebook how to utilize the `QRouteLead`.`QRoutePoint` is a convenient exchange format for directed points.\n", + "`QRoute` inherits the generic `QComponent`. QRoute also has two attributes of type `QRouteLead`, which enable close control of the start and end points in a route. We will describe in this notebook how to utilize the `QRouteLead`. `QRoutePoint` is a convenient exchange format for directed points.\n", "\n", "`QRoute` is an abstract class, without a `make()` method, thus cannot be instantiated as a design component. `QRoute` is inherited by classes that can be instantiated (have a `make()` method - blue highlights in the image below). By subclassing further, you can implement comprehensive routing algorithms, such as the `RouteMixed`.\n", "\n", diff --git a/tutorials/2 From components to chip/C. My first full quantum chip design/2.21 Design a 4 qubit full chip.ipynb b/tutorials/2 From components to chip/C. My first full quantum chip design/2.21 Design a 4 qubit full chip.ipynb index 44b4237e5..95991684e 100644 --- a/tutorials/2 From components to chip/C. My first full quantum chip design/2.21 Design a 4 qubit full chip.ipynb +++ b/tutorials/2 From components to chip/C. My first full quantum chip design/2.21 Design a 4 qubit full chip.ipynb @@ -442,7 +442,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "QDesign enables GDS renderer during init. Let's see what the avilable option defaults are." + "QDesign enables GDS renderer during init. Let's see what the available option defaults are." ] }, { diff --git a/tutorials/4 Analysis/A. Core - EM and quantization/4.02 Eigenmode and EPR.ipynb b/tutorials/4 Analysis/A. Core - EM and quantization/4.02 Eigenmode and EPR.ipynb index 3b59bb619..6ead41af9 100644 --- a/tutorials/4 Analysis/A. Core - EM and quantization/4.02 Eigenmode and EPR.ipynb +++ b/tutorials/4 Analysis/A. Core - EM and quantization/4.02 Eigenmode and EPR.ipynb @@ -430,7 +430,7 @@ "For the resonator analysis we will use the default setup. Youn can feel free to edit it the same way we did in section 1.\n", "\n", "#### Execute simulation and verify convergence and EM field\n", - "Analyze the readout in isolation. Select the readout and terminate it with an open on both ends. Note that we are selecting for this analysis both the `readout` component and the `open_to_ground` component. The `open_to_ground` compoent might feel redundant because we are specifying in that open in the `open_terminations`, and the end converging reult is indeed the same. however the `open_to_ground` appears to help the system to ceonverge faster, so we keep it in there." + "Analyze the readout in isolation. Select the readout and terminate it with an open on both ends. Note that we are selecting for this analysis both the `readout` component and the `open_to_ground` component. The `open_to_ground` component might feel redundant because we are specifying in that open in the `open_terminations`, and the end converging result is indeed the same. However the `open_to_ground` appears to help the system to converge faster, so we keep it in there." ] }, { @@ -713,7 +713,7 @@ "# 4. Analyze a coupled 2-transmon system\n", "### Create the design\n", "\n", - "This is a different system than the one analyzed in sections 1,2,3. Therefore, let's start by deleting the design currntly in the Qiskit Metal GUI (if any)." + "This is a different system than the one analyzed in sections 1,2,3. Therefore, let's start by deleting the design currently in the Qiskit Metal GUI (if any)." ] }, {