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

Fix deprecation warning for newly added ClassicallyControlledOperation #4763

Closed
tanujkhattar opened this issue Dec 18, 2021 · 0 comments · Fixed by #4780
Closed

Fix deprecation warning for newly added ClassicallyControlledOperation #4763

tanujkhattar opened this issue Dec 18, 2021 · 0 comments · Fixed by #4780
Labels
kind/bug-report Something doesn't seem to work.

Comments

@tanujkhattar
Copy link
Collaborator

Description of the issue
The following deprecation warning is emitted on running the json serialization test and should be fixed.

~/quantum/Cirq/cirq-core/cirq/protocols/json_serialization.py:283: DeprecationWarning: Found 'cirq_type': 'ClassicallyControlledOperation' in _json_dict_. Custom values of this field are not permitted, and will produce an error starting in Cirq v0.15.

Cirq version
0.14dev

@tanujkhattar tanujkhattar added the kind/bug-report Something doesn't seem to work. label Dec 18, 2021
CirqBot pushed a commit that referenced this issue Dec 29, 2021
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 #4763
MichaelBroughton pushed a commit to MichaelBroughton/Cirq that referenced this issue Jan 22, 2022
…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
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
…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
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this issue Oct 31, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-report Something doesn't seem to work.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant