Recent Releases of The Walrus
The Walrus - Release 0.22.0
New features
- Implements the pre-Iwasawa and Iwasawa decompositions for symplectic matrices (#382).
Breaking changes
- Upgrades to
numpy2 (#398).
Improvements
Further simplifies the implementation of
decompositions.williamsonand corrects its docstring (#380).Further simplifies the implementation of
decompositions.blochmessiah(#381).
Bug fixes
Add the calculation method of
takagiwhen the matrix is diagonal. (#394)Add the lines for avoiding the comparison of np.ndarray and list. (#395)
Contributors
This release contains contributions from (in alphabetical order):
L.G. Helt (@heltluke), Will McCutcheon, Nicolas Quesada (@nquesada)
Scientific Software - Peer-reviewed
- Python
Published by heltluke 10 months ago
The Walrus - 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)
Scientific Software - Peer-reviewed
- Python
Published by sduquemesa about 2 years ago
The Walrus - 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,Amatfromgenerate_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)
Scientific Software - Peer-reviewed
- Python
Published by sduquemesa almost 3 years ago
The Walrus - 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
ltoris added which allowsthreshold_detector_probto act more consistently on displaced and zero-mean Gaussian states. #317New functions for threshold detection probabilities of Fock states, the Bristolian (brs) and the Unitary Bristolian (ubrs). #316
Entanglement measures
entanglement_entropyandlog_negativityfor bipartite Gaussian states are added to the quantum submodule. #332New functions,
recursive_hafnianandsolveadded in the_hafnianmodule. #325New 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
ltorfunction withinthreshold_detection_prob#317numba_tornow can benefit from numba parallelization #317Recursive 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
Scientific Software - Peer-reviewed
- Python
Published by thisac almost 4 years ago
The Walrus - 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
python
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
Scientific Software - Peer-reviewed
- Python
Published by thisac about 4 years ago
The Walrus - Release 0.17.0
Improvements
Python installation no longer requires
repoze.lru. #293Multidimensional 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
Scientific Software - Peer-reviewed
- Python
Published by thisac over 4 years ago
The Walrus - Release 0.16.2
Bug fixes
hermite_multidimensional_numbacan now handle a cutoff of typenp.ndarraywithshape=[]. #283
Contributors
This release contains contributions from (in alphabetical order):
Filippo Miatto
Scientific Software - Peer-reviewed
- Python
Published by thisac over 4 years ago
The Walrus - Release 0.16.1
Improvements
- Faster implementation of
hermite_multidimensional_numbaandhermite_multidimensional_numba_grad. #280
Bug fixes
Updates the
samples.generate_torontonian_samplefunction to ensure probabilities are normalized. #250Pins Numba to version
<0.54to 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.
Scientific Software - Peer-reviewed
- Python
Published by thisac over 4 years ago
The Walrus - Release 0.16.0
New features
Adds the function
hafnian_sparseto compute sparse loop hafnians (pure Python implementation). #245The
symplectic.squeezingfunction is now generalized to multiple modes of single mode squeezing. #249Adds a function
symplectic.passive_transformationwhich allows for Gaussian states to be transformed by arbitrary non-unitary, non-square linear optical transformations. #249The
torontonian_sample_statefunction can now sample displaced Gaussian states. #248Adds the function
hafnian_bandedto calculate the hafnian of a banded matrix. #246Adds the functions
hermite_multidimensional_numbaandgrad_hermite_multidimensional_numbato calculate renormalized multidimensional Hermite polynomials and its gradients using Numba. #251Adds the functions
mzgateandgrad_mzgateto calculate the Fock representation of the Mach-Zehnder gate and its gradients. #257Adds the ability to calculate n-body photon number distributions using the function
n_body_marginals. #253Adds the ability to calculate cumulants and arbitrary expectation values of products of powers of photon numbers with the functions
photon_number_cumulantandphoton_number_momentrespectively. #264Adds 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
torfunction. #265Numba methods for multidimensional hermite can now detect dtype automatically. #271
Bug fixes
Corrects bug in the function
photon_number_covarthat gave incorrect results when the covariance between two modes with finite displacements was calculated. #264Fixes a bug in
setup.pythat would cause the build to fail when using miniforge for M1 macs. #273Updates the
samples.generate_hafnian_samplefunction 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
Scientific Software - Peer-reviewed
- Python
Published by thisac over 4 years ago
The Walrus - 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
Scientific Software - Peer-reviewed
- Python
Published by josh146 almost 5 years ago
The Walrus - Version 0.15.0
New features
Adds the function
random_banded_interferometerto generate unitary matrices with a given bandwidth. #208Adds the function
tvd_cutoff_boundsto calculate bounds in the total variation distance between a Fock-truncated and an ideal GBS distribution. #210Adds function for calculating threshold detection probabilities for Gaussian states with displacement. #220
Adds new functions
total_photon_number_distributionandcharacteristic_functionto study properties of the total photon number distribution of akidentical lossy squeezers. #230Adds new functions
xxpp_to_xpxpandxpxp_to_xxppin thesymplecticmodule 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.pyto avoid issues withCFLAGS. #229The
fidelityfunction inquantum/gaussian_checks.pyis rewritten to add clarity. #226Simplifies logic of
normal_ordered_expectationby removing mutually cancellingnp.conj. #228
Bug fixes
Removes unnecessary
np.real_if_closestatements inquantum/fock_tensors.pycausing theprobabilitiesto not be normalized. #215Fixes 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
Scientific Software - Peer-reviewed
- Python
Published by thisac almost 5 years ago
The Walrus - Version 0.14.0
New features
Adds the function
find_classical_subsystemthat tries to find a subset of the modes with a classical covariance matrix. #193Adds the functions
mean_number_of_clicksandvariance_number_of_clicksthat calculate the first and second statistical moments of the total number of clicks in a Gaussian state centered at the origin. #195Adds the module
decompositionswith the functionwilliamsonto find the Williamson decomposition of an even-size positive-semidefinite matrix. #200Adds the
loop_hafnian_quadfunction 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
Improvements
Introduces a new faster and significantly more accurate algorithm to calculate power traces allowing to speed up the calculation of loop hafnians #199
The
quantummodule has been refactored and organized into sub-modules. Several functions have been renamed, while the old names are being deprecated. #197Adds support for C++14 #202
pytest-randomlyis added to the test suite to improve testing and avoid stochastically failing tests. #205Modifies the function
input_validationto usenp.allclosefor checking the symmetry of the input matrices. #206Modifies the function
_hafnianto calculate efficiently loop hafnians of diagonal matrices. #206
Breaking changes
Removes the redundant function
normal_ordered_complex_cov. #194Renames the function
mean_number_of_clicksto bemean_number_of_click_graph. #195
Contributors
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Nicolas Quesada, Trevor Vincent
Scientific Software - Peer-reviewed
- Python
Published by thisac over 5 years ago
The Walrus - Version 0.13.0
New features
Adds a new algorithm for hafnians of matrices with low rank. #166
Adds a function to calculate the fidelity between two Gaussian quantum states. #169
Adds a new module,
thewalrus.random, to generate random unitary, symplectic and covariance matrices. #169Adds new functions
normal_ordered_expectation,photon_number_expectationandphoton_number_squared_expectationinthewalrus.quantumto calculate expectation values of products of normal ordered expressions and number operators and their squares. #175Adds the function
hafnian_sample_graph_rank_oneinthewalrus.samplesto sample from rank-one adjacency matrices. #174
Improvements
Adds parallelization support using Dask for
quantum.probabilities. #161Removes support for Python 3.5. #163
Changes in the interface and speed ups in the functions in the
thewalrus.fock_gradientsmodule. #164Improves documentation of the multidimensional Hermite polynomials. #166
Improves speed of
fock_tensorwhen the symplectic matrix passed is also orthogonal. #166
Bug fixes
Fixes Numba decorated functions not rendering properly in the documentation. #173
Solves the issue with
quantumandsamplesnot being rendered in the documentation or the TOC. #173Fix bug where quantum and samples were not showing up in the documentation. #182
Breaking changes
- The functions in
thewalrus.fock_gradientsare now separated into functions for the gradients and the gates. Moreover, they are renamed, for instanceDgatebecomesdisplacementand its gradient is nowgrad_displacement. #164
Contributors
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Josh Izaac, Filippo Miatto, Nicolas Quesada
Scientific Software - Peer-reviewed
- Python
Published by thisac over 5 years ago
The Walrus - Version 0.13.0rc1
New features
Adds a new algorithm for hafnians of matrices with low rank. #166
Adds a function to calculate the fidelity between two Gaussian quantum states. #169
Adds a new module,
thewalrus.random, to generate random unitary, symplectic and covariance matrices. #169Adds new functions
normal_ordered_expectation,photon_number_expectationandphoton_number_squared_expectationinthewalrus.quantumto calculate expectation values of products of normal ordered expressions and number operators and their squares. #175Adds the function
hafnian_sample_graph_rank_oneinthewalrus.samplesto sample from rank-one adjacency matrices. #174
Improvements
Adds parallelization support using Dask for
quantum.probabilities. #161Removes support for Python 3.5. #163
Changes in the interface and speed ups in the functions in the
thewalrus.fock_gradientsmodule. #164Improves documentation of the multidimensional Hermite polynomials. #166
Improves speed of
fock_tensorwhen the symplectic matrix passed is also orthogonal. #166
Bug fixes
Fixes Numba decorated functions not rendering properly in the documentation. #173
Solves the issue with
quantumandsamplesnot being rendered in the documentation or the TOC. #173
Breaking changes
- The functions in
thewalrus.fock_gradientsare now separated into functions for the gradients and the gates. Moreover, they are renamed, for instanceDgatebecomesdisplacementand its gradient is nowgrad_displacement. #164
Contributors
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Filippo Miatto, Nicolas Quesada
Scientific Software - Peer-reviewed
- Python
Published by thisac over 5 years ago
The Walrus - Version 0.12.0
New features
Adds the ability to calculate the mean number of photons in a given mode of a Gaussian state. #148
Adds the ability to calculate the photon number distribution of a pure or mixed state using
generate_probabilities. #152Allows to update the photon number distribution when undergoing loss by using
update_probabilities_with_loss. #152Allows to update the photon number distribution when undergoing noise
update_probabilities_with_noise. #153Adds a brute force sampler
photon_number_samplerthat given a (multi-)mode photon number distribution generates photon number samples. #152Adds the ability to perform the Autonne-Takagi decomposition of a complex-symmetric matrix using
autonnefrom thesymplecticmodule. #154
Improvements
Improves the efficiency of Hermite polynomial calculation in
hermite_multidimensional.hpp. #141Implements parallelization with Dask for sampling from the Hafnian/Torontonian of a Gaussian state. #145
Bug fixes
- Corrects the issue with hbar taking a default value when calling
state_vector,pure_state_amplitude, anddensity_matrix_element#149
Contributors
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Nicolas Quesada, Kieran Wilkinson
Scientific Software - Peer-reviewed
- Python
Published by thisac almost 6 years ago
The Walrus - Version 0.11.0
New features
Introduces the renormalized hermite polynomials. These new polynomials improve the speed and accuracy of
thewalrus.quantum.state_vectorandthewalrus.quantum.density_matrixand alsohafnian_batchedandhermite_multimensionalwhen called with the optional argumentrenorm=True. #108Adds functions for calculating the covariance for the photon number distribution of a Gaussian state including a function for the full covariance matrix. #137
Adds support for Python 3.8. #138
Improvements
Updates the reference that should be used when citing The Walrus. #102
Updates and improves the speed and accuracy of
thewalrus.quantum.fock_tensor. #107Add OpenMP support to the repeated moment hafnian code. #120
Improves speed of the functions in
hermite_multidimensional.hpp. #123Improves speed of the functions in
thewalrus.fock_gradientsby doing calls to optimized functions inhermite_multidimensional.hpp. #123Further improves speed of the functions
thewalrus.fock_gradientsby writing explicit recursion relations for a given number of modes. #129Adds the functions
find_scaling_adjacency_matrix_torontonianandmean_number_of_clicksthat allow to fix the mean number of clicks when doing threshold detection sampling and allow to calculate the mean of clicks generated by a scaled adjacency matrix. #136
Bug fixes
Corrects typos in the random number generation in the C++ unit tests. #118
Corrects typos in describing the repeated-moment algorithm of Kan in the documentation. #104
Removes paper.{md,pdf,bib} from the repository now that The Walrus paper is published in Journal of Open Source Software #106
Updates the S2gate to use the correct definition. #130
Corrects the issue with hbar taking a default value when calculating mu in the density matrix function #134
Contributors
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Josh Izaac, Filippo Miatto, Nicolas Quesada, Trevor Vincent, Kieran Wilkinson
Scientific Software - Peer-reviewed
- Python
Published by thisac almost 6 years ago
The Walrus - Version 0.10.1
Small release to add a DOI on Zenodo.
Scientific Software - Peer-reviewed
- Python
Published by josh146 about 6 years ago
The Walrus - Version 0.10
New features
Adds the function
thewalrus.quantum.fock_tensorthat returns the Fock space tensor corresponding to a Symplectic transformation in phase space. #90Adds the
thewalrus.fock_gradientsmodule which provides the Fock representation of a set of continuous-variable universal gates in the Fock representation and their gradients. #96
Improvements
Unifies return values of all symplectic gates in the
thewalrus.symplecticmodule. #81Removes unnecessary citations in the tutorials. #92
Improves the efficiency of the multidimensional Hermite polynomials implementation and simplifies a number of derived functions. #93
Bug fixes
- Fixes a bug in the calculation of the state vector in
thewalrus.quantum.state_vector. This bug was found and fixed while implementingthewalrus.quantum.fock_tensor. #90
Contributors
This release contains contributions from (in alphabetical order):
Josh Izaac, Nicolas Quesada
Scientific Software - Peer-reviewed
- Python
Published by josh146 about 6 years ago
The Walrus - Version 0.9.0
Version 0.9.0
New features
- Adds a symplectic module
symplecticwhich allows easy access to symplectic transformations and covariance matrices of Gaussian states. #78
Improvements
- Adds a quick reference section in the documentation. #75
Bug fixes
- Solves issue #70 related to the index ordering in
thewalrus.quantum.density_matrix.
Contributors
This release contains contributions from (in alphabetical order):
Josh Izaac, Nicolas Quesada
Scientific Software - Peer-reviewed
- Python
Published by nquesada over 6 years ago
The Walrus - Version 0.8.0
Version 0.8.0
New features
Adds classical sampling of permanents of positive definite matrices in
csamples. #61The Walrus gallery with examples of nongaussian state preparations that can be studied using the functions from the
quantummodule. #55
Improvements
- Updates the bibliography of the documentation with recently published articles. #51
Bug fixes
Important bugfix in
quantum. This bug was detected by running the tests intest_integration. #48Corrects the Makefile so that it uses the environment variable pointing to Eigen (if available). #58
Removes any reference to Fortran in the Makefile. #58
Contributors
This release contains contributions from (in alphabetical order):
Luke Helt, Josh Izaac, Soran Jahangiri, Nicolas Quesada, Guillaume Thekkadath
Scientific Software - Peer-reviewed
- Python
Published by nquesada over 6 years ago
The Walrus - Version 0.7.0
New features
Hafnian library has been renamed to The Walrus, and the low-level libhafnian C++ library renamed to
libwalrus. #34Added a seed function
thewalrus.samples.seed, in order to make the sampling algorithms deterministic for testing purposes. #29Added support for the batched hafnian;
hafnian_batched(in Python) andlibwalrus::hermite_multidimensional_cpp(in C++). This is a newly added algorithm that allows a batch of photon number statistics to be computed for a given quantum Gaussian state. #21Adds the ability to sample from Gaussian states with finite means. #25
Improvements
Permanent Fortran code was ported to C++, with improvements including support for quadruple precision and summation using the
fsumalgorithm. #20Reorganization of the repository structure; C++ source code folder has been renamed from
srctoinclude, C++ tests have been moved into their own top-level directorytests, and thehafnian/libsubpackage has been removed in favour of a top-levelthewalrus/libwalrus.somodule. #34Added additional references to the bibliography #30
Adds documentation related to permanents, sampling states with nonzero displacement, sampling of classical states, and multidimensional Hermite polynomials and batched hafnians. #27
Simplifies the hafnian sampling functions #25
Test improvements, including replacing custom tolerance checks with
np.allclose(). #23
Bug fixes
Contributors
This release contains contributions from (in alphabetical order):
Brajesh Gupt, Josh Izaac, Nicolas Quesada
Scientific Software - Peer-reviewed
- Python
Published by josh146 over 6 years ago
The Walrus - Version 0.6.1
Summary of changes
New features
Added two new sampling functions in
hafnian.sample, allowing efficient sampling from classical Gaussian states:hafnian_sample_classical_statetorontonian_sample_classical_state
Added functions to calculate the probability amplitudes directly for pure states:
pure_state_amplitudestate_vector
Added utility functions to check the validity of covariance matrices:
is_valid_covis_pure_covis_classical_cov
Improvements
- All functions in the
quantumpackage now take as arguments xp-covariance matrices and vectors of means for consistency.
Contributors
This release contains contributions from (in alphabetical order):
Nicolas Quesada
Scientific Software - Peer-reviewed
- Python
Published by josh146 over 6 years ago
The Walrus - Version 0.6.0
Summary of changes
New features
Added a new sampling submodule
hafnian.sample, allowing sampling from the underlying hafnian/Torontonian distribution of graphs/Gaussian statesDocumentation overhaul: now contains some of the best and most up-to-date information about hafnians, loop hafnians, and Torontonians
C++ library has been significantly improved, tested, and refactored
Improvements
Ported the
hafnian_approx.F90Fortran file to C++The Torontonian function is now parallelized via OpenMP
Tests and the C++ header library have been refactored
Addition of new C++ tests using Googletest
C++ library is now documented via Doxygen; this is integrated directly into Sphinx
Contributors
This release contains contributions from (in alphabetical order):
Brajesh Gupt, Josh Izaac, Nicolas Quesada
Scientific Software - Peer-reviewed
- Python
Published by josh146 over 6 years ago
The Walrus - Version 0.1.2
Bug fixes
- Solve type conflict preventing the pip wheel to build correctly (see #4).
Contributors
@emaballarin
Scientific Software - Peer-reviewed
- Python
Published by josh146 over 7 years ago
The Walrus - Version 0.1.1
New features
- Odd-dimensioned matrices no longer raise an error, as the loop hafnian is well defined for matrices with odd dimensions. The non-loop hafnian will now return
0for matrices with odd-dimensions.
Scientific Software - Peer-reviewed
- Python
Published by josh146 over 7 years ago
The Walrus - Working Cythonized hafnian library
Scientific Software - Peer-reviewed
- Python
Published by josh146 over 7 years ago