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 qiskit requirement from ~=0.45.1 to ~=1.0.1 #2207

Closed
wants to merge 5 commits into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 23, 2024

This write-up summarizes the comments made in this PR.

When to merge this PR:

This PR can't be merged until pennylane-qiskit and cirq are compatible with this version of qiskit.

Right now, the circuit converter breaks because cirq-core uses OpenQASM2.

qiskit.qasm was removed in qiskit==1.0.1 to distinguish between qiskit.qasm2 and qiskit.qasm3.

Links to release notes for the converter:

In addition, pennylane-qiskit still depends on qiskit==0.45.3. All pennylane related build failures are from 0.34.0 where deprecated qiskit.extensions is imported. Bumping up to 0.34.1 leads to dependency conflicts.

The conflict is caused by:
    mitiq[development] 0.34.0 depends on qiskit~=1.0.1; extra == "development"
    bqskit[ext] 1.0.4 depends on qiskit>=0.36.2; extra == "ext"
    pennylane-qiskit 0.34.1 depends on qiskit<0.46 and >=0.32


Dependabot Notes

Updates the requirements on qiskit to permit the latest version.

Release notes

Sourced from qiskit's releases.

Qiskit 1.0.1

Release notes: https://docs.quantum.ibm.com/api/qiskit/release-notes/1.0

Changelog

Fixed:

  • Fix an unchecked condition in InverseCancellation (#11834)
  • Fix PropertySet re-use in BasePassManager.run (#11787)
  • Fix custom pulse instruction conversion to Qobj (#11829)
  • Fix scheduling units (#11817)
Commits

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Updates the requirements on [qiskit](https://github.com/Qiskit/qiskit) to permit the latest version.
- [Release notes](https://github.com/Qiskit/qiskit/releases)
- [Changelog](https://github.com/Qiskit/qiskit/blob/main/docs/release_notes.rst)
- [Commits](Qiskit/qiskit@0.45.1...1.0.1)

---
updated-dependencies:
- dependency-name: qiskit
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the infrastructure For issues related to building, packaging, and continuous integration. label Feb 23, 2024
@purva-thakre
Copy link
Contributor

purva-thakre commented Feb 26, 2024

A large number of the ImportError: cannot import name 'extensions' from 'qiskit' errors are related to pennylane. I think we will have to wait for pennylane to move to qiskit==1.0.1 to avoid circuit conversion errors.

https://github.com/unitaryfund/mitiq/actions/runs/8053215644/job/21995073925?pr=2207#step:6:4303

https://github.com/PennyLaneAI/pennylane-qiskit/blob/4eceeb835f3b22e9ab641e645b472035ea3c69e6/requirements.txt#L27

PennyLaneAI/pennylane-qiskit#441 (comment)

Link to the release notes: https://docs.quantum.ibm.com/api/qiskit/release-notes/1.0#qiskit-10-release-notes

@purva-thakre purva-thakre force-pushed the dependabot/pip/qiskit-approx-eq-1.0.1 branch 2 times, most recently from c1100df to d2e566e Compare February 26, 2024 18:55
@purva-thakre
Copy link
Contributor

purva-thakre commented Feb 26, 2024

Other errors are due to qasm circuit conversion issues: QuantumCircuit.qasm() can't be used with qiskit 1.0.1.

Right now, I think from cirq.contrib.qasm_import import circuit_from_qasm might not work after the .qasm method was removed. We might also have to wait for a new release from cirq.

Will add more on this later. I can't find where the .qasm() is used in cirq.

https://docs.quantum.ibm.com/api/migration-guides/qiskit-1.0-features#quantumcircuitqasm
Qiskit/qiskit#10533 (comment)

@purva-thakre purva-thakre force-pushed the dependabot/pip/qiskit-approx-eq-1.0.1 branch from 633fd32 to 2163fe4 Compare February 27, 2024 19:07
@purva-thakre
Copy link
Contributor

purva-thakre commented Feb 27, 2024

Locally, most of the make test errors are related to pennylane-qiskit: ImportError: cannot import name 'extensions' from 'qiskit'.

There are other qiskit related test failures but those are either fixable through the release notes or appear to be a cirq <-> OpenQasm2.0 issue.

Will add more details later on which dependency: AttributeError: 'list' object has no attribute 'add_qubit' is related to something in qasm which is could be a problem of the cirq <-> qasm converter. cirq does not use .qasm() method for their converter but relies on OpenQASM 2.0.

https://docs.quantum.ibm.com/api/migration-guides/qiskit-1.0-features#qiskitconverters

https://github.com/search?q=repo%3AQiskit%2Fqiskit%20add_qubit&type=code

I don't know why pip is struggling to resolve the dependency in the failing tests. Locally, there were no issues in a py311 virtual environment. Will try specifying the approximate versions.


# Documentation and examples.
Sphinx==5.2.3
sphinxcontrib-bibtex==2.5.0
sphinx-copybutton==0.5.0
sphinx-autodoc-typehints==1.19.4
myst-nb==1.0.0
myst-nb==0.17.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is reducing the dependency by 1 version only.

https://github.com/executablebooks/MyST-NB/releases

Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 8, 2024

A newer version of qiskit exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@purva-thakre
Copy link
Contributor

Closing this as #2269 already has the changes from this PR.

Copy link
Contributor Author

dependabot bot commented on behalf of github Apr 11, 2024

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/pip/qiskit-approx-eq-1.0.1 branch April 11, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure For issues related to building, packaging, and continuous integration.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant