-
Notifications
You must be signed in to change notification settings - Fork 981
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 name to circuit serializers #4422
Add name to circuit serializers #4422
Conversation
- name is needed since it is referenced by the protos (gate_set_name) - This is in both CircuitSerializer and SerializableGateSet but also needs to be in the interface to be used generally. - Added name() property and kept gate_set_name as a property for backwards compatibility.
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.
Do you think it would it be worth deprecating the gate_set_name
field as well ?
Maybe, but I couldn't figure out how. I guess you cannot decorate property classes, so it wouldn't let me add a deprecation decorator onto it. Since I am moving everything to using the Serializer interface which doesn't have the old 'gate_set_name' property, I didn't worry about it much. If you have a good way to add a deprecation to a |
Did you try something like: #4432 ? |
…5/Cirq-1 into add_name_to_serializer
Mypy complains, but I just told it to ignore it. |
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.
LGTM
Automerge cancelled: A status check is failing. |
- name is needed since it is referenced by the protos (gate_set_name) - This is in both CircuitSerializer and SerializableGateSet but also needs to be in the interface to be used generally. - Added name() property and kept gate_set_name as a property for backwards compatibility.
needs to be in the interface to be used generally.
backwards compatibility.