cirq_google.serialization.CircuitOpSerializer

Describes how to serialize CircuitOperations.

Inherits From: OpSerializer

Methods

can_serialize_operation

View source

Whether the given operation can be serialized by this serializer.

to_proto

View source

Returns the cirq.google.api.v2.CircuitOperation message as a proto dict.

Note that this function requires constants and raw_constants to be pre-populated with the circuit in op.