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

🚸 slightly tweak how optional qiskit dependency is handled #797

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

burgholzer
Copy link
Member

Description

This PR slightly adjusts how the optional qiskit dependency is handled in the load method.
At that point in the function, the user is passing in a Qiskit QuantumCircuit anyway, so Qiskit will naturally be available.

An observation I had while working on this:
We currently do not enforce a particular version constraint on qiskit at runtime.
Thus, someone might use a version of qiskit that is too old at runtime, and will probably run into errors.
We could probably do a better job of suggesting people to install the mqt.core[qiskit] extra to guarantee compatibility.

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 usability Anything related to usability Core Anything related to the Core library and IR python Anything related to Python code labels Jan 8, 2025
@burgholzer burgholzer merged commit 2404c85 into main Jan 8, 2025
23 checks passed
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.2%. Comparing base (a703232) to head (cd94730).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #797     +/-   ##
=======================================
- Coverage   92.2%   92.2%   -0.1%     
=======================================
  Files        125     125             
  Lines      13764   13760      -4     
  Branches    2167    2167             
=======================================
- Hits       12701   12697      -4     
  Misses      1063    1063             
Flag Coverage Δ *Carryforward flag
cpp 92.0% <ø> (ø) Carriedforward from a703232
python 99.7% <100.0%> (-0.1%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
src/mqt/core/__init__.py 100.0% <100.0%> (ø)
src/mqt/core/plugins/qiskit.py 100.0% <100.0%> (ø)

@burgholzer burgholzer deleted the mqt-core-qiskit-usability branch January 8, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Anything related to the Core library and IR python Anything related to Python code usability Anything related to usability
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant