Module: cirq_google.serialization

Classes for serializing circuits into protocol buffers.

Modules

arg_func_langs module

circuit_serializer module: Support for serializing and deserializing cirq_google.api.v2 protos.

common_serializers module: Common Serializers that can be used by APIs.

gate_sets module: Gate sets supported by Google's apis.

op_deserializer module

op_serializer module

serializable_gate_set module: Support for serializing and deserializing cirq_google.api.v2 protos.

serializer module

Classes

class CircuitOpDeserializer: Describes how to serialize CircuitOperations.

class CircuitOpSerializer: Describes how to serialize CircuitOperations.

class CircuitSerializer: A class for serializing and deserializing programs and operations.

class DeserializingArg: Specification of the arguments to deserialize an argument to a gate.

class GateOpDeserializer: Describes how to deserialize a proto to a given Gate type.

class GateOpSerializer: Describes how to serialize a GateOperation for a given Gate type.

class SerializableGateSet: A class for serializing and deserializing programs and operations.

class Serializer: Interface for serialization.

class SerializingArg: Specification of the arguments for a Gate and its serialization.

Functions

arg_from_proto(...): Extracts a python value from an argument value proto.

FSIM_GATESET Instance of cirq_google.serialization.SerializableGateSet

Gate set that combines sqrt(iswap) and syc as one fsim id.

NAMED_GATESETS

{
 'fsim': <cirq_google.serialization.serializable_gate_set.SerializableGateSet object at 0x7f2cb0172550>,
 'sqrt_iswap': <cirq_google.serialization.serializable_gate_set.SerializableGateSet object at 0x7f2cb0172510>,
 'sycamore': <cirq_google.serialization.serializable_gate_set.SerializableGateSet object at 0x7f2cb01724d0>
}

A convenience mapping from gateset names to gatesets

SQRT_ISWAP_GATESET Instance of cirq_google.serialization.SerializableGateSet

Gate set with sqrt(iswap) as the core 2 qubit interaction.

SYC_GATESET Instance of cirq_google.serialization.SerializableGateSet

Gate set with fsim(pi/2, pi/6) as the core 2 qubit interaction.

XMON Instance of cirq_google.serialization.SerializableGateSet

Gate set for XMON devices.