Lazy /Conditional loading of 3rd party Quantum libraries #30
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.
Lazy load/Conditionally loads 3rd party libraries :
qiskit,pyquilandcirq.Based on our discussion, change made from the draft PR earlier:
opencontrolsstill will have all the external libraries as dependency - this implies that those libraries are still installed when user installsopencontrolsas opposed to user installing those separately.Removed all package load/import error checks. This is because the 3-rd party libraries are still part of the dependency list in `opencontrols'. In that case, there is no change in behaviour whether the libraries are imported at the top of the module or inside a method within the module. The separation of.
Notes
pylint: disable=too-many-variablesin a couple of places - the solution is known; wanted to concentrate on library loading in this PR [that and a couple of other minor changes will be made in successive PR]cirqmodules in this fashionfrom cirq import ....instead ofimport cirqfollowed bycirq...., pylint somehow complains and could not find a solution. Any suggestion is welcome there. Not a major issue, but somehow breaks the pattern compared to what is done in other libraries.