-
Notifications
You must be signed in to change notification settings - Fork 210
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
refactor: move code to new structure #746
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
* Move operators * Remove ops, move mappers * Refactor fermionic mapper imports * Remove old mappers * Move qubit converter * Refactor qubit mapper imports * Refactor qubit converter imports * Remove ListorDict * Remove old converters * Move operator tests * Remove old operator tests * Refactor operator test imports * Move mappers tests * Remove old mappers tests * Refactor mapper test imports * Update operators inits * Update operator tests inits * Fix black * Fix lint * Fix copyright * Delete __init__.py Remove extra init * Fix imports, lint * Fix copyright * Migrate converters tests * Fix imports of operators * Fix imports of mappers * Replace qubit converter imports * Restore releasenotes * Restore releasenotes * Restore releasenotes * Remove extra init * Add QubitConverter * Move properties to operator factories * Move problems * Move results * Move properties, results and problems tests * Change problem imports * Change properties imports * Change results imports * Change properties imports * Fix property imports * Refactor problem inits * Fix black * Fix results imports * Fix qubit mapper import * Fix copyright * Fix various imports * undo hdf5 changes * Replace second_quantization with second_q * Remove init (again????) * Restore ListOrDict * Undo remove LisOrDict * Fix ListOrDict * Fix ListOrDict * Rename test second_quantization, various lint fixes * Fix lint * Fix black/copyright * Restore converters init * Moved transformers * Restore converters init * Move circuit * Move algorithms * Move algorithms and circuit unit tests * Replace algorithms imports * Replace circuit imports * Remove init againnnnnn * fix transformers imports + * Fix transformers imports * Remove 'leftovers' * Migrate drivers * Fix driver imports * Fix all local lint errors * Fix black and copyright * Fix import * Fix driver import * Move ListOrdict * refactor: update HDF5 files This updates the contents of the HDF5 files used during unittesting. Since this is a temporary migration of all the existing properties into a new module location, this means that the module import paths stored inside of the HDF5 files are being updated by this PR. Nothing else changes functionally. * fix cyclic imports * Remove drivers/sescond_quantization submodule * fix drivers imports * fix cyclic imports * Fix str mistake * Fix black * Fix cyclic import driver result * Update pylint minimum version * Inline imports molecule * Modify resource imports * Turn requirement into constraint * Update constraint * fix driver imports * Fix black * Fix transformers test * Fix typo * Fix black * 2nd attempt fix cyclic import drivers * Fix black * Remove sampling tutorial * Remove protein folding tutorial * Fix path * Remove pes sampler import * Fix black * Fix tutorial * Find drivers * Fix tutorials * fix drivers tests * fix drivers tests * Modify tutorial explanations (not finished) * Move mappers and converter * Move mappers test * Fix mapper imports * Fix black * Flatten operators * Migrate transformers * Migrate problems * Refactor operator_factories into properties (again) * Rescue mapper base classes * Rescue hopping ops * Fix import * fix: HDF5 binary files and file locations * fix: more test resource paths * fix: final resource path fixes * docs: auto-generate docs/apidocs with Sphinx * Fix tutorial import * Update inits * Fix imports * Fix import 2 * Remove pes samplers * Fix import * Fix sphinx * Fix docs * Fix black * Fix docs * Rubber duck * fix docs * Update docs/getting_started.rst "Remove link" Co-authored-by: Max Rossmannek <[email protected]> * Update qiskit_nature/second_q/properties/vibrational_energy.py "Apply fix" Co-authored-by: Max Rossmannek <[email protected]> * Update qiskit_nature/second_q/properties/vibrational_energy.py Co-authored-by: Max Rossmannek <[email protected]> * Update qiskit_nature/second_q/properties/vibrational_energy.py Co-authored-by: Max Rossmannek <[email protected]> * Update test/nature_test_case.py Co-authored-by: Max Rossmannek <[email protected]> * Update test/nature_test_case.py Co-authored-by: Max Rossmannek <[email protected]> * Update qiskit_nature/second_q/properties/bases/__init__.py Co-authored-by: Max Rossmannek <[email protected]> * Update qiskit_nature/second_q/properties/property.py Co-authored-by: Max Rossmannek <[email protected]> * Apply review comments * Fix path * Apply comments * Move quadratic hamiltonian + random fixes * Fix lint * Fix mypy * fix import * Add hamiltonians to docs * Fix black * Add hamiltonians to toctree * Apply suggestions from code review * Apply review comment * Apply review comments * Fix black * Fix sneaky mappers Co-authored-by: Max Rossmannek <[email protected]> Co-authored-by: Manoel Marques <[email protected]> Co-authored-by: Max Rossmannek <[email protected]>
This is based on the suggestion [1], which will allow us to preserve the git blaming history in both, the old and new, code locations. This will be reverted after the move to the new code location has been merged with this commit. [1]: https://stackoverflow.com/a/44036771
a6f9978
to
c91960f
Compare
The history preserving aspect of this PR is now working as can be seen under the following two links: |
I also marked this PR to be closing all of the code relocation issues. I will open separate issues for the planned refactorings within the modules in the near future 👍 |
Yay! Git blame works for both the old and the new modules! |
One small comment, the tutorials I removed (5,6 and 9) are still removed in this PR. It doesn't make sense to migrate them, but shouldn't we keep the old version of these together with the old version of the repo until we fully deprecate it? I also took a quick look at the docs and they seem ok to my untrained eye. |
Hm that's a good point actually. For the docs I decided (based on a discussion with @manoelmarques and previous input from @woodsp-ibm) that only the new code is documented in the API (i.e. the old code no longer has API documentation). Nonetheless, I agree that it makes sense to keep the legacy tutorials in place. I will re-add those in an upcoming commit 👍
Thanks 👍 |
For reviewing purposes it might be easiest, if you do a commit-by-commit review. The 4 commits do the following:
|
After an offline discussion, we decided to remove the tutorials for the code that is also no longer part of the public API docs. The code in question is still being unittested and the tutorials still exist on |
This effectively reverts 64a1099
refactor: move code to new structure
Summary
This is the follow-up to #722
Details and comments
This PR uses the approach describes in https://stackoverflow.com/a/44036771 to "copy" files while preserving the blame history in both locations.
main
merges)Closes #701 #702 #703 #704 #705 #706 #707 #708 #709 #710 #711