Skip to content

Commit

Permalink
Increment version to 0.19.0 (#630)
Browse files Browse the repository at this point in the history
* bump version number

* update changelog

* add upload workflow

* add td3 to changelog

* pin blackbird

* Add Eli Bourassa contribution

* minor updates

* more minor updates

Co-authored-by: Sebastián Duque Mesa <[email protected]>
  • Loading branch information
thisac and sduquemesa authored Sep 23, 2021
1 parent b15c9ff commit 3c8b509
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 30 deletions.
60 changes: 32 additions & 28 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Release 0.19.0 (development release)
# Release 0.19.0 (current release)

<h3>New features since last release</h3>

* Compact decompositions as described in <https://arxiv.org/abs/2104.07561>,
(``rectangular_compact`` and ``triangular_compact``) are now available in
the ``sf.decompositions`` module, and as options in the ``Interferometer`` operation.
[(#584)](https://github.com/XanaduAI/strawberryfields/pull/584)
(``rectangular_compact`` and ``triangular_compact``) are now available in
the ``sf.decompositions`` module, and as options in the ``Interferometer`` operation.
[(#584)](https://github.com/XanaduAI/strawberryfields/pull/584)

This decomposition allows for lower depth photonic circuits in physical devices by applying two
independent phase shifts in parallel inside each Mach-Zehnder interferometer.
``rectangular_compact`` reduces the layers of phase shifters from 2N+1 to N+2
for an N mode interferometer when compared to e.g. ``rectangular_MZ``.
This decomposition allows for lower depth photonic circuits in physical devices by applying two
independent phase shifts in parallel inside each Mach-Zehnder interferometer.
``rectangular_compact`` reduces the layers of phase shifters from 2N+1 to N+2
for an N mode interferometer when compared to e.g. ``rectangular_MZ``.

Example:
Example:

```python
```python
import numpy as np
from strawberryfields import Program
from strawberryfields.ops import Interferometer
Expand All @@ -37,7 +37,7 @@
Uout = S[:M,:M] + 1j * S[M:,:M] # unitary transformation

print(np.allclose(U, Uout))
```
```

* A new compiler, ``GaussianMerge``, has been added. It is aimed at reducing calculation
overhead for non-Gaussian circuits by minimizing the amount of Gaussian operations
Expand Down Expand Up @@ -130,53 +130,58 @@
[-0.6708+8.2152e-17j 0.6708+0.0000e+00j]]) | (q[0], q[1])
```


<h3>Improvements</h3>

* Cleanup `backends/tfbackend/ops.py` to reduce line count, clarify function
* `backends/tfbackend/ops.py` is cleaned up to reduce line count, clarify function
similarity across backend ops, and replace `tensorflow.tensordot` with
broadcasting.
[(#567)](https://github.com/XanaduAI/strawberryfields/pull/567)

* Support is added for using a ``TDMProgram`` to construct time-domain circuits with Fock
measurements and multiple loops.
[(#601)](https://github.com/XanaduAI/strawberryfields/pull/601)

* `measure_threshold` in the `gaussian` backend now supports displaced Gaussian states.
[(#615)](https://github.com/XanaduAI/strawberryfields/pull/615)

* Speed improvements to ``gaussian_unitary`` compiler
* Speed improvements are addded to ``gaussian_unitary`` compiler.
[(#603)](https://github.com/XanaduAI/strawberryfields/pull/603)


* Added native support in the Fock backend for the MZgate.
* Adds native support in the Fock backend for the MZgate.
[(#610)](https://github.com/XanaduAI/strawberryfields/issues/610)

* `measure_threshold` is now supported in the `bosonic` backend.
[(#618)](https://github.com/XanaduAI/strawberryfields/pull/618)


<h3>Breaking Changes</h3>

<h3>Bug fixes</h3>

* Fixed an unexpected behaviour that can result in increasing memory usage due
* Fixes an unexpected behaviour that can result in increasing memory usage due
to ``sympy.lambdify`` caching too much data using ``linecache``.
[(#579)](https://github.com/XanaduAI/strawberryfields/pull/579)

* Keep symbolic expressions when converting a Strawberry Fields circuit to a Blackbird program
* Keeps symbolic expressions when converting a Strawberry Fields circuit to a Blackbird program
by storing them as `blackbird.RegRefTransforms` in the resulting Blackbird program.
[(#596)](https://github.com/XanaduAI/strawberryfields/pull/596)

* Fixed a bug in the validation step of `strawberryfields.tdm.TdmProgram.compile` which almost always
* Fixes a bug in the validation step of `strawberryfields.tdm.TdmProgram.compile` which almost always
used the wrong set of allowed gate parameter ranges to validate the parameters in a program.
[(#605)](https://github.com/XanaduAI/strawberryfields/pull/605)

* The correct samples are now returned when running a TDMProgram with several shots, where
* The correct samples are now returned when running a `TDMProgram` with several shots, where
`timebins % concurrent_modes != 0`.
[(#611)](https://github.com/XanaduAI/strawberryfields/pull/611)

* Fixes the formula used for sampling generaldyne outcomes in the gaussian backend.
[(#614)](https://github.com/XanaduAI/strawberryfields/pull/614)

* Measurement arguments are now stored as non-keyword arguments, instead of keyword arguments, in
the resulting Blackbird program when using the `io.to_blackbird()` converter function.
[(#622)](https://github.com/XanaduAI/strawberryfields/pull/622)

* Now factorials of numbers larger than 170 are calculated approximately and stored on a `float`.

* Factorials of numbers larger than 170 are now calculated using long integer arithmetic, using
the flag `exact=True` in `scipy.special.factorial`, when calling
`sf.apps.similarity.orbit_cardinality`.
[(#628)](https://github.com/XanaduAI/strawberryfields/pull/628)

<h3>Documentation</h3>
Expand All @@ -191,11 +196,10 @@

This release contains contributions from (in alphabetical order):

J. Eli Bourassa, Jake Bulmer, Sebastian Duque, Theodor Isacsson, Aaron Robertson, Jeremy Swinarton,
Antal Száva, Federico Rueda, Yuan Yao.

J. Eli Bourassa, Jake Bulmer, Sebastian Duque, Theodor Isacsson, Aaron Robertson, Jeremy Swinarton, Antal Száva, Federico Rueda, Yuan Yao.


# Release 0.18.0 (current release)
# Release 0.18.0

<h3>New features since last release</h3>

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Upload
on:
release:
types: [published]

jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Build and install Strawberry Fields
run: |
python -m pip install --upgrade pip wheel
python setup.py bdist_wheel
pip install dist/StrawberryFields*.whl
- name: Install test dependencies
run: |
pip install wheel pytest pytest-cov pytest-mock --upgrade
- name: Run tests
run: |
python -m pytest tests --tb=native
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI }}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sympy>=1.5
tensorflow>=2.0
tensorboard>=2.0
networkx>=2.0
git+https://github.com/XanaduAI/blackbird@master#egg=quantum-blackbird
quantum-blackbird==0.4.0
python-dateutil==2.8.0
thewalrus>=0.16.0
toml
Expand Down
2 changes: 1 addition & 1 deletion strawberryfields/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.19.0-dev"
__version__ = "0.19.0"

0 comments on commit 3c8b509

Please sign in to comment.