-
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
Fix the deprecation warning for ClassicallyControlledOperation
#4780
Conversation
No. Based on code searching results, I think all the |
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
…ntumlib#4780) The `_json_dict_` method of `ClassicallyControlledOperation` contains a `cirq_type` key, which causes a deprecation warning: https://github.com/quantumlib/Cirq/blob/01ae51eebf3b18a5cbee9fc0c697d4e1511c07f2/cirq-core/cirq/protocols/json_serialization.py#L281-L288 It is easy to fix by removing this item. Nevertheless, the real problem is in the manual for serialization, which says: https://github.com/quantumlib/Cirq/blob/01ae51eebf3b18a5cbee9fc0c697d4e1511c07f2/docs/dev/serialization.md?plain=1#L91-L95 It says a `cirq_type` is required, which contradicts the code. To avoid confusing developers in the future, I have modified it. close quantumlib#4763
…ntumlib#4780) The `_json_dict_` method of `ClassicallyControlledOperation` contains a `cirq_type` key, which causes a deprecation warning: https://github.com/quantumlib/Cirq/blob/01ae51eebf3b18a5cbee9fc0c697d4e1511c07f2/cirq-core/cirq/protocols/json_serialization.py#L281-L288 It is easy to fix by removing this item. Nevertheless, the real problem is in the manual for serialization, which says: https://github.com/quantumlib/Cirq/blob/01ae51eebf3b18a5cbee9fc0c697d4e1511c07f2/docs/dev/serialization.md?plain=1#L91-L95 It says a `cirq_type` is required, which contradicts the code. To avoid confusing developers in the future, I have modified it. close quantumlib#4763
…ntumlib#4780) The `_json_dict_` method of `ClassicallyControlledOperation` contains a `cirq_type` key, which causes a deprecation warning: https://github.com/quantumlib/Cirq/blob/01ae51eebf3b18a5cbee9fc0c697d4e1511c07f2/cirq-core/cirq/protocols/json_serialization.py#L281-L288 It is easy to fix by removing this item. Nevertheless, the real problem is in the manual for serialization, which says: https://github.com/quantumlib/Cirq/blob/01ae51eebf3b18a5cbee9fc0c697d4e1511c07f2/docs/dev/serialization.md?plain=1#L91-L95 It says a `cirq_type` is required, which contradicts the code. To avoid confusing developers in the future, I have modified it. close quantumlib#4763
The
_json_dict_
method ofClassicallyControlledOperation
contains acirq_type
key, which causes a deprecation warning:Cirq/cirq-core/cirq/protocols/json_serialization.py
Lines 281 to 288 in 01ae51e
It is easy to fix by removing this item. Nevertheless, the real problem is in the manual for serialization, which says:
Cirq/docs/dev/serialization.md
Lines 91 to 95 in 01ae51e
It says a
cirq_type
is required, which contradicts the code. To avoid confusing developers in the future, I have modified it.close #4763