A verifiable quantum advantage towards real world applications: Quantum Echoes
Learn more
cirq_google.serialization.op_deserializer.OpDeserializer
Generic supertype for operation deserializers.
Each operation deserializer describes how to deserialize operation protos
to a specific type of Cirq operation.
Methods
can_deserialize_proto
View source
@abc.abstractmethod
can_deserialize_proto(
proto
) -> bool
Whether the given operation can be serialized by this serializer.
from_proto
View source
@abc.abstractmethod
from_proto(
proto,
*,
constants: list[v2.program_pb2.Constant],
deserialized_constants: list[Any]
) -> cirq.Operation
Converts a proto-formatted operation into a Cirq operation.
Args |
proto
|
The proto object to be deserialized.
|
constants
|
The list of Constant protos referenced by constant
table indices in proto .
|
deserialized_constants
|
The deserialized contents of constants .
|
Returns |
The deserialized operation represented by proto .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[],[]]