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

PySide6 Compatibility #1002

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

PySide6 Compatibility #1002

wants to merge 28 commits into from

Conversation

shanto268
Copy link

@shanto268 shanto268 commented Nov 18, 2024

What are the issues this pull addresses (issue numbers / links)?

Porting Qiskit Metal from PySide2 to PySide6 so that it can work natively on M* Macs (Apple Silicon).

Issues addressed:

Did you add tests to cover your changes (yes/no)?

No. N/A

Did you update the documentation accordingly (yes/no)?

Yes

Did you read the CONTRIBUTING document (yes/no)?

Yes

Summary

Fixed changes from PR #908 to pass automated CI workflows and tests, ensuring compatibility with updated dependencies, environment configurations, and the latest (11/17/2024) main branch.

Details and comments

  1. Built on top of changes made by @obrienpja in PR #908.

  2. Changes to QWidget_PlaceholderText and QTableView_AllComponents:

    • Refactored the QWidget_PlaceholderText class to ensure proper initialization and compatibility with PySide6.
    • Resolved issues with placeholder text styling by updating palette usage to align with PySide6 standards.
    • Updated QTableView_AllComponents to correctly inherit and integrate with QWidget_PlaceholderText, ensuring both functionality and visual styling work seamlessly.
    • Fixed initialization errors and ensured that the placeholder label behaves as intended when no components are available.
  3. Requirements and environment updates:

    • Updated the environment.yml file to use stable, OS-agnostic dependencies for Python 3.10.
    • Added missing dependencies, such as pyaedt, to ensure a consistent build across different operating systems.
    • Ensured that all dependencies align with the workflows and requirements in the lab's testing environment.
  4. Testing and validation:

    • Verified that the changes integrate seamlessly with the existing workflows and CI processes used in our lab.
    • Tested the updated branch against the current main branch workflows to confirm identical behavior.
    • All CI tests now pass successfully across all supported platforms (Windows, macOS, Ubuntu) and Python versions (3.9 and 3.10).

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ obrienpja
✅ priti-ashvin-shah-ibm
❌ shanto268
You have signed the CLA already but the status is still pending? Let us recheck it.

@zlatko-minev
Copy link
Collaborator

Thank you, @shanto268! The tests are running. This is a giant PR, so it would be good to have more eyes on it than just you and me. Has anyone else from your lab tried this? I think after merging this, we could bump the Qiskit Metal version from 0.1.5 to 0.2. I just want to make sure it runs.

@shanto268
Copy link
Author

Thanks! All tests have passed now, thankfully.

I totally agree—it indeed is a big PR, so having more eyes on it is a great idea. I’ll be using this version myself and asking my lab mates to do the same over the next couple of weeks. If everything runs smoothly, I’ll report back.

I’d also like to invite the great people—@PP501 and @DavidSomm—of the SQDMetal team to see if they can help beta test this version as well.

@zlatko-minev
Copy link
Collaborator

Awesome, that would be superb! Thank you everyone. Please don't be shy to post any comments here.

@zlatko-minev
Copy link
Collaborator

Nice

@zlatko-minev
Copy link
Collaborator

Linking pip install issue #1000

@PositroniumJS
Copy link

PositroniumJS commented Dec 27, 2024

I tried to use these changes with python 3.12 on Windows, for it to be installed, I modified the version of the packages (I give my requirements.txt file below), this is my feedback (all may not be linked to changes in this PR):

  1. sometimes, after the installation, the folder qiskit-metal/_gui/styles is missing in the installed package

  2. the first time, I can open the gui without any problem, except the following error messages in the console of the gui metal: line: 0, func: None(), file: None WARNING: endResetModel called on QSortFilterProxyModel(0x1dd7a634b60) without calling beginResetModel first [_handle_qt_messages._qt_message_handler]

  3. all subsequent times that I try to run this code (even after restarting my computer), it crashes without any error message. I managed to find out that it crashes when running self.main_window.show() in main_window.py

  4. I tried to do the same in WSL, likewise the gui opened the first time with the same error messages in the console (when clicking on the arrow to close the gui, the big window closed but the small one kept reopening itself, I had to use Ctrl+C in the terminal to close it), then again, impossible to launch the gui again, but this time I get the message Segmentation fault in the terminal

Deleting and recreating the venv is not solving the issue.

I used this code to test the gui:

from qiskit_metal import designs, draw, MetalGUI, Dict, open_docs
design = designs.DesignPlanar()
gui = MetalGUI(design)

requirements.txt

addict==2.4.0
descartes==1.1.0
gdspy==1.6.13
geopandas==0.12.2
ipython==8.30.0
matplotlib==3.9.3
numpy==1.26.4
pandas==1.5.3
pint==0.20.1
pyEPR-quantum==0.9.0
pygments==2.18.0
pyside6
qdarkstyle==3.1
qutip==4.7.6
scipy==1.12.0
shapely==2.0.6
scqubits==3.1.0
gmsh==4.11.1
pyaedt==0.13.0
pyyaml==6.0.2
cython<3.0.0

I have not tried with a lower version of python.

I do not know if someone else can manage to reproduce this bug. Feel free to tell me how to provide more details if necessary, in particular how to get the error messages of Qt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants