cirq_google.serialization.Serializer

Interface for serialization.

Methods

deserialize

View source

Deserialize a Circuit from a cirq_google.api.v2.Program.

Args
proto A dictionary representing a cirq_google.api.v2.Program proto.
device If the proto is for a schedule, a device is required Otherwise optional.

Returns
The deserialized Circuit, with a device if device was not None.

serialize

View source

Serialize.