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

cirq-google: Remove SerializableGateSet #5762

Conversation

verult
Copy link
Collaborator

@verult verult commented Jul 13, 2022

Thank you, SerializableGateSet!

@dstrain115

@verult verult requested a review from dstrain115 July 13, 2022 23:42
@verult verult requested review from wcourtney, a team, vtomole and cduck as code owners July 13, 2022 23:42
@CirqBot CirqBot added the size: XL lines changed >1000 label Jul 13, 2022
verult added 4 commits July 14, 2022 00:08
Necessary for SerializableGateSet deprecation. The only remaining parts of `common_serializers.py` after removing all deprecations are `CIRCUIT_OP_[DE]SERIALIZER`, and they don't have tests in this file.
@verult verult force-pushed the cg-device-refactor/remove-serializable-gatesets branch from 7a086e6 to b5863ef Compare July 14, 2022 00:08
@verult
Copy link
Collaborator Author

verult commented Jul 14, 2022

Test failure is from:

def test_infer_language():
with cirq.testing.assert_deprecated('SerializableGateSet', deadline='v0.16', count=None):
q = cirq.GridQubit(0, 0)
a = sympy.Symbol('a')
b = sympy.Symbol('b')
c_linear = cirq.Circuit(cirq.X(q) ** (b - a))
packed = cirq_google.XMON.serialize(c_linear)
assert packed.language.arg_function_language == 'linear'
c_empty = cirq.Circuit(cirq.X(q) ** b)
packed = cirq_google.XMON.serialize(c_empty)
assert packed.language.arg_function_language == ''
c_exp = cirq.Circuit(cirq.X(q) ** (b**a))
packed = cirq_google.XMON.serialize(c_exp)
assert packed.language.arg_function_language == 'exp'

Wanted to double check that defaulting to exp is intended for CircuitSerializer before removing the test.

@verult verult changed the title Remove SerializableGateSet cirq-google: Remove SerializableGateSet Jul 14, 2022
@dstrain115
Copy link
Collaborator

Yeah, this is just the operators supported by sympy symbols. I think we should support 'exp' (ie. +, -, *, /, and **)

Copy link
Collaborator

@dstrain115 dstrain115 left a comment

Choose a reason for hiding this comment

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

LGTM

@verult verult added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jul 14, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jul 14, 2022
@CirqBot CirqBot merged commit a7216fc into quantumlib:master Jul 14, 2022
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Jul 14, 2022
CirqBot pushed a commit that referenced this pull request Jul 15, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
pavoljuhas added a commit to pavoljuhas/Cirq that referenced this pull request May 29, 2024
Long past the `v0.16` deprecation deadline.
The constant were invalid for almost 2 years after quantumlib#5762.
pavoljuhas added a commit that referenced this pull request May 29, 2024
* Remove deprecated constants from cirq_google module.
  Long past the `v0.16` deprecation deadline, constants
  were invalid for almost 2 years after #5762.

* Remove deprecated method `cirq_google.Engine.sampler()`
  Long past the `v1.0` deprecation deadline.

* Purge deprecated arguments to `EngineProcessor.list_calibrations`
  `earliest_timestamp_seconds` and `latest_timestamp_seconds` are
  long past the `v1.0` deadline.

* Remove deprecated function `cirq_ionq.ionq_devices.decompose_to_device`.
  Long past the `v0.16` deadline.

Ref: https://github.com/quantumlib/Cirq/blob/main/release.md#before-you-release-flush-the-deprecation-backlog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: XL lines changed >1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants