Skip to content

Support Qiskit 2.0 #224

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

Open
woodsp-ibm opened this issue Mar 13, 2025 · 3 comments
Open

Support Qiskit 2.0 #224

woodsp-ibm opened this issue Mar 13, 2025 · 3 comments

Comments

@woodsp-ibm
Copy link
Member

With the removal of the V1 primitives in Qiskit 2.0, Qiskit Algorithms will no longer work with Qiskit. For now #221 includes a pin for < 2.0 to ensure Qiskit Algorithms continues to work after install once 2.0 is released (shortly at the time of writing).

See also #136 which is the main work item associated with this.

@woodsp-ibm
Copy link
Member Author

With Qiskit 2.0 now released and the V1 primitives removed (were deprecated back in release 1.2) the algorithms code here. as expected, no longer works with it. (See the Monitor Main CI task which pulls qiskit directly from the repo to see this as that fails).

At this point I think the only real solution for algorithms is to have a breaking change and drop V1 primitive use/support (since it does not exist Qiskit 2.0). I do not think it's so doable to somehow have V1 primitives as an optional dependence in the code here so if not found things still work and would work with V1 primitives, for prior qiskit versions, hence the breaking prior change suggestion.

This would mean updating the min version of qiskit in requirements.txt where I think 1.0 is the earlier version having V2 primitives. Things would need checking to ensure it still works (If not we may need to increase the min level supported dependent on what the failure/fix looks like).

@crystaldot
Copy link

crystaldot commented Jun 10, 2025

Is there any chance of further development of this project (qiskit-algorithms) based on qiskit >= 2.0.0 ? Also qiskit-nature is not functional now with qiskit >= 2.0.0 as it depends on qiskit-algorithms.

@woodsp-ibm
Copy link
Member Author

There is some activity from the community in updating algorithms - e.g. #197 for V2 primitives which are needed for Qiskit 2.0 as the V1 primitives, which this code currently uses, had been deprecated and removed.

As to Qiskit Nature, even if algorithms are updated it will have its own problems without itself being updated as it has some of its own code, such as QEOM, that was built around the V1 primitives. I will note that Qiskit Machine Learning and Qiskit Optimization copied logic from here that they used to become independent such that the maintainers of those packages could maintain what they needed and keep them operational.

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

No branches or pull requests

2 participants