cirq_google.op_deserializer.CircuitOpDeserializer

Describes how to serialize CircuitOperations.

Inherits From: OpDeserializer

serialized_id Returns the string identifier for the accepted serialized objects.

This ID denotes the serialization format this deserializer consumes. For example, one of the common deserializers converts objects with the id 'xy' into PhasedXPowGates.

Methods

from_proto

View source

Turns a cirq.google.api.v2.CircuitOperation proto into a CircuitOperation.

Args
proto The proto object to be deserialized.
arg_function_language The arg_function_language field from Program.Language.
constants The list of Constant protos referenced by constant table indices in proto. This list should already have been parsed to produce 'deserialized_constants'.
deserialized_constants The deserialized contents of constants.

Returns
The deserialized CircuitOperation represented by proto.