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

✨ Support for Qiskit 1.0 #349

Merged
merged 7 commits into from
Feb 16, 2024
Merged

✨ Support for Qiskit 1.0 #349

merged 7 commits into from
Feb 16, 2024

Conversation

burgholzer
Copy link
Member

Description

This PR adjusts the codebase to the changes from the 1.0 release of Qiskit. This entails:

  • Slight changes to the Qiskit primitives code since some members were moved from the interface BaseSampler/BaseEstimator to the implementation Sampler/Estimator. Coincidentally, this simplifies some of the code.
  • Slight changes to the existing Qiskit backends. The maximum number of qubits of the statevector and unitary simulators are now hardcoded since Qiskit decided to drop the psutils dependency. The defaults that have been put in place should still be reasonable for any use case where building the package from source is not an option.

In order to avoid all kinds of ugly compatibility hacks, this PR also changes the minimum required Qiskit version to 1.0.
Since Qiskit has devoted themselves to following semantic versioning from now on out, this hopefully means fewer compatibility changes in the future.

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.

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
essentially hardcode the maximum qubit numbers because Qiskit dropped the `psutils` dependency that allowed determining the available memory. Shouldn't have much influence in practice.

Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer added dependencies Pull requests that update a dependency file python Pull requests that update Python code minor Part of a minor release feature New feature or request labels Feb 16, 2024
@burgholzer burgholzer self-assigned this Feb 16, 2024
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a50b525) 92.7% compared to head (03039c6) 92.6%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #349     +/-   ##
=======================================
- Coverage   92.7%   92.6%   -0.2%     
=======================================
  Files         35      35             
  Lines       2660    2611     -49     
  Branches     345     345             
=======================================
- Hits        2468    2419     -49     
  Misses       192     192             
Flag Coverage Δ *Carryforward flag
cpp 94.6% <ø> (ø) Carriedforward from 54db8e8
python 86.8% <100.0%> (-1.0%) ⬇️

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

Files Coverage Δ
src/mqt/ddsim/hybridqasmsimulator.py 90.9% <100.0%> (ø)
src/mqt/ddsim/hybridstatevectorsimulator.py 100.0% <ø> (ø)
src/mqt/ddsim/pathstatevectorsimulator.py 100.0% <ø> (ø)
src/mqt/ddsim/primitives/estimator.py 93.4% <100.0%> (-1.6%) ⬇️
src/mqt/ddsim/primitives/sampler.py 100.0% <100.0%> (ø)
src/mqt/ddsim/qasmsimulator.py 98.8% <ø> (-0.2%) ⬇️
src/mqt/ddsim/statevectorsimulator.py 100.0% <ø> (ø)
src/mqt/ddsim/unitarysimulator.py 87.5% <ø> (ø)

Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer merged commit 37d0485 into main Feb 16, 2024
29 checks passed
@burgholzer burgholzer deleted the qiskit-1.0 branch February 16, 2024 17:02
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 feature New feature or request minor Part of a minor release python Pull requests that update Python code
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant