Specification of the arguments to deserialize an argument to a gate.
cirq.google.DeserializingArg(
serialized_name: str,
constructor_arg_name: str,
value_func: Optional[Callable[[arg_func_langs.ARG_LIKE], Any]] = None,
required: bool = True,
default: Any = None
)
Args |
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.
|
Attributes |
serialized_name
|
Dataclass field
|
constructor_arg_name
|
Dataclass field
|
value_func
|
Dataclass field
|
required
|
Dataclass field
|
default
|
Dataclass field
|
Methods
__eq__
__eq__(
other
)
Class Variables |
default
|
None
|
required
|
True
|
value_func
|
None
|