cirq.google.DeserializingArg

Specification of the arguments to deserialize an argument to a gate.

serialized_name The serialized name of the gate that is being deserialized.
constructor_arg_name The name of the argument in the constructor of the gate corresponding to this serialized argument.
value_func Sometimes a value from the serialized proto needs to converted to an appropriate type or form. This function takes the serialized value and returns the appropriate type. Defaults to None.
required Whether a value must be specified when constructing the deserialized gate. Defaults to True.
default default value to set if the value is not present in the arg. If set, required is ignored.

serialized_name Dataclass field
constructor_arg_name Dataclass field
value_func Dataclass field
required Dataclass field
default Dataclass field

Methods

__eq__

default None
required True
value_func None