Describes how to deserialize a proto to a given Gate type.

serialized_gate_id The serialized id of the gate that is being deserialized.
gate_constructor A function that produces the deserialized gate given arguments from args.
args A list of the arguments to be read from the serialized gate and the information required to use this to construct the gate using the gate_constructor above.
num_qubits_param Some gate constructors require that the number of qubits be passed to their constructor. This is the name of the parameter in the constructor for this value. If None, no number of qubits is passed to the constructor.
op_wrapper An optional Callable to modify the resulting GateOperation, for instance, to add tags
deserialize_tokens Whether to convert tokens to CalibrationTags. Defaults to True.

serialized_gate_id The id used when serializing the gate.



View source

Turns a cirq_google.api.v2.Operation proto into a GateOperation.