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

✨ switch to mqt-core Python package #336

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

Conversation

burgholzer
Copy link
Member

Description

This PR switches the project to use the newly developed mqt-core Python package.
As part of this change, it switches from purely using the git submodule to using FetchContent (as advised in cda-tum/mqt-qcec#302), which also allows to use the libraries directly provided by the mqt-core Python package.
This means that any Python package build will only require the mqt-core package as a build and runtime dependency and won't have to rely on the git submodule (or a fetched version of mqt-core) any more.
Any regular C++ build will use the FetchContent CMake module.

The change brings a range of advantages:

  • Uses the new load function of mqt-core that allows to load any supported circuit format as input and has better handling for Qiskit QuantumCircuit objects.
  • Simplifies the interfaces of the DDSIM Python bindings
  • Allows OpenQASM3 as an input format.

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 dependencies Pull requests that update a dependency file python Pull requests that update Python code minor Part of a minor release packaging Anything related to Python packaging usability Anything related to usability labels Jan 27, 2024
@burgholzer burgholzer self-assigned this Jan 27, 2024
@burgholzer burgholzer force-pushed the mqt-core-switch branch 2 times, most recently from 7ffac4c to ee41104 Compare January 27, 2024 14:14
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (a50b525) 92.7% compared to head (60cd68f) 92.9%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #336     +/-   ##
=======================================
+ Coverage   92.7%   92.9%   +0.1%     
=======================================
  Files         35      35             
  Lines       2660    2666      +6     
  Branches     345     345             
=======================================
+ Hits        2468    2477      +9     
+ Misses       192     189      -3     
Flag Coverage Δ
cpp 94.6% <ø> (-0.1%) ⬇️
python 88.2% <84.2%> (+0.5%) ⬆️
Files Coverage Δ
src/mqt/ddsim/__init__.py 100.0% <100.0%> (ø)
src/mqt/ddsim/hybridqasmsimulator.py 91.2% <100.0%> (+0.3%) ⬆️
src/mqt/ddsim/primitives/estimator.py 95.0% <100.0%> (+<0.1%) ⬆️
src/mqt/ddsim/qasmsimulator.py 98.9% <100.0%> (+<0.1%) ⬆️
src/mqt/ddsim/unitarysimulator.py 87.8% <100.0%> (+0.3%) ⬆️
src/mqt/ddsim/pathqasmsimulator.py 52.7% <57.1%> (+1.8%) ⬆️

... and 1 file with indirect coverage changes

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file minor Part of a minor release packaging Anything related to Python packaging python Pull requests that update Python code usability Anything related to usability
Projects
Status: In Progress
Status: In Progress
Development

Successfully merging this pull request may close these issues.

None yet

1 participant