Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename resonator folder and add missing __init__.py file #1009

Merged
merged 5 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Qiskit Metal Overview
* - Components
- This is a user interface for the design._components dict. The keys are unique integers, however, this interface allows user to treat the keys as strings. Set up variables and logger which are used to emulate a dict which is referencing design._components.
* - DesignPlanar
- Metal class for a planar (2D) design, consisting of a single plane chip. Typically assumed to have some CPW geometires.
- Metal class for a planar (2D) design, consisting of a single plane chip. Typically assumed to have some CPW geometries.
* - QDesign
- QDesign is the base class for Qiskit Metal Designs. A design is the most top-level object in all of Qiskit Metal. Create a new Metal QDesign.
* - QNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@
"metadata": {},
"outputs": [],
"source": [
"gui.rebuild() # Update the component geoemtry, since we changed the options\n",
"gui.rebuild() # Update the component geometry, since we changed the options\n",
"\n",
"# Get a list of all the qcomponents in QDesign and then zoom on them.\n",
"all_component_names = design.components.keys()\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/tut/1-Overview/1.2-Quick-start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
"q1.options.pad_width = '250 um'\n",
"q1.options.pad_gap = '50 um'\n",
"\n",
"# Update the geoemtry, since we changed the options\n",
"# Update the geometry, since we changed the options\n",
"gui.rebuild()"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
"q1.options.pad_height = '250 um'\n",
"q1.options.pad_width = '300 um'\n",
"\n",
"# Update the geoemtry and render to the gui, since we changed the options\n",
"# Update the geometry and render to the gui, since we changed the options\n",
"gui.rebuild()"
]
},
Expand Down
4 changes: 2 additions & 2 deletions qiskit_metal/designs/design_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,8 @@ def parse_value(self, value: Union[Any, List, Dict, Iterable]) -> Any:
Returns the number as is. Int to int, etc.


Arithemetic:
Some basic arithemetic can be handled as well, such as `'-2 * 1e5 nm'`
Arithmetic:
Some basic arithmetic can be handled as well, such as `'-2 * 1e5 nm'`
will yield float(-0.2) when the default units are set to `mm`.

Default units:
Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/designs/design_flipchip.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class DesignFlipChip(QDesign):
"""Metal class for a flipchip design, consisting of two chips with their device sides facing each other.
Typically assumed to have some CPW geometires.
Typically assumed to have some CPW geometries.

Inherits QDesign class.
"""
Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/designs/design_planar.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class DesignPlanar(QDesign):
"""Metal class for a planar (2D) design, consisting of a single plane chip.
Typically assumed to have some CPW geometires.
Typically assumed to have some CPW geometries.

Inherits QDesign class.
"""
Expand Down
4 changes: 2 additions & 2 deletions qiskit_metal/qlibrary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
from .qubits.transmon_pocket_teeth import TransmonPocketTeeth
from .qubits.SQUID_loop import SQUID_LOOP
from .qubits.star_qubit import StarQubit
from .resonator.readoutres_fc import ReadoutResFC
from .resonator.resonator_lumped import ResonatorLumped
from .resonators.readoutres_fc import ReadoutResFC
from .resonators.resonator_lumped import ResonatorLumped

from .tlines import anchored_path
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ def parse_value(
Returns the number as is. Int to int, etc.


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

Expand Down
4 changes: 2 additions & 2 deletions qiskit_metal/qlibrary/lumped/resonator_coil_rect.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ResonatorCoilRect(QComponent):
modified by the code based on the total length inputed."""

def make(self):
"""The make function implements the logic that creates the geoemtry
"""The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed information, such
Expand All @@ -85,7 +85,7 @@ def make(self):
(2 * n - 1))

if x_n <= p.gap + p.line_width:
self._error_message = f'Inputted values results in the width of the spiral being too small.'
self._error_message = 'Inputted values results in the width of the spiral being too small.'
self.logger.warning(self._error_message)
return

Expand Down
1 change: 0 additions & 1 deletion qiskit_metal/qlibrary/qubits/SQUID_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"""
from qiskit_metal import draw, Dict
from qiskit_metal.qlibrary.core.base import QComponent
import numpy as np


class SQUID_LOOP(QComponent):
Expand Down
5 changes: 2 additions & 3 deletions qiskit_metal/qlibrary/qubits/transmon_cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

import numpy as np
from qiskit_metal import draw, Dict
from qiskit_metal.qlibrary.core import BaseQubit

Expand Down Expand Up @@ -106,7 +105,7 @@ def make(self):
def make_pocket(self):
"""Makes a basic Crossmon, 4 arm cross."""

# self.p allows us to directly access parsed values (string -> numbers) form the user option
# self.p allows us to directly access parsed values (string -> numbers) from the user option
p = self.p

cross_width = p.cross_width
Expand Down Expand Up @@ -164,7 +163,7 @@ def make_connection_pad(self, name: str):
name (str) : Name of the connector pad
"""

# self.p allows us to directly access parsed values (string -> numbers) form the user option
# self.p allows us to directly access parsed values (string -> numbers) from the user option
p = self.p
cross_width = p.cross_width
cross_length = p.cross_length
Expand Down
10 changes: 5 additions & 5 deletions qiskit_metal/qlibrary/qubits/transmon_pocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class TransmonPocket(BaseQubit):
def make(self):
"""Define the way the options are turned into QGeometry.

The make function implements the logic that creates the geoemtry
The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed
Expand All @@ -150,7 +150,7 @@ def make(self):
def make_pocket(self):
"""Makes standard transmon in a pocket."""

# self.p allows us to directly access parsed values (string -> numbers) form the user option
# self.p allows us to directly access parsed values (string -> numbers) from the user option
p = self.p

# extract chip name
Expand Down Expand Up @@ -197,18 +197,18 @@ def make_pocket(self):
chip=chip)

def make_connection_pads(self):
"""Makes standard transmon in a pocket."""
"""Goes through connector pads and makes each one."""
for name in self.options.connection_pads:
self.make_connection_pad(name)

def make_connection_pad(self, name: str):
"""Makes n individual connector.
"""Makes an individual connector.

Args:
name (str) : Name of the connector
"""

# self.p allows us to directly access parsed values (string -> numbers) form the user option
# self.p allows us to directly access parsed values (string -> numbers) from the user option
p = self.p
pc = self.p.connection_pads[name] # parser on connector options

Expand Down
10 changes: 5 additions & 5 deletions qiskit_metal/qlibrary/qubits/transmon_pocket_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class TransmonPocket6(BaseQubit):
def make(self):
"""Define the way the options are turned into QGeometry.

The make function implements the logic that creates the geoemtry
The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed
Expand All @@ -157,7 +157,7 @@ def make(self):
def make_pocket(self):
"""Makes standard transmon in a pocket."""

# self.p allows us to directly access parsed values (string -> numbers) form the user option
# self.p allows us to directly access parsed values (string -> numbers) from the user option
p = self.p

# since we will reuse these options, parse them once and define them as variables
Expand Down Expand Up @@ -195,18 +195,18 @@ def make_pocket(self):
width=p.inductor_width)

def make_connection_pads(self):
"""Makes standard transmon in a pocket."""
"""Goes through connector pads and makes each one."""
for name in self.options.connection_pads:
self.make_connection_pad(name)

def make_connection_pad(self, name: str):
"""Makes n individual connector.
"""Makes an individual connector.

Args:
name (str) : Name of the connector
"""

# self.p allows us to directly access parsed values (string -> numbers) form the user option
# self.p allows us to directly access parsed values (string -> numbers) from the user option
p = self.p
pc = self.p.connection_pads[name] # parser on connector options

Expand Down
10 changes: 5 additions & 5 deletions qiskit_metal/qlibrary/qubits/transmon_pocket_teeth.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class TransmonPocketTeeth(BaseQubit):
def make(self):
"""Define the way the options are turned into QGeometry.

The make function implements the logic that creates the geoemtry
The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed
Expand All @@ -153,7 +153,7 @@ def make(self):
def make_pocket(self):
"""Makes standard transmon in a pocket."""

# self.p allows us to directly access parsed values (string -> numbers) form the user option
# self.p allows us to directly access parsed values (string -> numbers) from the user option
p = self.p
# pcop = self.p.coupled_pads[name] # parser on connector options

Expand Down Expand Up @@ -242,18 +242,18 @@ def make_pocket(self):
width=p.inductor_width)

def make_connection_pads(self):
"""Makes standard transmon in a pocket."""
"""Goes through connector pads and makes each one."""
for name in self.options.connection_pads:
self.make_connection_pad(name)

def make_connection_pad(self, name: str):
"""Makes n individual connector.
"""Makes an individual connector.

