-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add get config functions #7565
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
base: main
Are you sure you want to change the base?
Add get config functions #7565
Conversation
…ssor-config' into add_get_config_snapshot
I'm working on fixing the errors. Some missing tests/logic for a few edge cases. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7565 +/- ##
========================================
Coverage 97.50% 97.51%
========================================
Files 1103 1105 +2
Lines 99683 100007 +324
========================================
+ Hits 97198 97521 +323
- Misses 2485 2486 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
I've verified that this works fully end-to-end with a colab containing the following code:
|
@@ -175,3 +175,15 @@ def get_sampler(self, processor_id: str | list[str]) -> cirq.Sampler: | |||
if not isinstance(processor_id, str): | |||
raise ValueError(f'Invalid processor {processor_id}') | |||
return self._processors[processor_id].get_sampler() | |||
|
|||
def get_processor_config_from_snapshot( | |||
self, processor_id: str, snapshot_id: str, config_alias: str = 'default' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final nit: let's change config_alias
to config_name
here and throughout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on my part. Looks like there are just a couple of comments left from Will.
Adds the ability to retrieve a
QuantumProcessorConfig
from a project. There are two ways to retrieve processor configs: from theEngine
or anEngineProcessor
.Here is an example using the processor:
Here is an example getting the config directly from the Engine: