![]() |
A generic executable spec whose metadata is a list of key-value pairs.
Inherits From: ExecutableSpec
cirq_google.workflow.KeyValueExecutableSpec(
executable_family: str = cirq_google.workflow.ExecutableSpec.executable_family
,
key_value_pairs: Tuple[Tuple[str, Any], ...] = ()
)
The key-value pairs define an implicit data schema. Consider defining a problem-specific
subclass of ExecutableSpec
instead of using this class to realize the benefits of having
an explicit schema.
See Also:
KeyValueExecutableSpec.from_dict
will use a dictionary to populate key_value_pairs
.
Args | |
---|---|
executable_family
|
A unique name to group executables. |
key_value_pairs
|
A tuple of key-value pairs. The keys should be strings but the values can be any immutable object. Note that the order of the key-value pairs does NOT matter when comparing two objects. |
Attributes | |
---|---|
executable_family
|
Dataclass field |
key_value_pairs
|
Dataclass field |
Methods
from_dict
@classmethod
from_dict( d: Dict[str, Any], *, executable_family: str ) -> 'KeyValueExecutableSpec'
to_dict
to_dict() -> Dict[str, Any]
__eq__
__eq__(
other
)
Return self==value.
Class Variables | |
---|---|
executable_family |
Instance of NotImplementedType
|
key_value_pairs |
()
|