Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust imports in aqc plugin to avoid discovery overhead (Qiskit#7327)
This commit tweaks the imports for the aqc plugin to make the optimizer and other aqc method imports occur at run time only. Previously these were done at the module level, which is normally best practice for many reasons, but in this specific case doing plugin discovery causes the module to be loaded (and the plugin class instaniated) even if the plugin is not specified by the user. The imports for aqc are fairly heavy as both the algorithms tree and scipy can be slow to load. To avoid the overhead on discovery these imports are moved to runtime so we only load them if the aqc plugin is used and these imports are needed. Co-authored-by: Jake Lishman <[email protected]>
- Loading branch information