-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Restructure the files under algorithms.gradients. #9695
Comments
Is this just a code restructuring that will be transparent to end users? I.e. all the function will be imported into the gradient init file and an end user will still import from algorithms.gradients. In the gradients in the docstring the organization/presentation to the user is not the same as the above structure (has Estimator grads, Sampler grads and QGT) - would you change that too, to reflect this organization or not. It would not affect the code in any way just how they are grouped in the docs. |
Yes! exactly.
I hadn't thought of that. I think it's better to group by gradient type in the docs, too, if the file structures are so. |
* Reorganised algorithms.gradients Fixes issue #9695 by reorganising algorithms.gradients into seperate folders. * Moved 'lin_comb_qgt.py' to the 'qgt' folder Moved 'lin_comb_qgt.py' to the 'qgt' folder to ensure all qgt related files are grouped together. * Formatted files with linter. Ran linter and reformatted files accordingly. * Updated '__init__.py' Updated '__init__.py' to reflect new folder structure. * Removed 'qgt' folder Assimilated QGT classes into related folders within 'algorithms.gradients'. Also, 'qgt_result.py' was placed into the 'base' folder since it constitutes a base class. * Update qiskit/algorithms/gradients/__init__.py Co-authored-by: Julien Gacon <[email protected]> * Update qiskit/algorithms/gradients/__init__.py Co-authored-by: Julien Gacon <[email protected]> * Removed 'qfi' folder Removed 'qfi' folder and moved remaining contents into parent folder 'gradients'. * Update qiskit/algorithms/gradients/__init__.py Co-authored-by: Julien Gacon <[email protected]> * Attempted to resolve merge conflicts. Altered files to match new versions causing the conflict. * Ran linter Ran 'tox -eblack' on the repository to resolve linter issues. * Fixed base module hierarchy issue Altered contents of 'qfi.py' to refer to 'BaseQGT' according to the new hierarchy given in the PR. * Fixed more hierarchy issues. Changed more references to reflect new hierarchy. --------- Co-authored-by: Julien Gacon <[email protected]>
* Reorganised algorithms.gradients Fixes issue Qiskit/qiskit#9695 by reorganising algorithms.gradients into seperate folders. * Moved 'lin_comb_qgt.py' to the 'qgt' folder Moved 'lin_comb_qgt.py' to the 'qgt' folder to ensure all qgt related files are grouped together. * Formatted files with linter. Ran linter and reformatted files accordingly. * Updated '__init__.py' Updated '__init__.py' to reflect new folder structure. * Removed 'qgt' folder Assimilated QGT classes into related folders within 'algorithms.gradients'. Also, 'qgt_result.py' was placed into the 'base' folder since it constitutes a base class. * Update qiskit/algorithms/gradients/__init__.py Co-authored-by: Julien Gacon <[email protected]> * Update qiskit/algorithms/gradients/__init__.py Co-authored-by: Julien Gacon <[email protected]> * Removed 'qfi' folder Removed 'qfi' folder and moved remaining contents into parent folder 'gradients'. * Update qiskit/algorithms/gradients/__init__.py Co-authored-by: Julien Gacon <[email protected]> * Attempted to resolve merge conflicts. Altered files to match new versions causing the conflict. * Ran linter Ran 'tox -eblack' on the repository to resolve linter issues. * Fixed base module hierarchy issue Altered contents of 'qfi.py' to refer to 'BaseQGT' according to the new hierarchy given in the PR. * Fixed more hierarchy issues. Changed more references to reflect new hierarchy. --------- Co-authored-by: Julien Gacon <[email protected]>
What should we add?
Currently the files under under
algorithms.gradients
are messy. It's better to restructure the files. Grouping files by gradient type seems like a good idea. The files related to qgt and qfi are a bit tricky though.The text was updated successfully, but these errors were encountered: