diff --git a/pennylane/data/base/attribute.py b/pennylane/data/base/attribute.py index 7778e22c5d8..ef8bd1957bd 100644 --- a/pennylane/data/base/attribute.py +++ b/pennylane/data/base/attribute.py @@ -47,8 +47,6 @@ class AttributeInfo(MutableMapping): attribute. Is stored in the HDF5 object's ``attrs`` dict. Attributes: - attrs_namespace: Keys for this class's attributes will - be prefixed with this string in ``attrs_bind``. attrs_bind: The HDF5 attrs dict that this instance is bound to, or any mutable mapping py_type: Type annotation for this attribute diff --git a/pennylane/data/base/dataset.py b/pennylane/data/base/dataset.py index 43be6d553bf..9ec7c2c4a31 100644 --- a/pennylane/data/base/dataset.py +++ b/pennylane/data/base/dataset.py @@ -119,13 +119,12 @@ class Dataset(MapperMixin, _DatasetTransform): fields: A mapping of attribute names to their ``Attribute`` information. Note that this contains attributes declared on the class, not attributes added to an instance. Use ``attrs`` to view all attributes on an instance. - bind: The HDF5 group that contains this dataset's attributes """ __data_name__: ClassVar[str] __identifiers__: ClassVar[Tuple[str, ...]] - fields: ClassVar[typing.Mapping[str, Field]] = MappingProxyType({}) + fields: ClassVar[typing.Mapping[str, Field]] bind_: Optional[HDF5Group] = _init_arg(default=None, alias="bind", kw_only=False) data_name_: Optional[str] = _init_arg(default=None, alias="data_name") @@ -406,6 +405,9 @@ def __dir__(self): from other datasets.""" +Dataset.fields = MappingProxyType({}) + + class _DatasetAttributeType(DatasetAttribute[HDF5Group, Dataset, Dataset]): """Attribute type for loading and saving datasets as attributes of datasets, or elements of collection types."""