qiskit/releasenotes/notes/1.1/databin-construction-72ec04...

17 lines
915 B
YAML

---
features_primitives:
- |
`qiskit.primitives.containers.DataBin` now satisfies the `qiskit.primitives.containers.Shaped`
protocol. This means that every `DataBin` instance now has the additional attributes
* `shape: tuple[int, ...]` the leading shape of every entry in the instance
* `ndim: int` the length of `shape`
* `size: int` the product of the entries of `shape`
The shape can be passed to the constructor.
upgrade_primitives:
- |
The function `qiskit.primitives.containers.make_data_bin()` no longer creates and returns a
`qiskit.primitives.containers.DataBin` subclass. It instead always returns the `DataBin` class.
However, it continues to exist for backwards compatibility, though will eventually be deprecated.
All users should migrate to construct `DataBin` instances directly, instead of instantiating
subclasses as output by `make_data_bin()`.