Lightworks

Latest version: v1.7.0

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.7

**Full Changelog**: https://github.com/Aegiq/lightworks/compare/v1.6...v1.7

1.6

This release adds the tomography module, enabling state tomography to be performed on circuits. In a future release process tomography will also be included. There is also a new section of the documentation for the tomography and interferometers modules, which contain tutorials for each of these.

The unit of loss within Lightworks has been updated to a decimal value instead of a dB loss. It is hoped that this will be more intuitive for new users and those unfamiliar with photonics. This will alter the results of any existing code which uses loss elements, so this will need to be updated. The transmission conversion functions have also been updated so that they are now in terms of loss.

In the qubit module, qiskit_converter has been moved to the main import path of qubit, so should no longer be imported from qubit.converters. A single qubit identity gate I has also been introduced.

Behind the scenes, there was a number of updates to improve performance and reliability of Lightworks, including a rework of the circuit compiler, display functionality and some consolidation of functions.

Breaking Changes
--------------------
- The units of loss have been modified from dB to a decimal value. This will need to be updated in all existing code which utilises loss components, replacing any dB values with `db_loss_to_decimal(dB value)`.
- `transmission_to_db_loss` has been replaced with `decimal_to_db_loss` and `db_loss_to_transmission` has been replaced with `db_loss_to_decimal`.
- `qiskit_converter` import has been moved from qubit.converter to qubit, so it can now be imported as `from lightworks.qubit import qiskit_converter`.
- Removed the deprecated add_component methods of circuit.

Changelog
------------
- Introduced tomography module with `StateTomography` object for performing the tomography process, and included associated documentation for this.
- Improved and optimised circuit compiler and display components.
- Consolidated random seed processing.
- Added new tutorials and documentation for qubit and interferometers module.
- Fixed a bug within the circuit copy method, which caused issues when copying heralded circuits.

PR: 70

1.5.2

Fixes a bug introduced to the `qiskit_converter` in 1.5.1 in which it would fail for more complex circuits while `allow_post_selection` was set to True.

PR: 68

1.5.1

In this release, qiskit_converter is improved to allow for support of post-selected gates when a circuit configuration allows this. Additionally, the PostSelection and PostSelectionFunction objects have been introduced to allow for better management of post-selection criteria within Lightworks.

A new phase_offset option has also been included in the interferometer ErrorModel, allowing for errors in configuring a circuit to be simulated.

Breaking Changes
--------------------
- The set_post_selection method of the Analyzer has been replaced with a post_selection property.

Changelog
------------
- Support for post-selected gates in qiskit_converter, enable utilisation of these more-resource efficient gates when acceptable and compatible with the circuit.
- Implemented PostSelection objects to provide a dedicated way for management and verification of post-selection criteria. It is still possible to set post-selection with a function in the Sampler & QuickSampler.
- Fixed issue where loss elements were always shown in display methods regardless of display_loss option.
- Added phase_offset into interferometer ErrorModel, allowing for variation in phase setting from intended value to be simulated.

PR: 62

1.5

This release adds the `qiskit_converter` function for converting from a qiskit to Lightworks circuit. It supports all gates included within the Qubit module of Lightworks, although some of these may be in a limited capacity.

Also in this release, the add_ prefix was removed from all circuit component methods, for example if previously `add_bs` was called then this can be replaced with `bs`. The old methods still remain but these will raise a deprecation warning when called, this will be removed in the next major release. There was also additional improvements to how data is stored within the circuit class.

Breaking Changes
--------------------
- Removed add_ prefix from main component functions and included deprecation warning for old methods.

Changelog
------------
- Added `qiskit_converter` function for moving from a gate-based qiskit circuit to Lightworks and docs for this.
- Reworked circuit spec to use data classes, improving consistency and reliability of data storage.
- Improved type hinting and checking across package.

1.4.1

This release expands on the interferometer module, adding a set of random distributions which can be assigned to quantities of the ErrorModel. There is support for creation of custom distribution objects with the Distribution abstract base class.

Also in this release, the usage of the numpy random generation module was adjusted to set seed of a generator per object instead of setting the global random seed. In some cases this may change the results from existing code, as the new rng produces a different set of values.

PR: 54

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.