Strawberryfields

Latest version: v0.23.0

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

Scan your dependencies

Page 4 of 5

0.11.1

Improvements

* Added the `circuit_spec` attribute to `BaseBackend` to denote which CircuitSpecs class should be used to validate programs for each backend [125](https://github.com/XanaduAI/strawberryfields/pull/125).

* Removed the `return_state` keyword argument from `LocalEngine.run()`. Now no state object is returned if `modes==[]`. [126](https://github.com/XanaduAI/strawberryfields/pull/126)

Bug fixes

* Fixed a typo in the boson sampling tutorial. [133](https://github.com/XanaduAI/strawberryfields/pull/133)

* Allows imported Blackbird programs to store `target` options as default run options. During eng.run, if no run options are provided as a keyword argument, the engine will fall back on the run options stored within the program.

This fixes a bug where shots specified in Blackbird scripts were not being passed to `eng.run`. [130](https://github.com/XanaduAI/strawberryfields/pull/130)

* Removes `ModuleNotFoundError` from the codebase, replacing all occurrences with `ImportError`. Since `ModuleNotFoundError` was only introduced in Python 3.6+, this fixes a bug where Strawberry Fields was not importable on Python 3.5 [124](https://github.com/XanaduAI/strawberryfields/pull/124).

* Updates the Chip0 template to use MeasureFock() | [0, 1, 2, 3], which will allow correct fock measurement behaviour when simulated on the Gaussian backend. [124](https://github.com/XanaduAI/strawberryfields/pull/124)

* Fixed a bug in the `GraphEmbed` op, which was not correctly determining when a unitary was the identity [128](https://github.com/XanaduAI/strawberryfields/pull/128).

0.11.0

This is a significant release, with breaking changes to how quantum programs are constructed and executed. For example, the following Strawberry Fields program, <= version 0.10:

python
eng, q = sf.Engine(2, hbar=0.5)

with eng:
Sgate(0.5) | q[0]
MeasureFock() | q[0]

state = eng.run("fock", cutoff_dim=5)
ket = state.ket()
print(q[0].val)


would now be written, in v0.11, as follows:

python

0.10.0

0.9

New features

- Added two new utility functions to extract a numerical representation of a circuit from an Engine object: `extract_unitary` and `extract_channel`.

- Added a LaTeX quantum circuit drawer, that outputs the engine queue or the applied operations as a qcircuit compatible circuit diagram.

- Added support for an alternative form of Clements decomposition, where the local phases occur at the end rather than in the middle of the beamsplitter array. This decomposition is more symmetric than the intermediate one, which could make it more robust. This form also makes it easier to implement a tensor-network simulation of linear optics.

- Adds the `GraphEmbed` quantum operation/decomposition to the Strawberry Fields frontend. This allows the embedding of an arbitrary (complex-valued) weighted adjacency matrix into a Gaussian boson sampler.

- Adds support for the Reck decomposition

- Added documentation to the Quantum Algorithms section on CV quantum neural networks

Improvements

- Test suite has been ported to pytest

- Linting improvements

- Made corrections to the Clements decomposition documentation and docstring, and fixed the Clements unit tests to ensure they are deterministic.

Bug fixes

- Fixed Bloch-Messiah bug arising when singular values were degenerate. Previously, the Bloch-Messiah decomposition did not return matrices in the canonical symplectic form if one or more of the Bloch-Messiah singular values were degenerate.

Contributors

This release contains contributions from (in alphabetical order):

Shahnawaz Ahmed, Thomas R. Bromley, Ish Dhand, Marcus Edwards, Christian Gogolin, Josh Izaac, Nathan Killoran, Filippo Miatto, Nicolás Quesada.

0.9.0

0.8

New features

- Updated the [Strawberry Fields gallery](https://strawberryfields.readthedocs.io/en/latest/gallery/gallery.html), featuring community-submitted content (tutorials, notebooks, repositories, blog posts, research papers, etc.) using Strawberry Fields

- Added the `operation` decorator, which allows commonly-used algorithms and subroutines to be declared in blackbird code as one-liner operations

- Added a `ThermalLossChannel` to the Strawberry Fields API (currently supported by the Gaussian backend)

- Added a `poly_quad_expectation` method to the `state` objects for Gaussian and Fock backends

Improvements

- New and improved tests

- Fixed typos in code/documentation

Contributors

This release contains contributions from:

Juan Leni, Arthur Pesah, Brianna Gopaul, Nicolás Quesada, Josh Izaac, and Nathan Killoran.

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.