cirq_google.serialization.op_deserializer.OpDeserializer

Generic supertype for operation deserializers.

Each operation deserializer describes how to deserialize operation protos to a specific type of Cirq operation.

Methods

can_deserialize_proto

View source

Whether the given operation can be serialized by this serializer.

from_proto

View source

Converts a proto-formatted operation into a Cirq operation.

Args
proto The proto object to be deserialized.
constants The list of Constant protos referenced by constant table indices in proto.
deserialized_constants The deserialized contents of constants.

Returns
The deserialized operation represented by proto.