qml.data.DatasetNone

class DatasetNone(value=UnsetType.UNSET, info=None, *, bind=None, parent_and_key=None)[source]

Bases: pennylane.data.base.attribute.DatasetAttribute[Union[numpy._typing._array_like._SupportsArray[numpy.dtype[Any]], numpy._typing._nested_sequence._NestedSequence[numpy._typing._array_like._SupportsArray[numpy.dtype[Any]]], bool, int, float, complex, str, bytes, numpy._typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], None, None]

Datasets type for ‘None’ values.

bind

Returns the HDF5 object that contains this attribute's data.

info

Returns the AttributeInfo for this attribute.

registry

Maps type_ids to their DatasetAttribute classes.

type_consumer_registry

Maps types to their default DatasetAttribute

type_id

bind

Returns the HDF5 object that contains this attribute’s data.

info

Returns the AttributeInfo for this attribute.

registry = mappingproxy({'dataset': <class 'pennylane.data.base.dataset._DatasetAttributeType'>, 'array': <class 'pennylane.data.attributes.array.DatasetArray'>, 'dict': <class 'pennylane.data.attributes.dictionary.DatasetDict'>, 'json': <class 'pennylane.data.attributes.json.DatasetJSON'>, 'list': <class 'pennylane.data.attributes.list.DatasetList'>, 'molecule': <class 'pennylane.data.attributes.molecule.DatasetMolecule'>, 'none': <class 'pennylane.data.attributes.none.DatasetNone'>, 'operator': <class 'pennylane.data.attributes.operator.operator.DatasetOperator'>, 'pytree': <class 'pennylane.data.attributes.pytree.DatasetPyTree'>, 'scalar': <class 'pennylane.data.attributes.scalar.DatasetScalar'>, 'sparse_array': <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, 'string': <class 'pennylane.data.attributes.string.DatasetString'>, 'tuple': <class 'pennylane.data.attributes.tuple.DatasetTuple'>})

Maps type_ids to their DatasetAttribute classes.

type_consumer_registry = mappingproxy({<class 'pennylane.qchem.molecule.Molecule'>: <class 'pennylane.data.attributes.molecule.DatasetMolecule'>, <class 'NoneType'>: <class 'pennylane.data.attributes.none.DatasetNone'>, <class 'scipy.sparse._bsr.bsr_array'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._coo.coo_array'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._csc.csc_array'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._csr.csr_array'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._dia.dia_array'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._dok.dok_array'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._lil.lil_array'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._csc.csc_matrix'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._csr.csr_matrix'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._bsr.bsr_matrix'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._coo.coo_matrix'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._dia.dia_matrix'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._dok.dok_matrix'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'scipy.sparse._lil.lil_matrix'>: <class 'pennylane.data.attributes.sparse_array.DatasetSparseArray'>, <class 'str'>: <class 'pennylane.data.attributes.string.DatasetString'>, <class 'tuple'>: <class 'pennylane.data.attributes.tuple.DatasetTuple'>})

Maps types to their default DatasetAttribute

type_id = 'none'

consumes_types()

copy_value()

Deserializes the mapped value from bind, and also perform a 'deep-copy' of any nested values contained in bind.

default_value()

get_value()

Deserializes the mapped value from bind.

hdf5_to_value(bind)

Returns None.

py_type(value_type)

Determines the py_type of an attribute during value initialization, if it was not provided in the info argument.

value_to_hdf5(bind_parent, key, value)

Creates an empty HDF5 array under 'key'.

classmethod consumes_types()[source]
copy_value()

Deserializes the mapped value from bind, and also perform a ‘deep-copy’ of any nested values contained in bind.

classmethod default_value()[source]
get_value()

Deserializes the mapped value from bind.

hdf5_to_value(bind)[source]

Returns None.

classmethod py_type(value_type)

Determines the py_type of an attribute during value initialization, if it was not provided in the info argument. This method returns f"{value_type.__module__}.{value_type.__name__}.

value_to_hdf5(bind_parent, key, value)[source]

Creates an empty HDF5 array under ‘key’.