Skip to content

Commit

Permalink
Add missing gui styles when installing (#1007)
Browse files Browse the repository at this point in the history
* Correct setup.py to import the default styles of the gui

* Fix typos
  • Loading branch information
PositroniumJS authored Dec 31, 2024
1 parent 865b6a1 commit c1ed7c8
Show file tree
Hide file tree
Showing 18 changed files with 85 additions and 120 deletions.
40 changes: 20 additions & 20 deletions docs/tut/1-Overview/1.2-Quick-start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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. "
]
},
{
Expand Down Expand Up @@ -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."
]
},
Expand Down Expand Up @@ -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`)."
]
},
{
Expand Down Expand Up @@ -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)`"
]
},
{
Expand Down Expand Up @@ -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"
]
},
{
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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`."
]
},
{
Expand All @@ -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",
Expand Down Expand Up @@ -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."
]
},
Expand Down Expand Up @@ -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. "
]
},
{
Expand All @@ -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",
Expand Down Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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()"
]
Expand Down
8 changes: 0 additions & 8 deletions docs/tut/1-Overview/1.3-Saving-Your-Chip-Design.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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): "
]
},
{
Expand Down Expand Up @@ -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. "
]
},
{
Expand All @@ -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:"
]
},
{
Expand Down Expand Up @@ -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. "
]
},
{
Expand Down Expand Up @@ -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. "
]
},
{
Expand Down Expand Up @@ -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:"
]
},
{
Expand All @@ -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. "
]
},
{
Expand Down Expand Up @@ -534,13 +534,6 @@
"source": [
"gui.main_window.close()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
]
},
{
Expand All @@ -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: "
]
},
{
Expand Down Expand Up @@ -186,13 +186,6 @@
"source": [
"gui.screenshot()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion docs/tut/2-From-components-to-chip/2.11-Routing-101.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/tut/4-Analysis/4.02-Eigenmode-and-EPR.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down
Loading

0 comments on commit c1ed7c8

Please sign in to comment.