cirq_google.serialization.stimcirq_deserializer.StimCirqDeserializer

Describes how to serialize CircuitOperations.

Inherits From: OpDeserializer

Methods

can_deserialize_proto

View source

Whether the given operation can be serialized by this serializer.

from_proto

View source

Turns a cirq_google Operation proto into a stimcirq object.

Args
proto The proto object to be deserialized.
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 stimcirq object

Raises
ValueError If stimcirq is not installed or the object is not recognized.