diff --git a/.circleci/config.yml b/.circleci/config.yml index aa8c26ba3..e8e2f107e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,7 +74,7 @@ jobs: docker: - image: circleci/python:3.6.12-stretch environment: - CIBW_SKIP: "pp* cp27-* cp34-* cp35-* cp36-* cp310-* *i686" + CIBW_BUILD: 'cp37-* cp38-* cp39-*' CIBW_BEFORE_BUILD_LINUX: pip install numpy==1.19.5 scipy cython CIBW_TEST_REQUIRES: numpy scipy pytest pytest-cov pytest-randomly CIBW_TEST_COMMAND: python -m pytest --randomly-seed=137 {project}/thewalrus @@ -107,7 +107,7 @@ jobs: macos: xcode: "12.3.0" environment: - CIBW_SKIP: "pp* cp27-* cp34-* cp35-* cp36-* cp310-* *i686" + CIBW_BUILD: 'cp37-* cp38-* cp39-*' CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET=10.9" CIBW_BEFORE_BUILD_MACOS: brew install gmp gcc libomp; pip install numpy==1.19.5 scipy cython diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 80621a3d3..fd775296e 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,47 +1,53 @@ -# Version 0.16.0-dev +# Version 0.16.0 ### New features -* Adds the function `hafnian_sparse` to compute sparse loop hafnians (pure python implementation). [#245](https://github.com/XanaduAI/thewalrus/pull/245) +* Adds the function `hafnian_sparse` to compute sparse loop hafnians (pure Python implementation). [#245](https://github.com/XanaduAI/thewalrus/pull/245) -* ``symplectic.squeezing`` function is now generalized to multiple modes of single mode squeezing [#249](https://github.com/XanaduAI/thewalrus/pull/249) +* The ``symplectic.squeezing`` function is now generalized to multiple modes of single mode squeezing. [#249](https://github.com/XanaduAI/thewalrus/pull/249) -* Adds a function ``symplectic.passive_transformation`` which allows for Gaussian states to be transformed by arbitrary non-unitary, non-square linear optical transformations [#249](https://github.com/XanaduAI/thewalrus/pull/249) +* Adds a function ``symplectic.passive_transformation`` which allows for Gaussian states to be transformed by arbitrary non-unitary, non-square linear optical transformations. [#249](https://github.com/XanaduAI/thewalrus/pull/249) -* ``torontonian_sample_state`` now can sample displaced Gaussian states [#248](https://github.com/XanaduAI/thewalrus/pull/248) +* The ``torontonian_sample_state`` function now can sample displaced Gaussian states. [#248](https://github.com/XanaduAI/thewalrus/pull/248) -* Adds the function `hafnian_banded` to calculate the hafnian of a banded matrix [#246](https://github.com/XanaduAI/thewalrus/pull/246) +* Adds the function `hafnian_banded` to calculate the hafnian of a banded matrix. [#246](https://github.com/XanaduAI/thewalrus/pull/246) -* Adds the functions `hermite_multidimensional_numba` and `grad_hermite_multidimensional_numba` to calculate renormalized multidimensional Hermite polynomials and its gradients using numba [#251](https://github.com/XanaduAI/thewalrus/pull/251) +* Adds the functions `hermite_multidimensional_numba` and `grad_hermite_multidimensional_numba` to calculate renormalized multidimensional Hermite polynomials and its gradients using numba. [#251](https://github.com/XanaduAI/thewalrus/pull/251) -* Adds the functions `mzgate` and `grad_mzgate` to calculate the Fock representation of the Mach-Zehnder gate and its gradients [#257](https://github.com/XanaduAI/thewalrus/pull/257) +* Adds the functions `mzgate` and `grad_mzgate` to calculate the Fock representation of the Mach-Zehnder gate and its gradients. [#257](https://github.com/XanaduAI/thewalrus/pull/257) -* Adds the ability to calculate n-body photon number distributions using the function `n_body_marginals` [#253](https://github.com/XanaduAI/thewalrus/pull/253) +* Adds the ability to calculate n-body photon number distributions using the function `n_body_marginals`. [#253](https://github.com/XanaduAI/thewalrus/pull/253) -* Adds the ability to calculate cumulants and arbitrary expectation values of products of powers of photon numbers with the functions `photon_number_cumulant` and `photon_number_moment` respectively -[#264](https://github.com/XanaduAI/thewalrus/pull/264) +* Adds the ability to calculate cumulants and arbitrary expectation values of products of powers of photon numbers with the functions `photon_number_cumulant` and `photon_number_moment` respectively. [#264](https://github.com/XanaduAI/thewalrus/pull/264) -* Adds support for calculating the permanent using the BBFG algorithm [#267](https://github.com/XanaduAI/thewalrus/pull/267) +* Adds support for calculating the permanent using the BBFG algorithm and changes this to the default method for calculating permanents. [#267](https://github.com/XanaduAI/thewalrus/pull/267) -* Adds the ability to calculate click cumulants in threshold detection with the function `click_cumulant` -[#264](https://github.com/XanaduAI/thewalrus/pull/274) +* Adds the ability to calculate click cumulants in threshold detection with the function `click_cumulant`. [#264](https://github.com/XanaduAI/thewalrus/pull/274) ### Improvements -* Speeds up the calculation of photon number variances/covariances [#244](https://github.com/XanaduAI/thewalrus/pull/244) +* Speeds up the calculation of photon number variances/covariances. [#244](https://github.com/XanaduAI/thewalrus/pull/244) + +* Updates documentation for the the `tor` function. [#265](https://github.com/XanaduAI/thewalrus/pull/265) + +* Numba methods for multidimensional hermite can now detect dtype automatically. [#271](https://github.com/XanaduAI/thewalrus/pull/271) ### Bug fixes -* Corrects bug in the function `photon_number_covar` that gave incorrect results when the covariance between two modes with finite displacements was calculated. +* Corrects bug in the function `photon_number_covar` that gave incorrect results when the covariance between two modes with finite displacements was calculated. [#264](https://github.com/XanaduAI/thewalrus/pull/264) * Fixes a bug in `setup.py` that would cause the build to fail when using miniforge for M1 macs. [#273](https://github.com/XanaduAI/thewalrus/pull/273) +* Updates the `samples.generate_hafnian_sample` function to renormalizing probabilities. [#250](https://github.com/XanaduAI/thewalrus/pull/250) + ### Breaking changes -* Torontonians and approximations to the hafnian for non-negative matrices are no longer calculated in C++ using the Eigen software library. - Instead, they are now calculated in pure Python using Numba. These changes have the nice result of making The Walrus compilable from source using only a C++ compiler. [#262](https://github.com/XanaduAI/thewalrus/pull/262) [#259](https://github.com/XanaduAI/thewalrus/pull/259). +* Torontonians and approximations to the hafnian for non-negative matrices are no longer calculated + in C++ using the Eigen software library. Instead, they are now calculated in pure Python using + Numba. These changes have the nice result of making The Walrus compilable from source using only a + C++ compiler. [#262](https://github.com/XanaduAI/thewalrus/pull/262) [#259](https://github.com/XanaduAI/thewalrus/pull/259). ### Contributors diff --git a/appveyor.yml b/appveyor.yml index c66c0bb38..be5bc2380 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ environment: APPVEYOR_SKIP_FINALIZE_ON_EXIT: true TEST_TIMEOUT: 1000 CIBW_BEFORE_BUILD: pip install numpy==1.19.5 scipy cython - CIBW_SKIP: "cp27-* cp33-* cp34-* cp35-* cp36-* *win32" + CIBW_BUILD: 'cp37-* cp38-* cp39-*' CIBW_TEST_REQUIRES: "numpy scipy pytest pytest-cov pytest-randomly" CIBW_TEST_COMMAND: "python -m pytest --randomly-seed=137 {project}/thewalrus" CIBW_BUILD_VERBOSITY: 3 diff --git a/thewalrus/_version.py b/thewalrus/_version.py index e51195a5a..e0cb08027 100644 --- a/thewalrus/_version.py +++ b/thewalrus/_version.py @@ -1,4 +1,4 @@ -# Copyright 2019 Xanadu Quantum Technologies Inc. +# Copyright 2019-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.16.0-dev" +__version__ = "0.16.0"