class cirq.google.SerializableGateSet(gate_set_name: str, serializers: Iterable[cirq.google.op_serializer.GateOpSerializer], deserializers: Iterable[cirq.google.op_deserializer.GateOpDeserializer])[source]

A class for serializing and deserializing programs and operations.

This class is for cirq.google.api.v2. protos.

__init__(gate_set_name: str, serializers: Iterable[cirq.google.op_serializer.GateOpSerializer], deserializers: Iterable[cirq.google.op_deserializer.GateOpDeserializer])[source]

Construct the gate set.

Parameters
• gate_set_name – The name used to identify the gate set.

• serializers – The GateOpSerializers to use for serialization. Multiple serializers for a given gate type are allowed and will be checked for a given type in the order specified here. This allows for a given gate type to be serialized into different serialized form depending on the parameters of the gate.

• deserializers – The GateOpDeserializers to convert serialized forms of gates to GateOperations.