-
Notifications
You must be signed in to change notification settings - Fork 1.1k
cirq_google GridDevice: set JSON namespace to cirq.google #5512
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
cirq_google GridDevice: set JSON namespace to cirq.google #5512
Conversation
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.
+1
@@ -33,7 +33,6 @@ def _class_resolver_dictionary() -> Dict[str, ObjectFactory]: | |||
'GoogleNoiseProperties': cirq_google.GoogleNoiseProperties, | |||
'SycamoreGate': cirq_google.SycamoreGate, | |||
'GateTabulation': cirq_google.GateTabulation, | |||
'GridDevice': cirq_google.GridDevice, |
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.
[No change needed] As discussed, this is safe because GridDevice
has not yet appeared in a Cirq release.
Yes, using the json "namespacing" feature is much preferred to coming up with new names that don't match the class name. All objects would ideally be namespaced (with a carveout for top-level |
…#5512) Preferred alternative over quantumlib#5476 (renaming `GridDevice` to `GoogleGridDevice`). This resolves the issue of JSON name collisions between cirq_google and elsewhere by including the `cirq.google` namespace. Furthermore, by staying with `GridDevice` as the class name, we require the caller to include the `cirq-google` module name in cases when multiple `GridDevice` classes are used (for example in the server side code today). @95-martin-orion @mpharrigan cc @dstrain115 @tanujkhattar
…#5512) Preferred alternative over quantumlib#5476 (renaming `GridDevice` to `GoogleGridDevice`). This resolves the issue of JSON name collisions between cirq_google and elsewhere by including the `cirq.google` namespace. Furthermore, by staying with `GridDevice` as the class name, we require the caller to include the `cirq-google` module name in cases when multiple `GridDevice` classes are used (for example in the server side code today). @95-martin-orion @mpharrigan cc @dstrain115 @tanujkhattar
Preferred alternative over #5476 (renaming
GridDevice
toGoogleGridDevice
). This resolves the issue of JSON name collisions between cirq_google and elsewhere by including thecirq.google
namespace.Furthermore, by staying with
GridDevice
as the class name, we require the caller to include thecirq-google
module name in cases when multipleGridDevice
classes are used (for example in the server side code today).@95-martin-orion @mpharrigan
cc @dstrain115 @tanujkhattar