Args:
name (str) : Name of the connector
"""

# self.p allows us to directly access parsed values (string -> numbers) form the user option
# self.p allows us to directly access parsed values (string -> numbers) from the user option
p = self.p
pc = self.p.connection_pads[name] # parser on connector options

Expand Down
13 changes: 13 additions & 0 deletions qiskit_metal/qlibrary/resonators/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-

# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/sample_shapes/circle_caterpillar.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CircleCaterpillar(QComponent):
TOOLTIP = """A single configurable circle"""

def make(self):
"""The make function implements the logic that creates the geoemtry
"""The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed information, such
Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/sample_shapes/circle_raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class CircleRaster(QComponent):
TOOLTIP = """A single configurable circle"""

def make(self):
"""The make function implements the logic that creates the geoemtry
"""The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed information, such
Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/sample_shapes/n_gon.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class NGon(QComponent):
TOOLTIP = """A n-gon polygon"""

def make(self):
"""The make function implements the logic that creates the geoemtry
"""The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed information, such
Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/sample_shapes/n_square_spiral.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class NSquareSpiral(QComponent):
TOOLTIP = """An n count square spiral"""

def make(self):
"""The make function implements the logic that creates the geoemtry
"""The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed information, such
Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/sample_shapes/rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Rectangle(QComponent):
TOOLTIP = """A single configurable square"""

def make(self):
"""The make function implements the logic that creates the geoemtry
"""The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed information, such
Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/sample_shapes/rectangle_hollow.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class RectangleHollow(QComponent):
TOOLTIP = """A single configurable square"""

def make(self):
"""The make function implements the logic that creates the geoemtry
"""The make function implements the logic that creates the geometry
(poly, path, etc.) from the qcomponent.options dictionary of
parameters, and the adds them to the design, using
qcomponent.add_qgeometry(...), adding in extra needed information, such
Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/terminations/launchpad_wb.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


class LaunchpadWirebond(QComponent):
"""Launch pad to feed/read signals to/from the chip.
r"""Launch pad to feed/read signals to/from the chip.

Inherits 'QComponent' class.

Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/terminations/launchpad_wb_coupled.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


class LaunchpadWirebondCoupled(QComponent):
"""Launch pad to feed/read signals to/from the chip.
r"""Launch pad to feed/read signals to/from the chip.

Inherits 'QComponent' class.

Expand Down
2 changes: 1 addition & 1 deletion qiskit_metal/qlibrary/terminations/launchpad_wb_driven.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


class LaunchpadWirebondDriven(QComponent):
"""Launch pad to feed/read signals to/from the chip.
r"""Launch pad to feed/read signals to/from the chip.

Inherits 'QComponent' class.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
"metadata": {},
"outputs": [],
"source": [
"gui.rebuild() # Update the component geoemtry, since we changed the options\n",
"gui.rebuild() # Update the component geometry, since we changed the options\n",
"\n",
"# Get a list of all the qcomponents in QDesign and then zoom on them.\n",
"all_component_names = design.components.keys()\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/1 Overview/1.2 Quick start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
"q1.options.pad_width = '250 um'\n",
"q1.options.pad_gap = '50 um'\n",
"\n",
"# Update the geoemtry, since we changed the options\n",
"# Update the geometry, since we changed the options\n",
"gui.rebuild()"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
"q1.options.pad_height = '250 um'\n",
"q1.options.pad_width = '300 um'\n",
"\n",
"# Update the geoemtry and render to the gui, since we changed the options\n",
"# Update the geometry and render to the gui, since we changed the options\n",
"gui.rebuild()"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"outputs": [],
"source": [
"from qiskit_metal.qlibrary.qubits.transmon_concentric_type_2 import TransmonConcentricType2\n",
"from qiskit_metal.qlibrary.resonator.resonator_lumped import ResonatorLumped\n",
"from qiskit_metal.qlibrary.resonators.resonator_lumped import ResonatorLumped\n",
"from qiskit_metal.qlibrary.tlines.straight_path import RouteStraight\n",
"from qiskit_metal.qlibrary.terminations.launchpad_wb import LaunchpadWirebond\n",
"from qiskit_metal.qlibrary.terminations.launchpad_wb_coupled import LaunchpadWirebondCoupled"
Expand Down
2 changes: 1 addition & 1 deletion tutorials/FlipChip_designtutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"from qiskit_metal import designs, draw\n",
"from qiskit_metal import MetalGUI, Dict, Headings\n",
"from qiskit_metal.qlibrary.qubits.transmon_cross import TransmonCross\n",
"from qiskit_metal.qlibrary.resonator.readoutres_fc import ReadoutResFC\n",
"from qiskit_metal.qlibrary.resonators.readoutres_fc import ReadoutResFC\n",
"\n",
"# suppress deprecation warnings\n",
"import warnings\n",
Expand Down
Loading