Releases: XanaduAI/thewalrus
Release 0.21.0
New features
Improvements
-
Tighten power-trace bound of odd loop Hafnian. (#362)
-
Simplifies the internal working of Bloch-Messiah decomposition (#363).
-
Simplifies the internal working of Williamson decomposition (#366).
-
Improves the handling of an edge case in Takagi (#373).
-
Adds extra tests for the Takagi decomposition (#377)
Contributors
This release contains contributions from (in alphabetical order):
Yanic Cardin (@yaniccd), Gregory Morse (@GregoryMorse), Nicolas Quesada (@nquesada)
Release 0.20.0
New features
- Implementation of gaussian boson sampling and gaussian boson sampling with threshold detectors. (#343)
- New function to produce Bloch-Messiah decomposition of symplectic matrices. (#352)
Improvements
- Added function to extend single mode symplectic to act on multiple modes. (#347)
- Added function to compute grouped (total) click probabilities for GBS setups using threshold detectors. The function uses the positive P-distribution simulation method of Drummond et al.. (#348)
Bug fixes
- Remove redundant call of
Qmat
,Amat
fromgenerate_hafnian_sample
. (#343)
Documentation
- The centralized Xanadu Sphinx Theme is now used to style the Sphinx documentation. (#341)
Contributors
This release contains contributions from (in alphabetical order):
Mikhail Andrenkov (@Mandrenkov), Sebastián Duque (@sduquemesa), Jacob Hastrup (@JacobHast), Antonín Hoskovec (@thonic), Martin Houde (@MHoude2), Benjamin Lanthier (@benjaminlanthier), Dominic Leclerc (@dleclerc33), Filippo Miatto (@ziofil), Will McCutcheon, Brandon Turcotte (@brandonpolymtl), Jiaqi Zhao (@JQZ1111)
Release 0.19.0
New features
-
New functions for calculating properties of distinguishable squeezed states of light having passed through an interferometer. #326
-
New function
ltor
is added which allowsthreshold_detector_prob
to act more consistently on displaced and zero-mean Gaussian states. #317 -
New functions for threshold detection probabilities of Fock states, the Bristolian (brs) and the Unitary Bristolian (ubrs). #316
-
Entanglement measures
entanglement_entropy
andlog_negativity
for bipartite Gaussian states are added to the quantum submodule. #332 -
New functions,
recursive_hafnian
andsolve
added in the_hafnian
module. #325 -
New function to check if a matrix is symplectic
is_symplectic
. #334. -
Adds support for Python 3.10. #337
Improvements
-
Update methods for calculating threshold detector probabilities of Gaussian states, now using
ltor
function withinthreshold_detection_prob
#317 -
numba_tor
now can benefit from numba parallelization #317 -
Recursive Torontonian added for faster computation based on paper "Polynomial speedup in Torontonian calculation by a scalable recursive algorithm" by Ágoston Kaposi, Zoltán Kolarovszki, Tamás Kozsik, Zoltán Zimborás, and Péter Rakyta. #321
-
Recursive Loop Torontonian added for faster computation based on combining recursive Torontonian improvement and new loop Torontonian feature. #332
-
Hafnians of odd-sized matrices are calculated roughly twice as fast. #329
-
The new Hafnian functions now use the Labudde method to calculate power traces instead of using diagonalization. #333
Bug fixes
- Permanent algorithms handle 0x0 cases correctly. #320
Contributors
This release contains contributions from (in alphabetical order):
Jake Bulmer, Luke Helt, Martin Houde, Theodor Isacsson, Benjamin Lanthier, Fabian Laudenbach, Dominic Leclerc, Gregory Morse, Nicolas Quesada, Brandon Turcotte, Jiaqi Zhao
Release 0.18.0
New features
- Python module for the La Budde method of computing characteristic polynomials. #304
Improvements
-
Permanent algorithms are implemented in Python using Numba just-in-time compilation. #300
-
Hafnian algorithms are implemented in Python using Numba just-in-time compilation. #311
-
Documentation is updated to include the characteristic polynomials and decompositions modules. #312
Bug fixes
-
Makes modules reachable via the global namespace, instead of requiring importing the modules explicitly. #312
import thewalrus as tw tw.samples.generate_torontonian_sample
Breaking Changes
- The Walrus is no longer dependent on C++, and all C++-related code and documentation is removed. Instead, all code has been ported to Python using just-in-time compilation to improve performance. #311
Contributors
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Benjamin Lanthier, Dominic Leclerc, Nicolas Quesada, Brandon Turcotte, Trevor Vincent, Jiaqi Zhao
Release 0.17.0
Improvements
-
Python installation no longer requires
repoze.lru
. #293 -
Multidimensional Hermite polynomials are now implemented in Numba, hence reducing the C++ dependencies of The Walrus. #295
-
Updates missing figures in the "Basics of Hafnians and Loop Hafnians" documentation. #288
Contributors
This release contains contributions from (in alphabetical order):
Mikhail Andrenkov, Sebastián Duque
Release 0.16.2
Bug fixes
hermite_multidimensional_numba
can now handle a cutoff of typenp.ndarray
withshape=[]
. #283
Contributors
This release contains contributions from (in alphabetical order):
Filippo Miatto
Release 0.16.1
Improvements
- Faster implementation of
hermite_multidimensional_numba
andhermite_multidimensional_numba_grad
. #280
Bug fixes
-
Updates the
samples.generate_torontonian_sample
function to ensure probabilities are normalized. #250 -
Pins Numba to version
<0.54
to avoid binary imcompatibilities with the 1.21 release of NumPy. #250
Contributors
This release contains contributions from (in alphabetical order):
Josh Izaac, Filippo Miatto, Nicolas Quesada.
Release 0.16.0
New features
-
Adds the function
hafnian_sparse
to compute sparse loop hafnians (pure Python implementation). #245 -
The
symplectic.squeezing
function is now generalized to multiple modes of single mode squeezing. #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 -
The
torontonian_sample_state
function can now sample displaced Gaussian states. #248 -
Adds the function
hafnian_banded
to calculate the hafnian of a banded matrix. #246 -
Adds the functions
hermite_multidimensional_numba
andgrad_hermite_multidimensional_numba
to calculate renormalized multidimensional Hermite polynomials and its gradients using Numba. #251 -
Adds the functions
mzgate
andgrad_mzgate
to calculate the Fock representation of the Mach-Zehnder gate and its gradients. #257 -
Adds the ability to calculate n-body photon number distributions using the function
n_body_marginals
. #253 -
Adds the ability to calculate cumulants and arbitrary expectation values of products of powers of photon numbers with the functions
photon_number_cumulant
andphoton_number_moment
respectively. #264 -
Adds support for calculating the permanent using the BBFG algorithm and changes this to the default method for calculating permanents. #267
-
Adds the ability to calculate click cumulants in threshold detection with the function
click_cumulant
. #264
Improvements
-
Speeds up the calculation of photon number variances/covariances. #244
-
Updates documentation for the the
tor
function. #265 -
Numba methods for multidimensional hermite can now detect dtype automatically. #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 -
Fixes a bug in
setup.py
that would cause the build to fail when using miniforge for M1 macs. #273 -
Updates the
samples.generate_hafnian_sample
function to renormalize probabilities. #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 #259.
Contributors
This release contains contributions from (in alphabetical order):
Ali Asadi, Jake Bulmer, Timjan Kalajdzievski, Filippo Miatto, Nicolas Quesada, Yuan Yao
Release 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
Contributors
This release contains contributions from (in alphabetical order):
Josh Izaac
Version 0.15.0
New features
-
Adds the function
random_banded_interferometer
to generate unitary matrices with a given bandwidth. #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 -
Adds function for calculating threshold detection probabilities for Gaussian states with displacement. #220
-
Adds new functions
total_photon_number_distribution
andcharacteristic_function
to study properties of the total photon number distribution of ak
identical lossy squeezers. #230 -
Adds new functions
xxpp_to_xpxp
andxpxp_to_xxpp
in thesymplectic
module to swap the ordering of the quadrature operators in vectors and matrices. #237
Improvements
-
The hafnians and loop hafnians of diagonal matrices are now calculated in polynomial time. #212
-
Refactors
setup.py
to avoid issues withCFLAGS
. #229 -
The
fidelity
function inquantum/gaussian_checks.py
is rewritten to add clarity. #226 -
Simplifies logic of
normal_ordered_expectation
by removing mutually cancellingnp.conj
. #228
Bug fixes
-
Removes unnecessary
np.real_if_close
statements inquantum/fock_tensors.py
causing theprobabilities
to not be normalized. #215 -
Fixes the prefactor in
pure_state_amplitude
. #231
Contributors
This release contains contributions from (in alphabetical order):
Jack Brown, Jake Bulmer, Rachel Chadwick, Stefano Paesani, Nicolas Quesada