Skip to content

✨ Switch to mqt-core Python package #432

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

Merged
merged 10 commits into from
Feb 18, 2025
Merged

✨ Switch to mqt-core Python package #432

merged 10 commits into from
Feb 18, 2025

Conversation

burgholzer
Copy link
Member

@burgholzer burgholzer commented Aug 6, 2024

Description

This is an alternative to #355 and marks the final transition to the mqt-core Python package. See #355 and #352 for some history on this topic.

In addition to directly using the MQT Core Python package, this PR makes Qiskit an optional dependency of MQT QCEC. All core functionality is now covered MQT-internally.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

@burgholzer burgholzer added feature New feature or request dependencies Pull requests that update a dependency file python Anything related to Python code packaging Anything related to Python packaging c++ Anything related to C++ code minor Part of a minor release labels Aug 6, 2024
@burgholzer burgholzer self-assigned this Aug 6, 2024
@burgholzer burgholzer force-pushed the use-mqt-core-package branch from e95ffd5 to 5495501 Compare August 6, 2024 22:13
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 98.76543% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.1%. Comparing base (379c211) to head (0987b8f).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/mqt/qcec/parameterized.py 97.0% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #432     +/-   ##
=======================================
+ Coverage   95.8%   96.1%   +0.3%     
=======================================
  Files         39      40      +1     
  Lines       1837    1877     +40     
  Branches     225     224      -1     
=======================================
+ Hits        1760    1804     +44     
+ Misses        77      73      -4     
Flag Coverage Δ
cpp 95.9% <ø> (-0.1%) ⬇️
python 96.4% <98.7%> (+1.5%) ⬆️
Files with missing lines Coverage Δ
src/mqt/qcec/__init__.py 100.0% <100.0%> (ø)
src/mqt/qcec/_compat/optional.py 100.0% <100.0%> (ø)
src/mqt/qcec/compilation_flow_profiles.py 98.1% <100.0%> (+1.3%) ⬆️
src/mqt/qcec/configuration.py 100.0% <100.0%> (ø)
src/mqt/qcec/verify.py 100.0% <100.0%> (ø)
src/mqt/qcec/verify_compilation_flow.py 100.0% <100.0%> (ø)
src/mqt/qcec/parameterized.py 94.5% <97.0%> (-0.4%) ⬇️

... and 4 files with indirect coverage changes

@burgholzer burgholzer force-pushed the use-mqt-core-package branch 6 times, most recently from 96ff41e to db6cb20 Compare August 10, 2024 13:34
@burgholzer burgholzer force-pushed the use-mqt-core-package branch 5 times, most recently from 055c342 to bf94b85 Compare August 14, 2024 17:25
@burgholzer burgholzer force-pushed the use-mqt-core-package branch 2 times, most recently from 77145ad to 64dfa87 Compare September 4, 2024 21:26
@burgholzer burgholzer added major Part of a major release and removed minor Part of a minor release labels Sep 4, 2024
burgholzer added a commit that referenced this pull request Sep 29, 2024
## Description

This PR updates the CD workflow so that anytime it runs on a push to
`main`, it uploads the resulting package to Test PyPI. This allows to
battle test the packages before official releases.
This will be especially important in the context of #432
## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.
@burgholzer burgholzer marked this pull request as ready for review January 16, 2025 15:42
@burgholzer burgholzer force-pushed the use-mqt-core-package branch from dca2e62 to 2645f59 Compare January 16, 2025 20:42
@burgholzer
Copy link
Member Author

Alright, some progress.

The new ubuntu-24.04-arm runners fail due to a uv error that will probably be fixed soonish (a PR is open at astral-sh/uv#10697).

The Ubuntu 22.04 builds fail because pybind decides that the compiled version of mqt-core that comes from PyPI is not binary-compatible with the mqt-qcec extension being compiled.
Hence, it does not recognize the qc::QuantumComputation class. This has been addressed in pybind/pybind11#5439 which, unfortunately, has not been released yet.
We can work around this for now by compiling mqt-core from source, although that should not be a long term solution.

@burgholzer burgholzer force-pushed the use-mqt-core-package branch from 2645f59 to 5d56d28 Compare January 17, 2025 15:25
@burgholzer burgholzer added extensive-cpp-ci Adding this label indicates that extensive C++ CI runs should be started for this PR. extensive-python-ci Adding this label indicates that extensive Python CI runs should be started for this PR. labels Jan 22, 2025
@burgholzer burgholzer force-pushed the use-mqt-core-package branch 5 times, most recently from 4acce1a to 0df5561 Compare January 22, 2025 20:36
@burgholzer burgholzer added this to the MQT QCEC v3.0 milestone Feb 17, 2025
@burgholzer
Copy link
Member Author

A year-long odyssey is finally coming to an end. All the tests are green, all issues resolved. I see no reason for leaving this lying around anymore. Especially, since we cannot update to more recent versions of MQT Core without this PR.
I will probably cut a pre-release once this merged in order to battle-test the solution.

@burgholzer burgholzer merged commit 6802cfd into main Feb 18, 2025
73 checks passed
@burgholzer burgholzer deleted the use-mqt-core-package branch February 18, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Anything related to C++ code dependencies Pull requests that update a dependency file extensive-cpp-ci Adding this label indicates that extensive C++ CI runs should be started for this PR. extensive-python-ci Adding this label indicates that extensive Python CI runs should be started for this PR. feature New feature or request major Part of a major release packaging Anything related to Python packaging python Anything related to Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant