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 #418

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

burgholzer
Copy link
Member

@burgholzer burgholzer commented Jan 26, 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.
  • Allows to directly feed QASM strings as inputs to the compilation methods
  • Simplifies the interfaces of the QMAP 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 Anything related to Python code usability Anything related to usability packaging Anything related to Python packaging minor Changes leading to a minor version increase labels Jan 26, 2024
@burgholzer burgholzer self-assigned this Jan 26, 2024
@burgholzer burgholzer force-pushed the mqt-core-switch branch 2 times, most recently from 57479ce to e05f117 Compare January 27, 2024 14:18
burgholzer added a commit that referenced this pull request Jan 29, 2024
## Description

This PR updates the mqt-core submodule and brings in some further
advancements from #418.
Specifically, it switches to using `FetchContent` for obtaining
`mqt-core` (and `LogicBlocks`).
Per default, it is pointed to the vendored submodule via an overridable
CMake variable.

## 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 force-pushed the mqt-core-switch branch 2 times, most recently from 2643b7b to c93369f Compare February 5, 2024 15:51
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

Attention: Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.3%. Comparing base (6b5d2d1) to head (dbaa9cb).

Files with missing lines Patch % Lines
src/mqt/qmap/__init__.py 93.7% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #418   +/-   ##
=====================================
  Coverage   90.3%   90.3%           
=====================================
  Files         90      90           
  Lines      10045   10047    +2     
  Branches    1711    1711           
=====================================
+ Hits        9075    9077    +2     
  Misses       970     970           
Flag Coverage Δ
cpp 90.1% <ø> (ø)
python 93.5% <95.6%> (+<0.1%) ⬆️
Files with missing lines Coverage Δ
src/mqt/qmap/clifford_synthesis.py 94.2% <100.0%> (-0.6%) ⬇️
src/mqt/qmap/compile.py 97.1% <100.0%> (+<0.1%) ⬆️
src/mqt/qmap/__init__.py 95.8% <93.7%> (+1.7%) ⬆️

src/mqt/qmap/__init__.py Fixed Show fixed Hide fixed
@burgholzer burgholzer added major Changes leading to a major version increase and removed minor Changes leading to a minor version increase labels Sep 4, 2024
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 major Changes leading to a major version increase packaging Anything related to Python packaging python Anything related to Python code usability Anything related to usability
Projects
Status: In Progress
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant