-
Notifications
You must be signed in to change notification settings - Fork 349
Migration to qiskit 2.0 and integration testing #897
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
Comments
Thanks for keeping us in the loop @ElePT! We'd be very happy to give Neko a go when adding support for Qiskit 2.0. For us, this will likely be a 2-step process - first deprecating V1 primitives (and Qiskit v.0.x support), and then updating to 2.0 - and we'll get back to this at the right time. Really looking forward to seeing the 2.0 release out! |
As an FYI I would expect ML here to fail when/if Qiskit 2.0 is installed with it. I was just updating Algorithms to get CI running and you can see in the PR here qiskit-algorithms#221 that the tests against qiskit main fail to even start, as the class it uses/depends on has now been deleted.
In algorithms I added a pin for qiskit < 2.0 so it will not install 2.0, when its released shortly, as its incompatible. Here you have support for V2 primitives and with V1 being deprecated it was already stated in the 0.8 release notes that If you wanted to try things with Qiskit 2.0 locally to see what happens there is an ReleaseCandidate2 that was just put out following on from RC1 earlier this week https://pypi.org/project/qiskit/2.0.0rc2/ |
Just as a note updating the code to V2.0 is gong to be more than primitives. In looking at the deprecation messages currently emitted there are others around operators and library circuits. eg test_qnn_circuit.py:130: PendingDeprecationWarning: The class This seems to be similarly the case for ZFeatureMap, ZZFeatureMap, PauliFeatureMap, RealAmplitudes, EfficientSU2... Also I see /home/runner/work/qiskit-machine-learning/qiskit-machine-learning/test/algorithms/classifiers/test_vqc.py:79: DeprecationWarning: And while this below is not Qiskit related as its among the captured deprecation warnings - that hopefully will all no longer exist after updating - I just note it here for completion /home/runner/work/qiskit-machine-learning/qiskit-machine-learning/qiskit_machine_learning/neural_networks/neural_network.py:127: DeprecationWarning: array implementation doesn't accept a copy keyword, so passing copy=False failed. array must implement 'dtype' and 'copy' keyword arguments. To learn more, see the migration guide https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword In changing the above Qiskit related code it seems that Qiskit 1.,3 would then become a minimum requirement (currently the requirements has >1.0, < 2.0) |
What should we add?
The Qiskit SDK CI includes an integration testing step of downstream packages through https://github.com/Qiskit/qiskit-neko, among which we include
qiskit-machine-learning
. This allows us to see that the removal of deprecated primitive V1 implementations (Qiskit/qiskit#13877) affects theqiskit-machine-learning
-package, and that it will need an update to stay compatible with Qiskit 2.0.You are free to decide if you want to migrate to 2.0 and when, but we recommend migrating for increased compatibility and support. On the qiskit-neko side,
qiskit-machine-learning
integration tests will be skipped until the package is updated. The first Qiskit 2.0 release candidate is planned for tomorrow, and the release is planned for ~March 20th.Thank you for your effort maintaining Qiskit ML :) Let me know if you have any questions or need migration support.
The text was updated successfully, but these errors were encountered: