Skip to content
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

Merged
merged 9 commits into from May 31, 2023
Merged

Conversation

dstrain115
Copy link
Collaborator

  • 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.
@dstrain115 dstrain115 requested a review from maffoo May 22, 2023 16:57
@CirqBot CirqBot added the size: M 50< lines changed <250 label May 23, 2023
Copy link
Collaborator

@verult verult left a 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.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"verying" -> "varying"

Copy link
Collaborator Author

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):
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

@dstrain115
Copy link
Collaborator Author

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:
https://docs.google.com/document/d/1UEsZ73SVnexdf6_A3XT393ySUbD_6VRYBcdzBD8yR9o/edit#heading=h.mckr847qq60k

@dstrain115 dstrain115 requested a review from verult May 25, 2023 00:58
import cirq


class SupportsParameter(Protocol):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be SupportsDeviceParameter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@dstrain115 dstrain115 enabled auto-merge (squash) May 31, 2023 14:16
@dstrain115 dstrain115 merged commit ebec38b into quantumlib:master May 31, 2023
36 checks passed
navaro1 pushed a commit to navaro1/Cirq that referenced this pull request Jun 3, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants