Open
Conversation
pediejo
requested changes
Mar 20, 2024
Contributor
pediejo
left a comment
There was a problem hiding this comment.
This PR makes the great suggestion to separate the requirements and the subroutines as two different objects. An unanticipated nice feature is that this will allow us to define requirements for a task just once so that all subsequent subroutines that service that task can make use of the existing requirements dataclass for the task they service. I made just a few small suggestions to streamline the code by making use of the capabilities of the dataclass and also suggested a change that enables the populate_requirements_for_subroutine to work properly for the ABC SubroutineModel.
src/qsub/quantum_algorithms/general_quantum_algorithms/amplitude_amplification.py
Show resolved
Hide resolved
src/qsub/quantum_algorithms/general_quantum_algorithms/amplitude_estimation.py
Outdated
Show resolved
Hide resolved
src/qsub/quantum_algorithms/general_quantum_algorithms/amplitude_estimation.py
Outdated
Show resolved
Hide resolved
src/qsub/quantum_algorithms/general_quantum_algorithms/linear_systems.py
Outdated
Show resolved
Hide resolved
src/qsub/quantum_algorithms/general_quantum_algorithms/linear_systems.py
Outdated
Show resolved
Hide resolved
tests/qsub/quantum_algorithms/general_quantum_algorithms/test_amplitude_estimation.py
Show resolved
Hide resolved
…eparate file to store data classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a data class framework for the
set_requirementsmethod it thus removes the need to use the arguments of the function to state what the requirements of the subroutine are without actually using the arguments in the body of the method.