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

Update for Qiskit 1.0 #245

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

frankharkins
Copy link

@frankharkins frankharkins commented Mar 5, 2024

What

Updates code and examples to work with Qiskit 1.0.

Why

Qiskit 1.0 brings some stability guarantees and performance improvements. Most new users will use Qiskit 1.0 and will expect this project to be compatibile with it.

How

Mostly find/replace of import paths. Also replacing execute with backend.run.

# Old
execute(circuit, backend)

# New
transpile(circuit, backend)  # not always needed
backend.run(circuit)

See Qiskit 1.0 feature changes for more information.

Remarks

I re-ran the example notebooks that used Qiskit, with the exception of examples/Full_loop_single_qubit.ipynb which I could not get working (see #244). Since it's not caused by the Qiskit upgrade, I think fixing it is out of scope of this PR. Please advise on how you'd like to handle it.

View de1cde6 to see only the code changes to examples without the new cell outputs.

Checklist

Please include and complete the following checklist. Your Pull Request is (in most cases) not ready for review until the following have been completed. You can create a draft PR while you are still completing the checklist. Check the Contribution Guidelines for more details. You can mark an item as complete with the - [x] prefix

  • Tests - Added unit tests for new code, regression tests for bugs and updated the integration tests if required
  • Formatting & Linting - black and flake8 have been used to ensure styling guidelines are met
  • Type Annotations - All new code has been type annotated in the function signatures using type hints
  • Docstrings - Docstrings have been provided for functions in the numpydoc style
  • Documentation - The tutorial style documentation has been updated to explain changes & new features
  • Notebooks - Example notebooks have been updated to incorporate changes and new features
  • Changelog - A short note on this PR has been added to the Upcoming Release section

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.67%. Comparing base (48b7917) to head (84b5e2d).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #245   +/-   ##
=======================================
  Coverage   76.67%   76.67%           
=======================================
  Files          38       38           
  Lines        5873     5873           
=======================================
  Hits         4503     4503           
  Misses       1370     1370           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frankharkins
Copy link
Author

CI is failing but I can't reproduce locally; the tests passed and black claimed all .py files were formatted correctly.

@lazyoracle
Copy link
Member

CI is failing but I can't reproduce locally; the tests passed and black claimed all .py files were formatted correctly.

HI Frank, thanks for adding the qiskit 1.0 support and making the PR. I will look into the failing tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants