-
Notifications
You must be signed in to change notification settings - Fork 317
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
Migrating qiskit_algorithms
#817
base: main
Are you sure you want to change the base?
Conversation
Torch issue716
I skimmed things very quickly but one thing it looks like you will need is to modify the main init docstring to include any new modules for the main table of contents there. |
For all the copyrights, you know you can do a |
Maybe a release note outlining the changes with perhaps a migration guide too around what to do that the release note can also link too. As this stands is it considered a breaking change? I guess, for instance an optimizer instance from algorithms would still work since the function/logic is the same. But without any logic here to detect this no sort of user warning would be emitted to notify them they ought to be be switching to the version here. I.e. logically I think at present it still supports either the migrated logic here or the equivalent in algorithms even if the types are not explicitly coded for that in the changes here |
Thanks for the input, Steve. I fixed the copyright year and now going through the outstanding mypy errors. Then, I'll move over to the docstrings and release notes. This should not be a breaking change because the objects generated from Algorithms itself would be equivalent to those now generated in ML. But it would be a good idea to produce warnings or messages at specific points in the logic to ensure users are aware of this change as we consolidate the library. I can discuss the merge with Git history, however it might be more complex after changing the absolute/relative imports in some of the files. |
Hey, @edoaltamura. Are you still working on this? It might be work marking it as a Draft until you think it's ready for review. |
I will note, that presently with the main branch of Qiskit, that is shortly to be released as 1.2.0 that there is an issue with the |
Is it necessary for us to copy over all these files from algorithms when we're planning to cull most of them to reduce the maintenance load? I thought the intention described in #811 was to remove all but the SPSA gradient from that submodule. It seems counterproductive to fix issues in these files when they'll be removed soon. |
Regarding the spelling issues, to save time, we could do a union of the dictionary sets in |
I just saw that libcomb gradient had been copied here and noted the issue with present Qiskit main that fails the nightly CI unit tests in CI where it tests against Qiskit main branch. In terms of the gradients it does seem to be a subset copied here of what is in algorithms, but I do recall the statement about SPSA one being the only reasonable choice for hardware. |
My recollection of doing something in the past was to remove the custom dict let it create a list of all misspelled words and then sort the resultant to create the custom dict. I think I did this to create a dict to start with where I looked through for evident mispellings and removed them - in this case I guess all mispellings are correct and we would want the entire list. |
Summary
Qiskit algorithms, which Qiskit machine-learning (ML) depends on, is no longer officially supported as of qiskit-community/qiskit-algorithms@4247d06. To continue improving the subset of Algorithms features that are relevant to Qiskit machine-learning, it has been proposed to migrate those from Algorithms to ML.
This PR implements the merge of the subset of Qiskit Algorithms features needed for ML, as described in #811.
Closes #811.
qiskit_algorithms/gradients
->qiskit_machine_learning/gradients
qiskit_algorithms/optimizers
->qiskit_machine_learning/optimizers
qiskit_algorithms/state_fidelities
->qiskit_machine_learning/state_fidelities
qiskit_algorithms/utils
partially merged withqiskit_machine_learning/utils
Details and comments
The unit tests are also merged following the same structure as in the source directory.
qiskit_algorithms/tests/gradients
->qiskit_machine_learning/tests/gradients
qiskit_algorithms/tests/optimizers
->qiskit_machine_learning/tests/optimizers
qiskit_algorithms/tests/state_fidelities
->qiskit_machine_learning/tests/state_fidelities
qiskit_algorithms/tests/utils
partially merged withqiskit_machine_learning/tests/utils
Once the merge is complete, the codebase will be ready for a targeted attempt at resolving: