diff --git a/_metadata.py b/_metadata.py index 5d0b2ac5..f793cf1c 100644 --- a/_metadata.py +++ b/_metadata.py @@ -1,2 +1,2 @@ -__extension_version__ = "0.7.1" +__extension_version__ = "0.8.0" __extension_name__ = "pytket-cutensornet" diff --git a/docs/changelog.rst b/docs/changelog.rst index 61c44d28..390be13a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,8 +1,8 @@ Changelog ~~~~~~~~~ -Unreleased ----------- +0.8.0 (September 2024) +---------------------- * API breaking changes * Removed ``use_kahypar`` option from ``Config``. It can still be set via the ``simulate`` option ``compilation_params``. @@ -10,10 +10,10 @@ Unreleased * New feature: ``simulate`` now accepts pytket circuits with ``Measure``, ``Reset``, ``Conditional``, ``ClassicalExpBox`` and more classical operations. You can now retrieve classical bit values using ``get_bits``. * When calling ``simulate``, the gates on the circuit are no longer sorted by default. Use ``compilation_params["sort_gates"] = True`` to recover this behaviour, which is now deprecated. * ``StructuredState`` now supports simulation of single qubit circuits. -* Some bugfixes on MPSxMPO relating to measurement and relabelling qubits. The bug was caused due to these functions not guaranteeing the MPO was applied before their action. +* Some bugfixes on ``MPSxMPO`` relating to measurement and relabelling qubits. The bug was caused due to these functions not guaranteeing the MPO was applied before their action. * Documentation fixes: * ``apply_qubit_relabelling`` now appears in the documentation. - * ``add_qubit`` removed from documentation of MPSxMPO, since it is not supported. + * ``add_qubit`` removed from documentation of ``MPSxMPO``, since it is not currently supported. 0.7.1 (July 2024) ----------------- diff --git a/docs/modules/structured_state.rst b/docs/modules/structured_state.rst index 8fd0506a..94cb320f 100644 --- a/docs/modules/structured_state.rst +++ b/docs/modules/structured_state.rst @@ -35,6 +35,7 @@ Classes .. automethod:: get_fidelity .. automethod:: get_statevector .. automethod:: get_amplitude + .. automethod:: get_bits .. automethod:: get_qubits .. automethod:: get_byte_size .. automethod:: get_device_id diff --git a/pytket/extensions/cutensornet/structured_state/general.py b/pytket/extensions/cutensornet/structured_state/general.py index c6d4276b..0cc56230 100644 --- a/pytket/extensions/cutensornet/structured_state/general.py +++ b/pytket/extensions/cutensornet/structured_state/general.py @@ -448,7 +448,10 @@ def get_amplitude(self, state: int) -> complex: raise NotImplementedError(f"Method not implemented in {type(self).__name__}.") def get_bits(self) -> dict[Bit, bool]: - """Returns the dictionary of bits and their values.""" + """Returns the dictionary of bits and their values. + + A bit with value ``False`` corresponds to ``0``, and ``True`` is ``1``. + """ return self._bits_dict.copy() @abstractmethod