Skip to content

Refactor Solver to inherit from Target, add TargetFactory - #129

Merged
Guen Prawiroatmodjo (guenp) merged 23 commits into
mainfrom
guenp/refactor-solver
Aug 20, 2021
Merged

Guen Prawiroatmodjo (guenp) merged 23 commits into
mainfrom
guenp/refactor-solver

Conversation

@guenp

@guenp Guen Prawiroatmodjo (guenp) commented Aug 19, 2021 •

Copy link
Copy Markdown

Fixes #128.

  • This PR refactors Solver and all of its subclasses to inherit from Target and was a consequence of work done in Workspace.get_targets() returns list of Targets #125.
  • All Solvers in optimization/solvers.py are now under azure.quantum.target; solvers.py is split up into separate files.
  • These Solver subclasses are now all used by a TargetFactory class that is called by Workspace.get_targets().
  • Solver.submit() shows a deprecation warning if users passes compress=False to avoid the following warning from the service:
RuntimeError: Cannot retrieve results as job execution failed(status: Failed.error: {'additional_properties': {}, 'code': 'TransientFailure', 'message': 'The archive entry was compressed using an unsupported compression method.'})

@anpaz Andres Paz (anpaz) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a couple of comments on copyright and imports, but other than that i think this looks great. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not all targets have corresponding Target class

2 participants