-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add Parameter to cirq_google #6102
Conversation
dstrain115
commented
May 22, 2023
- This object will be able to store device parameters and is intended to be attached as a sweep meta-data.
- This object will be able to store device parameters and is intended to be attached as a sweep meta-data.
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.
For future context, could you link to the design doc?
class Parameter(SupportsParameter): | ||
"""Class for specifying device parameters. | ||
|
||
For instance, verying the length of pulses, timing, etc. |
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.
"verying" -> "varying"
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.
Done.
|
||
|
||
@dataclasses.dataclass | ||
class Parameter(SupportsParameter): |
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.
To prevent future parameter types from colliding, could for this name to be more specific? Maybe DeviceParameter
?
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.
Changed. Originally chose Parameter to keep compatibility with internal naming, but we should probably convert the internal name too.
Design doc is here (internal only): https://docs.google.com/document/d/1-yVZ4w0NNURW4SZV3yxsl_rNuVGYW6AqmxMeIE-vZlo The background and objective is still accurate. However, it is obsolete as we changed the plan to use sweep metadata instead. That RFC is here: |
import cirq | ||
|
||
|
||
class SupportsParameter(Protocol): |
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.
Should this be SupportsDeviceParameter
?
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.
Done.
* Add Parameter to cirq_google - This object will be able to store device parameters and is intended to be attached as a sweep meta-data. - Add study __init__ as a cirq_google module. Co-authored-by: Victory Omole <vtomole2@gmail.com>