Skip to content

✨ switch to mqt-core Python package #336

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 25 commits into from
Mar 5, 2025
Merged

✨ switch to mqt-core Python package #336

merged 25 commits into from
Mar 5, 2025

Conversation

burgholzer
Copy link
Member

@burgholzer burgholzer commented Jan 27, 2024

Description

This PR switches the project to use the newly developed mqt-core Python package.
Any Python package build will only require the mqt-core package as a build and runtime dependency and won't have to rely on fetched version of mqt-core any more.
Any regular C++ build will still 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.

In addition, this PR updates mqt-ddsim to most of the current best practices within the MQT.

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: Patch coverage is 99.15966% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.9%. Comparing base (babc960) to head (fd95157).
Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
include/HybridSchrodingerFeynmanSimulator.hpp 0.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #336     +/-   ##
=======================================
+ Coverage   92.3%   93.9%   +1.5%     
=======================================
  Files         37      37             
  Lines       2734    2648     -86     
  Branches     311     301     -10     
=======================================
- Hits        2526    2488     -38     
+ Misses       208     160     -48     
Flag Coverage Δ
cpp 93.9% <98.7%> (-0.3%) ⬇️
python 94.0% <100.0%> (+6.6%) ⬆️
Files with missing lines Coverage Δ
include/PathSimulator.hpp 97.5% <100.0%> (+2.1%) ⬆️
include/ShorSimulator.hpp 100.0% <ø> (ø)
include/Simulator.hpp 92.6% <100.0%> (+1.1%) ⬆️
include/UnitarySimulator.hpp 100.0% <ø> (ø)
src/CircuitSimulator.cpp 87.7% <100.0%> (-3.5%) ⬇️
src/DeterministicNoiseSimulator.cpp 100.0% <100.0%> (ø)
src/GroverSimulator.cpp 100.0% <100.0%> (ø)
src/HybridSchrodingerFeynmanSimulator.cpp 97.7% <100.0%> (-0.1%) ⬇️
src/PathSimulator.cpp 89.9% <100.0%> (+1.0%) ⬆️
src/ShorFastSimulator.cpp 92.2% <100.0%> (-2.5%) ⬇️
... and 13 more

@burgholzer burgholzer force-pushed the mqt-core-switch branch 2 times, most recently from a2ef802 to 2d2c358 Compare February 5, 2024 22:10
@burgholzer burgholzer force-pushed the mqt-core-switch branch 2 times, most recently from 61996fd to 60cd68f Compare February 14, 2024 16:18
@burgholzer burgholzer added this to the DDSIM 2.0 milestone Feb 16, 2024
@burgholzer burgholzer force-pushed the mqt-core-switch branch 2 times, most recently from 66b69b8 to bb7ffd3 Compare September 5, 2024 18:59
@burgholzer burgholzer added major Part of a major release and removed minor Part of a minor release labels Sep 6, 2024
burgholzer added a commit to munich-quantum-toolkit/core that referenced this pull request Mar 4, 2025
…lation (#849)

## Description

This pull request adds support for handling empty quantum and classical
registers during the translation process from Qiskit to MQT. This update
ensures proper translation and eliminates any potential errors caused by
empty registers.

This has come up while working on
munich-quantum-toolkit/ddsim#336

## Checklist:

- [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.

Signed-off-by: burgholzer <[email protected]>
this has been a burden to maintain and some of the dependencies involved are not mature enough. Given the limited scope of the feature, it is for the best to simply remove it.

Signed-off-by: burgholzer <[email protected]>
Signed-off-by: burgholzer <[email protected]>
Signed-off-by: burgholzer <[email protected]>
Signed-off-by: burgholzer <[email protected]>
@burgholzer burgholzer added c++ Anything related to C++ code 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. pre-commit Pull requests that update pre-commit checks github-actions Pull requests that update GitHub Actions code refactor Anything related to code refactoring labels Mar 4, 2025
@burgholzer burgholzer merged commit 185c964 into main Mar 5, 2025
200 of 204 checks passed
@burgholzer burgholzer deleted the mqt-core-switch branch March 5, 2025 08:58
@github-project-automation github-project-automation bot moved this from In Progress to Done in MQT Mar 5, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in MQT Simulation Mar 5, 2025
ystade pushed a commit to munich-quantum-toolkit/core that referenced this pull request Mar 5, 2025
…lation (#849)

## Description

This pull request adds support for handling empty quantum and classical
registers during the translation process from Qiskit to MQT. This update
ensures proper translation and eliminates any potential errors caused by
empty registers.

This has come up while working on
munich-quantum-toolkit/ddsim#336

## Checklist:

- [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.

Signed-off-by: burgholzer <[email protected]>
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. github-actions Pull requests that update GitHub Actions code major Part of a major release packaging Anything related to Python packaging pre-commit Pull requests that update pre-commit checks python Pull requests that update Python code refactor Anything related to code refactoring usability Anything related to usability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant