Thewalrus

Latest version: v0.21.0

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

Scan your dependencies

Page 2 of 5

0.16.1

Improvements

* Faster implementation of `hermite_multidimensional_numba` and `hermite_multidimensional_numba_grad`. [280](https://github.com/XanaduAI/thewalrus/pull/280)

Bug fixes

* Updates the `samples.generate_torontonian_sample` function to ensure probabilities are normalized. [250](https://github.com/XanaduAI/thewalrus/pull/250)

* Pins Numba to version `<0.54` to avoid binary imcompatibilities with the 1.21 release of NumPy. [250](https://github.com/XanaduAI/thewalrus/pull/250)

Contributors

This release contains contributions from (in alphabetical order):

Josh Izaac, Filippo Miatto, Nicolas Quesada.

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)

* 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)

* The ``torontonian_sample_state`` function can now 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 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 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 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)

Improvements

* 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. [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 renormalize 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).

Contributors

This release contains contributions from (in alphabetical order):

Ali Asadi, Jake Bulmer, Timjan Kalajdzievski, Filippo Miatto, Nicolas Quesada, Yuan Yao

0.15.1

Bug fixes

* Builds The Walrus binaries against an older version of NumPy, to avoid a breaking ABI change in NumPy 1.20. [240](https://github.com/XanaduAI/thewalrus/pull/240)

Contributors

This release contains contributions from (in alphabetical order):

Josh Izaac

0.15.0

New features

* Adds the function `random_banded_interferometer` to generate unitary matrices with a given bandwidth. [208](https://github.com/XanaduAI/thewalrus/pull/208)

* Adds the function `tvd_cutoff_bounds` to calculate bounds in the total variation distance between a Fock-truncated and an ideal GBS distribution. [210](https://github.com/XanaduAI/thewalrus/pull/210)

* Adds function for calculating threshold detection probabilities for Gaussian states with displacement. [220](https://github.com/XanaduAI/thewalrus/pull/220)

* Adds new functions `total_photon_number_distribution` and `characteristic_function` to study properties of the total photon number distribution of a `k` identical lossy squeezers. [230](https://github.com/XanaduAI/thewalrus/pull/230)

* Adds new functions `xxpp_to_xpxp` and `xpxp_to_xxpp` in the `symplectic` module to swap the ordering of the quadrature operators in vectors and matrices. [237](https://github.com/XanaduAI/thewalrus/pull/237/)


Improvements

* The hafnians and loop hafnians of diagonal matrices are now calculated in polynomial time. [212](https://github.com/XanaduAI/thewalrus/pull/212)

* Refactors `setup.py` to avoid issues with `CFLAGS`. [229](https://github.com/XanaduAI/thewalrus/pull/229)

* The `fidelity` function in `quantum/gaussian_checks.py` is rewritten to add clarity. [226](https://github.com/XanaduAI/thewalrus/pull/226)

* Simplifies logic of `normal_ordered_expectation` by removing mutually cancelling `np.conj`. [228](https://github.com/XanaduAI/thewalrus/pull/228)

Bug fixes

* Removes unnecessary `np.real_if_close` statements in `quantum/fock_tensors.py` causing the `probabilities` to not be normalized. [215](https://github.com/XanaduAI/thewalrus/pull/215)

* Fixes the prefactor in `pure_state_amplitude`. [231](https://github.com/XanaduAI/thewalrus/pull/231)

Contributors

This release contains contributions from (in alphabetical order):

Jack Brown, Jake Bulmer, Rachel Chadwick, Stefano Paesani, Nicolas Quesada

0.14.0

New features

* Adds the function `find_classical_subsystem` that tries to find a subset of the modes with a classical covariance matrix. [193](https://github.com/XanaduAI/thewalrus/pull/193)

* Adds the functions `mean_number_of_clicks` and `variance_number_of_clicks` that calculate the first and second statistical moments of the total number of clicks in a Gaussian state centered at the origin. [195](https://github.com/XanaduAI/thewalrus/pull/195)

* Adds the module `decompositions` with the function `williamson` to find the Williamson decomposition of an even-size positive-semidefinite matrix. [200](https://github.com/XanaduAI/thewalrus/pull/200)

* Adds the `loop_hafnian_quad` function to the Python interface for converting double precision matrices into quad precision, doing the calculations in quad precision, and then return the result as a double. [201](https://github.com/XanaduAI/thewalrus/pull/201)

Improvements

* Introduces a new faster and significantly more accurate algorithm to calculate power traces allowing to speed up the calculation of loop hafnians [199](https://github.com/XanaduAI/thewalrus/pull/199)

* The `quantum` module has been refactored and organized into sub-modules. Several functions have been renamed, while the old names are being deprecated. [197](https://github.com/XanaduAI/thewalrus/pull/197)

* Adds support for C++14 [202](https://github.com/XanaduAI/thewalrus/pull/202)

* `pytest-randomly` is added to the test suite to improve testing and avoid stochastically failing tests. [205](https://github.com/XanaduAI/thewalrus/pull/205)

* Modifies the function `input_validation` to use `np.allclose` for checking the symmetry of the input matrices. [206](https://github.com/XanaduAI/thewalrus/pull/205)

* Modifies the function `_hafnian` to calculate efficiently loop hafnians of diagonal matrices. [206](https://github.com/XanaduAI/thewalrus/pull/205)

Breaking changes

* Removes the redundant function `normal_ordered_complex_cov`. [194](https://github.com/XanaduAI/thewalrus/pull/194)

* Renames the function `mean_number_of_clicks` to be `mean_number_of_click_graph`. [195](https://github.com/XanaduAI/thewalrus/pull/195)

Contributors

This release contains contributions from (in alphabetical order):

Theodor Isacsson, Nicolas Quesada, Trevor Vincent

0.13.0

New features

* Adds a new algorithm for hafnians of matrices with low rank. [166](https://github.com/XanaduAI/thewalrus/pull/166)

* Adds a function to calculate the fidelity between two Gaussian quantum states. [169](https://github.com/XanaduAI/thewalrus/pull/169)

* Adds a new module, `thewalrus.random`, to generate random unitary, symplectic and covariance matrices. [169](https://github.com/XanaduAI/thewalrus/pull/169)

* Adds new functions `normal_ordered_expectation`, `photon_number_expectation` and `photon_number_squared_expectation` in `thewalrus.quantum` to calculate expectation values of products of normal ordered expressions and number operators and their squares. [175](https://github.com/XanaduAI/thewalrus/pull/175)

* Adds the function `hafnian_sample_graph_rank_one` in `thewalrus.samples` to sample from rank-one adjacency matrices. [174](https://github.com/XanaduAI/thewalrus/pull/174)

Improvements

* Adds parallelization support using Dask for `quantum.probabilities`. [161](https://github.com/XanaduAI/thewalrus/pull/161)

* Removes support for Python 3.5. [163](https://github.com/XanaduAI/thewalrus/pull/163)

* Changes in the interface and speed ups in the functions in the `thewalrus.fock_gradients` module. [164](https://github.com/XanaduAI/thewalrus/pull/164/files)

* Improves documentation of the multidimensional Hermite polynomials. [166](https://github.com/XanaduAI/thewalrus/pull/166)

* Improves speed of `fock_tensor` when the symplectic matrix passed is also orthogonal. [166](https://github.com/XanaduAI/thewalrus/pull/166)

Bug fixes

* Fixes Numba decorated functions not rendering properly in the documentation. [173](https://github.com/XanaduAI/thewalrus/pull/173)

* Solves the issue with `quantum` and `samples` not being rendered in the documentation or the TOC. [173](https://github.com/XanaduAI/thewalrus/pull/173)

* Fix bug where quantum and samples were not showing up in the documentation. [182](https://github.com/XanaduAI/thewalrus/pull/182)

Breaking changes

* The functions in `thewalrus.fock_gradients` are now separated into functions for the gradients and the gates. Moreover, they are renamed, for instance `Dgate` becomes `displacement` and its gradient is now `grad_displacement`. [164](https://github.com/XanaduAI/thewalrus/pull/164/files)

Contributors

This release contains contributions from (in alphabetical order):

Theodor Isacsson, Josh Izaac, Filippo Miatto, Nicolas Quesada

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.