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

Qiskit Metal v0.5: PySide6, Removing GDSPY to GDSTK, PYAEDT v1.0, and many more changes #1002

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
cd38ee9
Change PySide2 imports to PySide6 imports
obrienpja Aug 22, 2022
2d85448
Update QT_API to PySide6 and update mpl backend
obrienpja Sep 25, 2022
8f1263a
Merge branch 'main' into pyside6-v2
obrienpja Jan 25, 2023
a00ea96
Install libegl in ubuntu environment
obrienpja Jan 26, 2023
e9defda
Comment out mpl.use
obrienpja Jan 26, 2023
d0bcb56
Yapf format main_window.py
obrienpja Jan 31, 2023
2810eb3
Merge branch 'pyside6-v2' of github.com:Qiskit/qiskit-metal into pysi…
obrienpja Jan 31, 2023
61a00c2
Remove sleeps from GUI
obrienpja Feb 1, 2023
fb66b0a
Add qdarkstyle to dependencies
obrienpja Feb 1, 2023
cedd497
Fix version of libegl1 to 22.0.1
obrienpja Feb 6, 2023
c4dd5bd
Fix version number for libegl1
obrienpja Feb 6, 2023
08bf56d
Try installing libegl1 version 22.0.1-1ubuntu2
obrienpja Feb 6, 2023
eb5b94a
Fix libegl1 version to 1.4.0-1
obrienpja Feb 6, 2023
94f791c
Install libegl-mesa0 version 22.0.1-1ubuntu2
obrienpja Feb 6, 2023
35f31ea
Run sudo apt update and remove libegl1 dep
obrienpja Feb 6, 2023
0cfd93a
Change some Qt6 class paths
obrienpja Feb 7, 2023
b6654b4
Merge branch 'main' into pyside6-v2
priti-ashvin-shah-ibm Feb 14, 2023
65d34d7
fix: changed env and qwidget for working gui
shanto268 Nov 18, 2024
a72617f
fix: changed QWidget_PlaceholderText and environment files
shanto268 Nov 18, 2024
352415c
Merge branch 'pyside6-port'
shanto268 Nov 18, 2024
03fe275
docs: got rid of log files
shanto268 Nov 18, 2024
31b612e
fix: changed requirements + fixed the Paths
shanto268 Nov 18, 2024
deb7813
docs: added pyyaml and cython to reqs
shanto268 Nov 18, 2024
566918c
docs: fixing the requirements
shanto268 Nov 18, 2024
a87652e
docs: Fix linting issues to satisfy CI checks
shanto268 Nov 18, 2024
b9ad48c
docs: Update upload-artifact to v3 in docs workflow
shanto268 Nov 18, 2024
06b5b2e
fix: added missing QFileSystemModel import
shanto268 Nov 19, 2024
492268e
Merge branch 'main' into main
zlatko-minev Dec 16, 2024
6e48123
Merge branch 'main' into main
zlatko-minev Dec 31, 2024
2ce4996
Bumping Qiskit Metal version
zlatko-minev Dec 31, 2024
7714dee
Added mermaid diagram and overview
zlatko-minev Dec 31, 2024
54c1685
Update README_ARCH.md: Fixed meramid theme
zlatko-minev Dec 31, 2024
6545951
Update README.md
zlatko-minev Dec 31, 2024
e481012
Update README.md
zlatko-minev Dec 31, 2024
fb8081b
Update README.md
zlatko-minev Dec 31, 2024
d76f76c
Update README.md
zlatko-minev Dec 31, 2024
ea3e2e4
fix mermaid js
zlatko-minev Dec 31, 2024
0f04a1a
Merge branch 'main' into main
zlatko-minev Jan 20, 2025
df2347f
Clean up readmes
zlatko-minev Jan 20, 2025
444b4ca
pylint
zlatko-minev Jan 26, 2025
9589b47
contributions update
zlatko-minev Jan 26, 2025
cf577a5
GUI Styles minot rupdate and install
zlatko-minev Jan 26, 2025
6b7b258
MPL fix on issue of aspect ratio
zlatko-minev Jan 26, 2025
626909f
### Gui
zlatko-minev Jan 26, 2025
f10a121
Changelog
zlatko-minev Jan 26, 2025
00958d5
gui emitreset fix
zlatko-minev Jan 26, 2025
8f129bb
cleanup lint for file skeleton render
zlatko-minev Jan 26, 2025
7c161a4
Fixedaspect ratio and cleanuo
zlatko-minev Jan 26, 2025
36c7b1d
Requirements testuing updating
zlatko-minev Jan 26, 2025
f7ec17b
Changelog
zlatko-minev Jan 26, 2025
2c348ff
GDS RENDERED with GDSTK
zlatko-minev Jan 26, 2025
71a22c2
GSTK make cheese
zlatko-minev Jan 26, 2025
24b34ac
Todo for v0.5
zlatko-minev Jan 26, 2025
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
17 changes: 9 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Tests
on:
# Run this workflow every time a new commit is pushed to or a pull request is created from one of these branches
push:
branches: [main, "stable/*"]
branches: [main, 'stable/*']
pull_request:
branches: [main, "stable/*"]
branches: [main, 'stable/*']
jobs:
# NOTE: The ubuntu-22.04 and macos-latest tests have been separated out because ubuntu
# requires installing some additional libraries (libglu1-mesa) for Gmsh to run. Please
Expand All @@ -17,7 +17,7 @@ jobs:
# Set matrix for runs-on
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ['3.9', '3.10']
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -36,8 +36,9 @@ jobs:
ubuntu-latest-${{ matrix.python-version }}
- name: Install Deps
run: |
python -m pip install -U tox==4.11.0 setuptools==67.3.1 virtualenv==20.24.3 wheel==0.38.4
sudo apt install libglu1-mesa=9.0.2-1 libglu1-mesa-dev=9.0.2-1
python -m pip install -U tox setuptools virtualenv wheel
sudo apt update
sudo apt install libglu1-mesa libglu1-mesa-dev libegl1-mesa
- name: Install and Run Tests
run: tox -e py
macos-tests:
Expand All @@ -48,7 +49,7 @@ jobs:
# Set matrix for runs-on
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ['3.9', '3.10']
steps:
- name: Chekout code
uses: actions/checkout@v3
Expand All @@ -74,7 +75,7 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ['3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -146,7 +147,7 @@ jobs:
sudo apt install -y graphviz=2.42.2-6 pandoc=2.9.2.1-3ubuntu2 qtbase5-dev=5.15.3+dfsg-2ubuntu0.2 qt5-qmake=5.15.3+dfsg-2ubuntu0.2
- name: Build Docs
run: tox -edocs
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: html_docs
path: docs/_build/html
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ instance/
# User Folders:
.scrapy
_sandbox_/
_debug/
qiskit_metal/qlibrary/user_components/*
!qiskit_metal/qlibrary/user_components/__init__.py
!qiskit_metal/qlibrary/user_components/my_qcomponent.py
Expand Down Expand Up @@ -92,6 +93,7 @@ celerybeat-schedule
# virtualenv
.venv
venv/
venvz/
ENV/

# Spyder project settings
Expand Down
18 changes: 9 additions & 9 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=PySide2
extension-pkg-whitelist=PySide6,gdstk

# Add files or directories to the blacklist. They should be base names, not
# paths.
Expand Down Expand Up @@ -91,7 +91,7 @@ disable=apply-builtin,
        dict-values-not-iterating,
        dict-view-method,
        div-method,
        eq-without-hash,
;         eq-without-hash,
        exception-escape,
        exception-message-attribute,
        execfile-builtin,
Expand All @@ -108,21 +108,21 @@ disable=apply-builtin,
        intern-builtin,
        invalid-str-codec,
        locally-disabled,
        logging-fstring-interpolation  # fstrings inside logging
logging-fstring-interpolation, # fstrings inside logging
        long-builtin,
        long-suffix,
;         long-suffix,
        map-builtin-not-iterating,
        metaclass-assignment,
missing-module-docstring,
        next-method-called,
        next-method-defined,
        no-absolute-import,
        non-ascii-bytes-literal,
;         non-ascii-bytes-literal,
        nonzero-method,
        oct-method,
        old-division,
        old-ne-operator,
        old-octal-literal,
;         old-ne-operator,
;         old-octal-literal,
        old-raise-syntax,
        parameter-unpacking,
        print-statement,
Expand Down Expand Up @@ -339,8 +339,8 @@ max-module-lines=1000
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator
; no-space-check=trailing-comma,
; dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
Expand Down
24 changes: 20 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,38 @@ https://google.github.io/styleguide/pyguide.html) for auto formatting. The custo

#### VSCode Setup

Steps:
1. Install the following extensions: `python` and `yapf` if you have not yet.
2. Add the following workspace setting in the workspace `settings.json`.

If you are using VSCode for your code editor, you can add these settings
to your `settings.json` to enforce your code to our style. Make sure to add PySide2 to the linter:
```
```json
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.linting.pylintArgs": [
"--extension-pkg-whitelist=PySide2"
],
"python.formatting.provider": "yapf",
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true
}
```


In newer versions of VS Code:
```json
{
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"editor.defaultFormatter": "eeyore.yapf",
"notebook.defaultFormatter": "eeyore.yapf",
"[python]": {
"editor.defaultFormatter": "eeyore.yapf"
}
}
```

### Code Review
Code review is done in the open and open to anyone. While only maintainers have access to merge commits, providing feedback on pull requests is very valuable and helpful. It is also a good mechanism to learn about the code base. You can view a list of all open pull requests to review any open pull requests and provide feedback on it.

Expand Down
146 changes: 145 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
We're excited to share that we're nearing the completion of porting Qiskit Metal from PySide2 to PySide6! This update enables native support for M* Macs (Apple Silicon) and includes several other enhancements for the upcoming release. Please take a moment to review and provide feedback on [Pull Request #1002](https://github.com/qiskit-community/qiskit-metal/pull/1002) before we proceed with merging and tagging. Your input is invaluable to ensure the release meets everyone's expectations. Thank you for your continued contributions!

## Installation
If you are interested in customizing your experience, or if you are unable to install qiskit-metal using the `pip install` instructions below, consider installing directly the source code, following the instructions in the [documentation](https://qiskit-community.github.io/qiskit-metal/installation.html) and/or the [installation instructions for developers](https://github.com/Qiskit/qiskit-metal/blob/main/README_developers.md).
If you are interested in customizing your experience, or if you are unable to install qiskit-metal using the `pip install` instructions below, consider installing directly the source code, following the instructions in the [documentation](https://qiskit-community.github.io/qiskit-metal/installation.html) and/or the [installation instructions for developers](https://github.com/Qiskit/qiskit-metal/blob/main/README_Developers.md).

For normal use, please continue reading.

Expand Down Expand Up @@ -106,11 +106,153 @@ We use [GitHub issues](https://github.com/Qiskit/qiskit-metal/issues) for tracki
[join the Qiskit Slack community](https://qisk.it/join-slack)
and use our [Qiskit Slack channel](https://qiskit.slack.com) for discussion and simple questions.
For questions that are more suited for a forum we use the Qiskit tag in the [Stack Exchange](https://quantumcomputing.stackexchange.com/questions/tagged/qiskit).

## Next Steps
Now you're set up and ready to check out some of the other examples from our
[Qiskit Metal Tutorials](https://github.com/Qiskit/qiskit-metal/blob/main/tutorials/) repository or [Qiskit Metal Documentation](https://qiskit-community.github.io/qiskit-metal/tut/).


---

# Big Picture Architecutre Overview

### Diagram

The **Qiskit Metal** codebase is organized into several key modules, each with a distinct role in enabling the design, analysis, and visualization of quantum circuits. Below is an overview of the primary components and their interactions, discussed deeper in the [Architecture Readme](README_Architecture.md) and the docs:

```mermaid
%%{init: {"flowchart": {"htmlLabels": true}, 'theme':'forest'} }%%
graph TB
classDef core fill:#87cefa,stroke:#000000;
classDef gui fill:#FFDDC1,stroke:#000000;
classDef renderer fill:#DBB9FF,stroke:#000000;
classDef utility fill:#FFD700,stroke:#000000;
classDef design fill:#90EE90,stroke:#000000;
classDef analysis fill:#FFB6C1,stroke:#000000;

subgraph Qiskit_Metal
subgraph Core
QLibraryComponents["QLibrary Components"]
QDesign["QDesign"]
QComponent["QComponent"]
QRoute["QRoute"]
BaseQubit["BaseQubit"]
end

subgraph GUI
MetalGUI["MetalGUI"]
end

subgraph Renderers
QRenderer["QRenderer"]
QRendererGui["QRendererGui"]
QGDSRenderer["QGDSRenderer"]
QAnsysRenderer["QAnsysRenderer"]
QHFSSRenderer["QHFSSRenderer"]
QQ3DRenderer["QQ3DRenderer"]
QPyaedt["QPyaedt"]
QGmshRenderer["QGmshRenderer"]
QElmerRenderer["QElmerRenderer"]
end

subgraph Analyses
Hamiltonian["Hamiltonian"]
Sweep_Options["Sweep_Options"]
end

subgraph Utilities
Parsing["Parsing"]
Exceptions["Exceptions"]
Logging["Logging"]
Toolbox["Toolbox"]
end
end

QLibraryComponents --> QDesign
QRenderer --> QDesign
QRendererGui --> QRenderer
MetalGUI --> QRendererGui
MetalGUI --> QLibraryComponents
MetalGUI --> QDesign
QGDSRenderer --> QRenderer
QAnsysRenderer --> QRenderer
QHFSSRenderer --> QRenderer
QQ3DRenderer --> QRenderer
QPyaedt --> QRenderer
QGmshRenderer --> QRenderer
QElmerRenderer --> QRenderer
Parsing --> QDesign
Exceptions --> QDesign
Logging --> QDesign
Toolbox --> QDesign
QDesign --> QComponent
QDesign --> QRoute
QDesign --> BaseQubit
Hamiltonian --> QDesign
Sweep_Options --> QDesign

class QLibraryComponents,QDesign,QComponent,QRoute,BaseQubit core;
class MetalGUI gui;
class QRenderer,QRendererGui,QGDSRenderer,QAnsysRenderer,QHFSSRenderer,QQ3DRenderer,QPyaedt,QGmshRenderer,QElmerRenderer renderer;
class Parsing,Exceptions,Logging,Toolbox utility;
class Hamiltonian,Sweep_Options analysis;
```


### Core
The **Core** module serves as the backbone of Qiskit Metal, housing essential elements for design and component creation:
- **QLibrary Components**: Predefined library of quantum circuit elements, such as qubits and resonators, that can be used in designs.
- **QDesign**: The central design framework that integrates all components and handles design rules.
- **QComponent**: Base class for all components in the design.
- **QRoute**: Specialized class for managing connections between components.
- **BaseQubit**: Represents foundational qubit structures used in circuit designs.

### Renderers
The **Renderers** module facilitates exporting designs to external tools for electromagnetic simulation and layout rendering:
- **QRenderer**: Base class for all renderers.
- **QRendererGui**: GUI interface for managing renderers.
- Specialized renderers like:
- **QGDSRenderer**
- **QAnsysRenderer**
- **QHFSSRenderer**
- **QQ3DRenderer**
- **QPyaedt**
- **QGmshRenderer**
- **QElmerRenderer**

These renderers enable integration with industry-standard tools for detailed simulation and fabrication.

### Analyses
The **Analyses** module includes tools for performing simulations and extracting insights from designs:
- **Hamiltonian**: Supports calculations of Hamiltonian parameters.
- **Sweep Options**: Provides tools for parametric sweeps and optimizations.


### GUI
The **GUI** module provides tools for user-friendly interaction with Qiskit Metal. The **MetalGUI** clas is the primary graphical interface for managing designs and visualizations. It is discussed in more depth in the [Architecture Readme](README_Architecture.md).

### Utilities
The **Utilities** module supports the overall functionality of Qiskit Metal by offering supplementary tools.



### Key Interactions
- The **Core** modules form the foundation and integrate tightly with the **Renderers**, **GUI**, and **Analyses** modules.
- The **GUI** depends on the **Core** and **Renderers** to provide visualization and interactivity.
- The **Renderers** serve as bridges between Qiskit Metal and external tools, interacting with the **Core** to export designs.
- The **Analyses** modules leverage the **Core** to extract meaningful data for optimization and validation.
- The **Utilities** modules provide essential supporting functionalities across the entire codebase.

This modular structure ensures scalability, flexibility, and ease of use for designing, analyzing, and fabricating quantum circuits.


---

# Backmatter

## Authors and Citation
Qiskit Metal is the work of [many people](https://github.com/Qiskit/qiskit-metal/pulse/monthly) who contribute to the project at different levels. Metal was conceived and developed by [Zlatko Minev](https://www.zlatko-minev.com) at IBM; then co-led with Thomas McConkey. If you use Qiskit Metal, please cite as per the included [BibTeX file](https://github.com/Qiskit/qiskit-metal/blob/main/Qiskit_Metal.bib). For icon attributions, see [here](https://github.com/Qiskit/qiskit-metal/blob/main/qiskit_metal/_gui/_imgs/icon_attributions.txt).

## Changelog and Release Notes
The changelog provides a quick overview of notable changes for a given release.

Expand All @@ -122,3 +264,5 @@ Additionally, as part of each release detailed release notes are written to docu

## License
[Apache License 2.0](https://github.com/Qiskit/qiskit-metal/blob/main/LICENSE.txt)


Loading