Skip to content

Commit

Permalink
Remove deprecated constants from cirq_google module
Browse files Browse the repository at this point in the history
Long past the `v0.16` deprecation deadline.
The constant were invalid for almost 2 years after quantumlib#5762.
  • Loading branch information
pavoljuhas committed May 29, 2024
1 parent 625c2c1 commit ebd99f3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 38 deletions.
24 changes: 0 additions & 24 deletions cirq-google/cirq_google/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""Classes for working with Google's Quantum Engine API."""

import sys
from cirq import _compat
from cirq_google import api

from cirq_google._version import __version__
Expand Down Expand Up @@ -114,26 +113,3 @@
from cirq_google.json_resolver_cache import _class_resolver_dictionary

_register_resolver(_class_resolver_dictionary)


_SERIALIZABLE_GATESET_DEPRECATION_MESSAGE = (
'SerializableGateSet and associated classes (GateOpSerializer, GateOpDeserializer,'
' SerializingArgs, DeserializingArgs) will no longer be supported.'
' In cirq_google.GridDevice, the new representation of Google devices, the gateset of a device'
' is represented as a cirq.Gateset and is available as'
' GridDevice.metadata.gateset.'
' Engine methods no longer require gate sets to be passed in.'
' In addition, circuit serialization is replaced by cirq_google.CircuitSerializer.'
)


_compat.deprecate_attributes(
__name__,
{
'XMON': ('v0.16', _SERIALIZABLE_GATESET_DEPRECATION_MESSAGE),
'FSIM_GATESET': ('v0.16', _SERIALIZABLE_GATESET_DEPRECATION_MESSAGE),
'SQRT_ISWAP_GATESET': ('v0.16', _SERIALIZABLE_GATESET_DEPRECATION_MESSAGE),
'SYC_GATESET': ('v0.16', _SERIALIZABLE_GATESET_DEPRECATION_MESSAGE),
'NAMED_GATESETS': ('v0.16', _SERIALIZABLE_GATESET_DEPRECATION_MESSAGE),
},
)
15 changes: 2 additions & 13 deletions docs/google/devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ $$
\right]
$$

This gate has a duration of 12ns and can be used in `cirq_google.SYC_GATESET`
or in the `cirq_google.FSIM_GATESET`.
This gate has a duration of 12ns.

#### Square root of iSWAP

Expand All @@ -214,8 +213,7 @@ $$
\right]
$$

This gate has a duration of 32ns and can be used in
`cirq_google.SQRT_ISWAP_GATESET` or in the `cirq_google.FSIM_GATESET`.
This gate has a duration of 32ns.

This gate is implemented by using an entangling gate surrounded by
Z gates. The preceding Z gates are physical Z gates and will absorb
Expand All @@ -237,15 +235,6 @@ to see if it is available on the processor you are using.
This gate is equivalent to FSimGate(0, π). It has an approximate duration
of 26ns.

#### FSim gateset

The `cirq.FSIM_GATESET` provides all three of the above gates in one set.
In addition, by using this combined gate set, the FSimGate can be parameterized,
which allows for efficient sweeps across varying two-qubit gates.
Note that providing a theta/phi combination that
is not one of the above gates will cause an error when run on hardware.


### Wait gate

For decay experiments and other applications, a WaitGate is provided
Expand Down
1 change: 0 additions & 1 deletion docs/google/engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ engine = cirq_google.Engine(project_id='YOUR_PROJECT_ID')
# Create a sampler from the engine
job = engine.run_batch(circuit_list,
processor_id='PROCESSOR_ID',
gate_set=cirq_google.FSIM_GATESET,
repetitions=1000,
params_list=param_list)
results = job.results()
Expand Down

0 comments on commit ebd99f3

Please sign in to comment.